/* ============================================================================
   canvas-system.css — the shared "design file" system for tim-hose-portfolio.
   Tokens, chrome (toolbar / panels / inspector), the dot-grid canvas, frames,
   reusable components, hover annotations, multiplayer cursors, and the
   container-query + viewport responsive rules. Linked by every page so the
   home page and case studies stay on one system.
   ============================================================================ */
  :root{
    --chrome:    #FFFFFF;
    --canvas:    #EDEDF0;
    --line:      #D8D8DE;
    --ink:       #1B1B1F;   /* 15:1 on chrome */
    --ink-2:     #5A5A66;   /* 6.4:1 on chrome */
    --sel:       #0B6BCB;   /* selection blue, 5.0:1 on white */
    --ai:        #5B3EDB;   /* 6.3:1 white text */
    --guest:     #1A7F37;   /* 4.8:1 white text */
    --sans:"Inter", sans-serif;
    --mono:"IBM Plex Mono", monospace;
  }
  *{ margin:0; padding:0; box-sizing:border-box; }
  html{ scroll-behavior:smooth; }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior:auto; }
    *, *::before, *::after{ animation:none !important; transition:none !important; }
  }
  body{
    font-family:var(--sans); color:var(--ink); background:var(--canvas);
    font-size:15px; line-height:1.6;
  }
  a{ color:inherit; }
  :focus-visible{ outline:2px solid var(--sel); outline-offset:2px; border-radius:4px; }
  .mono{ font-family:var(--mono); }
  h2{ line-height:1.15; }   /* tighter than the body's 1.6 so multi-line headings don't feel airy */

  /* skip link (keyboard) */
  .skip{position:fixed;top:8px;left:8px;z-index:200;background:var(--ink);color:#fff;padding:10px 16px;border-radius:8px;font:600 14px/1 var(--sans);transform:translateY(-150%);transition:transform .15s ease;}
  .skip:focus{transform:none;outline:2px solid var(--sel);outline-offset:2px;}
  #content{scroll-margin-top:64px;}
  #content:focus-visible{outline:none;}

  /* ============ top toolbar ============ */
  .toolbar{
    position:fixed; inset:0 0 auto 0; height:52px; z-index:100;
    background:var(--chrome); border-bottom:1px solid var(--line);
    display:flex; align-items:center; justify-content:space-between; padding:0 16px;
  }
  .tool{
    width:36px; height:36px; border-radius:8px; border:none; background:transparent;
    display:grid; place-items:center; color:var(--ink-2); cursor:pointer;
  }
  .tool:hover{ background:#F0F0F4; color:var(--ink); }
  .tool[aria-pressed="true"]{ background:var(--sel); color:#fff; }
  .filename{ font-size:13.5px; font-weight:600; }
  .filename .mono{ color:var(--ink-2); font-weight:400; font-size:12px; margin-left:8px; }
  /* the "tim-hose-portfolio" lead acts as an evergreen home link; the mono tail names the page */
  .filename a{ color:inherit; text-decoration:none; }
  .filename a:hover{ color:var(--sel); }
  .right{ display:flex; align-items:center; gap:12px; }
  .avatars{ display:flex; }
  .avatar{
    width:28px; height:28px; border-radius:50%; border:2px solid #fff;
    display:grid; place-items:center; font-size:11px; font-weight:700; color:#fff;
    margin-left:-6px;
  }
  .share{
    font-family:var(--sans); font-size:13px; font-weight:600; color:#fff;
    background:var(--sel); border:none; border-radius:8px; padding:9px 18px;
    cursor:pointer; text-decoration:none;
  }
  .share:hover{ background:#085799; }

  /* ============ side panels ============ */
  .panel{
    position:fixed; top:52px; bottom:0; width:248px; z-index:90;
    background:var(--chrome); font-size:13px; overflow-y:auto;
  }
  .panel-l{ left:0; border-right:1px solid var(--line); }
  .panel-r{ right:0; border-left:1px solid var(--line); width:264px; }
  .panel .grp{
    font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
    color:var(--ink-2); padding:14px 16px 8px;
  }
  .panel hr{ border:none; border-top:1px solid var(--line); margin:8px 0; }

  .layers{ list-style:none; }
  .layers a{
    display:flex; gap:8px; align-items:center; text-decoration:none;
    padding:7px 16px; color:var(--ink);
  }
  .layers a:hover{ background:#F0F4FA; }
  /* the Layers tree is de-linked by JS (decorative, not navigation) — drop link affordances */
  .layers a:not([href]){ cursor:default; }
  .layers a:not([href]):not(.selected):hover{ background:transparent; }
  .layers .ico{ color:var(--ink-2); font-family:var(--mono); font-size:11px; width:16px; text-align:center; }
  .layers .indent{ padding-left:36px; }
  .layers .selected{ background:#E1EEFB; color:#085799; font-weight:600; }
  .layers .selected .ico{ color:#085799; }
  .layers .back{ color:var(--sel); font-weight:600; }

  /* inspector rows */
  .insp{ padding:4px 16px 12px; color:var(--ink); }
  .insp-row{ display:flex; justify-content:space-between; padding:5px 0; font-family:var(--mono); font-size:12px; }
  .insp-row .lab{ color:var(--ink-2); }
  .chip{
    display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-size:11.5px;
    background:#F0F0F4; border-radius:5px; padding:3px 8px; margin:3px 4px 3px 0;
  }
  .chip .sw{ width:12px; height:12px; border-radius:3px; border:1px solid var(--line); }
  .badge-aa{
    display:inline-block; font-size:11px; font-weight:700; color:#fff; background:var(--guest);
    border-radius:4px; padding:2px 7px;
  }

  /* component-property toggle (Figma-style boolean prop in the inspector) */
  .prop{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0 2px; cursor:pointer; }
  .prop-name{ font-size:13px; font-weight:600; color:var(--ink); }
  .prop-hint{ font-family:var(--mono); font-size:10.5px; color:var(--ink-2); margin-top:2px; }
  .switch{ position:relative; flex:none; display:inline-flex; }
  .switch input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
  .switch .track{ width:36px; height:20px; border-radius:999px; background:#C4C4CE; transition:background .15s ease; }
  .switch .thumb{ position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:transform .15s ease; }
  .switch input:checked + .track{ background:var(--sel); }
  .switch input:checked + .track .thumb{ transform:translateX(16px); }
  .switch input:focus-visible + .track{ outline:2px solid var(--sel); outline-offset:2px; }
  body.lurkers-off .cursor{ display:none; }

  /* ===== case-study password curtain (CLIENT-SIDE ONLY — see canvas-system.js) ===== */
  body.gated{ overflow:hidden; }
  .gate{ position:fixed; inset:0; z-index:300; background:var(--canvas); display:grid; place-items:center; padding:24px; overflow:auto; }
  .gate[hidden]{ display:none; }   /* needed because .gate sets display, which would otherwise beat [hidden] */
  .gate-card{ width:100%; max-width:420px; background:var(--chrome); border:1px solid var(--line); border-radius:14px; box-shadow:0 18px 50px rgba(27,27,31,.16); padding:40px 36px 34px; }
  .gate-eyebrow{ font-family:var(--mono); font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--sel); margin-bottom:14px; }
  .gate-card h2{ font-size:24px; font-weight:800; letter-spacing:-.01em; }
  .gate-desc{ color:var(--ink-2); font-size:14.5px; margin:10px 0 24px; }
  .gate-desc a{ color:var(--ink); border-bottom:1px solid var(--sel); text-decoration:none; }
  .gate-desc a:hover{ color:var(--sel); }
  .gate form{ display:flex; flex-direction:column; gap:16px; }
  .gate button.btn{ align-self:stretch; text-align:center; }
  .gate .form-status{ text-align:left; }
  .gate-foot{ margin-top:22px; font-family:var(--mono); font-size:11px; color:var(--ink-2); }

  /* ============ canvas ============ */
  .canvas-area{
    margin:52px 264px 0 248px; padding:64px 56px 120px;
    background-image:radial-gradient(circle, #C9C9D2 1px, transparent 1px);
    background-size:24px 24px; min-height:100vh;
  }
  .frame{ max-width:1160px; margin:0 auto 96px; container-type:inline-size; }
  .frame-label{
    font-family:var(--mono); font-size:12px; color:var(--ink-2); margin-bottom:8px;
    display:flex; gap:10px; align-items:center;
  }
  .frame-label b{ color:var(--sel); font-weight:500; }
  .artboard{
    background:#fff; border:1px solid var(--line); border-radius:6px;
    box-shadow:0 4px 24px rgba(27,27,31,.08); position:relative; overflow:visible;
  }

  /* hero artboard */
  .hero-board{ padding:96px 96px 88px; }
  .eyebrow{ font-family:var(--mono); font-size:13px; color:var(--ink-2); margin-bottom:28px; }
  .eyebrow b{ color:var(--ai); font-weight:500; }

  .selection{ position:relative; display:inline-block; }
  .selection .box{ position:absolute; inset:-14px -18px; border:1.5px solid var(--sel); pointer-events:none; }
  .selection .box i{
    position:absolute; width:9px; height:9px; background:#fff; border:1.5px solid var(--sel);
  }
  .selection .box i:nth-child(1){ top:-5px; left:-5px; }
  .selection .box i:nth-child(2){ top:-5px; right:-5px; }
  .selection .box i:nth-child(3){ bottom:-5px; left:-5px; }
  .selection .box i:nth-child(4){ bottom:-5px; right:-5px; }
  .selection .size-badge{
    position:absolute; bottom:-34px; left:50%; transform:translateX(-50%);
    background:var(--sel); color:#fff; font-family:var(--mono); font-size:11.5px;
    border-radius:4px; padding:3px 10px; white-space:nowrap;
  }
  h1{
    font-size:clamp(72px, 7.8vw, 112px); font-weight:900; letter-spacing:-.045em; line-height:.96;
  }
  h1 .accent{ color:var(--sel); }
  .hero-sub{ margin-top:52px; font-size:21px; color:var(--ink-2); max-width:56ch; line-height:1.55; }
  .hero-cta{ margin-top:40px; display:flex; flex-wrap:wrap; gap:14px; }
  .btn{
    position:relative; white-space:nowrap;
    font-size:15px; font-weight:600; text-decoration:none; border-radius:10px; padding:15px 28px;
    background:var(--ink); color:#fff; transition:transform .12s ease;
  }
  .btn:hover{ transform:translateY(-2px); }
  .btn.alt{ background:#fff; color:var(--ink); border:1.5px solid var(--ink); }

  /* auto-layout hover hint on artboard */
  .hero-board::after{
    content:"auto-layout · ↓ vertical · gap 40 · padding 96";
    position:absolute; top:10px; right:14px;
    font-family:var(--mono); font-size:11px; color:var(--sel);
    border:1px dashed var(--sel); border-radius:5px; padding:3px 8px;
    opacity:0; transition:opacity .15s ease;
  }
  .artboard:hover.hero-board::after, .hero-board:hover::after{ opacity:1; }

  /* comment pin */
  .pin{
    position:absolute; right:72px; top:72px;
    width:34px; height:34px; border-radius:50% 50% 50% 6px;
    background:#FFB938; border:2px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.18);
    display:grid; place-items:center; font-size:13px; font-weight:800; color:#1B1B1F; cursor:default;
  }
  .pin .tip{
    position:absolute; top:42px; right:0; width:230px;
    background:var(--ink); color:#fff; font-size:12.5px; font-weight:500; line-height:1.5;
    border-radius:10px 4px 10px 10px; padding:12px 14px; opacity:0; pointer-events:none;
    transition:opacity .15s ease; text-align:left;
  }
  .pin:hover .tip{ opacity:1; }   /* pin is decorative (aria-hidden, not focusable) — hover-only is fine */

  /* work artboard */
  .work-board{ padding:72px 96px; }
  .board-head{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:48px; }
  .board-head h2{ font-size:34px; font-weight:800; letter-spacing:-.02em; }
  .board-head .mono{ font-size:12px; color:var(--ink-2); }
  /* selected work — one project per full-width row, alternating which side the visual sits on,
     so the work is the largest mass on the page instead of a cramped two-up grid */
  .work-rows{ display:flex; flex-direction:column; }
  .work-row{
    position:relative; display:grid; align-items:center;
    grid-template-columns:1.45fr 1fr; gap:clamp(28px,4vw,56px);
    text-decoration:none; color:inherit;
    padding:clamp(24px,3.4vw,44px) 8px; border-top:1px solid var(--line);
  }
  .work-row:first-child{ border-top:none; }
  /* alternating rows: visual moves right AND the wide column moves with it, so the
     right-aligned visuals stay the same size as the left-aligned ones */
  .work-row--flip{ grid-template-columns:1fr 1.45fr; }
  .work-row--flip .row-visual{ order:2; }
  .thumb{
    aspect-ratio:16/10; display:grid; place-items:center; position:relative;
    border:1px solid var(--line); border-radius:14px; overflow:hidden;
    transition:box-shadow .15s ease, transform .15s ease;
  }
  .work-row:hover .thumb, .work-row:focus-visible .thumb{ transform:translateY(-3px); box-shadow:0 14px 40px rgba(27,27,31,.16); }
  .thumb .comp{
    background:rgba(255,255,255,.92); border-radius:10px; padding:18px 26px;
    font-family:var(--mono); font-size:13px; color:var(--ink); box-shadow:0 4px 16px rgba(0,0,0,.12);
  }
  .row-fig{ font-family:var(--mono); font-size:12px; color:var(--ink-2); }
  .row-text h3{ font-size:clamp(24px,2.4vw,34px); font-weight:800; letter-spacing:-.02em; line-height:1.2; margin:10px 0 0; transition:color .12s ease; }
  .work-row:hover .row-text h3, .work-row:focus-visible .row-text h3{ color:var(--sel); }
  .row-text p{ color:var(--ink-2); font-size:clamp(15px,1.2vw,16.5px); margin-top:12px; max-width:46ch; }
  .card-tags{ margin-top:16px; }
  .row-link{ display:inline-block; margin-top:20px; font-family:var(--mono); font-size:13px; color:var(--sel); }
  .work-row:hover .row-link, .work-row:focus-visible .row-link{ text-decoration:underline; }
  .work-row:focus-visible{ outline:2px solid var(--sel); outline-offset:4px; border-radius:8px; }
  .hover-spec{
    position:absolute; top:12px; left:12px; z-index:2; font-family:var(--mono); font-size:11px;
    color:#fff; background:var(--sel); border-radius:4px; padding:3px 8px; opacity:0; transition:opacity .15s;
  }
  /* keyboard users get the annotation via focus-within, not just hover */
  .work-row:hover .hover-spec, .work-row:focus-within .hover-spec{ opacity:1; }

  /* contact artboard */
  .contact-board{ padding:88px 96px; text-align:center; }
  .contact-board h2{ font-size:clamp(44px,4.4vw,64px); font-weight:900; letter-spacing:-.04em; }
  .contact-board p{ color:var(--ink-2); font-size:18px; margin:20px auto 36px; max-width:48ch; }
  .email{
    display:inline-block; font-size:26px; font-weight:700; color:var(--sel);
    text-decoration:none; border-bottom:2px solid var(--sel); padding-bottom:4px;
  }
  .email:hover{ color:#085799; border-color:#085799; }

  /* ============ content sections: capabilities / experience / education ============ */
  .section-board{ padding:64px 96px; }
  .section-board .board-head{ margin-bottom:40px; }

  /* hero meta chips */
  .hero-meta{ display:flex; flex-wrap:wrap; gap:8px; margin-top:46px; }
  .hero-meta + .hero-sub{ margin-top:32px; }

  /* capabilities — a component sheet */
  .caps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
  .cap{
    position:relative; background:#fff; border:1px solid var(--line); border-radius:14px;
    padding:24px 24px 28px; transition:box-shadow .15s ease, transform .15s ease;
  }
  .cap:hover{ transform:translateY(-3px); box-shadow:0 10px 32px rgba(27,27,31,.1); }
  .cap .num{ font-family:var(--mono); font-size:12px; color:var(--ink-2); }
  .cap h3{ font-size:19px; font-weight:700; letter-spacing:-.01em; margin:10px 0 8px; }
  .cap p{ color:var(--ink-2); font-size:14px; }
  .cap .hover-spec{ left:auto; right:12px; }
  .cap:hover .hover-spec{ opacity:1; }
  .cap-intro{ color:var(--ink-2); font-size:15px; max-width:60ch; margin:-24px 0 28px; }

  /* experience — annotated timeline: a compact meta rail (years + location) beside the content,
     so the description gets the full remaining width instead of a squeezed column */
  .xp{
    position:relative; display:grid; align-items:start; column-gap:40px;
    grid-template-columns:160px minmax(0,1fr);
    padding:24px 10px; border-top:1px solid var(--line); transition:background .15s ease;
  }
  .xp:first-child{ border-top:none; }
  .xp:hover{ background:#F0F4FA; }
  .xp-rail{ display:flex; flex-direction:column; gap:7px; padding-top:3px; }
  .xp .years{ font-family:var(--mono); font-size:12px; color:var(--sel); letter-spacing:.02em; }
  .xp .loc{ font-family:var(--mono); font-size:11.5px; color:var(--ink-2); }
  .xp h3{ font-size:17px; font-weight:700; letter-spacing:-.01em; line-height:1.2; }
  .xp .org{ display:block; font-family:var(--mono); font-size:11.5px; color:var(--ink-2); margin-top:6px; }
  .xp-main p{ color:var(--ink-2); font-size:14px; margin-top:10px; max-width:66ch; }

  /* education — 2-col cards */
  .edu-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .edu{ background:#fff; border:1px solid var(--line); border-radius:14px; padding:28px 28px 32px; }
  .edu .org{ font-family:var(--mono); font-size:12px; color:var(--sel); letter-spacing:.02em; }
  .edu h3{ font-size:20px; font-weight:700; letter-spacing:-.01em; margin:10px 0 12px; }
  .edu p{ color:var(--ink-2); font-size:14px; }
  .edu ul{ list-style:none; margin-top:10px; }
  .edu li{ color:var(--ink-2); font-size:14px; padding:10px 0; border-top:1px solid var(--line); }
  .edu li:first-child{ border-top:none; }
  .edu li b{ color:var(--ink); font-weight:700; }
  .edu li .mono{ color:var(--sel); }

  /* contact form (canvas style) */
  .cform{ max-width:520px; margin:36px auto 0; text-align:left; display:flex; flex-direction:column; gap:18px; }
  .field label{
    display:flex; justify-content:space-between; align-items:baseline; gap:12px;
    font-family:var(--mono); font-size:11.5px; letter-spacing:.04em; color:var(--ink-2); margin-bottom:8px;
  }
  .field label .tok{ color:var(--sel); }
  .field input, .field textarea{
    width:100%; font-family:var(--sans); font-size:15px; color:var(--ink);
    background:#F7F7FA; border:1px solid var(--line); border-radius:10px; padding:13px 15px;
    transition:border-color .15s ease;
  }
  .field input:hover, .field textarea:hover{ border-color:var(--ink-2); }
  .field input:focus, .field textarea:focus{ outline:2px solid var(--sel); outline-offset:2px; border-color:var(--sel); }
  .field textarea{ resize:vertical; min-height:120px; line-height:1.5; }
  button.btn{ border:none; cursor:pointer; font-family:var(--sans); align-self:center; }
  .form-status{ font-family:var(--mono); font-size:12px; color:var(--ink-2); min-height:1.3em; text-align:center; }
  .form-status.err{ color:#C81E3C; }
  .form-status.ok{ color:var(--guest); }
  .alt-email{ font-family:var(--mono); font-size:12.5px; color:var(--ink-2); margin-top:24px; }
  .alt-email a{ color:var(--ink); text-decoration:none; border-bottom:1px solid var(--sel); }
  .alt-email a:hover{ color:var(--sel); }
  .contact-meta{
    display:flex; justify-content:center; gap:10px 24px; flex-wrap:wrap;
    margin-top:36px; font-family:var(--mono); font-size:12px; color:var(--ink-2);
  }
  .contact-meta a{ color:var(--ink); text-decoration:none; border-bottom:1px solid var(--sel); }
  .contact-meta a:hover{ color:var(--sel); }

  /* ============ hover annotations — tokens & specs revealed on hover ============ */
  .tok-tag{
    position:absolute; z-index:6; font-family:var(--mono); font-size:10.5px; letter-spacing:.02em;
    color:#fff; background:var(--sel); border-radius:4px; padding:3px 8px; white-space:nowrap;
    opacity:0; pointer-events:none; transition:opacity .15s ease;
  }
  /* buttons → padding / radius / fill tokens */
  .btn .tok-tag{ left:50%; top:-30px; transform:translateX(-50%); }
  .btn:hover .tok-tag, .btn:focus-visible .tok-tag{ opacity:1; }
  /* experience rows → node + tenure, parked in the empty space below the meta rail */
  .xp .tok-tag{ left:10px; bottom:12px; }
  .xp:hover .tok-tag, .xp:focus-within .tok-tag{ opacity:1; }
  /* education cards → cell coords */
  .edu{ position:relative; }
  .edu .tok-tag{ right:12px; top:12px; }
  .edu:hover .tok-tag{ opacity:1; }
  /* section headings → reveal their type token */
  .board-head h2{ position:relative; }
  .board-head h2 .tok-tag{ left:0; top:-24px; }
  .board-head h2:hover .tok-tag{ opacity:1; }
  /* hero accent word → its colour token, with a swatch */
  .accent{ position:relative; }
  .accent .tok-tag{ left:0; top:calc(100% + 8px); background:var(--ink); display:inline-flex; align-items:center; gap:6px; }
  .accent .tok-tag .sw{ width:11px; height:11px; border-radius:2px; background:var(--sel); border:1px solid rgba(255,255,255,.35); }
  .accent:hover .tok-tag{ opacity:1; }

  /* ============ multiplayer cursors ============ */
  .cursor{ position:fixed; z-index:120; pointer-events:none; }
  .cursor svg{ display:block; filter:drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
  .cursor .name{
    margin:2px 0 0 14px; display:inline-block; color:#fff; font-size:11.5px; font-weight:600;
    border-radius:4px 10px 10px 10px; padding:3px 9px; white-space:nowrap;
  }
  .cur-ai   { animation:drift1 26s ease-in-out infinite; top:30%; left:58%; }
  .cur-guest{ animation:drift2 31s ease-in-out infinite; top:64%; left:34%; }
  @keyframes drift1{
    0%,100%{ transform:translate(0,0); } 25%{ transform:translate(-180px,140px); }
    55%{ transform:translate(90px,260px); } 80%{ transform:translate(160px,60px); }
  }
  @keyframes drift2{
    0%,100%{ transform:translate(0,0); } 30%{ transform:translate(220px,-120px); }
    60%{ transform:translate(-120px,-40px); } 85%{ transform:translate(60px,120px); }
  }

  /* ============ content reflow via container queries — keyed to the real board width,
     so sections respond to the side panels being open or collapsed, not just the viewport. ============ */
  @container (max-width: 920px){
    .hero-board{ padding:56px 48px 52px; }
    .work-board, .section-board{ padding:48px 48px; }
    .contact-board{ padding:56px 48px; }
    .caps{ grid-template-columns:1fr 1fr; }
  }
  @container (max-width: 560px){
    .hero-board{ padding:40px 22px 36px; }
    .work-board, .section-board{ padding:30px 22px; }
    .contact-board{ padding:40px 22px; }
    .caps{ grid-template-columns:1fr; }
    .edu-grid{ grid-template-columns:1fr; }
    /* work rows collapse to a single stacked column, visual above text */
    .work-row{ grid-template-columns:1fr; gap:18px; padding:22px 4px; }
    .work-row--flip .row-visual{ order:0; }
    .row-text p{ max-width:none; }
    .board-head{ flex-direction:column; align-items:flex-start; gap:6px; }
    .board-head h2{ font-size:27px; }
    /* experience rows collapse to a single column; the rail goes inline above the content */
    .xp{ grid-template-columns:1fr; row-gap:10px; padding:20px 4px; }
    .xp-rail{ flex-direction:row; gap:14px; align-items:baseline; padding-top:0; }
    .xp .tok-tag{ display:none; }   /* no spare room in the stacked layout */
  }

  /* ============ inspector collapse (desktop) — reclaim the right panel's width for the work canvas.
     Only the decorative inspector collapses; the left Pages/Layers nav stays put for navigation/a11y. ============ */
  .insp-collapse{ display:none; }
  @media (min-width:1101px){
    .insp-collapse{
      display:grid; place-items:center; width:32px; height:32px; border-radius:8px;
      border:1px solid var(--line); background:transparent; color:var(--ink-2); cursor:pointer;
    }
    .insp-collapse:hover{ background:#F0F0F4; color:var(--ink); }
    .insp-collapse svg{ transition:transform .2s ease; }
    body.insp-collapsed .insp-collapse svg{ transform:rotate(180deg); }
    body.insp-anim .panel-r{ transition:transform .2s ease; }
    body.insp-anim .canvas-area{ transition:margin .2s ease; }
    body.insp-collapsed .panel-r{ transform:translateX(100%); }
    body.insp-collapsed .canvas-area{ margin-right:48px; }
  }

  /* ============ responsive: tablet & mobile ============ */
  .menu-btn, .insp-btn{ display:none; }
  .scrim{
    position:fixed; inset:0; z-index:95; background:rgba(27,27,31,.38);
    opacity:0; visibility:hidden; transition:opacity .2s ease, visibility .2s ease;
  }
  .scrim.on{ opacity:1; visibility:visible; }

  /* tablet & down — panels become overlays toggled from the toolbar */
  @media (max-width:1100px){
    .menu-btn{ display:grid; }
    .insp-btn{
      display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px;
      border:1px solid var(--line); border-radius:8px; background:transparent;
      font-family:var(--sans); font-size:13px; font-weight:600; color:var(--ink-2); cursor:pointer;
    }
    .insp-btn:hover{ background:#F0F0F4; color:var(--ink); }

    .panel{ z-index:110; box-shadow:0 12px 48px rgba(27,27,31,.2); }
    .panel-l{ transform:translateX(-100%); transition:transform .25s ease; }
    .panel-l.open{ transform:translateX(0); }
    .panel-r{                          /* inspector → bottom sheet */
      top:auto; bottom:0; left:0; right:0; width:100%; max-height:82vh;
      border-left:none; border-top:1px solid var(--line); border-radius:16px 16px 0 0;
      transform:translateY(100%); transition:transform .25s ease;
    }
    .panel-r.open{ transform:translateY(0); }

    .canvas-area{ margin:52px 0 0; padding:48px 40px 100px; }

    .cursor{ display:none; }            /* drifting cursors overlap on small screens */
  }

  /* phones */
  @media (max-width:640px){
    .filename .mono{ display:none; }
    /* toolbar: filename truncates instead of wrapping; inspector button goes icon-only */
    .filename{
      flex:1 1 auto; min-width:0; text-align:center; padding:0 8px; font-size:13px;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    }
    .right{ gap:8px; flex:0 0 auto; }
    .insp-btn{ width:44px; padding:0; justify-content:center; }
    .insp-btn .lbl{ display:none; }
    .share{ padding:11px 16px; }
    .avatar{ width:26px; height:26px; }
    .canvas-area{ padding:28px 16px 72px; background-size:20px 20px; }
    .frame{ margin-bottom:56px; }

    h1{ font-size:clamp(38px, 11vw, 112px); }
    .hero-sub{ margin-top:32px; font-size:17px; }
    .hero-cta{ margin-top:28px; flex-wrap:wrap; gap:10px; }
    .btn{ padding:13px 22px; }
    .selection .box, .selection .size-badge{ display:none; }
    .pin{ right:18px; top:18px; }

    .contact-board p{ font-size:16px; }
    .email{ font-size:21px; }
    .hero-meta{ margin-top:36px; gap:6px; }
    .cform{ margin-top:28px; }
    .contact-meta{ flex-direction:column; gap:8px; }
  }

  /* very narrow (≈360px Android): drop the avatar stack so the filename keeps its room */
  @media (max-width:460px){
    .avatars{ display:none; }
  }

  /* touch: drop hover-only hints, grow tap targets */
  @media (hover:none){
    .hero-board::after, .hover-spec{ display:none; }
    .tool, .menu-btn{ width:44px; height:44px; }
    .share{ padding:12px 20px; }
  }
