/* Phase 4 design system — loaded after app.css and 3d/studio.css; overrides their tokens.
 * Palette and typeface from the Saudi Architecture Brand Guidelines (Dec 2024): Alexandria; Nature #7F8C73,
 * Sea #76A7B3, Jacaranda #9D9AB5, Sand #CFAC67, Mountains #CF9A88. Neutrals follow the Saudi Architecture website
 * (#161616 text, #6C737F secondary, #D2D6DB borders, #F3F4F6 grey). Text colours are darker shades of the brand hues
 * so that they meet WCAG AA on white (see docs/10). */
/* (Phase 5) Alexandria removed — the site typeface IBM Plex Sans Arabic is declared in atlas5.css */

:root {
  --nature: #7F8C73; --nature-ink: #4E5A45; --nature-deep: #3A4434; --nature-soft: #EEF0EA;
  --sea-c: #76A7B3; --sea-ink: #2F6370; --sea-soft: #E8F1F3;
  --jac: #9D9AB5; --jac-ink: #4B4868; --jac-soft: #EFEEF5;
  --sand: #CFAC67; --sand-ink: #7A5E23; --sand-soft: #F7F0E1;
  --mount: #CF9A88; --mount-soft: #F7ECE8;
  --paper: #F7F7F4; --surface: #FFFFFF; --raised: #FFFFFF; --ink: #161616; --ink-2: #384250; --muted: #5F6672; --faint: #9DA4AE;
  --line: #E5E7EB; --line-2: #D2D6DB; --stone: #F1EFEA; --stone-2: #DCD7CC;
  --accent: var(--jac); --accent-ink: var(--jac-ink); --accent-soft: var(--jac-soft); --accent-line: #CFCDE0;
  --brand: var(--nature-ink); --brand-hover: var(--nature-deep);
  --timber: #7A5636; --timber-soft: #F5EEE6; --timber-line: #DECBB6;
  --req: #8A2F3D; --req-soft: #F8E9EB; --req-line: #E6C3C9;
  --ok: #3E6A4E; --warn: #8A5A12; --warn-soft: #FBF3E3;
  --sea: #EEF2F3; --boundary: #FFFFFF; --focus: #2F6370;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 22, 22, .04), 0 8px 24px rgba(22, 22, 22, .05);
  --font: "Alexandria", Tahoma, "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  --measure: 62ch; --page: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --nature-ink: #B7C3A9; --nature-deep: #D5DECB; --nature-soft: #252A21; --sea-ink: #9CCAD5; --sea-soft: #1D2A2D;
  --jac: #B3B0CB; --jac-ink: #CFCDE6; --jac-soft: #26252F; --sand-ink: #E2C98F; --sand-soft: #2C2619; --mount-soft: #2E2420;
  --paper: #121314; --surface: #1A1B1D; --raised: #1F2023; --ink: #F1F2F3; --ink-2: #D2D6DB; --muted: #A4ABB5; --faint: #6C737F;
  --line: #2B2D31; --line-2: #3A3D42; --stone: #24231F; --stone-2: #3A372F;
  --accent-line: #45435A; --brand: #B7C3A9; --brand-hover: #D5DECB;
  --timber: #D2AA80; --timber-soft: #2A231C; --timber-line: #4A3B2B; --req: #EBA6B1; --req-soft: #33222A; --req-line: #5A3540;
  --ok: #95C7A6; --warn: #E2B46A; --warn-soft: #2C2518; --sea: #16191A; --boundary: #121314; --focus: #9CCAD5; color-scheme: dark; } }
:root[data-theme="dark"] {
  --nature-ink: #B7C3A9; --nature-deep: #D5DECB; --nature-soft: #252A21; --sea-ink: #9CCAD5; --sea-soft: #1D2A2D;
  --jac: #B3B0CB; --jac-ink: #CFCDE6; --jac-soft: #26252F; --sand-ink: #E2C98F; --sand-soft: #2C2619; --mount-soft: #2E2420;
  --paper: #121314; --surface: #1A1B1D; --raised: #1F2023; --ink: #F1F2F3; --ink-2: #D2D6DB; --muted: #A4ABB5; --faint: #6C737F;
  --line: #2B2D31; --line-2: #3A3D42; --stone: #24231F; --stone-2: #3A372F;
  --accent-line: #45435A; --brand: #B7C3A9; --brand-hover: #D5DECB;
  --timber: #D2AA80; --timber-soft: #2A231C; --timber-line: #4A3B2B; --req: #EBA6B1; --req-soft: #33222A; --req-line: #5A3540;
  --ok: #95C7A6; --warn: #E2B46A; --warn-soft: #2C2518; --sea: #16191A; --boundary: #121314; --focus: #9CCAD5; color-scheme: dark; }

body { font-family: var(--font); font-size: 16px; line-height: 1.8; font-weight: 400; background: var(--paper); }
h1, h2, h3, .title, .h2, .h3 { font-weight: 600; letter-spacing: 0; }
.en { font-family: "Alexandria", "Segoe UI", system-ui, sans-serif; }
main { max-width: var(--page); padding: 24px 24px 72px; }

/* ---------- site shell (replaceable: everything inside .top / .foot comes from site.config.js) */
.top { background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); }
.top__in { max-width: var(--page); padding: 12px 24px; gap: 20px; }
.brand { gap: 10px; font-weight: 600; font-size: 15px; }
.brand__mark { display: none; }
.brand__name { color: var(--ink); }
.brand__tag { font-size: 11.5px; font-weight: 500; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; line-height: 1.7; }
.crumbs { font-size: 13px; gap: 4px 8px; }
.crumbs a { border-bottom: 0; color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.crumbs [aria-current] { color: var(--ink-2); }
.site-link { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; padding: 4px 8px; border-radius: 8px; }
.site-link:hover { color: var(--ink); background: var(--stone); }
.iconbtn { border-color: var(--line); background: transparent; }
.foot { max-width: var(--page); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }
.foot__note { flex: 1 1 380px; }

/* ---------- shared primitives */
.btn { border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 8px 16px; font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.btn:hover { border-color: var(--ink-2); }
.btn--primary, .btn.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn--primary { color: #121314; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #121314; } }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--quiet { border-color: transparent; background: transparent; color: var(--ink-2); padding-inline: 4px; }
.btn--quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.btn--lg { padding: 12px 22px; font-size: 16px; border-radius: 12px; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
h1.title { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.3; font-weight: 600; margin: 0 0 10px; }
.lede { font-size: 17px; color: var(--ink-2); max-width: var(--measure); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill--live { background: var(--nature-soft); color: var(--nature-ink); }
.pill--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nature); }
.pill--soon { background: var(--stone); color: var(--muted); }
.pill--proto { background: var(--sand-soft); color: var(--sand-ink); }
.symslot { width: 44px; height: 44px; border-radius: 10px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; flex: none; position: relative; }
.symslot__sw { width: 18px; height: 18px; border-radius: 5px; }
.symslot--lg { width: 56px; height: 56px; border-radius: 12px; }
.symslot--lg .symslot__sw { width: 24px; height: 24px; }
.sec-title { font-size: clamp(20px, 2vw, 26px); font-weight: 600; margin: 0 0 4px; }
.sec-sub { color: var(--muted); margin: 0 0 18px; max-width: var(--measure); }
.footnote { font-size: 13px; color: var(--muted); max-width: 80ch; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.footnote a { color: inherit; }

/* ---------- L1 national map */
.atlas-home { display: grid; gap: 10px; }
.atlas-home__head { text-align: center; max-width: 720px; margin: 8px auto 0; }
.atlas-home__head .lede { margin: 0 auto; }
.atlas-home__stage { position: relative; max-width: 1060px; width: 100%; margin: 0 auto; }
.atlas-home__stage .ksa-map__stage { border: 0; background: transparent; box-shadow: none; }
.atlas-home__stage .ksa-map__svg { max-height: min(72vh, 720px); }
.atlas-home__bar { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; align-items: center; font-size: 13.5px; color: var(--muted); }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.preview { position: absolute; inset-inline-start: 0; top: 0; width: min(320px, 40%); background: var(--surface); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(22,22,22,.12);
  padding: 18px 18px 16px; display: grid; gap: 10px; z-index: 5; border: 1px solid var(--line); }
.preview[hidden] { display: none; }
.preview__head { display: flex; gap: 12px; align-items: center; }
.preview__name { font-size: 19px; font-weight: 600; line-height: 1.4; margin: 0; }
.preview__d { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.preview__x { position: absolute; top: 8px; inset-inline-end: 8px; border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 18px; }
.preview__x:hover { background: var(--stone); }
.preview__meta { font-size: 13px; color: var(--muted); }
.preview .btn--primary { justify-content: center; }
.directory { max-width: 1060px; margin: 6px auto 0; width: 100%; }
.directory > summary { list-style: none; cursor: pointer; text-align: center; color: var(--ink-2); font-size: 14px; padding: 6px; }
.directory > summary::-webkit-details-marker { display: none; }
.directory > summary span { border-bottom: 1px solid var(--line-2); }
.directory__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.dir-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; text-align: start; width: 100%; cursor: pointer; color: var(--ink-2); }
.dir-item:hover, .dir-item:focus-visible { border-color: var(--line-2); color: var(--ink); }
.dir-item__sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.dir-item .pill { margin-inline-start: auto; }
.dir-item--live { border-color: var(--accent-line); background: var(--jac-soft); color: var(--ink); font-weight: 500; }
.ksa-label { font-family: var(--font); }

/* ---------- L2 Hejazi landing */
.style-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; min-height: min(68vh, 620px); }
.style-hero__text { display: grid; gap: 14px; align-content: center; }
.style-hero__id { display: flex; gap: 14px; align-items: center; }
.style-hero__id .eyebrow { margin: 0; }
.style-hero h1.title { font-size: clamp(32px, 4.4vw, 56px); margin: 0; }
.style-hero__lede { font-size: 18px; line-height: 1.9; color: var(--ink-2); max-width: 52ch; margin: 0; }
.style-hero__cta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 6px; }
.style-hero__src { font-size: 12.5px; color: var(--muted); }
.style-hero__src a { color: inherit; }
.style-hero__visual { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, var(--jac-soft), var(--stone) 70%); aspect-ratio: 1 / 1.02; }
.style-hero__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.style-hero__cap { position: absolute; inset-inline-start: 12px; bottom: 12px; font-size: 12px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 86%, transparent); border-radius: 999px; padding: 3px 12px; backdrop-filter: blur(6px); }
.style-hero__minimap { position: absolute; top: 12px; inset-inline-end: 12px; width: 92px; height: 116px; background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 12px; padding: 6px; backdrop-filter: blur(6px); }
.style-hero__minimap svg { width: 100%; height: 100%; display: block; }
.explore { margin-top: 56px; }
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cat { position: relative; text-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 18px 16px; cursor: pointer; display: grid; gap: 6px; align-content: start;
  min-height: 132px; transition: border-color .15s, box-shadow .15s, transform .15s; color: var(--ink); font: inherit; }
.cat:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.cat[aria-expanded="true"] { border-color: var(--ink-2); box-shadow: var(--shadow); }
.cat__band { position: absolute; inset-inline-start: 18px; top: 0; width: 40px; height: 4px; border-radius: 0 0 4px 4px; }
.cat__t { font-size: 18px; font-weight: 600; line-height: 1.45; margin-top: 4px; }
.cat__d { font-size: 14px; color: var(--muted); line-height: 1.7; }
.cat__s { margin-top: auto; padding-top: 6px; }
.cat--feature { background: var(--jac-soft); border-color: var(--accent-line); }
.catpanel { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; display: grid; gap: 14px; }
.catpanel[hidden] { display: none; }
.catpanel__h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.catpanel__h h3 { margin: 0; font-size: 18px; font-weight: 600; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.topic { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--ink); }
.topic:hover { background: var(--stone); }
.topic__t { font-weight: 600; }
.topic__d { font-size: 14px; color: var(--muted); }
.feature-el { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; padding: 12px; border-radius: 14px; background: var(--jac-soft); text-decoration: none; color: var(--ink); }
.feature-el img { width: 160px; height: 160px; object-fit: cover; object-position: 50% 30%; border-radius: 10px; background: var(--stone); }
.feature-el__t { font-size: 20px; font-weight: 600; }
.feature-el__d { color: var(--ink-2); font-size: 15px; margin: 4px 0 10px; }

/* ---------- L3 elements explorer */
.page-head { display: grid; gap: 6px; margin: 4px 0 26px; max-width: 760px; }
.page-head h1.title { margin: 0; }
.page-head .lede { margin: 0; }
.els { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.el { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
a.el:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.el__v { aspect-ratio: 4 / 3; background: var(--stone); position: relative; overflow: hidden; }
.el__v img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.el__v--empty { display: grid; place-items: center; color: var(--faint); font-size: 13px; background: repeating-linear-gradient(135deg, var(--stone) 0 10px, color-mix(in srgb, var(--stone) 70%, var(--surface)) 10px 20px); }
.el__tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.el__b { padding: 14px 16px 16px; display: grid; gap: 4px; align-content: start; }
.el__t { font-size: 18px; font-weight: 600; }
.el__d { font-size: 14px; color: var(--muted); line-height: 1.7; }
.el__src { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.el__src a { color: inherit; }
.el--soon { opacity: .9; }
.el--live { border-color: var(--accent-line); }

/* ---------- domain pages (lighter) */
.sections { gap: 10px; }
.sec { border-radius: 12px; border-color: var(--line); }

/* ---------- layer switch (rawasheen: explore / professional / sources) */
.layers { display: inline-flex; gap: 2px; background: var(--stone); border-radius: 12px; padding: 3px; }
.layers a { text-decoration: none; font-size: 13.5px; padding: 6px 14px; border-radius: 10px; color: var(--muted); white-space: nowrap; }
.layers a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.layers a:hover { color: var(--ink); }

/* ---------- about */
.about-grid { display: grid; gap: 22px; max-width: 900px; }
.about-grid h2 { font-size: 20px; margin: 0 0 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tbl { font-size: 14px; }

@media (max-width: 1000px) {
  .style-hero { grid-template-columns: 1fr; gap: 22px; min-height: 0; }
  .style-hero__visual { aspect-ratio: 16 / 11; order: -1; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  main { padding: 16px 16px 56px; }
  .top__in { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .crumbs { order: 3; width: 100%; font-size: 12.5px; }
  .site-link { display: none; }
  .brand__tag { display: none; }
  .atlas-home__stage .ksa-map__svg { max-height: 62vh; }
  .preview { position: static; width: 100%; margin-top: 8px; box-shadow: var(--shadow); }
  .cats { grid-template-columns: 1fr; gap: 10px; }
  .cat { min-height: 0; }
  .feature-el { grid-template-columns: 96px 1fr; }
  .feature-el img { width: 96px; height: 96px; }
  .style-hero__minimap { width: 70px; height: 88px; }
  .explore { margin-top: 36px; }
}
.ksa-shape--inactive { cursor: pointer; }
.ksa-shape.is-selected { stroke: var(--ink); stroke-width: 2.4px; }
.ksa-shape--active.is-selected { stroke: var(--jac-ink); stroke-width: 2.6px; }
.has-selection .ksa-shape--inactive:not(.is-selected) { fill-opacity: .7; }

/* ---------- L4 rawasheen studio (Phase 4) */
.studio__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 14px; flex-wrap: wrap; }
.studio__head h1.title { margin: 0; font-size: clamp(28px, 3vw, 40px); }
.studio__head .eyebrow { margin: 0 0 2px; }
.studio__lede { font-size: 15.5px; color: var(--muted); margin: 2px 0 0; }
.studio__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.stage { height: calc(100vh - 210px); min-height: 520px; max-height: 900px; border: 0; border-radius: 20px; box-shadow: none;
  background: radial-gradient(120% 90% at 55% 30%, var(--surface) 0%, var(--stone) 75%, var(--stone-2) 140%); }
.stage__hint { top: 14px; inset-inline-start: 14px; border: 0; font-size: 13px; }
.stage__note { top: 14px; border-radius: 10px; }
.stage__sel { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 12px;
  box-shadow: 0 4px 18px rgba(22,22,22,.12); padding: 4px 4px 4px 4px; padding-inline-start: 14px; max-width: calc(100% - 28px); z-index: 4; }
.stage__sel[hidden] { display: none; }
.stage__sel-t { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__sel-go { display: none; border: 0; background: var(--stone); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.stage__sel-x { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--muted); }
.stage__sel-x:hover { background: var(--stone); color: var(--ink); }
.stage__toolbar { inset-inline: 14px; bottom: 14px; justify-content: center; gap: 10px; }
.tools { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 0; box-shadow: 0 2px 12px rgba(22,22,22,.10); border-radius: 12px; padding: 4px; }
.tool { font-size: 13px; padding: 6px 12px; border-radius: 9px; color: var(--ink-2); }
.tool[aria-pressed="true"] { background: var(--jac-soft); color: var(--jac-ink); box-shadow: none; }
.tool--primary { background: var(--brand); color: #fff; }
.tool--primary:hover { background: var(--brand-hover); color: #fff; }
.stage__tour { bottom: 70px; border: 0; border-inline-start: 4px solid var(--jac); border-radius: 14px; box-shadow: 0 10px 36px rgba(22,22,22,.16); }
.p3d { top: 76px; max-height: calc(100vh - 210px); min-height: 0; border: 0; box-shadow: none; background: transparent; padding: 4px 2px 12px; }
.p3d__sec + .p3d__sec { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.p3d__h { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.p3d__gloss { font-size: 15.5px; line-height: 1.85; margin: 0; color: var(--ink); }
.howto { margin: 0 0 12px; padding-inline-start: 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.pgroup { margin-bottom: 12px; }
.pgroup__t { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 6px; display: inline-block; text-decoration: none; }
button.pgroup__t:hover { color: var(--ink); text-decoration: underline; }
.pgroup--ctx > summary { cursor: pointer; }
.pbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font-size: 13.5px; }
.pbtn:hover, .pbtn:focus-visible { border-color: var(--jac); }
.pbtn.is-on { background: var(--jac-soft); border-color: var(--jac); color: var(--jac-ink); }
.lenslist { gap: 0; }
.lbtn { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 10px 2px; font-weight: 500; font-size: 14.5px; }
.lbtn:last-child { border-bottom: 0; }
.lbtn:hover, .lbtn:focus-visible { background: transparent; color: var(--jac-ink); }
.p3d__back { font-size: 13px; margin-bottom: 14px; color: var(--muted); text-decoration: none; }
.p3d__back:hover { color: var(--ink); }
.p3d__eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
.p3d__title { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
.p3d__meta { margin-bottom: 14px; }
.p3d__row { display: grid; gap: 2px; margin: 0 0 14px; }
.p3d__row p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.p3d__k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.p3d__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.p3d__more { display: grid; gap: 10px; padding-top: 6px; }
.p3d__more[hidden] { display: none; }
.p3d__deep { font-size: 13.5px; color: var(--jac-ink); }
.p3d__note { border-radius: 10px; border: 0; background: var(--warn-soft); }
.qlist li { border: 0; background: var(--paper); border-radius: 10px; }
.qlist__q { font-size: 14px; }
.qlist__r { font-size: 12.5px; }
.ev { font-weight: 500; }
.studio__model-note { font-size: 12.5px; color: var(--muted); max-width: 90ch; }
.layerbar { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
@media (max-width: 1000px) {
  .studio__grid { grid-template-columns: 1fr; }
  .stage { height: 64vh; min-height: 400px; }
  .p3d { position: static; max-height: none; padding-top: 6px; }
  .stage__sel-go { display: inline-block; }
}
@media (max-width: 640px) {
  .studio__head { gap: 8px; align-items: start; }
  .studio__head h1.title { font-size: 26px; }
  .studio__lede { display: none; }
  .studio__head .layers { width: 100%; }
  .studio__head .layers a { flex: 1; text-align: center; padding: 6px 6px; font-size: 13px; }
  .stage { height: 66vh; min-height: 380px; border-radius: 16px; }
  .stage__hint { display: none; }
  .stage__toolbar { bottom: 8px; inset-inline: 8px; gap: 6px; }
  .tools { border-radius: 12px; }
  .tool { padding: 6px 8px; font-size: 12.5px; }
  .tools__sep { display: none; }
  .stage__tour { top: auto; bottom: 108px; inset-inline: 8px; width: auto; }
  .stage__sel { top: 8px; inset-inline-start: 8px; }
}
/* Alexandria has no arrow/symbol glyphs: route U+2190–21FF, U+2190 family and a few symbols to system fonts first. */
@font-face { font-family: "AtlasSymbols"; src: local("Segoe UI Symbol"), local("Segoe UI"), local("Arial"), local("DejaVu Sans"), local("Noto Sans Symbols2"), local("Noto Sans");
  unicode-range: U+2190-21FF, U+2794, U+27F2, U+25D0, U+00D7, U+2197; }
:root { --font: "AtlasSymbols", "Alexandria", Tahoma, "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif; }
@media (max-width: 640px) {
  .stage__toolbar { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .stage__toolbar::-webkit-scrollbar { display: none; }
  .stage__toolbar .tools { flex-wrap: nowrap; flex: none; }
  .stage__tour { bottom: 64px; }
}
.els { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.el--live { grid-column: span 2; grid-row: span 2; }
.el--live .el__v { aspect-ratio: auto; min-height: 340px; flex: 1; }
.el--live { grid-template-rows: 1fr auto; }
.el--live .el__t { font-size: 24px; }
@media (max-width: 1000px) { .els { grid-template-columns: repeat(2, minmax(0, 1fr)); } .el--live { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 560px) { .els { grid-template-columns: 1fr; } .el--live .el__v { min-height: 260px; } }
/* rendered images are light by nature: keep their frames light in both themes */
.style-hero__visual { background: linear-gradient(160deg, #EFEEF5, #E7E2D8 70%); }
.el__v:not(.el__v--empty), .feature-el img { background: #E7E2D8; }
.style-hero__cap { color: #384250; background: rgba(255,255,255,.86); }
.symimg { width: 44px; height: 44px; object-fit: contain; flex: none; } .symimg--lg { width: 56px; height: 56px; }
