/* Bismillah
   Atkinson Hyperlegible, drawn by the Braille Institute so I/l/1 and O/0
   cannot be mistaken for one another. Carried here rather than shared, so
   this folder is complete on its own. Licence in OFL.txt. */

@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   TOKENS  — CLAUDE.md §2
   ============================================================ */
:root{
  --yd-font: 'YD Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --yd-r-sm: 10px;
  --yd-r-md: 14px;
  --yd-r-lg: 20px;
  --yd-r-pill: 999px;

  --yd-gap: 14px;
  --yd-pad: 20px;

  --yd-top: 58px;
  --yd-rail: 218px;
  --yd-panel: 292px;
  --yd-status: 30px;

  --yd-t: .16s cubic-bezier(.4,0,.2,1);
}

/* ---------- DARK (default) ---------- */
:root, :root[data-theme="dark"]{
  /* Tells the browser this page does its own theming. Without it a browser
     set to darken pages automatically will repaint the background behind our
     back, and the light theme comes out with a near black body while every
     token still says cream. It also makes scrollbars and form controls match
     the theme instead of the system. */
  color-scheme: dark;

  --yd-bg:        #0E0E0F;
  --yd-surface:   #161618;
  --yd-surface-2: #1D1D20;
  --yd-border:    #2A2A2E;
  --yd-border-hi: #3A3A40;
  --yd-text:      #EDEBE8;
  --yd-text-dim:  #97938D;
  --yd-text-faint:#5E5B57;

  --yd-accent:    #D8B56B;
  --yd-accent-hi: #E8C983;
  --yd-accent-lo: #9C7C33;
  --yd-on-accent: #17140C;

  /* The line that marks a thing as current, hovered or focused. Gold sits
     well on near black, so here it is the accent. See the light theme. */
  --yd-edge:   var(--yd-accent);

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 12px 20px rgba(0,0,0,.50);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 10px rgba(0,0,0,.45);
  --yd-card:   0 1px 0 rgba(255,255,255,.03) inset;
  --yd-ring:   0 0 0 3px rgba(216,181,107,.28);
  --yd-dot:    rgba(255,255,255,.06);
}

/* ---------- LIGHT ---------- */
:root[data-theme="light"]{
  color-scheme: light;

  --yd-bg:        #F5F3EF;
  --yd-surface:   #FFFFFF;
  --yd-surface-2: #EFECE5;
  --yd-border:    #DFDAD1;
  --yd-border-hi: #C9C2B6;
  --yd-text:      #1A1917;
  --yd-text-dim:  #6C6862;
  --yd-text-faint:#9A958D;

  --yd-accent:    #CBA65A;
  --yd-accent-hi: #DEBB72;
  --yd-accent-lo: #8E6C26;
  --yd-on-accent: #1A1408;

  /* Gold on cream is the worst of both: too pale to see at a hairline and too
     warm to pass as quiet. A plain dark line does the job and stays out of the
     way, which is what the rest of this theme does too. */
  --yd-edge:   var(--yd-text);

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 10px 18px rgba(80,62,20,.22);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 8px rgba(80,62,20,.18);
  --yd-card:   0 1px 2px rgba(60,50,30,.05);
  --yd-ring:   0 0 0 3px rgba(26,25,23,.16);
  --yd-dot:    rgba(0,0,0,.07);
}

/* ============================================================
   APP SHELL  — CLAUDE.md §3
   ============================================================ */
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{
  background:var(--yd-bg); color:var(--yd-text);
  font-family:var(--yd-font); font-weight:400; font-size:14px; line-height:1.55;
  -webkit-font-smoothing:antialiased; overflow:hidden;
  transition:background var(--yd-t), color var(--yd-t);
}
h1,h2,h3{ margin:0; font-weight:500; letter-spacing:-.01em; }
p{ margin:0; }
::-webkit-scrollbar{ width:9px; height:9px; }
::-webkit-scrollbar-thumb{ background:var(--yd-border-hi); border-radius:var(--yd-r-pill); }
::-webkit-scrollbar-track{ background:transparent; }

.yd-shell{ height:100%; display:flex; flex-direction:column; }
.yd-mid{ flex:1; display:flex; min-height:0; }
.yd-sp{ flex:1; }

.yd-top{
  height:var(--yd-top); flex:none; display:flex; align-items:center; gap:14px;
  padding:0 18px; background:var(--yd-surface); border-bottom:1px solid var(--yd-border);
}
.yd-brand{ display:flex; align-items:baseline; gap:9px; min-width:0; }
.yd-brand .mark{ align-self:center; flex:none; }
.yd-brand .name{ font-weight:500; font-size:15px; letter-spacing:.01em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.yd-brand .by{ font-size:11.5px; font-weight:300; color:var(--yd-text-faint);
  white-space:nowrap; letter-spacing:.02em; }
.yd-brand .by b{ font-weight:500; color:var(--yd-text-dim); }
.yd-menu{ display:flex; gap:2px; margin-left:10px; }
.yd-menu button{ font:400 13px/1 var(--yd-font); padding:8px 12px; border:0;
  border-radius:var(--yd-r-sm); background:transparent; color:var(--yd-text-dim);
  cursor:pointer; transition:var(--yd-t); }
.yd-menu button:hover{ background:var(--yd-surface-2); color:var(--yd-text); }

.yd-rail{ width:var(--yd-rail); flex:none; padding:14px 12px; overflow:auto;
  background:var(--yd-bg); border-right:1px solid var(--yd-border);
  display:flex; flex-direction:column; gap:3px; }
.yd-rail .grp{ font-size:10px; font-weight:500; letter-spacing:.16em; text-transform:uppercase;
  color:var(--yd-text-faint); padding:14px 10px 7px; }
.yd-nav{ display:flex; align-items:center; gap:11px; width:100%;
  font:400 13.5px/1 var(--yd-font); text-align:left; padding:11px 12px; border:0;
  border-radius:var(--yd-r-sm); background:transparent; color:var(--yd-text-dim);
  cursor:pointer; transition:var(--yd-t); }
.yd-nav svg{ flex:none; opacity:.85; }
.yd-nav:hover{ background:var(--yd-surface); color:var(--yd-text); }
.yd-nav[aria-current="true"]{ background:var(--yd-surface); color:var(--yd-accent); font-weight:500; }
.yd-nav[aria-current="true"] svg{ opacity:1; }

.yd-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.yd-bar{ flex:none; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:12px 18px; border-bottom:1px solid var(--yd-border); background:var(--yd-bg); }
.yd-stage{ flex:1; min-height:0; overflow:auto; padding:clamp(18px,3vw,34px);
  display:grid; place-items:center;
  background:
    radial-gradient(circle at 1px 1px, var(--yd-dot) 1px, transparent 0) 0 0/22px 22px,
    var(--yd-bg); }

.yd-panel{ width:var(--yd-panel); flex:none; overflow:auto; padding:var(--yd-pad);
  background:var(--yd-surface); border-left:1px solid var(--yd-border);
  display:flex; flex-direction:column; gap:20px; }
.yd-sec-h{ display:flex; align-items:center; gap:10px;
  font-size:10px; font-weight:500; letter-spacing:.16em; text-transform:uppercase;
  color:var(--yd-text-faint); margin-bottom:12px; }
.yd-sec-h::after{ content:""; flex:1; height:1px; background:var(--yd-border); }

.yd-status{ height:var(--yd-status); flex:none; display:flex; align-items:center; gap:12px;
  padding:0 18px; font-size:11.5px; color:var(--yd-text-faint);
  background:var(--yd-surface); border-top:1px solid var(--yd-border); }
.yd-status .dot{ width:6px; height:6px; border-radius:50%; background:var(--yd-accent); flex:none; }

/* ============================================================
   COMPONENTS  — CLAUDE.md §4
   ============================================================ */
.yd-btn{
  font-family:inherit; font-size:14px; font-weight:500; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 22px; border:0; border-radius:var(--yd-r-md);
  color:var(--yd-on-accent);
  background:linear-gradient(180deg, var(--yd-accent-hi), var(--yd-accent));
  box-shadow:var(--yd-lift); cursor:pointer; min-height:44px;
  transition:transform var(--yd-t), box-shadow var(--yd-t), filter var(--yd-t);
}
.yd-btn:hover{ filter:brightness(1.05); }
.yd-btn:active{ transform:translateY(4px); box-shadow:var(--yd-lift-a); }
.yd-btn:focus-visible{ outline:0; box-shadow:var(--yd-lift), var(--yd-ring); }
.yd-btn[disabled]{ opacity:.38; pointer-events:none; }
.yd-btn.wide{ width:100%; }
.yd-btn.sm{ padding:10px 16px; font-size:13px; min-height:38px;
  box-shadow:0 4px 0 var(--yd-accent-lo), 0 8px 14px rgba(0,0,0,.4); }
.yd-btn.icon{ padding:0; width:44px; border-radius:var(--yd-r-pill); }

.yd-btn2{
  font-family:inherit; font-size:14px; font-weight:400; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 20px; border-radius:var(--yd-r-md); min-height:44px;
  color:var(--yd-text); background:var(--yd-bg);
  border:1px solid var(--yd-border-hi); cursor:pointer; transition:var(--yd-t);
}
.yd-btn2:hover{ background:var(--yd-surface-2); border-color:var(--yd-edge); color:var(--yd-edge); }
.yd-btn2:active{ transform:translateY(1px); }
.yd-btn2.sm{ padding:10px 14px; font-size:13px; min-height:38px; }

.yd-btn3{ font-family:inherit; font-size:13.5px; font-weight:400; min-height:44px;
  padding:13px 10px; border:0; background:transparent;
  color:var(--yd-text-dim); cursor:pointer; transition:var(--yd-t); }
.yd-btn3:hover{ color:var(--yd-accent); }

.yd-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.yd-lab{ font-size:11.5px; font-weight:400; color:var(--yd-text-dim); letter-spacing:.02em;
  display:flex; justify-content:space-between; gap:8px; }
.yd-lab b{ font-weight:500; color:var(--yd-accent); }
.yd-in, .yd-sel{
  font-family:inherit; font-size:14px; color:var(--yd-text);
  padding:12px 14px; border-radius:var(--yd-r-sm); min-height:44px;
  background:var(--yd-bg); border:1px solid var(--yd-border);
  transition:var(--yd-t); width:100%;
}
.yd-sel{ appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.yd-in::placeholder{ color:var(--yd-text-faint); }
.yd-in:focus, .yd-sel:focus{ outline:0; border-color:var(--yd-edge); box-shadow:var(--yd-ring); }

.yd-range{ -webkit-appearance:none; appearance:none; width:100%; height:4px; margin:11px 0;
  border-radius:var(--yd-r-pill);
  background:var(--yd-surface-2); border:1px solid var(--yd-border); cursor:pointer; }
.yd-range::-webkit-slider-thumb{ -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background:var(--yd-accent); border:0; box-shadow:0 3px 0 var(--yd-accent-lo), 0 5px 10px rgba(0,0,0,.4); }
.yd-range::-moz-range-thumb{ width:20px; height:20px; border:0; border-radius:50%;
  background:var(--yd-accent); box-shadow:0 3px 0 var(--yd-accent-lo); }

.yd-tog{ display:flex; align-items:center; gap:11px; cursor:pointer; font-size:13.5px;
  color:var(--yd-text-dim); min-height:40px; }
.yd-tog input{ position:absolute; opacity:0; pointer-events:none; }
.yd-tog i{ width:44px; height:25px; border-radius:var(--yd-r-pill); background:var(--yd-surface-2);
  border:1px solid var(--yd-border); position:relative; transition:var(--yd-t); flex:none; }
.yd-tog i::after{ content:""; position:absolute; top:3px; left:3px; width:17px; height:17px;
  border-radius:50%; background:var(--yd-text-faint); transition:var(--yd-t); }
.yd-tog input:checked + i{ background:var(--yd-accent); border-color:var(--yd-accent-lo); }
.yd-tog input:checked + i::after{ left:22px; background:var(--yd-on-accent); }

.yd-seg{ display:inline-flex; padding:4px; gap:3px; border-radius:var(--yd-r-md); max-width:100%;
  background:var(--yd-surface-2); border:1px solid var(--yd-border); }
.yd-seg button{ font-family:inherit; font-size:13px; font-weight:400; padding:9px 16px; border:0;
  flex:1 1 auto; white-space:nowrap; border-radius:var(--yd-r-sm);
  background:transparent; color:var(--yd-text-dim); cursor:pointer; transition:var(--yd-t); }
.yd-seg button:hover{ color:var(--yd-text); }
.yd-seg button[aria-pressed="true"]{ background:var(--yd-accent); color:var(--yd-on-accent); font-weight:500; }

/* Same recipe as the tag on the site's front page: dim text, a plain surface
   behind it, an ordinary border. A chip is a label, and a label does not need
   to shout in the brand colour to be read. */
.yd-chip{ display:inline-block; font-size:10px; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  padding:5px 10px; border-radius:var(--yd-r-pill);
  color:var(--yd-text-dim);
  background:var(--yd-surface-2);
  border:1px solid var(--yd-border); }

.yd-card{ padding:var(--yd-pad); border-radius:var(--yd-r-lg);
  background:var(--yd-surface); border:1px solid var(--yd-border);
  box-shadow:var(--yd-card); transition:var(--yd-t); }
.yd-card:hover{ border-color:var(--yd-border-hi); }

.yd-switch{ display:inline-flex; align-items:center; gap:2px; flex:none;
  padding:3px; border-radius:var(--yd-r-pill);
  background:var(--yd-surface-2); border:1px solid var(--yd-border); }
.yd-switch button{ display:grid; place-items:center; width:34px; height:28px; padding:0;
  border:0; border-radius:var(--yd-r-pill); background:transparent;
  color:var(--yd-text-faint); cursor:pointer; transition:var(--yd-t); }
.yd-switch button:hover{ color:var(--yd-text-dim); }
.yd-switch button[aria-pressed="true"]{ background:var(--yd-accent); color:var(--yd-on-accent); }

/* The way back to the site. A pill of its own rather than a third button
   inside the theme switch, because it is not a third theme — pressing it
   leaves the page. Same height and same surface as the switch, so the two sit
   together as a pair without pretending to be one control. */
/* 36px, not 34: the switch beside it is a 28px button in 3px of padding
   inside a 1px border, and the two have to line up at the shoulders. */
.yd-back{ display:grid; place-items:center; width:36px; height:36px; flex:none;
  border-radius:var(--yd-r-pill); text-decoration:none; cursor:pointer;
  background:var(--yd-surface-2); border:1px solid var(--yd-border);
  color:var(--yd-text-faint); transition:var(--yd-t); }
.yd-back:hover{ color:var(--yd-text); border-color:var(--yd-border-hi); }
.yd-back:focus-visible{ outline:0; box-shadow:var(--yd-ring); }

/* ============================================================
   PALETTE STUDIO  — built only from the tokens above
   ============================================================ */
.yd-brand .mark{ display:inline-flex; align-self:center; flex:none; }
.yd-brand .mark > *{ display:block; }
/* display:block above outranks the browser's own [hidden] rule, which would
   otherwise leave the fallback drawn on top of the logo — and the broken
   image still drawn when the asset is missing. Put [hidden] back in charge. */
.yd-brand .mark > *[hidden]{ display:none; }

/* The stage holds one stretched, top-aligned column.
   The single implicit grid column is pinned to minmax(0,1fr) so a wide
   child — the contrast table — scrolls inside its own wrapper instead of
   widening the page. Nothing here adds a colour, radius or shadow. */
.yd-stage{ grid-template-columns:minmax(0,1fr); }
.ps-work{ align-self:start; justify-self:stretch; width:100%; min-width:0;
  display:flex; flex-direction:column; gap:var(--yd-pad); }
.ps-work > *{ min-width:0; }

.ps-h{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.ps-h h2{ font-size:15px; font-weight:500; }
.ps-h .sub{ font-size:11.5px; font-weight:300; color:var(--yd-text-faint); }
.ps-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* ---------- the palette stage ---------- */
.ps-bars{ display:flex; gap:0; height:clamp(210px,36vh,330px);
  border:1px solid var(--yd-border); border-radius:var(--yd-r-lg); overflow:hidden; }
.ps-bar{ position:relative; flex:1 1 0; min-width:0; border:0; padding:0;
  background:transparent; cursor:grab; display:flex; flex-direction:column;
  align-items:center; justify-content:space-between; transition:flex-grow var(--yd-t); }
.ps-bar:focus-visible{ outline:0; }
.ps-bar.drag{ opacity:.35; }
.ps-bar.over::before{ content:""; position:absolute; inset:0 auto 0 0; width:3px;
  background:var(--yd-accent); z-index:3; }
.ps-bar .fill{ position:absolute; inset:0; }
/* Selecting a swatch: a band caps the bar and its number becomes a badge.

   An outline was the obvious thing and the wrong one. A stroke has to meet the
   rounded corner of the frame, and no radius fixes it: match the frame and the
   end bars come out lopsided against their own inner corners, hold it clear
   and it reads as a sticker lying on top. Two goes at it, both ugly.

   A filled band has none of that trouble. Where the frame curves it simply
   gets cut, which is what a filled shape is supposed to do, so the end bars
   look no different from the middle ones. The badge is the second cue, and it
   sits well inside the padding where no edge can reach it.

   Widening the selected bar was tried as well and taken out again: at a narrow
   window it stole enough room from the others to clip their hex readings. */
.ps-bar .seln{ position:absolute; left:0; right:0; top:0; height:0;
  background:currentColor; pointer-events:none; transition:height var(--yd-t); }
.ps-bar[aria-selected="true"] .seln{ height:8px; }
.ps-bar .cap{ position:relative; width:100%; display:flex; align-items:center;
  justify-content:space-between; gap:4px; padding:9px 9px 0; }
/* the box is held open at every state, so turning the badge on moves nothing */
.ps-bar .num{ font-size:10px; font-weight:500; letter-spacing:.12em; opacity:.62;
  min-width:19px; height:19px; display:inline-flex; align-items:center;
  justify-content:center; padding:0 5px; border-radius:var(--yd-r-pill);
  border:1.5px solid transparent; transition:var(--yd-t); }
.ps-bar[aria-selected="true"] .num{ opacity:1; border-color:currentColor; }
.ps-bar .foot{ position:relative; width:100%; display:flex; flex-direction:column;
  align-items:center; gap:7px; padding:0 6px 14px; }
.ps-hex{ font-family:inherit; font-size:12.5px; font-weight:500; letter-spacing:.05em;
  padding:8px 9px; min-height:36px; width:100%; max-width:118px;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border-radius:var(--yd-r-sm); border:1px solid currentColor;
  background:transparent; color:inherit; cursor:pointer; transition:var(--yd-t); }
/* The hover fill used to be the buttons own text colour, with the label
   flipped back by mix-blend-mode so it stayed readable. Two things went wrong
   with that. The filter sitting on the same element created a stacking context,
   which cuts an element off from the backdrop it is supposed to blend with, so
   the blend quietly stopped happening and the text went the same colour as the
   fill. Taking the filter away did not save it either.

   A trick that has to work out the right answer at paint time can be wrong. A
   tint cannot. The fill is now the same colour at low opacity, laid underneath
   rather than blended, and the label is never touched at all. */
.ps-hex{ position:relative; overflow:hidden; }
.ps-hex::before{
  content:""; position:absolute; inset:0; background:currentColor;
  opacity:0; transition:var(--yd-t); pointer-events:none; }
.ps-hex:hover::before, .ps-hex:focus-visible::before{ opacity:.16; }
.ps-hex > *{ position:relative; z-index:1; }
.ps-hex:hover svg{ opacity:1; }
.ps-hex svg{ flex:none; opacity:.7; }
.ps-ic{ display:grid; place-items:center; width:30px; height:30px; padding:0; flex:none;
  border-radius:var(--yd-r-sm); border:1px solid transparent; background:transparent;
  color:inherit; cursor:pointer; transition:var(--yd-t); opacity:.6; }
.ps-ic:hover{ opacity:1; border-color:currentColor; }
.ps-ic[aria-pressed="true"]{ opacity:1; border-color:currentColor; }
.ps-bar .mark-lock{ position:absolute; top:44px; left:50%; transform:translateX(-50%);
  font-size:9px; font-weight:500; letter-spacing:.14em; text-transform:uppercase;
  opacity:.75; pointer-events:none; }

/* ---------- ramps ---------- */
.ps-ramp-list{ display:flex; flex-direction:column; gap:10px; }
.ps-ramp-row{ display:flex; align-items:center; gap:10px; min-width:0; }
.ps-ramp-key{ flex:none; width:74px; display:flex; align-items:center; gap:7px;
  font-size:11.5px; color:var(--yd-text-dim); }
.ps-ramp-key i{ width:12px; height:12px; border-radius:3px; flex:none;
  border:1px solid var(--yd-border-hi); }
.ps-ramp{ display:flex; flex:1 1 auto; min-width:0;
  border:1px solid var(--yd-border); border-radius:var(--yd-r-sm); overflow:hidden; }
.ps-step{ flex:1 1 0; min-width:0; height:50px; border:0; padding:0; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  font-family:inherit; transition:var(--yd-t); }
.ps-step b{ font-size:9.5px; font-weight:500; letter-spacing:.04em; opacity:.8; }
.ps-step small{ font-size:8.5px; font-weight:400; letter-spacing:.02em; opacity:.62; }
.ps-step:hover b, .ps-step:hover small{ opacity:1; }

/* ---------- contrast grid ---------- */
.ps-gwrap{ overflow-x:auto; padding-bottom:4px; }
.ps-grid{ border-collapse:separate; border-spacing:5px; margin:-5px; }
.ps-grid th{ font-size:10px; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  color:var(--yd-text-faint); padding:0 4px; white-space:nowrap; }
.ps-grid th.c{ padding-bottom:4px; }
.ps-grid th .sw{ display:inline-flex; align-items:center; gap:6px; }
.ps-grid th .sw i{ width:12px; height:12px; border-radius:3px;
  border:1px solid var(--yd-border-hi); flex:none; }
.ps-cell{ min-width:116px; padding:9px 8px; border-radius:var(--yd-r-sm);
  border:1px solid var(--yd-border); background:var(--yd-surface-2); vertical-align:top; }
.ps-cell.self{ background:transparent; border-style:dashed; }
.ps-cell.bad{ background:color-mix(in srgb, var(--yd-accent) 9%, var(--yd-surface-2));
  border-color:var(--yd-border-hi); }
.ps-cell .rt{ display:flex; align-items:center; gap:5px;
  font-size:14px; font-weight:500; letter-spacing:-.01em; color:var(--yd-text); }
.ps-cell .rt svg{ flex:none; color:var(--yd-text-dim); }
.ps-pills{ display:flex; align-items:center; gap:3px; margin-top:5px; }
.ps-pills .pk{ flex:none; width:30px; font-size:8.5px; font-weight:400; letter-spacing:.04em;
  color:var(--yd-text-faint); }
.ps-pill{ flex:1 1 0; min-width:0; text-align:center;
  font-size:8.5px; font-weight:500; letter-spacing:.06em;
  padding:3px 0; border-radius:4px; border:1px solid var(--yd-border-hi);
  color:var(--yd-text-faint); background:transparent; }
.ps-pill.ok{ color:var(--yd-accent); border-color:transparent;
  background:color-mix(in srgb, var(--yd-accent) 18%, transparent); }
.ps-pill.no{ text-decoration:line-through; border-style:dotted; }
.ps-legend{ display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:14px;
  font-size:11px; color:var(--yd-text-faint); }
.ps-legend span{ display:inline-flex; align-items:center; gap:6px; }

/* ---------- preview ---------- */
.ps-prev{ border-radius:var(--yd-r-md); padding:clamp(16px,3vw,30px);
  border:1px solid var(--yd-border); display:flex; flex-direction:column; gap:16px; }
.ps-prev-card{ border-radius:var(--yd-r-md); padding:clamp(16px,2.4vw,24px);
  display:flex; flex-direction:column; gap:12px; }
.ps-prev h3{ font-size:clamp(17px,2.2vw,22px); font-weight:500; }
.ps-prev p{ font-size:13.5px; font-weight:300; line-height:1.7; max-width:62ch; }
.ps-prev-acts{ display:flex; gap:10px; flex-wrap:wrap; margin-top:4px; }
.ps-pb{ font-family:inherit; font-size:13.5px; font-weight:500; line-height:1;
  min-height:44px; padding:13px 20px; border:0; border-radius:var(--yd-r-sm);
  cursor:pointer; transition:var(--yd-t); }
.ps-pb.ghost{ background:transparent; font-weight:400; }
.ps-pb[disabled]{ opacity:.42; pointer-events:none; }
.ps-chart{ display:flex; align-items:flex-end; gap:14px; height:122px; padding-top:8px; }
.ps-chart div{ flex:1 1 0; border-radius:6px 6px 0 0; position:relative; }
.ps-chart div::after{ content:attr(data-v); position:absolute; left:0; right:0; bottom:-19px;
  text-align:center; font-size:10.5px; font-weight:400; letter-spacing:.04em; }

/* ---------- export ---------- */
.ps-tabs{ display:flex; gap:3px; padding:4px; margin-bottom:12px; overflow-x:auto;
  border-radius:var(--yd-r-md); background:var(--yd-surface-2); border:1px solid var(--yd-border); }
.ps-tabs button{ font-family:inherit; font-size:12.5px; font-weight:400; white-space:nowrap;
  padding:9px 14px; border:0; border-radius:var(--yd-r-sm); background:transparent;
  color:var(--yd-text-dim); cursor:pointer; transition:var(--yd-t); }
.ps-tabs button:hover{ color:var(--yd-text); }
.ps-tabs button[aria-pressed="true"]{ background:var(--yd-accent); color:var(--yd-on-accent); font-weight:500; }
.ps-code{ position:relative; }
.ps-code pre{ margin:0; padding:16px 16px 16px; max-height:268px; overflow:auto;
  border-radius:var(--yd-r-sm); background:var(--yd-bg); border:1px solid var(--yd-border);
  font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  font-size:11.5px; line-height:1.72; color:var(--yd-text-dim);
  white-space:pre; tab-size:2; }
.ps-code .cp{ position:absolute; top:9px; right:9px; }
.ps-exp-foot{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:16px; }
.ps-exp-foot .note{ font-size:11px; color:var(--yd-text-faint); }

/* ---------- right panel ---------- */
.ps-sq{ position:relative; width:100%; aspect-ratio:1/1; margin-bottom:12px;
  border-radius:var(--yd-r-sm); overflow:hidden; border:1px solid var(--yd-border);
  cursor:crosshair; touch-action:none; }
.ps-sq canvas{ display:block; width:100%; height:100%; }
.ps-dot{ position:absolute; width:16px; height:16px; margin:-8px 0 0 -8px; border-radius:50%;
  border:2px solid #FFFFFF; box-shadow:0 0 0 1px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.4);
  pointer-events:none; }
.ps-hue{ position:relative; height:22px; margin-bottom:16px; border-radius:var(--yd-r-pill);
  border:1px solid var(--yd-border); cursor:ew-resize; touch-action:none;
  background:linear-gradient(90deg,#FF0000,#FFFF00,#00FF00,#00FFFF,#0000FF,#FF00FF,#FF0000); }
.ps-hue .ps-dot{ top:50%; width:18px; height:18px; margin:-9px 0 0 -9px; }
.ps-swatch-big{ height:58px; border-radius:var(--yd-r-sm); border:1px solid var(--yd-border);
  margin-bottom:14px; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:500; letter-spacing:.1em; }
.ps-copy{ display:inline-flex; align-items:center; gap:4px; font-family:inherit;
  font-size:10px; font-weight:500; letter-spacing:.08em; text-transform:uppercase;
  padding:0; border:0; background:transparent; color:var(--yd-text-faint);
  cursor:pointer; transition:var(--yd-t); }
.ps-copy:hover{ color:var(--yd-accent); }
.ps-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ps-panel-note{ font-size:11.5px; font-weight:300; line-height:1.65; color:var(--yd-text-faint); }
.ps-locks{ display:flex; flex-direction:column; gap:4px; }
.ps-lockrow{ display:flex; align-items:center; gap:10px; width:100%; min-height:40px;
  padding:5px 8px; border:0; border-radius:var(--yd-r-sm); background:transparent;
  color:var(--yd-text-dim); font:400 12.5px/1 var(--yd-font); cursor:pointer;
  transition:var(--yd-t); text-align:left; }
.ps-lockrow:hover{ background:var(--yd-surface-2); color:var(--yd-text); }
.ps-lockrow i{ width:18px; height:18px; border-radius:4px; flex:none;
  border:1px solid var(--yd-border-hi); }
.ps-lockrow .yd-sp{ min-width:0; }
.ps-lockrow svg{ flex:none; }
.ps-lockrow[aria-pressed="true"]{ color:var(--yd-accent); }
.ps-stat{ display:flex; align-items:baseline; justify-content:space-between; gap:10px;
  padding:8px 0; border-bottom:1px solid var(--yd-border); font-size:12px;
  color:var(--yd-text-dim); }
.ps-stat:last-child{ border-bottom:0; }
.ps-stat b{ font-weight:500; font-size:14px; color:var(--yd-text); }

/* ---------- library rail ---------- */
.ps-rail-head{ display:flex; flex-direction:column; gap:8px; }
.ps-rail-io{ display:flex; gap:6px; }
.ps-rail-io .yd-btn2{ flex:1 1 0; min-width:0; padding:10px 8px; }
.ps-lib{ display:flex; flex-direction:column; gap:4px; }
.ps-item{ position:relative; display:flex; flex-direction:column; gap:7px;
  padding:9px 9px 10px; border-radius:var(--yd-r-sm); border:1px solid transparent;
  background:transparent; cursor:grab; transition:var(--yd-t); }
.ps-item:hover{ background:var(--yd-surface); border-color:var(--yd-border); }
/* The one that is open. A gold outline said it loudly and said it in a colour,
   which is twice wrong here: this is a quiet rail you glance at, and colour on
   its own carries nothing to half the people who will use this.

   What marks it is the plate it sits on and the weight of its name. The border
   only separates that plate from the rail behind it. */
.ps-item[aria-current="true"]{ background:var(--yd-surface); border-color:var(--yd-border-hi); }
.ps-item.drag{ opacity:.35; }
.ps-item.over{ box-shadow:inset 0 3px 0 -1px var(--yd-accent); }
.ps-item-top{ display:flex; align-items:center; gap:6px; min-width:0; }
.ps-item-nm{ flex:1 1 auto; min-width:0; font-size:12.5px; font-weight:400;
  color:var(--yd-text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ps-item[aria-current="true"] .ps-item-nm{ color:var(--yd-text); font-weight:500; }
.ps-item-nm-in{ flex:1 1 auto; min-width:0; font-family:inherit; font-size:12.5px;
  padding:5px 7px; min-height:32px; border-radius:6px; color:var(--yd-text);
  background:var(--yd-bg); border:1px solid var(--yd-edge); }
.ps-item-nm-in:focus{ outline:0; box-shadow:var(--yd-ring); }
.ps-mini{ display:flex; height:22px; border-radius:5px; overflow:hidden;
  border:1px solid var(--yd-border); }
.ps-mini i{ flex:1 1 0; min-width:0; }
.ps-item-acts{ display:flex; gap:2px; }
.ps-ib{ display:grid; place-items:center; width:30px; height:30px; padding:0; flex:none;
  border:0; border-radius:6px; background:transparent; color:var(--yd-text-faint);
  cursor:pointer; transition:var(--yd-t); }
.ps-ib:hover{ background:var(--yd-surface-2); color:var(--yd-accent); }
.ps-ib[aria-pressed="true"]{ color:var(--yd-accent); }
.ps-empty{ padding:14px 10px; font-size:11.5px; font-weight:300; line-height:1.6;
  color:var(--yd-text-faint); }
.ps-vis{ display:flex; align-items:center; gap:8px; }
.ps-vis .yd-sel{ width:auto; min-width:148px; font-size:13px; padding:10px 34px 10px 12px;
  min-height:38px; background-position:calc(100% - 17px) 17px, calc(100% - 12px) 17px; }
.ps-visnote{ font-size:10px; font-weight:500; letter-spacing:.1em; text-transform:uppercase;
  color:var(--yd-text-faint); }
/* The signature artwork is in the page but must never be seen there. A class
   rather than a style attribute, so a page served under a policy that forbids
   inline styles hides it just the same instead of putting a 256px logo in the
   middle of the screen. */
.yd-hidden-art{ position:absolute; left:-9999px; top:0; }
.ps-sronly{ position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ============================================================
   RESPONSIVE  — CLAUDE.md §5
   ============================================================ */
@media (max-width:1000px){
  :root{ --yd-rail:64px; --yd-panel:264px; }
  .yd-rail{ align-items:center; padding:14px 8px; }
  .yd-rail .lbl, .yd-rail .grp{ display:none; }
  .yd-nav{ justify-content:center; padding:12px 0; }
  .yd-menu{ display:none; }
}
@media (max-width:860px){
  html,body{ height:auto; overflow:visible; }
  .yd-shell{ height:auto; min-height:100%; }
  .yd-mid{ flex-direction:column; }
  :root{ --yd-rail:auto; --yd-panel:auto; }
  .yd-rail{ width:100%; flex-direction:row; overflow-x:auto; gap:6px;
    border-right:0; border-bottom:1px solid var(--yd-border); padding:10px 12px; }
  .yd-rail .lbl{ display:inline; }
  .yd-nav{ width:auto; white-space:nowrap; padding:10px 14px; }
  .yd-main{ overflow:visible; }
  .yd-stage{ overflow:visible; min-height:320px; }
  .yd-panel{ width:100%; border-left:0; border-top:1px solid var(--yd-border); }
}
@media (max-width:460px){
  .yd-top{ padding:0 12px; gap:8px; }
  .yd-brand{ flex-direction:column; gap:0; align-items:flex-start; }
  .yd-brand .mark{ display:none; }
  .yd-bar{ padding:10px 12px; }
  .yd-bar .yd-btn, .yd-bar .yd-btn2{ flex:1 1 130px; }
  .yd-bar .yd-btn.icon{ flex:none; }
  .yd-seg{ width:100%; }
  .yd-seg button{ padding:9px 6px; font-size:12px; }
  .yd-status{ height:auto; padding:8px 12px; flex-wrap:wrap; }
}

@media (prefers-reduced-motion:reduce){ *{ transition:none !important; } }

/* ---- app-level responsive, inside the same three breakpoints ---- */
@media (max-width:1000px){
  .ps-rail-head{ width:100%; }
  .ps-rail-head .yd-btn.sm{ padding:10px 0; }
  .ps-rail-io{ flex-direction:column; }
  .ps-item{ padding:7px 5px; }
  .ps-item-acts{ display:none; }
  .ps-ramp-key{ width:58px; }
  .ps-ramp-key span{ display:none; }
}
@media (max-width:860px){
  .ps-rail-head{ width:auto; flex:none; flex-direction:row; align-items:center; }
  /* The 1000px rule above strips this button's side padding and the .wide rule
     stretches it, both right for the narrow icon-only column. Here the label is
     back and the rail is a row, so the word had nothing to sit in and spilled
     out of its own box. Padding and an honest width, same as Import and Export. */
  .ps-rail-head .yd-btn.sm{ width:auto; flex:none; padding:10px 16px; }
  .ps-rail-io{ flex-direction:row; }
  .ps-lib{ flex-direction:row; gap:6px; }
  .yd-rail .grp{ display:none; }
  .ps-item{ width:132px; flex:none; padding:8px; }
  .ps-item-acts{ display:flex; }
  .ps-empty{ width:220px; }
}
@media (max-width:620px){
  .ps-bars{ height:auto; flex-direction:column; }
  .ps-bar{ min-height:72px; flex-direction:row; align-items:center;
    justify-content:space-between; cursor:pointer; }
  .ps-bar .cap{ width:auto; padding:0 0 0 12px; }
  .ps-bar .foot{ width:auto; flex-direction:row; align-items:center; padding:0 12px 0 0; }
  .ps-bar .mark-lock{ position:static; transform:none; }
  .ps-hex{ max-width:none; width:auto; }
  .ps-bar.over::before{ inset:0 0 auto 0; width:auto; height:3px; }
  .ps-step small{ display:none; }
  .ps-ramp-key{ width:46px; }
  .ps-chart{ height:96px; }
}
@media (max-width:460px){
  .ps-ramp-row{ flex-wrap:wrap; }
  .ps-ramp-key{ width:100%; }
  .ps-step{ height:42px; }
  .ps-vis .yd-sel{ min-width:0; width:100%; }
  .ps-vis{ width:100%; }
}
