/* ATLAS R57 CP3 — family-level visual differentiation.
   Same design system, distinct legal-family rhythm. No semantic/content mutation. */

:where(.atlas-anatomy){
  --atlas-f-accent:#8b332f;
  --atlas-f-accent-2:#b7833d;
  --atlas-f-soft:#f5efe6;
  --atlas-f-line:rgba(16,28,33,.14);
  --atlas-f-radius:18px;
  --atlas-f-shadow:0 18px 46px rgba(16,28,33,.055);
}
:where(.atlas-anatomy) .p2-page-hero{
  border-bottom:1px solid var(--atlas-f-line);
}
:where(.atlas-anatomy) .p2-eyebrow,
:where(.atlas-anatomy) .p2-kicker{color:var(--atlas-f-accent)}
:where(.atlas-anatomy) :is(.p3-decision-card,.p2-hero__panel,.p3-scope>div,.p3-scope>aside){
  border-radius:var(--atlas-f-radius);
}

/* FAMILY — softer, relational, generous breathing room */
:where(.atlas-anatomy--family){--atlas-f-accent:#8a3d3d;--atlas-f-soft:#f7efea;--atlas-f-radius:26px}
:where(.atlas-anatomy--family) .p2-page-hero{background:linear-gradient(145deg,#fbf7f1 0%,#fff 58%,#f8efeb 100%)}
:where(.atlas-anatomy--family) .p2-section-head{padding-left:1.35rem;border-left:3px solid rgba(138,61,61,.38)}
:where(.atlas-anatomy--family) .p2-section--tint{background:linear-gradient(180deg,#f7f0e9,#f4eee7)}
:where(.atlas-anatomy--family) :is(.p3-decision-card,.p2-hero__panel){box-shadow:var(--atlas-f-shadow)}
:where(.atlas-anatomy--family) .p2-process li{grid-template-columns:56px 1fr;border-bottom-color:rgba(138,61,61,.14)}

/* ENFORCEMENT — linear procedural rail, compact corners */
:where(.atlas-anatomy--enforcement){--atlas-f-accent:#6f2b2b;--atlas-f-radius:8px}
:where(.atlas-anatomy--enforcement) .p2-page-hero{background:linear-gradient(105deg,#f7f3ed 0 72%,#ebe2d8 72%)}
:where(.atlas-anatomy--enforcement) .p2-section{border-top:1px solid rgba(16,28,33,.09)}
:where(.atlas-anatomy--enforcement) .p2-section-head{position:relative;padding-left:1.2rem}
:where(.atlas-anatomy--enforcement) .p2-section-head:before{content:"";position:absolute;left:0;top:.25rem;bottom:.25rem;width:3px;background:var(--atlas-f-accent)}
:where(.atlas-anatomy--enforcement) .p2-process{border-left:2px solid rgba(111,43,43,.3);border-top:0;padding-left:1.3rem}
:where(.atlas-anatomy--enforcement) .p2-process li{border-bottom:1px solid rgba(16,28,33,.11)}
:where(.atlas-anatomy--enforcement) :is(.p3-decision-card,.p2-hero__panel){border-radius:8px;box-shadow:none}

/* CORPORATE — boardroom geometry, modular blocks */
:where(.atlas-anatomy--corporate){--atlas-f-accent:#713a31;--atlas-f-radius:6px}
:where(.atlas-anatomy--corporate) .p2-page-hero{background-color:#faf7f1;background-image:linear-gradient(rgba(113,58,49,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(113,58,49,.055) 1px,transparent 1px);background-size:32px 32px}
:where(.atlas-anatomy--corporate) .p2-section-head{max-width:880px;padding-top:1rem;border-top:3px solid var(--atlas-f-accent)}
:where(.atlas-anatomy--corporate) :is(.p3-decision-card,.p3-deliverables article,.p2-hero__panel){border-radius:6px}
:where(.atlas-anatomy--corporate) .p3-decision-grid{gap:1.35rem}
:where(.atlas-anatomy--corporate) .p3-decision-card{box-shadow:8px 8px 0 rgba(113,58,49,.055)}

/* ADMINISTRATIVE / FISCAL — numbered procedural dossier */
:where(.atlas-anatomy--administrative){--atlas-f-accent:#7d3b32;--atlas-f-radius:12px;counter-reset:atlas-admin}
:where(.atlas-anatomy--administrative) .p2-page-hero{background:linear-gradient(180deg,#f9f7f2,#f2eee7)}
:where(.atlas-anatomy--administrative) .p2-section{counter-increment:atlas-admin}
:where(.atlas-anatomy--administrative) .p2-section-head{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:1rem;max-width:900px}
:where(.atlas-anatomy--administrative) .p2-section-head:before{content:counter(atlas-admin,decimal-leading-zero);grid-column:1;grid-row:1 / span 3;font:700 .78rem/1.2 var(--ac-font-ui,"Manrope",sans-serif);letter-spacing:.08em;color:var(--atlas-f-accent);padding-top:.55rem;border-top:2px solid currentColor}
:where(.atlas-anatomy--administrative) .p2-section-head>*{grid-column:2}
:where(.atlas-anatomy--administrative) .p2-section--tint{background:#f3efe8}

/* PROPERTY — plans / documents, broad framed surfaces */
:where(.atlas-anatomy--property){--atlas-f-accent:#80513c;--atlas-f-radius:14px}
:where(.atlas-anatomy--property) .p2-page-hero{background-color:#f8f5ef;background-image:linear-gradient(90deg,rgba(128,81,60,.045) 1px,transparent 1px),linear-gradient(rgba(128,81,60,.045) 1px,transparent 1px);background-size:52px 52px}
:where(.atlas-anatomy--property) .p2-section-head{max-width:930px}
:where(.atlas-anatomy--property) .p2-section-head:after{content:"";display:block;width:min(160px,30vw);height:2px;margin-top:1.2rem;background:linear-gradient(90deg,var(--atlas-f-accent),transparent)}
:where(.atlas-anatomy--property) :is(.p3-scope>div,.p3-decision-card,.p2-hero__panel){box-shadow:0 14px 0 rgba(128,81,60,.04);border-radius:14px}
:where(.atlas-anatomy--property) .p2-section--tint{background:#f1ede6}

/* INHERITANCE — editorial/documentary paper rhythm */
:where(.atlas-anatomy--inheritance){--atlas-f-accent:#744332;--atlas-f-radius:2px}
:where(.atlas-anatomy--inheritance) .p2-page-hero{background:linear-gradient(90deg,#f8f4ec 0 78%,#eee7db 78%)}
:where(.atlas-anatomy--inheritance) .p2-section-head{max-width:780px;padding-bottom:1.15rem;border-bottom:1px solid rgba(116,67,50,.25)}
:where(.atlas-anatomy--inheritance) .p2-section--tint{background:#f6f1e8}
:where(.atlas-anatomy--inheritance) :is(.p3-decision-card,.p2-hero__panel){border-radius:2px;box-shadow:0 12px 28px rgba(70,49,38,.045)}
:where(.atlas-anatomy--inheritance) .p2-plain-list li{border-bottom:1px solid rgba(116,67,50,.09);padding-block:.65rem}

/* IMMIGRATION — journey / status progression */
:where(.atlas-anatomy--immigration){--atlas-f-accent:#7b4936;--atlas-f-radius:20px}
:where(.atlas-anatomy--immigration) .p2-page-hero{background:linear-gradient(140deg,#faf6f0,#fff 58%,#efe9df)}
:where(.atlas-anatomy--immigration) .p4-mini-process{position:relative;padding-left:1.2rem;border-left:2px dashed rgba(123,73,54,.28)}
:where(.atlas-anatomy--immigration) .p4-mini-process>*{position:relative}
:where(.atlas-anatomy--immigration) .p4-mini-process>*:before{content:"";position:absolute;left:-1.52rem;top:.65rem;width:8px;height:8px;border-radius:50%;background:var(--atlas-f-accent);box-shadow:0 0 0 5px #fbfaf6}
:where(.atlas-anatomy--immigration) .p4-fact-grid>*{border-radius:20px}
:where(.atlas-anatomy--immigration) .p2-section--tint{background:#f3eee7}

/* CLAIMS / RECOVERY — ledger-like clarity */
:where(.atlas-anatomy--claims){--atlas-f-accent:#75372f;--atlas-f-radius:4px}
:where(.atlas-anatomy--claims) .p2-page-hero{background:linear-gradient(180deg,#faf7f2,#f5f0e9)}
:where(.atlas-anatomy--claims) .p2-section-head{max-width:850px;padding:.9rem 0;border-top:1px solid rgba(117,55,47,.35);border-bottom:1px solid rgba(117,55,47,.16)}
:where(.atlas-anatomy--claims) :is(.p3-decision-card,.p2-hero__panel){border-radius:4px;box-shadow:none}
:where(.atlas-anatomy--claims) .p3-deliverables{border-radius:4px}
:where(.atlas-anatomy--claims) .p3-deliverables article:nth-child(even){background:#f7f3ed}

/* CITIZENSHIP — dossier / document pack */
:where(.atlas-anatomy--citizenship){--atlas-f-accent:#7a4137;--atlas-f-radius:10px}
:where(.atlas-anatomy--citizenship) .p2-page-hero{background:linear-gradient(120deg,#faf7f1 0 67%,#eee7dc 67%)}
:where(.atlas-anatomy--citizenship) .p2-section-head{padding:1rem 1.2rem;border:1px solid rgba(122,65,55,.18);border-left:5px solid var(--atlas-f-accent);background:rgba(255,255,255,.44);max-width:900px}
:where(.atlas-anatomy--citizenship) :is(.p3-decision-card,.p2-hero__panel){border-radius:10px}
:where(.atlas-anatomy--citizenship) .p2-check-list li{padding-block:.9rem}

/* DIGITAL / IP — technical grid, angular surfaces */
:where(.atlas-anatomy--digital){--atlas-f-accent:#693b38;--atlas-f-radius:5px}
:where(.atlas-anatomy--digital) .p2-page-hero{background-color:#f8f6f1;background-image:radial-gradient(circle at 1px 1px,rgba(16,28,33,.09) 1px,transparent 1.2px);background-size:24px 24px}
:where(.atlas-anatomy--digital) .p2-section-head{max-width:900px;padding-left:1rem;border-left:1px solid var(--atlas-f-accent)}
:where(.atlas-anatomy--digital) :is(.p4-fact-grid>*,.p3-decision-card,.p2-hero__panel){border-radius:5px}
:where(.atlas-anatomy--digital) .p4-fact-grid>*{position:relative;overflow:hidden}
:where(.atlas-anatomy--digital) .p4-fact-grid>*:after{content:"";position:absolute;right:0;top:0;width:28px;height:2px;background:var(--atlas-f-accent)}

/* COMPLIANCE — audit matrix / controlled checklist */
:where(.atlas-anatomy--compliance){--atlas-f-accent:#6e4037;--atlas-f-radius:0px}
:where(.atlas-anatomy--compliance) .p2-page-hero{background:linear-gradient(180deg,#f9f6f0,#f1ede6)}
:where(.atlas-anatomy--compliance) .p2-section-head{max-width:920px;padding:.9rem 1rem;border:1px solid rgba(110,64,55,.2);background:#fbf9f5}
:where(.atlas-anatomy--compliance) :is(.p4-fact-grid,.p3-decision-grid){gap:1px;background:rgba(110,64,55,.16);border:1px solid rgba(110,64,55,.16)}
:where(.atlas-anatomy--compliance) :is(.p4-fact-grid>*,.p3-decision-card){border:0!important;border-radius:0!important;background:#fff}
:where(.atlas-anatomy--compliance) .p2-section--tint{background:#f4f0e9}

/* EMPLOYMENT — decision hierarchy / action bands */
:where(.atlas-anatomy--employment){--atlas-f-accent:#7c4236;--atlas-f-radius:16px}
:where(.atlas-anatomy--employment) .p2-page-hero{background:linear-gradient(125deg,#faf6ef,#fff 60%,#f0e8df)}
:where(.atlas-anatomy--employment) .p2-section-head{max-width:880px;padding-top:1rem;border-top:4px solid rgba(124,66,54,.28)}
:where(.atlas-anatomy--employment) .p2-section:nth-of-type(even) .p2-container{padding-left:clamp(0rem,3vw,2.5rem)}
:where(.atlas-anatomy--employment) :is(.p3-decision-card,.p2-hero__panel){border-radius:16px}

/* CONTRACTS — negotiation table / commercial document rhythm */
:where(.atlas-anatomy--contracts){--atlas-f-accent:#75402f;--atlas-f-radius:12px}
:where(.atlas-anatomy--contracts) .p2-page-hero{background:linear-gradient(160deg,#fbf8f2,#fff 52%,#efe8dc)}
:where(.atlas-anatomy--contracts) .p2-section-head{max-width:900px;position:relative;padding-bottom:1rem}
:where(.atlas-anatomy--contracts) .p2-section-head:after{content:"";position:absolute;left:0;bottom:0;width:72px;height:3px;background:var(--atlas-f-accent)}
:where(.atlas-anatomy--contracts) .p3-decision-grid{gap:1.2rem}
:where(.atlas-anatomy--contracts) .p3-decision-card{border-radius:12px;box-shadow:0 8px 24px rgba(16,28,33,.04)}
:where(.atlas-anatomy--contracts) .p2-section--tint{background:#f4efe7}

/* GENERAL — restrained */
:where(.atlas-anatomy--general){--atlas-f-accent:#773d34}
:where(.atlas-anatomy--general) .p2-section-head{padding-bottom:1rem;border-bottom:1px solid rgba(119,61,52,.2)}

@media (max-width:720px){
  :where(.atlas-anatomy--administrative) .p2-section-head{grid-template-columns:34px minmax(0,1fr);column-gap:.7rem}
  :where(.atlas-anatomy--administrative) .p2-section-head:before{font-size:.68rem}
  :where(.atlas-anatomy--family) .p2-section-head,
  :where(.atlas-anatomy--digital) .p2-section-head{padding-left:.85rem}
  :where(.atlas-anatomy--citizenship) .p2-section-head{padding:.8rem .9rem}
  :where(.atlas-anatomy--employment) .p2-section:nth-of-type(even) .p2-container{padding-left:0}
}

@media (prefers-reduced-motion:reduce){
  :where(.atlas-anatomy) *{scroll-behavior:auto!important}
}
