/* Internal workspaces continue the accepted white/pink selection surface.
   Page classes keep these layouts independent of the homepage and wizard. */
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .page-heading {
  align-items: start; gap: 24px; margin: 14px 0 28px; padding: 0; border: 0;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) :is(.page-heading h1,.route-detail h1,.confirmation h1,.error-page h1) {
  margin: 0 0 12px; font-size: clamp(1.9rem,3.3vw,2.8rem); font-weight: 500;
  letter-spacing: -.035em; line-height: 1.15;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) :is(h2,h3) { font-weight: 500; letter-spacing: -.02em; }
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .eyebrow {
  margin-bottom: 9px; font-size: .82rem; font-weight: 400; color: var(--muted);
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) :is(button,.button) {
  min-height: 44px; border-radius: 0; font-weight: 500; font-size: .85rem;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) :is(input,select,textarea) {
  min-width: 0; min-height: 48px; border-radius: 0; accent-color: var(--navy); font-weight: 400;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) :is(input[type=checkbox],input[type=radio]) {
  flex: none; width: 18px; height: 18px; min-height: 18px; padding: 0; margin-top: 3px;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .secondary {
  color: var(--navy); background: var(--canvas); border-color: var(--navy);
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .secondary:hover {
  color: var(--navy-2); background: var(--quiet); border-color: var(--navy-2);
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .quiet {
  color: var(--navy); background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 4px;
}
body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries,.page-confirm-plan,.page-reset,.page-error) .quiet:hover { background: var(--quiet); color: var(--navy-2); }
body.atlas-app :is(.source-disclosure > summary,.catalog-method > summary,.form-disclosure > summary,.import-box > summary) { min-height: 44px; padding-block: 10px; cursor: pointer; }
body.atlas-app .badge { font-weight: 500; border-radius: 0; }

/* Catalog: search first, then routes. Status remains attached to its route. */
body.page-results .register-filter {
  display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) auto;
  gap: 14px 24px; align-items: end; margin: 0; padding: 0 0 22px;
  border: 0; border-bottom: 1px solid var(--line-cool); background: transparent;
}
body.page-results .register-filter label { min-width: 0; font-size: .85rem; font-weight: 500; }
body.page-results .register-filter .check { grid-row: 2; grid-column: 1 / -1; align-items: center !important; margin-top: 2px; }
body.page-results .register-filter button { grid-column: 3; grid-row: 1; min-height: 48px; }
body.atlas-app.page-results .results-stats {
  display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 20px 0 8px; margin: 0;
  color: var(--muted); background: transparent; border: 0; font-size: .82rem;
}
body.page-results .results-stats strong { margin-right: 6px; color: var(--ink); font-size: 1.4rem; font-weight: 400; }
body.page-results .catalog-scope { margin: 8px 0; max-width: 95ch; font-size: .82rem; color: var(--muted); }
body.page-results .catalog-scope a { display: inline-block; margin-left: 6px; }
body.page-results .catalog-method { margin: 24px 0 16px; max-width: 95ch; font-size: .82rem; color: var(--muted); }
body.page-results .catalog-method summary { color: var(--navy); }
body.page-results .route-register { border: 0; background: transparent; }
body.atlas-app.page-results .route-register .route-card {
  display: grid; grid-template-columns: 42px minmax(0,1fr) 180px; gap: 22px;
  padding: 26px 0; border: 0; border-top: 1px solid var(--line-cool); background: transparent;
}
body.atlas-app.page-results .route-register .route-card:hover { background: transparent; }
body.page-results .route-number { grid-column: 1; grid-row: 1; padding-top: 4px; font-size: .8rem; font-weight: 400; color: var(--muted); }
body.atlas-app.page-results .route-register .route-card-main { display: block; grid-column: 2; grid-row: 1; min-width: 0; }
body.atlas-app.page-results .route-register .route-country { display: block; margin: 0 0 9px; color: var(--muted); font-size: .8rem; font-weight: 400; }
body.atlas-app.page-results .route-register .route-card h2 { margin: 0 0 10px; font-size: clamp(1.12rem,1.8vw,1.4rem); font-weight: 500; line-height: 1.3; }
body.page-results .route-card h2 a { color: var(--ink); }
body.page-results .route-card h2 a:hover { color: var(--navy); }
body.atlas-app.page-results .route-register .route-question { display: block; margin: 0 0 10px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
body.page-results :is(.route-missing,.route-conflict) { margin: 10px 0 0; font-size: .82rem; }
body.atlas-app.page-results .route-register .route-missing { display: block; overflow: visible; -webkit-line-clamp: unset; -webkit-box-orient: unset; color: var(--muted); }
body.page-results .route-conflict { color: var(--bad); }
body.page-results .route-card-side { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: start; justify-content: start; gap: 12px; margin: 0; padding-top: 3px; }
body.page-results .route-state { font-size: .8rem; font-weight: 400; white-space: normal; }
body.page-results .route-open { display: inline-flex; align-items: center; min-height: 44px; color: var(--navy); font-size: .85rem; font-weight: 500; }
body.page-results .register-key { max-width: 95ch; margin-top: 30px; color: var(--muted); font-size: .82rem; }
body.page-results .pagination { justify-content: space-between; font-size: .85rem; }

/* Full profile: known facts stay open, optional sections disclose in place. */
body.page-profile .profile-form { max-width: 960px; gap: 0; }
body.atlas-app.page-profile .profile-form .form-section {
  display: block; margin: 0; padding: 26px 0; background: transparent;
  border: 0; border-top: 1px solid var(--line-cool); border-radius: 0;
}
body.page-profile .section-title { margin-bottom: 22px; }
body.page-profile .section-title h2 { margin-bottom: 8px; font-size: 1.25rem; }
body.page-profile .section-title p { max-width: 70ch; }
body.page-profile .field-grid { gap: 22px 26px; }
body.page-profile .field-grid label { gap: 8px; font-size: .85rem; font-weight: 500; }
body.atlas-app.page-profile .profile-form .form-disclosure { padding: 0; }
body.page-profile .form-disclosure > summary { display: list-item; padding: 22px 0; }
body.page-profile .form-disclosure > summary strong { font-size: 1.2rem; font-weight: 500; }
body.page-profile .form-disclosure > summary span { display: block; margin: 7px 0 0 18px; color: var(--muted); font-size: .85rem; font-weight: 400; }
body.page-profile .form-disclosure .field-grid { margin-bottom: 26px; }
body.page-profile .check-grid { margin-top: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 26px; }
body.page-profile .check-card { min-height: 48px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-cool); border-radius: 0; background: transparent; }
body.page-profile .check-card:has(input:checked) { color: var(--navy); background: transparent; border-color: var(--line-cool); }
body.page-profile .privacy-note { max-width: 960px; padding: 0; margin: 0 0 20px; border: 0; background: transparent; color: var(--muted); font-size: .82rem; }
body.page-profile .privacy-note summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
body.page-profile .profile-basis { margin: 22px 0 0; color: var(--muted); font-size: .82rem; }
body.atlas-app.page-profile .profile-form .form-actions { justify-content: start; gap: 14px; padding: 0; margin: 24px 0 34px; }
body.page-profile :is(.import-box,main > details:not(.privacy-note)) { max-width: 960px; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line-cool); }
body.page-profile main > details:not(.privacy-note) > summary { padding: 16px 0; min-height: 48px; color: var(--navy); cursor: pointer; font-size: .9rem; font-weight: 500; }
body.page-profile main > details:not(.privacy-note) > :is(p,label,div,button) { margin-bottom: 16px; }
body.page-profile main > details > label { display: grid; gap: 8px; font-size: .85rem; }
body.atlas-app.page-profile main > details > button { color: var(--navy); background: var(--canvas); border-color: var(--navy); }
body.atlas-app.page-profile main > details > button:hover { color: var(--navy-2); background: var(--quiet); }
body.page-profile input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 0; background: var(--quiet); color: var(--navy); font: inherit; }
body.page-profile .import-box { padding-bottom: 20px; }
body.page-profile .import-box form { max-width: 800px; gap: 16px; }
body.page-profile .import-box form > button { justify-self: start; }

/* Route: a next condition followed by the evidence and answer workspace. */
body.page-route .back-link { min-height: 44px; margin: 0 0 14px; padding-block: 10px; font-size: .85rem; font-weight: 400; }
body.page-route .route-detail-head { grid-template-columns: minmax(0,1fr) 260px; gap: 40px; padding: 0 0 24px; border: 0; }
body.page-route .route-detail-head .lead { max-width: 70ch; font-size: .95rem; line-height: 1.5; }
body.page-route .detail-status { justify-items: start; padding-left: 22px; border-left: 1px solid var(--line-cool); font-size: .8rem; }
body.atlas-app.page-route .route-priority { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 24px; margin: 0; background: var(--quiet); color: var(--ink); border: 0; border-left: 2px solid var(--navy); border-radius: 0; }
body.atlas-app.page-route .route-priority span { display: block; margin-bottom: 9px; color: var(--navy); font-size: .82rem; font-weight: 400; }
body.page-route .route-priority strong { display: block; max-width: 75ch; color: var(--ink); font-size: 1rem; font-weight: 500; line-height: 1.5; }
body.atlas-app.page-route .route-priority .button { flex: none; color: var(--on-action); background: var(--navy); }
body.atlas-app.page-route .route-priority .button:hover { color: var(--on-action); background: var(--navy-2); }
body.page-route .detail-actions { gap: 14px 22px; margin: 18px 0 22px; }
body.page-route .evidence-note { margin: 0 0 26px; padding: 0; background: transparent; border: 0; color: var(--muted); font-size: .82rem; }
body.page-route .evidence-note strong { font-weight: 500; }
body.page-route .detail-section { margin-top: 28px; padding: 24px 0 0; }
body.page-route .detail-section h2 { font-size: 1.4rem; margin-bottom: 12px; }
body.page-route .condition { grid-template-columns: minmax(0,1fr) 280px; gap: 40px; padding: 24px 0; border-left-width: 2px; }
body.page-route .condition-copy { padding-left: 20px; }
body.page-route .condition h3 { font-size: 1rem; line-height: 1.5; font-weight: 500; }
body.page-route .condition:target { animation: none; }
body.page-route .answer-form { padding-right: 4px; gap: 12px; }
body.page-route .answer-form label { gap: 8px; font-weight: 500; }
body.page-route .answer-form .secondary { justify-self: start; }
body.page-route .blocker-section { padding-left: 20px; }
body.page-route .amount-grid { gap: 30px; }
body.page-route .detail-columns { gap: 40px; }
body.page-route .source-list { gap: 12px; }

/* Comparing dense facts uses a table at wide sizes, criteria groups on phones. */
body.page-compare .compare-table { border: 0; }
body.page-compare .compare-table table { table-layout: fixed; min-width: 860px; }
body.page-compare .compare-table :is(td,th) { min-width: 0; padding: 20px 16px; font-size: .85rem; }
body.page-compare .compare-table thead th { background: var(--quiet); color: var(--ink); font-weight: 500; }
body.page-compare .compare-table th:first-child { width: 150px; background: var(--canvas); color: var(--muted); font-weight: 500; }
body.page-compare .compare-table caption { padding: 0 0 16px; font-size: .82rem; }
body.page-compare .compare-table th a { display: block; font-size: .95rem; font-weight: 500; }
body.page-compare .compare-table td p { margin: 0 0 10px; }
body.page-compare .compare-criterion { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-cool); }
body.page-compare .compare-criterion h2 { font-size: 1.15rem; margin: 0 0 18px; }
body.page-compare .compare-criterion dl { display: block; margin: 0; }
body.page-compare .compare-criterion dl > div { display: block; padding: 16px 0; border-top: 1px solid var(--line-cool); }
body.page-compare .compare-criterion dt { font-weight: 400; font-size: .85rem; }
body.page-compare .compare-criterion dt strong { display: block; font-weight: 500; margin-bottom: 5px; }
body.page-compare .compare-criterion dt a { display: block; }
body.page-compare .compare-criterion dd { margin-top: 12px; color: var(--ink); font-size: .9rem; }
body.page-compare .compare-mobile-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* The plan measures checked actions; it never presents an approval score. */
body.page-plan .page-heading .plan-route-name { max-width: 75ch; margin: 4px 0 12px; font-size: 1.05rem; color: var(--ink); }
body.page-plan .plan-progress { max-width: 900px; padding-bottom: 24px; }
body.page-plan .plan-progress > div { display: flex; align-items: baseline; gap: 14px; }
body.page-plan .plan-progress strong { color: var(--navy); font-size: 1.8rem; font-weight: 400; }
body.page-plan .plan-progress span { color: var(--muted); font-size: .85rem; }
body.page-plan .plan-progress progress { display: block; width: 100%; height: 5px; margin: 16px 0 12px; accent-color: var(--navy); border: 0; background: var(--line-cool); }
body.page-plan progress::-webkit-progress-bar { background: var(--line-cool); }
body.page-plan progress::-webkit-progress-value { background: var(--navy); }
body.page-plan progress::-moz-progress-bar { background: var(--navy); }
body.page-plan .plan-progress p { margin: 0; color: var(--muted); font-size: .82rem; }
body.page-plan .plan-form { max-width: 900px; }
body.page-plan .plan-list { margin: 0 0 28px; }
body.page-plan .plan-list > li { padding: 22px 0; border-left: 0; }
body.page-plan .plan-list label { padding: 0; gap: 18px; font-size: .95rem; }
body.page-plan .plan-list label strong { color: var(--navy); font-size: .82rem; font-weight: 400; margin-bottom: 5px; }
body.page-plan .plan-list .barrier label strong { color: var(--bad); }
body.page-plan .plan-list .confirm label strong { color: var(--warn); }
body.page-plan .plan-list .source-disclosure { margin-left: 36px; }
body.page-plan .detail-section { max-width: 900px; margin-top: 32px; padding-top: 24px; }
body.page-plan .detail-section h2 { font-size: 1.4rem; }

body.page-countries .filter-bar { border-top: 0; padding-top: 0; gap: 24px; }
body.page-countries .countries-table { border: 0; }
body.page-countries .countries-table thead th { background: var(--quiet); color: var(--ink); font-weight: 500; }
body.page-countries .countries-table tbody th { font-weight: 500; }
body.page-countries .countries-table caption { padding-inline: 0; }
body.page-countries .countries-table .meta { line-height: 1.5; }
body.page-countries .countries-table .source-cell a { min-height: 36px; padding-block: 6px; }

body.atlas-app:is(.page-confirm-plan,.page-reset) .confirmation { max-width: 720px; margin: 28px 0; padding: 0; border: 0; background: transparent; }
body.atlas-app:is(.page-confirm-plan,.page-reset) .confirmation > p:not(.eyebrow) { font-size: .95rem; }
body.atlas-app:is(.page-confirm-plan,.page-reset) .confirmation .notice { margin-block: 24px; }
body.atlas-app.page-error .error-page { max-width: 640px; margin: 28px 0; }
body.page-error .error-code { color: var(--navy); font-size: 1rem; font-weight: 400; margin-bottom: 16px; }

@media (max-width: 900px) {
  body.page-route .route-detail-head { display: block; }
  body.page-route .detail-status { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 0; border: 0; margin-top: 18px; }
  body.page-route .condition { grid-template-columns: minmax(0,1fr); gap: 20px; }
  body.page-route .answer-form { margin-left: 20px; max-width: 560px; }
  body.page-compare .compare-table, body.page-compare .remove-actions { display: none; }
  body.page-compare .compare-mobile { display: block; }
}
@media (max-width: 650px) {
  body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries) .page-heading { display: block; margin: 8px 0 24px; }
  body.atlas-app:is(.page-results,.page-profile,.page-route,.page-compare,.page-plan,.page-countries) .page-heading > a { margin-top: 12px; }
  body.page-results .register-filter { grid-template-columns: minmax(0,1fr); gap: 16px; }
  body.page-results .register-filter .check { grid-column: 1; grid-row: 3; }
  body.page-results .register-filter button { grid-column: 1; grid-row: 4; }
  body.atlas-app.page-results .route-register .route-card { grid-template-columns: minmax(0,1fr); gap: 0; padding: 22px 0; }
  body.page-results .route-number { display: none; }
  body.atlas-app.page-results .route-register .route-card-main { grid-column: 1; grid-row: 1; }
  body.page-results .route-card-side { grid-column: 1; grid-row: 2; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; }
  body.page-results .results-stats { gap: 8px 20px; }
  body.page-profile .field-grid, body.page-profile .check-grid { grid-template-columns: minmax(0,1fr); }
  body.page-profile .form-disclosure > summary span { margin-left: 0; }
  body.atlas-app.page-route .route-priority { display: block; padding: 20px; }
  body.page-route .route-priority .button { width: auto; margin-top: 18px; }
  body.page-route .detail-actions { gap: 8px; }
  body.page-route .detail-actions > a { width: 100%; }
  body.page-route .condition-copy { padding-left: 14px; }
  body.page-route .answer-form { margin-left: 14px; }
  body.page-route .detail-columns, body.page-route .amount-grid, body.page-route .evidence-grid { grid-template-columns: minmax(0,1fr); }
  body.page-countries .filter-bar { gap: 14px; }
  body.page-countries .countries-table tbody tr { border: 0; border-top: 1px solid var(--line-cool); padding: 20px 0; }
  body.page-countries .countries-table tbody :is(th,td) { padding-inline: 0; }
  body.page-countries .countries-table tbody th { font-size: 1.2rem; }
  body.page-countries .countries-table tbody td:nth-child(4) > strong { color: var(--navy); font-size: 1.45rem; font-weight: 500; }
  body.page-plan .plan-progress > div { flex-wrap: wrap; gap: 6px 14px; }
}
