/* Review studio chrome. Outside the product and outside the theme-v2 parity contract.
 * Light only (user decision, 15 Nov 2026): dark appearance belongs to the app inside the frame, never to the studio.
 * Porcelain field, brand ink type, the logo's gold for rules and markers, Cormorant Garamond for display lines only.
 * Rules here never reach into .app: every selector is a .studio-*, .g-* or .cmp-* class, or the device frame itself. */
@font-face{font-family:"Cormorant Garamond";src:url("../../app-ui/assets/cormorant-normal.woff2") format("woff2");font-style:normal;font-weight:400 700;font-display:swap}

:root{--st-bar-h:64px}
html{background:#F3F6F8;color-scheme:light}
.studio-page{
  --st-porcelain:#F3F6F8;--st-paper:#FFFFFF;--st-mist:#EEF2F5;
  --st-ink:#142037;--st-ink-2:#384860;--st-muted:#5B6A80;
  --st-line:#DDE4EA;--st-line-strong:#C6D1DB;
  --st-gold:#C99546;--st-gold-soft:rgba(201,149,70,.55);--st-gold-text:#83602A;
  --st-focus:#2397A3;
  --st-display:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --st-ui:"Plus Jakarta Sans",system-ui,sans-serif;
  --st-lattice:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' fill='none' stroke='%23C99546' stroke-opacity='.45' stroke-width='.7'%3E%3Cpath d='M9 9h18v18H9zM18 5.3 30.7 18 18 30.7 5.3 18zM0 18h5.3M30.7 18H36M18 0v5.3M18 30.7V36'/%3E%3C/svg%3E");
  margin:0;min-height:100vh;background:var(--st-porcelain);color:#142037;font-family:"Plus Jakarta Sans",system-ui,sans-serif;color-scheme:light
}
:is(.studio-bar,.studio-notes,.g-head,.cmp) :is(a,button,select):focus-visible{outline:2px solid var(--st-focus);outline-offset:2px}

/* ---------- Header: brand, page navigation, page tools ---------- */
.studio-bar{position:sticky;top:0;z-index:50;display:flex;align-items:center;flex-wrap:wrap;gap:10px 28px;padding:10px 24px;background:rgba(255,255,255,.96);font-family:var(--st-ui)}
.studio-bar::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:linear-gradient(90deg,rgba(201,149,70,0),var(--st-gold-soft) 16%,var(--st-gold-soft) 84%,rgba(201,149,70,0))}
.studio-brand{display:flex;align-items:center;gap:12px;min-height:44px;color:var(--st-ink);text-decoration:none}
.studio-brand img{width:34px;height:34px;flex:none}
.studio-brand-name{font-size:18px;font-weight:700;letter-spacing:-.01em}
.studio-brand-study{display:flex;flex-direction:column;padding-left:12px;border-left:1px solid var(--st-gold);font-size:11px;line-height:15px;font-weight:600;color:var(--st-muted)}
.studio-brand-study b{font-weight:700;color:var(--st-ink-2)}
.studio-nav{display:flex;gap:2px}
.studio-nav a{position:relative;display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border-radius:10px;color:var(--st-ink-2);font-size:13px;font-weight:600;text-decoration:none}
.studio-nav a:hover{color:var(--st-ink);background:var(--st-porcelain)}
.studio-nav a[aria-current="page"]{color:var(--st-ink)}
.studio-nav a[aria-current="page"]::after{content:"";position:absolute;left:12px;right:12px;bottom:7px;height:2px;border-radius:2px;background:var(--st-gold)}
.studio-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-left:auto}
.studio-tools label{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--st-muted)}
.studio-rule{width:1px;height:24px;background:var(--st-line)}

/* Studio form controls (scoped: never styles selects inside the app). */
.studio-bar select,.studio-notes select{appearance:none;-webkit-appearance:none;min-height:40px;padding:0 32px 0 12px;border:1px solid var(--st-line-strong);border-radius:12px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23384860' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;color:var(--st-ink);font:600 13px/1.2 var(--st-ui);cursor:pointer}
.studio-bar select:hover,.studio-notes select:hover{border-color:var(--st-ink-2)}
.studio-seg{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--st-line-strong);border-radius:12px;background:#fff}
.studio-seg button{min-width:44px;min-height:32px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--st-ink-2);font:600 12px/1 var(--st-ui);cursor:pointer}
.studio-seg button:hover{color:var(--st-ink);background:var(--st-porcelain)}
.studio-seg button[aria-pressed="true"]{background:var(--st-ink);color:#fff}
.studio-switch{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 12px 0 10px;border:1px solid var(--st-line-strong);border-radius:12px;background:#fff;color:var(--st-ink-2);font:600 12px/1 var(--st-ui);cursor:pointer}
.studio-switch:hover{border-color:var(--st-ink-2)}
.studio-switch-track{position:relative;width:28px;height:16px;border-radius:8px;background:var(--st-line-strong);flex:none}
.studio-switch-track::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(20,32,55,.25)}
.studio-switch[aria-pressed="true"]{color:var(--st-ink)}
.studio-switch[aria-pressed="true"] .studio-switch-track{background:var(--st-ink)}
.studio-switch[aria-pressed="true"] .studio-switch-track::after{transform:translateX(12px);background:var(--st-gold)}
.studio-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:40px;padding:0 14px;border:1px solid var(--st-line-strong);border-radius:12px;background:#fff;color:var(--st-ink-2);font:600 12px/1 var(--st-ui);cursor:pointer}
.studio-button:hover{border-color:var(--st-ink-2);color:var(--st-ink)}
@media (prefers-reduced-motion:no-preference){
  .studio-seg button,.studio-nav a,.studio-journeys a,.cmp-index button{transition:background-color .16s ease,color .16s ease}
  .studio-switch-track,.studio-switch-track::after{transition:background-color .16s ease,transform .16s ease}
}

/* Display type shared by the three pages. */
.studio-title{margin:0;font:500 40px/1 var(--st-display);letter-spacing:-.01em;color:var(--st-ink)}
.studio-lede{margin:12px 0 0;max-width:68ch;font:400 14px/22px var(--st-ui);color:var(--st-ink-2)}
.studio-lede a,.studio-notes a{color:var(--st-gold-text);font-weight:600;text-decoration-color:var(--st-gold-soft);text-underline-offset:3px}
.studio-lede a:hover,.studio-notes a:hover{color:var(--st-ink)}
.studio-lede code{font:600 12.5px/1 var(--st-ui);color:var(--st-ink)}

/* ---------- Studio: notes beside the stage ---------- */
.studio-stage{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;max-width:1680px;margin:0 auto;padding:24px;font-family:var(--st-ui)}
.studio-notes{position:sticky;top:calc(var(--st-bar-h) + 24px);align-self:start;max-height:calc(100vh - var(--st-bar-h) - 48px);overflow:auto;padding:4px 10px 8px 0;font-size:13px;line-height:20px;color:var(--st-ink-2);scrollbar-width:thin}
.studio-notes .studio-title{font-size:38px;line-height:1.02}
.studio-notes .studio-lede{font-size:13px;line-height:20px;margin-top:12px}
.studio-group{margin-top:22px;padding-top:18px;border-top:1px solid var(--st-line)}
.studio-group h2{margin:0 0 4px;font:600 23px/1.1 var(--st-display);color:var(--st-ink)}
.studio-field{display:flex;flex-direction:column;gap:6px;margin-top:12px;font-size:12px;font-weight:600;color:var(--st-ink-2)}
.studio-field select{width:100%}
.studio-journeys{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.studio-journeys a{display:grid;grid-template-columns:8px minmax(0,1fr);column-gap:12px;padding:8px 10px;border-radius:12px;color:var(--st-ink);text-decoration:none}
.studio-journeys a::before{content:"";grid-row:1 / span 2;width:7px;height:7px;margin-top:7px;transform:rotate(45deg);background:var(--st-line-strong)}
.studio-journeys a:hover{background:var(--st-paper)}
.studio-journeys a:hover::before,.studio-journeys a[aria-current="page"]::before{background:var(--st-gold)}
.studio-journeys a[aria-current="page"]{background:var(--st-paper);box-shadow:inset 0 0 0 1px var(--st-line)}
.studio-journeys .j-title{font-size:13px;line-height:20px;font-weight:700}
.studio-journeys .j-path{font-size:12px;line-height:17px;color:var(--st-muted)}
.studio-boundary{margin:22px 0 0;padding-top:16px;border-top:1px solid var(--st-line);font-size:12px;line-height:18px;color:var(--st-muted)}

/* ---------- The stage: the device as a lit exhibit on a faint gold lattice ----------
 * No pseudo-element, position or isolation here: a stacking context around the frame changes how Chrome rasterises
 * the app's text (LCD instead of greyscale) and breaks pixel parity with the committed captures. The lattice is a
 * background layer, faded towards the edges by the gradient stacked above it. */
.studio-preview{min-width:0;display:flex;flex-direction:column;align-items:center;gap:14px;padding:16px 20px 44px;border:1px solid var(--st-line);border-radius:28px;overflow:hidden;background:radial-gradient(52% 50% at 50% 44%,rgba(238,242,245,0) 0%,rgba(238,242,245,0) 34%,rgba(238,242,245,.86) 80%,var(--st-mist) 100%),var(--st-lattice) 50% 0/48px 48px repeat,radial-gradient(110% 70% at 50% 34%,#FFFFFF 0%,#FAFBFC 46%,var(--st-mist) 100%)}
.studio-route{margin:0;max-width:100%;padding:6px 14px;border:1px solid var(--st-line);border-radius:999px;background:rgba(255,255,255,.86);font:600 12px/16px var(--st-ui);color:var(--st-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.device-frame{position:relative;width:390px;height:844px;max-width:100%;border:10px solid #152832;border-radius:46px;background:#152832;box-shadow:0 0 0 1px rgba(20,32,55,.06),0 40px 60px -28px rgba(20,32,55,.42),0 16px 28px -16px rgba(20,32,55,.3);overflow:hidden;flex:none}
.device-frame[data-device="phone-320"]{width:320px;height:700px;border-radius:36px}
.device-frame[data-device="phone-430"]{width:430px;height:932px}
.device-frame[data-device="tablet"]{width:1194px;height:834px;border-radius:28px;border-width:12px}
.device-frame[data-device="tablet-portrait"]{width:834px;height:1112px;border-radius:28px;border-width:12px}
.device-frame .app{width:100%;height:100%;border-radius:36px}
.device-frame[data-device^="tablet"] .app{border-radius:16px}

/* ---------- Component gallery ---------- */
.g-head{max-width:1240px;margin:0 auto;padding:36px 24px 12px;font-family:var(--st-ui)}
.gallery.app{height:auto;overflow:visible;display:block;max-width:1240px;margin:0 auto;padding:12px 24px 64px;background:transparent;container-type:normal}
.g-sec{display:grid;grid-template-columns:200px minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start;padding:24px 0;border-top:1px solid var(--st-line)}
.g-sec h2{margin:0;font:600 23px/1.1 var(--st-display);color:var(--st-ink)}
.g-sec>div>p{margin:8px 0 0;font:400 12px/18px var(--st-ui);color:var(--st-muted)}
.g-ref,.g-live{min-width:0;border-radius:20px;padding:16px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.g-ref{background:var(--st-paper);border:1px solid var(--st-line)}
.g-live{background:var(--canvas);border:1px solid var(--line)}
.g-ref img{max-width:100%;height:auto;display:block}
.g-ref em{font:italic 400 13px/20px var(--st-ui);color:var(--st-muted)}
.g-ref>span,.g-live>.g-cap{font:600 12px/16px var(--st-ui);letter-spacing:0;color:var(--st-muted)}
.g-live>.g-cap{color:var(--muted)}
.g-live .group,.g-live .card-x,.g-live .premium-card,.g-live .keeps-row,.g-live .ticket-pass,.g-live .lesson-list,.g-live .soft-note{margin-left:0;margin-right:0}
.g-live .card-list,.g-live .chips,.g-live .rail{padding-left:0;padding-right:0}
.g-live>*{width:100%;max-width:390px}
.g-wide>*{max-width:none}
.g-sheet{position:relative;height:420px;border-radius:16px;overflow:hidden;background:var(--canvas)}
.g-plates{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;width:100%}
.g-plates .plate{height:110px}

/* ---------- Compare board ---------- */
.cmp{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;max-width:1500px;margin:0 auto;padding:32px 24px 64px;font-family:var(--st-ui)}
.cmp-index{position:sticky;top:calc(var(--st-bar-h) + 24px);align-self:start;max-height:calc(100vh - var(--st-bar-h) - 48px);overflow:auto;padding-right:6px;scrollbar-width:thin}
.cmp-index h2{margin:18px 0 4px;padding:0 10px;font:600 20px/1.2 var(--st-display);color:var(--st-ink)}
.cmp-index h2:first-child{margin-top:0}
.cmp-index ul{list-style:none;margin:0;padding:0}
.cmp-index button{display:block;width:100%;min-height:36px;padding:7px 10px;border:0;border-radius:10px;background:transparent;color:var(--st-ink-2);font:500 13px/20px var(--st-ui);text-align:left;cursor:pointer}
.cmp-index button:hover{background:var(--st-paper);color:var(--st-ink)}
.cmp-index button[aria-current="true"]{background:var(--st-paper);color:var(--st-ink);font-weight:700;box-shadow:inset 2px 0 0 var(--st-gold),inset 0 0 0 1px var(--st-line)}
.cmp-main{min-width:0}
.cmp-scene{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:28px;padding-top:22px;border-top:1px solid var(--st-line)}
.cmp-scene h2{margin:0;font:500 32px/1.05 var(--st-display);color:var(--st-ink)}
.cmp-step{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--st-muted)}
.cmp-note{margin:10px 0 20px;max-width:80ch;font:400 14px/22px var(--st-ui);color:var(--st-ink-2)}
.cmp-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.cmp-fig{margin:0;min-width:0;display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid var(--st-line);border-radius:20px;background:var(--st-paper)}
.cmp-fig figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:0 4px}
.cmp-fig figcaption b{font:600 20px/1.2 var(--st-display);color:var(--st-ink)}
.cmp-fig figcaption span{font-size:12px;font-weight:600;color:var(--st-muted)}
.cmp-fig img{display:block;width:100%;height:auto;border-radius:12px;background:var(--st-porcelain)}
.cmp-empty{margin:0;padding:24px;border:1px dashed var(--st-line-strong);border-radius:12px;font-size:13px;line-height:20px;color:var(--st-muted)}

/* Cormorant defaults to old-style figures, which make "03b" read as "o3b". Kept after every rule that sets the
 * font shorthand, because the shorthand resets font-variant-numeric. */
.studio-title,.studio-group h2,.g-sec h2,.cmp-index h2,.cmp-scene h2,.cmp-fig figcaption b{font-variant-numeric:lining-nums}

/* ---------- Narrow screens: panels stack, 16px gutters ---------- */
@media (max-width:900px){
  .studio-bar{position:relative;padding:10px 16px}
  .studio-tools{margin-left:0}
  .studio-rule{display:none}
  .studio-stage{grid-template-columns:1fr;padding:16px}
  .studio-notes{position:static;max-height:none;padding-right:0}
  .studio-preview{padding:14px 10px 32px;border-radius:22px}
  .g-head,.gallery.app{padding-left:16px;padding-right:16px}
  .g-sec{grid-template-columns:1fr}
  .cmp{grid-template-columns:1fr;padding:24px 16px 48px}
  .cmp-index{position:static;max-height:none;order:2}
  .cmp-index ul{display:flex;flex-wrap:wrap;gap:4px}
  .cmp-index button{width:auto}
  .cmp-cols{grid-template-columns:1fr}
}
