/* Thai FX Compare · shared secondary-page styling · Issues #27 / #28
   Paired with ui-foundation.css. Static documents preserve their original copy.
   Do not add per-release override blocks here: adjust a canonical component.
*/
body.fx-health, body.fx-docs, body.fx-legal {
 background:var(--fx-bg); color:var(--fx-ink);
 font:400 16px/1.65 var(--fx-font); font-synthesis:none;
 overflow-wrap:break-word;
}
body.fx-health *,body.fx-docs *,body.fx-legal * { box-sizing:border-box; }
body.fx-health :is(a,button,input,select,textarea):focus-visible,
body.fx-docs :is(a,button,input,select,textarea):focus-visible,
body.fx-legal :is(a,button,input,select,textarea):focus-visible {
 outline:3px solid var(--fx-primary); outline-offset:3px;
}
body.fx-health a,body.fx-docs a,body.fx-legal a { text-underline-offset:3px; }
body.fx-health :is(button,input,select), body.fx-docs :is(button,input,select) {
 font:inherit; min-height:40px;
}
body.fx-health :is(button,select), body.fx-docs :is(button,select) { touch-action:manipulation; }
body.fx-health [hidden], body.fx-docs [hidden] { display:none!important; }

/* Main surfaces and common header/navigation across all information pages. */
.fx-health .health-app, .fx-docs .wrap {
 width:min(1200px,calc(100% - 40px)); max-width:100%;
 margin-inline:auto; padding-bottom:56px;
}
.fx-health :is(.topbar,.health-topbar),
.fx-docs .top {
 display:flex; align-items:center; justify-content:space-between;
 flex-wrap:wrap; min-height:68px; height:auto;
 padding:12px 0; gap:12px 20px;
 background:transparent; border-bottom:1px solid var(--fx-line);
}
.fx-health :is(.brand,.health-brand), .fx-docs .brand {
 display:inline-flex; align-items:center; gap:10px;
 text-decoration:none; color:var(--fx-ink);
 font-size:16px; font-weight:750; white-space:normal; line-height:1.3;
}
.fx-health :is(.brand-mark,.health-brand-mark), .fx-docs .mark,
.fx-legal .fx-mark {
 display:inline-grid; place-items:center; flex:0 0 34px;
 width:34px;height:34px;border-radius:10px;
 background:var(--fx-ink);color:white;font-size:11px;font-weight:850;
 border:0;box-shadow:none;letter-spacing:.04em;
}
.fx-health .brand small { color:var(--fx-subtle); font-size:12px; }
.fx-health :is(.topbar nav,.fx-subnav), .fx-docs .nav {
 display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;
 gap:6px 10px;max-width:100%;
}
.fx-health :is(.topbar nav a,.fx-subnav a,.back-link),
.fx-docs .nav a, .fx-legal .fx-nav a {
 display:inline-flex;align-items:center;min-height:40px;
 padding:8px 11px;border-radius:10px;text-decoration:none;
 font-size:14px;font-weight:600;line-height:1.3;color:var(--fx-muted);
}
.fx-health :is(.topbar nav a,.fx-subnav a,.back-link):hover,
.fx-docs .nav a:hover, .fx-legal .fx-nav a:hover { background:var(--fx-primary-soft);color:var(--fx-primary); }
.fx-health :is(.topbar nav a[aria-current],.fx-subnav a[aria-current]),
.fx-docs .nav a.active { background:var(--fx-primary-soft);color:var(--fx-primary); }
.fx-health :is(.topbar button,.hero button,.refresh-button),
.fx-docs :is(.btn,button) {
 min-height:42px;padding:9px 16px;
 background:var(--fx-surface);border:1px solid var(--fx-line);
 border-radius:10px;box-shadow:none;color:var(--fx-ink);
 font:600 14px/1.35 var(--fx-font);cursor:pointer;
}
.fx-health :is(.topbar button,.hero button,.refresh-button):hover {background:var(--fx-primary-soft);border-color:#bad0f7;}
.fx-health :is(.hero,.health-hero), .fx-docs .hero {
 padding:40px 0 26px;gap:22px;align-items:flex-end;
}
.fx-health :is(.hero h1,.health-hero h1), .fx-docs .hero h1 {
 color:var(--fx-ink);font-size:clamp(30px,4.4vw,51px);
 font-weight:780;letter-spacing:-.035em;line-height:1.12;text-wrap:balance;
}
.fx-health :is(.eyebrow,.hero .eyebrow), .fx-docs .eyebrow {
 color:var(--fx-primary);font-size:13px;font-weight:700;letter-spacing:.04em;
}
.fx-health :is(.sub,.hero p,.section-head p), .fx-docs :is(.hero p,.lead) {
 color:var(--fx-muted);font-size:15px;line-height:1.6;
}
.fx-health :is(.stats>div,.summary-card,.section,.health-panel,.collector-card,.feedback-card,.location-overview,.location-rate-summary),
.fx-docs :is(.card,.doc-block,.endpoint) {
 border:1px solid var(--fx-line);border-radius:var(--fx-radius-md);
 background:var(--fx-surface);box-shadow:var(--fx-shadow);
}
.fx-health :is(.stats>div,.summary-card) {
 padding:20px;min-width:0;box-shadow:none;
}
.fx-health :is(.stats strong,.summary-card strong), .fx-docs .hero strong {
 font-variant-numeric:tabular-nums lining-nums;color:var(--fx-ink);
}
.fx-health :is(.stats small,.summary-card span,.summary-card small) {
 color:var(--fx-muted);font-size:13px;font-weight:600;letter-spacing:0;
}
.fx-health :is(.section,.health-panel) { padding:clamp(16px,2vw,24px);margin-block:15px; }
.fx-health .section-head h2,.fx-health .panel-head h2,.fx-docs h2 {
 font-size:clamp(20px,2.2vw,26px);letter-spacing:-.025em;line-height:1.3;color:var(--fx-ink);
}
.fx-health :is(.location-field span,.collector-meta,.feedback-meta,.location-item p,.location-item small) {
 font-size:13px;line-height:1.5;color:var(--fx-muted);
}
.fx-health :is(.location-field input,.location-field select,.location-currency select) {
 height:auto;min-height:44px;border:1px solid var(--fx-line);
 border-radius:10px;background:var(--fx-surface);color:var(--fx-ink);
 font-size:15px;padding:8px 12px;
}
.fx-health .location-item {min-height:52px;}
.fx-health .location-item strong {font-size:14px;}
.fx-health :is(.location-overview,.location-map-panel,.location-list-panel){min-width:0;}
.fx-health :is(.location-item,.location-map-meta,.location-best-text){overflow-wrap:anywhere;}
.fx-health :is(.runner-status,.banner,.info) {font-size:14px;line-height:1.6;border-radius:12px;}
.fx-health footer,.fx-docs footer {
 color:var(--fx-muted);border-top:1px solid var(--fx-line);
 padding:20px 0;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;
 font-size:13px;
}
/* API reference: keep existing endpoint semantics and code readable. */
.fx-docs :is(.feature-grid,.doc-grid,.section-grid) {min-width:0;}
.fx-docs :is(.card,.doc-block) {padding:clamp(16px,2vw,24px);}
.fx-docs .endpoint {padding:12px 14px;box-shadow:none;}
.fx-docs :is(code,pre,.path) {font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;}
.fx-docs pre {font-size:13px;line-height:1.6;max-width:100%;overflow-x:auto;}
.fx-docs .path {max-width:100%;white-space:normal;overflow-wrap:anywhere;}
.fx-docs .method {border-radius:7px;}
.fx-docs .active {color:var(--fx-primary);}
/* Legal and terms: one legible content width and calm informational hierarchy. */
.fx-legal main {width:min(850px,calc(100% - 40px));max-width:100%;margin:auto;padding:0 0 70px;}
.fx-legal .fx-legal-header {
 display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
 min-height:70px;padding:14px 0;border-bottom:1px solid var(--fx-line);
 margin-bottom:38px;
}
.fx-legal .fx-home {display:flex;align-items:center;gap:10px;text-decoration:none;font-size:15px;font-weight:750;color:var(--fx-ink);}
.fx-legal .fx-nav {display:flex;gap:5px 12px;align-items:center;flex-wrap:wrap;}
.fx-legal .back {display:inline-block;margin-bottom:20px;font-size:14px;font-weight:600;color:var(--fx-muted);text-decoration:none;border-bottom:0;}
.fx-legal .back:hover {color:var(--fx-primary);}
.fx-legal h1 {font-size:clamp(32px,5vw,51px);line-height:1.12;letter-spacing:-.035em;margin:0 0 12px;}
.fx-legal h2 {font-size:clamp(20px,2.4vw,24px);line-height:1.35;margin:32px 0 10px;color:var(--fx-ink);}
.fx-legal :is(p,li) {font-size:16px;line-height:1.7;}
.fx-legal :is(.muted,.meta) {font-size:14px;color:var(--fx-muted);}
.fx-legal a {color:var(--fx-primary);}
.fx-legal .box {background:white;border:1px solid var(--fx-line);border-radius:16px;box-shadow:var(--fx-shadow);padding:20px 22px;}
@media(max-width:680px){
 .fx-health .health-app,.fx-docs .wrap {width:calc(100% - 28px);}
 .fx-health :is(.topbar,.health-topbar),.fx-docs .top {align-items:flex-start;gap:9px;}
 .fx-health :is(.topbar nav,.fx-subnav),.fx-docs .nav {justify-content:flex-start;width:100%;gap:4px;}
 .fx-health :is(.topbar nav a,.fx-subnav a,.back-link),.fx-docs .nav a {font-size:13px;padding:7px 9px;min-height:38px;}
 .fx-health :is(.hero,.health-hero),.fx-docs .hero {padding:25px 0 18px;flex-direction:column;align-items:stretch;}
 .fx-health .stats {grid-template-columns:repeat(2,minmax(0,1fr));}
 .fx-health :is(.stats>div,.summary-card) {padding:15px;}
 .fx-health .location-overview {grid-template-columns:minmax(0,1fr);}
 .fx-health .location-finder-controls {grid-template-columns:minmax(0,1fr);}
 .fx-health .location-finder-controls .location-field {grid-column:1 / -1;}
 .fx-health .location-map-panel iframe {max-width:100%;}
 .fx-legal main {width:calc(100% - 32px);}
 .fx-legal .fx-legal-header {align-items:flex-start;}
 .fx-legal .fx-nav {width:100%;gap:4px;}
 .fx-legal .fx-nav a {font-size:13px;padding:7px 8px;}
}
@media(prefers-reduced-motion:reduce){
 body.fx-health *,body.fx-docs *,body.fx-legal * {animation-duration:.01ms!important;transition-duration:.01ms!important;}
}


/* Shared discovery CTAs and responsive API docs. */
.fx-health .fx-locations-compare,.fx-health .fx-all-locations {
 display:inline-flex;align-items:center;justify-content:center;
 min-height:42px;padding:9px 14px;border:1px solid #c8d9fa;border-radius:10px;
 background:var(--fx-primary-soft);color:var(--fx-primary);
 text-decoration:none;font-size:14px;font-weight:700;line-height:1.4;
}
.fx-health .fx-locations-compare:hover,.fx-health .fx-all-locations:hover {background:#deebff;}
.fx-health .section-head {display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;}
.fx-health .fx-location-metric {display:flex;align-items:baseline;gap:9px;color:var(--fx-muted);font-size:14px;}
.fx-health .fx-location-metric strong {font-size:26px;color:var(--fx-ink);font-variant-numeric:tabular-nums;}
.fx-health .location-item:focus-visible {outline:3px solid var(--fx-primary);outline-offset:-3px;}
.fx-docs .hero-box {background:var(--fx-surface);border:1px solid var(--fx-line);border-radius:16px;padding:24px;box-shadow:var(--fx-shadow);}
.fx-docs .btn:not(.secondary) {background:var(--fx-primary);color:#fff;border-color:var(--fx-primary);border-radius:10px;}
.fx-docs .btn:not(.secondary):hover {background:var(--fx-primary-hover);border-color:var(--fx-primary-hover);}
.fx-docs .btn.secondary {background:var(--fx-surface);color:var(--fx-primary);border-color:var(--fx-line);border-radius:10px;}
.fx-docs .nav a.active {border:0;border-radius:10px;}
.fx-docs :is(.feature-grid,.price-grid,.docs-layout) {min-width:0;}
.fx-docs :is(.toc,.card,.doc-block,.section) {min-width:0;}
@media(max-width:680px) {
 .fx-docs .hero {display:grid;grid-template-columns:minmax(0,1fr);gap:20px;padding:28px 0 24px;}
 .fx-docs .hero h1 {font-size:clamp(31px,8vw,45px);line-height:1.12;}
 .fx-docs .hero-box {padding:18px;}
 .fx-docs :is(.feature-grid,.price-grid,.docs-layout) {grid-template-columns:minmax(0,1fr);}
 .fx-docs .toc {position:static;}
 .fx-health .fx-all-locations {width:100%;}
}
