/* CVMSN — Atlas refined (staging-only preview, 16 Nov 2026)
   Tokens: measured from the approved brand kit (brand/tokens/approved-brand-tokens.md)
   navy #00163D · blue #0858C8 · cyan #08B8F8 (decorative only — 2.28:1 on white, never text)
   silver #B4B9BF -> #F8F9FA · paper #F8F9FA · surface #FFFFFF
   Accessibility: every text colour below is >= 4.5:1 on its background (measured, see report).
   Fonts: Space Grotesk (display) + Inter (body) via Google Fonts, system fallbacks if offline. */
:root{
  --navy:#00163D; --blue:#0858C8; --blue-dark:#064A9E; --cyan:#08B8F8;
  --silver:#B4B9BF; --silver-mid:#E8E9EB; --paper:#F8F9FA; --surface:#FFFFFF;
  --ink:#1A2436; --muted:#44546E; --tint:#EAF1FB; --hairline:#D8DEE8;
  --footer-muted:#C7D2E4; --success:#1F6B43; --warn-bg:#FFF7E6; --warn-text:#7A3E00;
  --radius:8px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--paper);color:var(--ink);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:"Space Grotesk",Inter,system-ui,sans-serif;color:var(--navy);line-height:1.15;letter-spacing:-.01em}
a{color:var(--blue)}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px;border-radius:2px}
/* F1 fix (2026-11-16): native month inputs have three internal Tab stops
   (month segment, year segment, calendar-picker indicator). On the picker
   stop the focus sits on the indicator button inside the input's shadow
   DOM: the host input matches NEITHER :focus NOR :focus-visible there
   (probe-verified), so a :focus-only rule cannot restore the ring.
   :focus-within DOES match on every stop, so the rule lists both.
   Keep the native input and its validation; same 3px blue, same offset.
   Accepted trade-off: the ring also shows on mouse click. */
input[type="month"]:focus,input[type="month"]:focus-within{outline:3px solid var(--blue);outline-offset:2px;border-radius:2px}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}
.skip{position:absolute;left:-9999px;top:0;background:var(--navy);color:#fff;padding:10px 16px;z-index:10}
.skip:focus{left:8px;top:8px}

/* Header / nav */
.site-head{background:var(--surface);border-bottom:1px solid var(--hairline)}
.site-head .wrap{display:flex;align-items:center;gap:28px;min-height:76px;padding-top:10px;padding-bottom:10px}
.brand img{height:44px;width:auto;display:block}
.brand .tagline-note{font-size:12px;color:var(--muted)}
.main-nav{display:flex;gap:4px;margin-left:auto;flex-wrap:wrap}
.main-nav a{color:var(--ink);text-decoration:none;font-weight:600;font-size:15px;padding:10px 12px;border-radius:6px;min-height:44px;display:inline-flex;align-items:center}
.main-nav a:hover{background:var(--tint);color:var(--navy)}
.main-nav a[aria-current="page"]{color:var(--blue);box-shadow:inset 0 -3px 0 var(--blue)}
.head-cta{margin-left:8px}

/* Buttons — min 44px tall on touch, >=24px tap target everywhere */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 22px;border-radius:var(--radius);font-weight:700;font-size:16px;text-decoration:none;border:2px solid transparent;cursor:pointer;font-family:inherit}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:hover{background:var(--blue-dark)}
.btn-navy{background:var(--navy);color:#fff}
.btn-secondary{background:var(--surface);color:var(--navy);border-color:var(--navy)}
.btn-secondary:hover{background:var(--tint)}
.btn-sm{min-height:44px;padding:10px 16px;font-size:15px}

/* Hero */
.hero{padding:64px 0 56px}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:56px;align-items:start}
.eyebrow{font-size:13px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--blue);margin-bottom:16px}
.hero h1{font-size:54px;margin-bottom:20px}
.hero h1 .accent{color:var(--blue)}
.hero .sub{font-size:18px;color:var(--muted);max-width:52ch;margin-bottom:28px}
.cta-row{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.free-promise{background:var(--surface);border:1px solid var(--hairline);border-left:4px solid var(--blue);border-radius:var(--radius);padding:16px 18px;margin-top:8px}
.free-promise p{font-size:15px}
.free-promise strong{color:var(--navy)}
.ats-note{font-size:14px;color:var(--muted);margin-top:14px;max-width:56ch}
.ats-note strong{color:var(--ink)}
.accent-bar{height:4px;width:64px;background:linear-gradient(90deg,var(--blue),var(--cyan));border-radius:2px;margin-bottom:24px}

/* Sample CV sheet (hero) */
.sheet{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);box-shadow:0 16px 40px rgba(0,22,61,.12);padding:32px 34px;position:relative}
.sheet::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--navy),var(--blue),var(--cyan));border-radius:8px 8px 0 0}
.sheet h2{font-size:22px}
.sheet .role{color:var(--muted);font-size:14px;margin:4px 0 16px}
.sheet h3{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--blue);margin:18px 0 8px}
.sheet p,.sheet li{font-size:14px;line-height:1.55}
.sheet ul{padding-left:18px}
.sheet .meta{font-size:13px;color:var(--muted)}
.sheet-tag{position:absolute;top:-14px;right:16px;background:var(--navy);color:#fff;font-size:12px;font-weight:700;letter-spacing:.06em;padding:8px 12px;border-radius:6px}
.sheet-note{font-size:13px;color:var(--muted);margin-top:14px;text-align:center}

/* Market paths */
.section{padding:56px 0}
.section.flush-top{padding-top:0}
.section-head{max-width:68ch;margin-bottom:32px}
.section-head h2{font-size:32px;margin-bottom:12px}
.section-head p{color:var(--muted);font-size:17px}
.paths{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.path-card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:28px}
.path-card h3{font-size:22px;margin-bottom:4px}
.path-card .market-tag{display:inline-block;background:var(--tint);color:var(--navy);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:5px 10px;border-radius:999px;margin-bottom:14px}
.path-card p{color:var(--muted);margin-bottom:16px}
.path-card ul{list-style:none}
.path-card li{padding:8px 0 8px 28px;position:relative;border-top:1px solid var(--hairline);font-size:15px}
.path-card li::before{content:"";position:absolute;left:4px;top:15px;width:10px;height:10px;border-radius:50%;background:var(--blue)}
.path-card li strong{color:var(--navy)}

/* Feature / trust cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:26px}
.card .num{font-family:"Space Grotesk",sans-serif;font-size:13px;font-weight:700;color:var(--blue);letter-spacing:.1em}
.card h3{font-size:20px;margin:10px 0 8px}
.card p{color:var(--muted);font-size:15px}
.card p strong{color:var(--ink)}
.trust-strip{background:var(--navy);color:#fff;border-radius:var(--radius);padding:28px 32px;margin-top:20px;display:flex;gap:32px;flex-wrap:wrap;align-items:center}
.trust-strip h3{color:#fff;font-size:20px}
.trust-strip p{color:var(--footer-muted);font-size:15px;max-width:70ch}
.trust-strip .btn-secondary{background:transparent;color:#fff;border-color:#fff}
.trust-strip .btn-secondary:hover{background:rgba(255,255,255,.12)}

/* Steps */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;counter-reset:step}
.step{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:26px}
.step .step-n{font-family:"Space Grotesk",sans-serif;font-size:28px;font-weight:700;color:var(--blue)}
.step h3{font-size:19px;margin:8px 0}
.step p{color:var(--muted);font-size:15px}

/* Footer */
.site-foot{background:var(--navy);color:#fff;margin-top:64px;padding:48px 0 32px}
.site-foot .wrap{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:32px}
.site-foot h3{color:#fff;font-size:16px;margin-bottom:12px}
.site-foot p,.site-foot a{color:var(--footer-muted);font-size:15px;line-height:1.7}
.site-foot a{text-decoration:none}
.site-foot a:hover{color:#fff;text-decoration:underline}
.site-foot .foot-logo{background:#fff;border-radius:8px;padding:10px 12px;display:inline-block;margin-bottom:16px}
.site-foot .foot-logo img{height:40px;width:auto;display:block}
.foot-base{border-top:1px solid rgba(255,255,255,.18);margin-top:32px;padding-top:20px;font-size:14px;color:var(--footer-muted)}

/* Editor */
.editor-shell{display:grid;grid-template-columns:340px 1fr;gap:24px;align-items:start}
.panel{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:24px}
.panel h2{font-size:20px;margin-bottom:4px}
.panel .panel-sub{color:var(--muted);font-size:14px;margin-bottom:20px}
.field{margin-bottom:16px}
.field label{display:block;font-weight:600;font-size:14px;color:var(--navy);margin-bottom:6px}
.field input,.field select,.field textarea{width:100%;font:inherit;font-size:15px;color:var(--ink);background:var(--surface);border:1.5px solid var(--hairline);border-radius:6px;padding:11px 12px;min-height:44px}
.field textarea{min-height:132px;resize:vertical}
.field .hint{font-size:13px;color:var(--muted);margin-top:5px}
.fieldset-title{font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--blue);margin:22px 0 12px}
.save-state{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:var(--tint);border-radius:6px;padding:12px 14px;font-size:14px;margin-bottom:20px}
.save-state .dot{width:9px;height:9px;border-radius:50%;background:var(--success);flex:none}
.save-state strong{color:var(--navy)}
.versions{list-style:none;font-size:14px}
.versions li{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--hairline)}
.versions li:first-child{border-top:0}
.versions .v-meta{color:var(--muted)}
.versions a{font-weight:600;white-space:nowrap}
.preview-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.preview-head h2{font-size:20px}
.market-switch{display:flex;border:1.5px solid var(--navy);border-radius:8px;overflow:hidden}
.market-switch button{font:inherit;font-weight:700;font-size:14px;padding:10px 16px;min-height:44px;border:0;background:var(--surface);color:var(--navy);cursor:pointer}
.market-switch button[aria-pressed="true"]{background:var(--navy);color:#fff}
.preview-page{background:var(--surface);border:1px solid var(--hairline);border-radius:4px;box-shadow:0 12px 32px rgba(0,22,61,.10);padding:40px 44px;max-width:794px;margin:0 auto}
.preview-page h2{font-size:26px}
.preview-page .role{color:var(--muted);font-size:14px;margin:4px 0 16px}
.preview-page h3{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--blue);margin:20px 0 8px;border-bottom:1px solid var(--hairline);padding-bottom:5px}
.preview-page p,.preview-page li{font-size:14.5px;line-height:1.6}
.preview-page ul{padding-left:18px}
.job{margin-bottom:14px}
.job-h{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.job-h .role-t{font-weight:700}
.job-h .dates{color:var(--muted);font-size:14px;white-space:nowrap}
.job .org{color:var(--muted);font-style:italic;font-size:14px;margin-bottom:4px}
.check-list{list-style:none;margin-top:16px}
.check-list li{padding:10px 0 10px 30px;position:relative;border-top:1px solid var(--hairline);font-size:15px;color:var(--muted)}
.check-list li::before{content:"✓";position:absolute;left:4px;top:10px;color:var(--success);font-weight:700}
.check-list li strong{color:var(--ink)}
.check-list .check-note{font-size:13px;display:block}

/* Templates gallery */
.filter-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:28px}
.filter-row .pill{border:1.5px solid var(--navy);background:var(--surface);color:var(--navy);border-radius:999px;padding:9px 16px;font:inherit;font-weight:600;font-size:14px;min-height:44px;cursor:pointer}
.filter-row .pill[aria-pressed="true"]{background:var(--navy);color:#fff}
.gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.tpl-card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.tpl-thumb{height:150px;display:flex;align-items:flex-end;padding:18px;border-bottom:1px solid var(--hairline)}
.tpl-thumb.tint-blue{background:#EAF1FB}
.tpl-thumb.tint-grey{background:#F8F9FA}
.tpl-thumb .mini{background:#fff;border:1px solid var(--hairline);border-radius:3px;box-shadow:0 4px 12px rgba(0,22,61,.12);padding:10px 12px;width:100%}
.tpl-thumb .mini b{display:block;font-family:"Space Grotesk",sans-serif;font-size:14px;color:var(--navy)}
.tpl-thumb .mini span{font-size:12px;color:var(--muted)}
.tpl-body{padding:20px;display:flex;flex-direction:column;gap:8px;flex:1}
.tpl-body h2{font-size:19px}
.tpl-cat{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--blue)}
.tpl-body p{color:var(--muted);font-size:14.5px;flex:1}
.tpl-body .tpl-link{font-weight:700;font-size:15px}
.portal-note{background:var(--warn-bg);border:1px solid #E8C87A;border-radius:var(--radius);padding:18px 20px;margin-top:28px}
.portal-note p{font-size:15px;color:var(--warn-text)}
.portal-note strong{color:var(--warn-text)}
.page-head{padding:48px 0 8px}
.page-head h1{font-size:44px;margin-bottom:12px}
.page-head p{color:var(--muted);font-size:17px;max-width:70ch}
.breadcrumb{font-size:14px;color:var(--muted);margin-bottom:16px}
.breadcrumb a{color:var(--blue)}

/* Responsive */
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;gap:40px}
  .cards,.steps{grid-template-columns:1fr 1fr}
  .gallery{grid-template-columns:1fr 1fr}
  .editor-shell{grid-template-columns:1fr}
  .site-foot .wrap{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .hero{padding:40px 0}
  .hero h1{font-size:36px}
  .page-head h1{font-size:32px}
  .section-head h2{font-size:26px}
  .paths,.cards,.steps,.gallery{grid-template-columns:1fr}
  .site-head .wrap{flex-wrap:wrap;gap:12px}
  .main-nav{order:3;width:100%;margin-left:0;border-top:1px solid var(--hairline);padding-top:8px}
  .main-nav a{padding:10px 10px}
  .head-cta{margin-left:auto}
  .btn{width:100%}
  .cta-row .btn{flex:1 1 100%}
  .head-cta .btn{width:auto}
  .preview-page{padding:28px 22px}
  .versions li{flex-wrap:wrap}
  .site-foot .wrap{grid-template-columns:1fr}
  .trust-strip{flex-direction:column;align-items:flex-start;gap:16px}
  .sheet{padding:26px 22px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* --- Resume Studio: functional editor (Parts 3 + 4, 16 Nov 2026) --- */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.field-error{color:#8F1D1D;font-size:13px;font-weight:600;margin-top:5px}
.field input[aria-invalid="true"],.field textarea[aria-invalid="true"],.skill-row input[aria-invalid="true"]{border-color:#8F1D1D;box-shadow:0 0 0 1px #8F1D1D}
.form-errors-summary{background:#FFF7E6;border:1px solid #E8C87A;border-radius:6px;color:#7A3E00;font-size:14px;padding:10px 12px;margin-bottom:16px}
.save-state.is-saving .dot{background:var(--blue)}
.edit-section{border-top:1px solid var(--hairline);padding-top:16px;margin-top:8px}
.edit-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.edit-section-head h3{font-size:17px}
.edit-section-ctrls{display:flex;gap:6px;flex-wrap:wrap}
/* 44px targets (2026-11-16): reorder/delete controls were 36.8px tall and
   icon-only ones 28.5px wide. min 44x44 now; label size, radius, colours
   and wrapping unchanged — the buttons just grow to the target. */
.mini-btn{font:inherit;font-size:13px;font-weight:600;color:var(--navy);background:var(--surface);border:1.5px solid var(--hairline);border-radius:6px;padding:10px 12px;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
/* The D1 rule `.skill-row>*{min-width:0}` below (same specificity, later
   in source order) would override the 44px min-width above for the
   icon-only skill buttons, so re-assert it here at higher specificity.
   The D1 shrink rule still governs the skill text input (1fr, min-width:0),
   which is what keeps the row inside a 320px viewport. */
.skill-row .mini-btn{min-width:44px}
.mini-btn:hover:not(:disabled){border-color:var(--navy);background:var(--tint)}
.mini-btn:disabled{opacity:.45;cursor:not-allowed}
.mini-btn-danger{color:#8F1D1D}
.mini-btn-danger:hover:not(:disabled){border-color:#8F1D1D;background:#FDF0F0}
.link-btn{font:inherit;font-size:14px;font-weight:600;color:var(--blue);background:none;border:0;padding:6px 10px;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:underline}
.link-btn-danger{color:#8F1D1D}
.entry-card{border:1px solid var(--hairline);border-radius:8px;padding:16px;margin-bottom:16px;background:var(--surface)}
.entry-card legend{font-weight:700;color:var(--navy);font-size:14px;padding:0 6px}
.entry-ctrls{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}
.date-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
/* D1 fix (2026-11-16): grid/flex children must be allowed to shrink below
   their intrinsic min-content width, or a month input (~183px) forces the
   whole editor panel wider than a 320px viewport. Desktop layout unchanged. */
.editor-shell>*{min-width:0}
.panel{min-width:0}
#preview{min-width:0}
.preview-page{min-width:0}
.date-grid>*{min-width:0}
.date-grid input{min-width:0;width:100%}
.skill-row>*{min-width:0}
.skill-row input{min-width:0}
.versions li>*{min-width:0}
.check-field{display:flex;align-items:center;gap:10px}
.check-field input{width:auto;min-height:20px;accent-color:var(--blue)}
.check-field label{margin-bottom:0;font-weight:500;color:var(--ink)}
.skill-list{display:grid;gap:10px;margin-bottom:12px}
.skill-row{display:grid;grid-template-columns:1fr auto auto auto;gap:6px;align-items:start}
.skill-row input{width:100%;font:inherit;font-size:15px;border:1.5px solid var(--hairline);border-radius:6px;padding:11px 12px;min-height:44px}
.skill-row .field-error{grid-column:1 / -1}
.storage-note{margin-top:24px;border:1px solid var(--hairline);border-radius:8px;padding:14px 16px;background:var(--paper)}
.storage-note summary{font-weight:700;color:var(--navy);cursor:pointer;min-height:44px;display:flex;align-items:center}
.storage-note p{font-size:14px;color:var(--muted);margin-top:10px}
.storage-note p strong{color:var(--ink)}
.export-status{border-radius:8px;padding:14px 16px;font-size:15px;margin-top:16px}
.export-status p{margin:0}
.export-loading{background:var(--tint);border:1px solid var(--blue)}
.export-done{background:#EAF6EE;border:1px solid var(--success)}
.export-error{background:#FDF0F0;border:1px solid #8F1D1D}
.check-list li.check-missing::before{content:"○";color:var(--warn-text)}
.preview-page.market-uk{max-width:794px}
.preview-page.market-us{max-width:816px}
#section-library .btn{margin:0 6px 6px 0}

/* --- Print / PDF export (Part 4): only the preview page prints. --- */
@media print{
  .site-head,.site-foot,.panel,.preview-head,.check-list,.cta-row,.no-print,
  .save-state,.page-head,.export-status,.storage-note{display:none !important}
  body{background:#fff}
  .wrap{max-width:none;padding:0}
  .editor-shell{display:block}
  #preview{display:block}
  .preview-page{box-shadow:none !important;border:0 !important;border-radius:0;max-width:none !important;margin:0;padding:0}
  .preview-page h3{break-after:avoid}
  .job{break-inside:avoid}
}

/* --- VQA-1 fix (2026-11-16): status boxes are untranslated English
   system messages (dynamic; may contain user-controlled document
   titles, so they are never run through innerHTML). In Urdu mode
   render them as LTR islands, right-aligned, so no bidi period
   artifacts appear on screen. In print they are hidden entirely
   (see @media print above). */
[dir="rtl"] .export-status{direction:ltr;text-align:right}

/* D1 fix (2026-11-16): below 640px the date fields stack in one column.
   NOTE — this block must stay AFTER the base .date-grid rule above, which
   is declared after the main 640px media query; same specificity, so
   source order decides. Two month inputs side-by-side need 378px. */
@media (max-width:640px){
  .date-grid{grid-template-columns:1fr;gap:12px 0}
}

/* --- Phase 1 (2026-11-16): template family presentation (ADR-207) --- */
/* ADDITIVE classes only — no existing rule above is changed. When a
   template is applied in the editor, editor.js adds tpl-<family> to
   #preview-page and shows the template name in the chip. This is a
   FAMILY look (accent/serif), not the standalone preview's exact
   layout: the 12 previews have their own DOM/CSS that cannot be dropped
   onto the editor preview. The exact template_id is persisted
   (localStorage + server); the standalone preview remains the
   full-fidelity rendering. ATS family + Atlas + Scholar Academic keep
   the plain Atlas presentation (no extra rules). */
.preview-page.tpl-modern h3{color:#0F766E} /* teal, 5.0:1 on white */
.preview-page.tpl-executive h2,.preview-page.tpl-executive h3{font-family:Georgia,'Times New Roman',serif}
.preview-page.tpl-creative h3{color:#9A3412} /* warm burnt orange, 5.9:1 on white */

/* --- Sprint 3 (2026-11-16): per-template visual distinction (ADR-214) --- */
/* ADDITIVE classes only — no existing rule above is changed. editor.js adds
   tplv-<slug> to #preview-page alongside tpl-<family>. Accent colours are
   taken from each template's own standalone preview CSS (templates/previews/
   NN-<slug>.css); every h3/name text colour below is >= 4.5:1 on white
   (gold #C8A96A is used ONLY as a rule, never as text). Each variant differs
   in at least two dimensions (accent colour + heading treatment and/or
   rule/divider style and/or name treatment), so the 12 templates are
   visibly distinct in the editor preview AND in print (same DOM, same
   rules — @media print does not strip these classes). This is still a
   presentation layer on the single Atlas DOM, NOT full-fidelity standalone
   rendering (ADR-207/214): layout and column structure are not reproduced;
   the standalone previews remain canonical. Atlas (tplv-atlas) keeps the
   plain base look: no extra rules. */
.preview-page.tplv-plainfield-ats h2{color:#1F3864}
.preview-page.tplv-plainfield-ats h3{color:#1F3864;border-bottom:1px solid #1F3864}
.preview-page.tplv-ledger-ats h2{color:#243447}
.preview-page.tplv-ledger-ats h3{color:#243447;border-bottom:3px double #243447}
.preview-page.tplv-stack-ats h2{color:#0F2A43;font-size:28px}
.preview-page.tplv-stack-ats h3{color:#0F2A43;border-bottom:3px solid #0F2A43}
.preview-page.tplv-meridian-ats h2{color:#134E4A}
.preview-page.tplv-meridian-ats h3{color:#134E4A;border-bottom:0;border-left:4px solid #134E4A;padding-left:8px}
.preview-page.tplv-halcyon-modern h2{color:#C2410C}
.preview-page.tplv-halcyon-modern h3{color:#C2410C;border-bottom:2px dotted #C2410C}
.preview-page.tplv-north-modern h2{color:#10233F;font-size:28px}
.preview-page.tplv-north-modern h3{color:#10233F;letter-spacing:.18em;border-bottom:2px solid #10233F}
.preview-page.tplv-vantage-modern h2{font-family:Georgia,'Times New Roman',serif;color:#0F766E}
.preview-page.tplv-vantage-modern h3{font-family:Georgia,'Times New Roman',serif;color:#0F766E}
.preview-page.tplv-boardroom-executive h2,.preview-page.tplv-boardroom-executive h3{font-family:Georgia,'Times New Roman',serif}
.preview-page.tplv-boardroom-executive h2{color:#0F1E2E}
.preview-page.tplv-boardroom-executive h3{color:#0F1E2E;border-bottom:2px solid #C8A96A}
.preview-page.tplv-sovereign-executive h2{font-family:Georgia,'Times New Roman',serif;color:#7C5A1E}
.preview-page.tplv-sovereign-executive h3{color:#7C5A1E;border-bottom:3px double #7C5A1E}
.preview-page.tplv-scholar-academic h2{font-family:Georgia,'Times New Roman',serif;color:#1E3A5F}
.preview-page.tplv-scholar-academic h3{color:#1E3A5F;letter-spacing:.22em;border-bottom:1px solid #1E3A5F}
.preview-page.tplv-studio-creative h2{color:#E11D48;font-size:30px}
.preview-page.tplv-studio-creative h3{color:#BE123C;border-bottom:0;border-left:4px solid #E11D48;padding-left:8px}
.preview-page.tplv-portfolio-creative h2{color:#6D28D9;font-size:28px}
.preview-page.tplv-portfolio-creative h3{color:#6D28D9;border-bottom:0;border-top:3px solid #6D28D9;padding-top:5px}

/* --- Sprint 3 (2026-11-16): carried-through + custom sections (ADR-215/216) --- */
/* The preview renders carried-through and custom sections with the same
   h3 + list treatment as managed sections. The two notes below the preview
   are no-print chrome (never in the PDF): one says carried-through
   sections are shown as stored with no edit controls here; the other says
   custom sections are stored in this browser only, not on the account. */
.carried-note{color:var(--muted);font-size:14px;margin-top:12px}
.custom-note{color:var(--muted);font-size:14px;margin-top:8px}
.custom-sec-form .field textarea{min-height:88px}

/* --- Phase 1 (2026-11-16): language switcher (ADR-209) --- */
/* Additive rule only. The switcher lives in .head-cta on all six Atlas
   pages; 44px minimum target like the other header controls. */
#locale-switcher{font:inherit;font-size:14px;font-weight:600;color:var(--navy);background:var(--surface);border:1.5px solid var(--hairline);border-radius:6px;padding:10px 8px;min-height:44px;margin-right:8px;cursor:pointer}

/* --- Sprint 2 P4 (2026-11-16): mobile editor / RTL / touch-target polish --- */
/* ADDITIVE overrides only — no existing rule above is changed; every rule
   below is later in source order, so it wins at equal specificity.
   Evidence: brand/evidence/2026-11-16/sprint2/p4-probe-*.json. */

/* P4-1 — RTL 10,000px overflow (ALL 6 pages): .skip was hidden with
   left:-9999px. In LTR that stays off the scrollable area; in RTL
   (dir=rtl alone, no i18n strings involved) it expands
   documentElement.scrollWidth to ~10,319px at a 320px viewport, giving
   every Urdu page a horizontal scrollbar + ~10,000px of sideways scroll
   into empty space (probe-measured; hit-testing proves the content
   itself is laid out in the viewport — the blank headless RTL
   screenshots are a capture artifact of the negative scroll origin,
   not what a user sees). Fix: the same clip technique .visually-hidden
   already uses — a 1px clipped box at its static position, restored to
   a normal box on :focus. Keyboard behaviour unchanged (skip link stays
   Tab stop #1; Enter still moves focus to #main — re-verified 6/6). */
.skip{left:auto;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.skip:focus{left:8px;top:8px;width:auto;height:auto;padding:10px 16px;overflow:visible;clip:auto;clip-path:none;white-space:normal}
/* FG-1 (2026-11-17): in RTL the revealed skip link belongs on the
   inline-start (right) side, not the physical left. */
[dir="rtl"] .skip:focus{left:auto;right:8px}

/* FG-1 (2026-11-17): per-span bidi isolation for mixed-script CV content
   (editor.js cel()). unicode-bidi:isolate keeps a Latin run inside an
   Urdu paragraph (and vice versa) from reordering its neighbours; the
   span's own dir attribute sets its direction. Class-based (not inline
   style) so the served CSP stays clean. */
.bidi-iso{unicode-bidi:isolate}

/* P4-2 — touch targets. Main-nav links already had min-height:44px but
   no min-width: the Urdu "ہوم" link measured 43x44 at 320px (1px short).
   Template card links (.tpl-link) were 24px tall (12 cards x 2 links);
   footer nav links ~20px tall; "Present" + marketing checkboxes 13x20.
   Checkboxes get the WCAG 2.2 AA 24px minimum (they are not primary
   controls; their <label for> text is the larger effective target).
   Primary controls (nav, card links, footer nav) get the full 44px. */
.main-nav a{min-width:44px;justify-content:center}
.tpl-body .tpl-link{display:inline-flex;align-items:center;min-height:44px}
.site-foot nav a{display:inline-flex;align-items:center;min-height:44px}
input[type="checkbox"]{width:24px;height:24px;min-height:24px;flex:none}

/* P4-3 — RTL mirroring for physical left/right rules (cosmetic, small):
   accent border, list bullets/checks and the sheet tag mirror to the
   inline-start side; preview/sheet list padding flips so bullets do
   not collide with RTL text. */
[dir="rtl"] .free-promise{border-left-width:1px;border-right:4px solid var(--blue)}
[dir="rtl"] .path-card li{padding:8px 28px 8px 0}
[dir="rtl"] .path-card li::before{left:auto;right:4px}
[dir="rtl"] .check-list li{padding:10px 30px 10px 0}
[dir="rtl"] .check-list li::before{left:auto;right:4px}
[dir="rtl"] .sheet-tag{right:auto;left:16px}
/* VQA-2 fix (2026-11-16): the preview's list padding keys off the
   PREVIEW's own dir (set by editor.js from the CV content's script),
   not the UI chrome direction — an English CV in Urdu UI keeps LTR
   bullets, an Urdu CV keeps RTL bullets. The .sheet is chrome sample
   content, so it still follows the UI direction. */
[dir="rtl"] .sheet ul{padding-left:0;padding-right:18px}
.preview-page[dir="rtl"] ul{padding-left:0;padding-right:18px}

/* --- Sprint 3 Agent D (2026-11-16): pricing + legal pages, footer legal column --- */
/* ADDITIVE rules only — no existing rule above is changed. The footer grid
   override below is desktop-only (min-width:901px): at <=900px the
   existing media queries collapse the footer to 2 columns, then 1 — an
   unscoped override here would beat those equal-specificity rules in
   source order and force 4 columns on mobile (100px overflow at 390px,
   found in verification 2026-11-16). */
@media (min-width:901px){.site-foot .wrap{grid-template-columns:1.2fr 1fr 1fr 1fr}}
.beta-banner{background:var(--warn-bg);border:1px solid #E8C87A;border-radius:var(--radius);padding:18px 20px;margin:0 0 28px}
.beta-banner p{font-size:15px;color:var(--warn-text)}
.beta-banner strong{color:var(--warn-text)}
.price-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:32px}
.price-card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:28px}
.price-card h2{font-size:24px;margin-bottom:4px}
.price-card-pro{border:2px solid var(--blue)}
.price-tag{display:inline-block;background:var(--tint);color:var(--navy);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:5px 10px;border-radius:999px;margin-bottom:14px}
.price-amount{font-family:"Space Grotesk",Inter,system-ui,sans-serif;font-size:44px;font-weight:700;color:var(--navy);line-height:1.1;margin:8px 0 4px}
.price-amount .price-per{font-size:16px;font-weight:600;color:var(--muted)}
.price-per{color:var(--muted);font-size:15px;margin-bottom:16px}
.price-card ul{list-style:none;margin-bottom:20px}
.price-card li{padding:8px 0 8px 28px;position:relative;border-top:1px solid var(--hairline);font-size:15px}
.price-card li::before{content:"";position:absolute;left:4px;top:15px;width:10px;height:10px;border-radius:50%;background:var(--blue)}
.price-card li strong{color:var(--navy)}
.compare{width:100%;border-collapse:collapse;margin:16px 0 24px;font-size:15px}
.compare th,.compare td{border:1px solid var(--hairline);padding:10px 12px;text-align:left;vertical-align:top}
.compare thead th{background:var(--navy);color:#fff}
.compare tbody th{color:var(--navy)}
.legal-body{max-width:72ch;padding-bottom:8px}
.legal-body h2{font-size:24px;margin:32px 0 12px}
.legal-body h2:first-child{margin-top:0}
.legal-body p{color:var(--muted);margin-bottom:12px}
.legal-body p strong{color:var(--ink)}
.legal-body ul{padding-left:22px;margin-bottom:12px}
.legal-body li{color:var(--muted);margin-bottom:6px}
.legal-body li strong{color:var(--ink)}
/* Admin tables (Sprint 3 follow-up): wide tables scroll inside their
   wrapper instead of pushing the page sideways. The admin tables are
   wrapped in <div class="table-wrap"> in admin.html; this rule replaces
   the JS CSSOM workaround that used to live in admin.js. */
.table-wrap{overflow-x:auto}
@media (max-width:640px){
  .price-grid{grid-template-columns:1fr}
  .price-amount{font-size:36px}
  /* Comparison table fits the viewport instead of scrolling sideways:
     fixed thirds, smaller type/padding, words wrap (verified 390 + 320). */
  .compare{table-layout:fixed;font-size:14px}
  .compare th,.compare td{padding:8px 8px;overflow-wrap:break-word}
}
[dir="rtl"] .price-card li{padding:8px 28px 8px 0}
[dir="rtl"] .legal-body ul{padding-left:0;padding-right:22px}
[dir="rtl"] .price-card li::before{left:auto;right:4px}

/* D-QA2 (2026-11-16): classes replacing the inline style="" attributes
   removed from editor.html — the served CSP (default-src 'self') blocks
   inline styles, so each load logged a console violation per attribute.
   Same values, same rendering; verify-editor.py still passes 45/45. */
.muted-note{color:var(--muted);font-size:14px}
.mb-8{margin-bottom:8px}
.mb-16{margin-bottom:16px}
.mt-12{margin-top:12px}
.mt-16{margin-top:16px}
.mt-20{margin-top:20px}
.mt-28{margin-top:28px}
