/* One URL and data model, with a simpler phone presentation. Desktop rules remain in styles.css. */
.mobile-only,.site-menu-toggle,.mobile-menu-feedback,.mobile-filter-done,.mobile-cell-label{display:none}
.mobile-cell-value{display:contents}
@media(max-width:900px){.mobile-filter-done{display:block;min-height:44px;margin-top:12px}.filter-panel{z-index:70}.filter-backdrop{z-index:65}}
@media(max-width:640px), (max-width:1000px) and (max-height:500px) and (pointer:coarse){
  html,body{font-size:15px}.app{height:100dvh}
  .mobile-only{display:block}
  .topbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:8px 12px;z-index:50}
  .topbar .topbar-brand{grid-column:1;grid-row:1}.topbar .subtitle,.topbar .result-count,.topbar .build-tag{display:none}
  .topbar .topbar-meta{grid-column:2;grid-row:1}.topbar .nav-cluster{display:contents}
  .mobile-enhanced .site-menu-toggle{display:block;grid-column:3;grid-row:1;min-height:44px}
  .mobile-enhanced .topbar .page-nav{display:none;position:absolute;left:12px;right:12px;top:100%;padding:8px;gap:4px;grid-template-columns:1fr 1fr;background:var(--surface);border:1px solid var(--border);z-index:60;box-shadow:0 10px 24px #0008}
  .mobile-enhanced .topbar.menu-open .page-nav{display:grid}
  .topbar .page-nav a,.topbar .mobile-menu-feedback{display:flex;align-items:center;justify-content:flex-start;min-height:44px;padding:10px 12px;font-size:.9rem}
  .mobile-enhanced .topbar .nav-feedback{display:none}
  .btn,.filters-toggle,.icon-btn,summary{min-height:44px}
  input[type=search],input[type=number],input[type=text],select{font-size:16px!important;min-height:44px}
  input[type=checkbox],input[type=radio]{width:20px;height:20px;flex-shrink:0}
  .field-label{font-size:.8rem}.field-grid{gap:12px}.chip{min-height:36px}.toggle{align-items:center;min-height:44px}
  .filter-panel{width:min(360px,94vw)}.filter-panel-inner{padding:16px;overflow:auto;gap:16px}
  .filter-panel-inner>.legend{display:none}.filter-heading{flex-wrap:wrap}
  .mobile-filter-done{position:sticky;bottom:0;background:var(--surface);border-color:var(--accent);flex-shrink:0}
  .site-footer{padding:6px 12px}.site-footer nav{justify-content:space-between;gap:8px}.site-footer a{display:flex;align-items:center;min-height:38px;font-size:.73rem}
  .seo-tool-intro{display:none}.site-breadcrumbs{font-size:.78rem;line-height:1.8}
  .bench-main{padding:16px 12px}.bench-intro h2{font-size:1.35rem;line-height:1.3}.bench-intro p{font-size:.9rem}
  .seo-card{padding:16px}.seo-card h3{line-height:1.4}.seo-grid{gap:12px}.browse-grid{margin-top:18px}
  .profile-layout{gap:20px}.profile-rail{position:static}.seo-facts{padding:14px}.seo-facts>p{line-height:2.4}.seo-actions a{padding:10px 0}
  .seo-article p,.seo-article li{font-size:.95rem;line-height:1.65}.seo-article pre{white-space:pre-wrap;overflow-wrap:anywhere}

  /* Dashboard: cards keep identity, context, two prices and one metric from each source type. */
  .page-dashboard .main{min-width:0}.page-dashboard .toolbar{padding:8px 12px}.page-dashboard #status,.page-dashboard #widthReset{display:none!important}
  .page-dashboard .compare-bar{width:100%;justify-content:flex-end;gap:10px}.page-dashboard .compare-msg{flex:1;font-size:.8rem}
  .mobile-model-tools{padding:8px 12px 12px;display:grid;grid-template-columns:1fr 130px;gap:8px}
  .mobile-model-tools label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:.8rem;color:var(--text-muted)}
  .mobile-model-tools input,.mobile-model-tools select{width:100%;min-width:0}
  #mobileModelSummary{grid-column:1/-1;font-size:.78rem;color:var(--text-muted);margin:0}
  .page-dashboard .pin-panel,.page-dashboard .legend,.page-dashboard .col-resize{display:none!important}
  .page-dashboard label:has(#family),.page-dashboard label:has(#sizeFilter),.page-dashboard label:has(#rowLimit):not(.mobile-active-filter),.page-dashboard label:has(#coverage),.page-dashboard .field:has(#categoryChips){display:none}
  .page-dashboard #tableRegion{padding:0 12px;border:0}
  .mobile-enhanced #mainTable.mobile-labeled-table{display:block;width:100%!important;min-width:0;table-layout:auto}
  .mobile-enhanced #mainTable colgroup,.mobile-enhanced #mainTable thead{display:none}
  .mobile-enhanced #mainTable tbody{display:grid;gap:12px;width:100%}
  .mobile-enhanced #mainTable tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border:1px solid var(--border);border-radius:6px;padding:12px;background:var(--surface);gap:8px 12px}
  .mobile-enhanced #mainTable tbody tr.is-selected{border-color:var(--accent)}
  .mobile-enhanced #mainTable tbody th,.mobile-enhanced #mainTable tbody td{width:auto!important;max-width:none;min-width:0;position:static;border:0;padding:0;background:none;white-space:normal;overflow-wrap:anywhere;text-align:left}
  .mobile-enhanced #mainTable .model-cell{grid-column:1/-1}.mobile-enhanced #mainTable .model-name{font-size:1rem;white-space:normal}.cmp-hit{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .mobile-enhanced #mainTable tbody td{display:none}.mobile-enhanced #mainTable tbody td:is(:nth-child(2),:nth-child(3),:nth-child(4),:nth-child(7),:nth-child(8),:last-child),.mobile-enhanced #mainTable tbody td.mobile-featured{display:block}
  .mobile-enhanced #mainTable tbody td:nth-child(4),.mobile-enhanced #mainTable tbody td:last-child{grid-column:1/-1}
  .mobile-enhanced #mainTable .mobile-cell-label{display:block;font:400 .75rem var(--font-sans);color:var(--text-muted);margin:6px 0}
  .mobile-enhanced #mainTable td:is(:nth-child(2),:nth-child(3),:last-child)>.mobile-cell-label{display:none}
  .mobile-enhanced #mainTable .detail-btn{width:100%;margin-top:8px}.mobile-enhanced #mainTable .src-link{display:inline-flex;min-width:40px;min-height:40px;align-items:center;justify-content:center}
  .mobile-enhanced #mainTable .score-stack{display:inline-flex}.page-dashboard #scrollStatus{font-size:.75rem}

  /* Compare uses the same rows and values. Each metric lists all selected models. */
  .page-compare .main{overflow:auto;display:block;min-width:0}.page-compare .compare-toolbar{display:flex;flex-direction:column;align-items:stretch;padding:12px;gap:12px}
  .page-compare .picker,.page-compare .combo{width:100%;max-width:none}.page-compare .picker-label{font-size:.85rem}
  .cmp-chips{display:flex;flex-wrap:wrap;gap:8px}.cmp-chip{max-width:100%;padding:2px 4px 2px 10px}.cmp-chip .chip-name{max-width:230px;white-space:normal}.cmp-chip [data-move],.row-hide,#deltaMode,.field:has(#deltaMode){display:none}
  .page-compare .toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.page-compare #cmpMsg{flex-basis:100%;margin:0}.page-compare .comparison-notice{margin:4px 12px;font-size:.78rem}
  #mobileCompareSummary{padding:6px 12px;margin:0;color:var(--text-muted);font-size:.8rem}
  .mobile-compare-sections{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:12px;position:sticky;top:0;background:var(--bg);z-index:3}
  .mobile-compare-sections .btn{padding:6px 2px;font-size:.74rem;min-width:0}.mobile-compare-sections [aria-pressed=true]{border-color:var(--accent);color:var(--accent)}
  #compareRegion{overflow:visible;padding:0 12px;contain:none;border:0}.page-compare .table-region{contain:none}
  #compareTable{display:block;width:100%;min-width:0}#compareTable colgroup,#compareTable thead{display:none}
  #compareTable tbody{display:none}#compareTable[data-mobile-section=meta] tbody[data-section=meta],#compareTable[data-mobile-section=pricing] tbody[data-section=pricing],#compareTable[data-mobile-section=indep] tbody[data-section=indep],#compareTable[data-mobile-section=off] tbody[data-section=off]{display:block}
  #compareTable tbody tr{display:block;margin-bottom:14px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}
  #compareTable tbody th,#compareTable tbody td{position:static;width:auto;min-width:0;max-width:none;background:none;white-space:normal;border:0;padding:12px;overflow-wrap:anywhere}
  #compareTable tbody th{display:block;text-align:left}.rowhead-label{font-size:.92rem}.cmp-rowhead .comparison-context{max-width:none}.rowhead-inner .cat-tag{font-size:.7rem}
  #compareTable tbody td{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;border-top:1px solid var(--border-soft);align-items:center}
  #compareTable tbody td.is-best{background-color:rgba(245,158,11,.07)}
  #compareTable .mobile-cell-label{display:block;font:400 .83rem var(--font-sans);color:var(--text-muted);text-align:left}
  #compareTable .mobile-cell-value{display:block;text-align:right;min-width:0}.cmp-value-wrap{justify-content:flex-end;flex-wrap:wrap}
  #compareTable .section-row{border:0;background:none}#compareTable .section-inner{position:static}.section-toggle{min-height:44px}
  #compareTable .src-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;min-width:36px}
  .page-compare #cmpStatus{padding:12px;font-size:.75rem}.combo-list li{min-height:48px}

  /* Profiles and recorded pricing become labeled rows, retaining every source and evidence disclosure. */
  .seo-table-region{border:0;overflow:visible}
  .seo-table.mobile-labeled-table,.coverage-table.mobile-labeled-table{display:block;min-width:0;width:100%}
  .seo-table.mobile-labeled-table thead,.coverage-table.mobile-labeled-table thead{display:none}
  .seo-table.mobile-labeled-table tbody,.coverage-table.mobile-labeled-table tbody{display:block}
  .seo-table.mobile-labeled-table tr,.coverage-table.mobile-labeled-table tr{display:block;border:1px solid var(--border);border-radius:6px;margin-bottom:12px;padding:12px;background:var(--surface)}
  .seo-table.mobile-labeled-table th,.coverage-table.mobile-labeled-table th{display:block;max-width:none;white-space:normal;font-size:.9rem;border:0;padding:4px 0}
  .seo-table.mobile-labeled-table td,.coverage-table.mobile-labeled-table td{display:block;padding:8px 0;border:0;overflow-wrap:anywhere;text-align:left}
  .seo-table .mobile-cell-label,.coverage-table .mobile-cell-label{display:block;font:400 .75rem var(--font-sans);color:var(--text-muted);margin-bottom:4px}
  .seo-evidence{min-width:0;max-width:none}.seo-evidence summary{font-size:.85rem}
  /* Benchmark discovery and timelines remain; collection editing stays on desktop. */
  .bench-view-nav{display:flex;gap:6px}.bench-view-nav a{flex:1;padding:10px 6px;font-size:.78rem;text-align:center;min-height:44px}
  .bench-view-nav [data-bench-view=collections],.bench-discovery,.bench-library-stats,.field:has(#libraryCollection),#benchmarkSave,[data-save-benchmark],.bench-card-save{display:none}
  .bench-tools{display:grid;grid-template-columns:1fr 1fr;gap:10px}.bench-tools .bench-search{grid-column:1/-1}.bench-tools .btn{align-self:end}
  .bench-card h3{font-size:1rem}.bench-card p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .bench-result-tools{gap:12px}.bench-result-actions{gap:8px}.bench-result-actions a{font-size:.78rem}.bench-caveat{font-size:.8rem}
  .bench-results-table,.timeline-table{width:100%;min-width:0;table-layout:fixed}.br-model,.tl-model{width:43%!important}.br-score,.tl-score{width:25%!important}.br-evidence{width:32%!important}
  .bench-results-table td,.bench-results-table th,.timeline-table td,.timeline-table th{padding:9px 5px;font-size:.8rem;white-space:normal;overflow-wrap:anywhere}
  .bench-results-table .sticky-col{position:static;min-width:0;max-width:none}.bench-evidence summary{font-size:.75rem;min-height:44px;display:flex;align-items:center}
  .timeline-control-panel{padding:12px}.timeline-controls{display:grid;grid-template-columns:1fr 1fr}.timeline-controls .field{grid-column:1/-1;grid-row:1}.timeline-marks{display:none}#timelineRange{min-height:44px}.timeline-time-note{font-size:.78rem}
  /* Phone calculator focuses on planning. File inspection and bulk profile authoring stay on desktop. */
  .calculator-main{padding:16px 12px}.calculator-main h2{font-size:1.35rem}.calculator-model,.calculator-result,.calculator-proof{padding:12px}
  #recordMode,#recordPanel,.calculator-proof:has(#evidenceFile),[data-add-profile],.calculator-guide-grid a[href$="read-usage-log/"],.calculator-guide-links{display:none!important}
  .calculator-guide-grid{grid-template-columns:1fr}.calculator-modes{margin:12px 0}.calculator-fields{grid-template-columns:1fr}.calculator-fields label{font-size:.85rem}
  .calculator-profile{min-width:0;margin-inline:0;padding:12px 0}.calculator-result table{table-layout:fixed;font-size:.75rem}.calculator-result th,.calculator-result td{overflow-wrap:anywhere}
  .calculator-result .evidence-meta{font-size:.74rem}.calculator-result .total{font-size:1.2rem}
}

@media(max-width:640px), (max-width:1000px) and (max-height:500px) and (pointer:coarse){
 .page-compare .compare-toolbar>*{flex:0 0 auto}.cmp-chips{align-items:center}.cmp-chip{min-height:44px}.cmp-chip .icon-btn{min-width:36px}
 .mobile-compare-edit{border:1px solid var(--border);border-radius:6px;padding:0 12px}.mobile-compare-edit>summary{display:list-item;cursor:pointer;padding:12px 0;color:var(--text)}
 .mobile-compare-edit .picker{margin:12px 0}.mobile-compare-edit .cmp-chips{margin:12px 0}.mobile-edit-actions{display:flex;gap:12px;flex-wrap:wrap}.mobile-compare-edit[open] .mobile-edit-actions{margin:12px 0}
 .page-compare .toolbar-actions{width:100%;margin-left:0}.page-compare .toolbar-actions>.btn{flex:1}.page-compare #cmpMsg:empty{display:none}
 .mobile-enhanced #mainTable th.sticky-col,.mobile-enhanced #mainTable tr.is-selected th.model-cell{box-shadow:none}
 .mobile-enhanced #mainTable td:nth-child(4){display:flex!important;align-items:center;gap:8px;color:var(--text-muted);font-size:.8rem}
 .mobile-enhanced #mainTable td:nth-child(4) .mobile-cell-label{margin:0}.mobile-enhanced #mainTable td:nth-child(4) .mobile-cell-value{display:block}
 .page-dashboard #scrollStatus[data-done=true]{display:none}
 .page-compare #compareTable .section-head{padding:0 8px}
}

@media(max-width:640px), (max-width:1000px) and (max-height:500px) and (pointer:coarse){
 html:not(.mobile-enhanced) .topbar{display:flex;flex-wrap:wrap}html:not(.mobile-enhanced) .nav-cluster{display:flex;flex-basis:100%}
 .shell{grid-template-columns:minmax(0,1fr);position:relative}.filters-toggle{display:inline-flex}
 .filter-panel{position:fixed;top:0;bottom:0;left:0;transform:translateX(-105%)}.filter-panel.is-open{transform:translateX(0)}
 .filter-backdrop:not([hidden]){display:block;position:fixed;inset:0;background:#0008}
}
