/* ================================================================
   The MSP Register, design 2 (22 Nov 2026). Loaded only when the build
   runs with REGISTER_DESIGN=2, on top of site.css.

   Adam, 22 Nov: the graphite look of the "one theme for my whole Mac" reel
   for dark, today's colours for light, one menu down the left that opens on
   hover and shows only icons when closed, and Ask abi. at the top like the
   app, with her face, the ripple and the cursor follow. Signed off on the
   canvas "MSP Register: graphite restyle".

   Theme: html[data-theme] is set before paint by the inline script in the
   head from the visitor's choice (Auto, Light, Dark; Auto follows the
   device). Light keeps the site.css tokens.
   ================================================================ */
:root.d2[data-theme="dark"]{
  color-scheme: dark;
  --ground:#0E0E10; --surface:#151517; --raised:#1D1D20;
  --ink:#F2F2F4; --body:#C2C2C7; --muted:#8E8E93; --faint:#86868C;
  --hair:#2E2E33; --hair-soft:#28282C;
  --land:#1A1A1D; --land-line:#34343A; --field-line:#5E5E64;
  --accent:#F38BBD; --accent-ink:#F38BBD; --accent-wash:rgba(243,139,189,.13); --accent-on:#1D1D1F;
  --good-ink:#5BD6A0; --good-wash:#12241C; --good-line:#22412F;
  --note-ink:#E5B155; --note-wash:#2A2113; --note-line:#453519;
  --shadow:0 1px 3px rgba(0,0,0,.5); --shadow-overlay:0 18px 48px rgba(0,0,0,.55);
}
:root.d2{ --rail:76px; --rail-open:268px; }
.d2 body{ background-color:var(--ground) }
:root.d2[data-theme="dark"] body{ background-image:linear-gradient(118deg,rgba(255,255,255,.05) 0%,rgba(255,255,255,0) 38%); background-attachment:fixed }

/* Type: the reel's calmer weight and the two-tone headline. */
.d2 h1{ font-weight:500; letter-spacing:-.04em }
.d2 h2{ font-weight:500; letter-spacing:-.035em }
.d2 .tone{ color:var(--muted) }

/* ---------- the rail ---------- */
.d2 .rail{ display:none }
@media (min-width:900px){
  .d2 body{ padding-left:var(--rail) }
  .d2 header{ display:none }
  .d2 .rail{ display:flex; flex-direction:column; gap:2px; position:fixed; z-index:40; top:0; left:0; bottom:0; width:var(--rail);
    overflow:hidden auto; box-sizing:border-box; padding:22px 12px; background:var(--ground); border-right:1px solid var(--hair-soft);
    transition:width .24s cubic-bezier(.2,.8,.3,1), box-shadow .24s; scrollbar-width:none }
  .d2 .rail::-webkit-scrollbar{ display:none }
  .d2 .rail:hover, .d2 .rail:focus-within{ width:var(--rail-open); box-shadow:18px 0 48px rgba(0,0,0,.28) }
  :root.d2[data-theme="dark"] .rail:hover, :root.d2[data-theme="dark"] .rail:focus-within{ box-shadow:18px 0 48px rgba(0,0,0,.55) }
}
.d2 .rail .lbl{ opacity:0; white-space:nowrap; transition:opacity .14s }
.d2 .rail:hover .lbl, .d2 .rail:focus-within .lbl{ opacity:1; transition-delay:.07s }
.d2 .rail .brand2{ position:relative; display:block; height:48px; margin-bottom:12px; flex:none }
.d2 .rail .mk-c{ white-space:nowrap; position:absolute; left:14px; top:10px; font-size:18px; font-weight:600; letter-spacing:-.04em; color:var(--ink); transition:opacity .14s }
.d2 .rail:hover .mk-c, .d2 .rail:focus-within .mk-c{ opacity:0 }
.d2 .rail .brand2 .lbl{ position:absolute; left:14px; top:2px }
.d2 .rail .brand2 b{ display:block; font-size:17px; font-weight:600; letter-spacing:-.03em; color:var(--ink) }
.d2 .rail .brand2 small{ display:block; font-size:12px; color:var(--faint) }
.d2 .dot{ display:inline-block; width:.32em; height:.32em; margin-left:.05em; border-radius:50%; background:linear-gradient(135deg,#A855F7,#EC4899) }
.d2 .rail .ri{ display:flex; align-items:center; gap:14px; min-height:42px; padding:0 14px; border-radius:10px; font-size:14.5px; color:var(--body); flex:none }
.d2 .rail .ri svg{ flex:none; width:20px; height:20px }
.d2 .rail .ri:hover{ background:var(--raised); color:var(--ink) }
.d2 .rail .ri[aria-current="page"]{ background:var(--raised); color:var(--ink); font-weight:500 }
.d2 .rail .sec{ position:relative; height:24px; margin:10px 14px 2px; font-size:12px; line-height:24px; color:var(--faint); flex:none }
.d2 .rail .sec::before{ content:""; position:absolute; left:0; width:24px; top:12px; height:1px; background:var(--hair); transition:opacity .14s }
.d2 .rail:hover .sec::before, .d2 .rail:focus-within .sec::before{ opacity:0 }
.d2 .seg{ display:flex; gap:2px; padding:3px; border-radius:10px; background:var(--raised); flex:1 }
.d2 .seg button{ flex:1; height:30px; border:0; border-radius:8px; font:inherit; font-size:13px; cursor:pointer; background:transparent; color:var(--muted) }
.d2 .seg button[aria-pressed="true"]{ background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.2) }

/* ---------- Ask abi. ---------- */
.d2 .askbar{ position:relative; z-index:30; max-width:1000px; margin:0 auto; padding:18px 24px 0 }
.d2 .askwrap{ display:flex; justify-content:center }
.d2 .ask{ position:relative; overflow:hidden; width:min(100%,520px); min-height:50px; box-sizing:border-box; display:flex; align-items:center; gap:10px;
  padding:5px 6px; border-radius:999px; background:var(--surface); border:1px solid var(--hair);
  transition:width .34s cubic-bezier(.2,.8,.3,1), min-height .34s cubic-bezier(.2,.8,.3,1), border-color .2s }
.d2 .ask::before{ content:""; position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .2s;
  background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%),rgba(236,72,153,.16),rgba(168,85,247,.06) 45%,transparent 72%) }
.d2 .askwrap:hover .ask, .d2 .ask:focus-within, .d2 .ask.open{ width:100%; min-height:58px; border-color:color-mix(in srgb,#EC4899 35%,transparent) }
.d2 .askwrap:hover .ask::before, .d2 .ask:focus-within::before{ opacity:1 }
.d2 .ask > *{ position:relative }
.d2 .ask input{ flex:1 1 auto; min-width:0; height:40px; border:0; outline:none; background:transparent; color:var(--ink); font:inherit; font-size:16px }
.d2 .ask input::placeholder{ color:var(--faint) }
.d2 .ask kbd{ font:12px var(--mono); color:var(--faint); border:1px solid var(--hair); border-radius:6px; padding:2px 6px }
.d2 .ask button[type=submit]{ height:40px; padding:0 18px; border:0; border-radius:999px; background:var(--ink); color:var(--ground); font:inherit; font-size:15px; font-weight:500; cursor:pointer }
.d2 .ring{ position:absolute !important; left:6px; top:50%; width:40px; height:40px; margin-top:-20px; border-radius:50%; border:1.5px solid rgba(236,72,153,.6); opacity:0; pointer-events:none }
.d2 .ring.go{ animation:d2rip 1s cubic-bezier(.1,.6,.3,1) }
.d2 .ring.two.go{ animation-delay:.14s }
@keyframes d2rip{ 0%{ transform:scale(1); opacity:.75 } 100%{ transform:scale(7); opacity:0 } }
.d2 .abiface{ flex:none; width:40px; height:40px; overflow:visible }
.d2 .abiface .eyes{ transform:translate(var(--ex,0px),var(--ey,0px)); transition:transform .12s ease-out }
.d2 .abiface .pup{ transform-box:fill-box; transform-origin:center; animation:d2blink 5.4s infinite }
.d2 .abiface .bod{ transform-origin:60px 110px; transition:transform .3s cubic-bezier(.2,.8,.3,1) }
.d2 .askwrap:hover .abiface .bod{ transform:translateY(-2px) scale(1.04) }
@keyframes d2blink{ 0%,93%,100%{ transform:scaleY(1) } 96%{ transform:scaleY(.12) } }
.d2 .askres{ margin-top:10px; padding:14px 18px 12px; background:var(--surface); border:1px solid var(--hair); border-radius:18px; box-shadow:var(--shadow-overlay) }
.d2 .askres[hidden]{ display:none }
.d2 .askres .chips{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:13px; color:var(--faint) }
.d2 .askres .chip{ padding:3px 10px; border-radius:999px; background:var(--raised); color:var(--ink) }
.d2 .askres .chip i{ font-style:normal; color:var(--faint) }
.d2 .askres a.hit{ display:flex; justify-content:space-between; gap:16px; padding:9px 10px; margin:0 -10px; border-radius:10px }
.d2 .askres a.hit:hover, .d2 .askres a.hit:focus{ background:var(--raised); outline:none }
.d2 .askres .hn{ color:var(--ink); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.d2 .askres .hm{ font-size:13.5px; color:var(--muted); white-space:nowrap }
.d2 .askres .foot{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin-top:8px; padding-top:10px; border-top:1px solid var(--hair); font-size:12.5px; color:var(--faint) }
.d2 .askres .foot a{ color:var(--accent-ink) }
@media (max-width:640px){ .d2 .ask kbd{ display:none } .d2 .askbar{ padding:12px 16px 0 } }

/* ---------- welcome, first visit ---------- */
.d2 .welcome{ position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; background:rgba(6,6,8,.55);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px) }
:root.d2:not([data-theme="dark"]) .welcome{ background:rgba(240,240,245,.7) }
.d2 .welcome[hidden]{ display:none }
.d2 .wcard{ width:min(960px,calc(100vw - 48px)); max-height:calc(100vh - 48px); overflow:auto; background:var(--surface); border:1px solid var(--hair);
  border-radius:24px; box-shadow:0 30px 80px rgba(0,0,0,.4); animation:d2pop .42s cubic-bezier(.2,.8,.3,1) }
@keyframes d2pop{ 0%{ opacity:0; transform:translateY(14px) scale(.985) } 100%{ opacity:1; transform:none } }
.d2 .whead{ display:flex; align-items:center; gap:14px; padding:20px 24px 16px; border-bottom:1px solid var(--hair) }
.d2 .whead h2{ margin:0; flex:1; font-size:21px; color:var(--ink) }
.d2 .wx{ width:40px; height:40px; border:0; border-radius:50%; background:var(--raised); color:var(--muted); cursor:pointer; font-size:18px; line-height:1 }
.d2 .wcols{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) }
.d2 .wcol{ padding:28px; display:flex; flex-direction:column }
.d2 .wcol + .wcol{ border-left:1px solid var(--hair) }
.d2 .wcol .eyebrow{ margin:0; font-size:12.5px; color:var(--accent-ink) }
.d2 .wcol h3{ margin:8px 0 0; font-size:28px; line-height:1.12; font-weight:500; letter-spacing:-.035em; color:var(--ink) }
.d2 .wcol p{ color:var(--muted) }
.d2 .wcol ul{ margin:12px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; font-size:14.5px }
.d2 .wcol li::before{ content:"✓"; color:var(--accent-ink); margin-right:10px }
.d2 .ladder{ margin-top:12px; border-top:1px solid var(--hair) }
.d2 .ladder div{ display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--hair); font-size:14.5px }
.d2 .ladder span:first-child{ color:var(--ink) } .d2 .ladder span:last-child{ color:var(--muted) }
.d2 .wcta{ margin-top:auto; padding-top:22px; display:flex; flex-wrap:wrap; align-items:center; gap:14px }
.d2 .wbtn{ padding:12px 20px; border-radius:12px; background:var(--ink); color:var(--ground); font-weight:500 }
.d2 .wbtn.ghost{ background:transparent; color:var(--ink); border:1px solid var(--ink) }
.d2 .wlink{ font-size:14.5px; color:var(--muted) }
.d2 .wfoot{ display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 24px; border-top:1px solid var(--hair); font-size:13px; color:var(--faint) }
.d2 .wfoot button{ border:0; background:transparent; color:var(--muted); font:inherit; cursor:pointer; padding:10px 4px }
@media (max-width:760px){
  .d2 .welcome{ align-items:flex-end }
  .d2 .wcard{ width:100%; max-height:86vh; border-radius:22px 22px 0 0; animation-name:d2up }
  .d2 .wcols{ grid-template-columns:1fr }
  .d2 .wcol + .wcol{ border-left:0; border-top:1px solid var(--hair) }
  .d2 .wcol{ padding:20px }
  .d2 .wcol h3{ font-size:22px }
  .d2 .wfoot span{ display:none }
}
@keyframes d2up{ 0%{ transform:translateY(40px); opacity:0 } 100%{ transform:none; opacity:1 } }

@media (prefers-reduced-motion:reduce){
  .d2 .rail, .d2 .ask, .d2 .abiface .eyes, .d2 .abiface .bod{ transition:none }
  .d2 .abiface .pup, .d2 .ring.go, .d2 .wcard{ animation:none }
}
@media print{ .d2 .rail, .d2 .askbar, .d2 .welcome{ display:none !important } .d2 body{ padding-left:0 } }

/* ---------- dark: the graphite room ----------
   site.css paints the light room (abi.'s pink glow and the floor of lines)
   and white glass. In dark the room is plain graphite and the glass is a
   breath of white, as in the reel. Light keeps today's room untouched. */
:root.d2[data-theme="dark"]{
  --glass:rgba(255,255,255,.03); --glass-strong:rgba(255,255,255,.05); --glass-line:rgba(255,255,255,.08);
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -34px rgba(0,0,0,.6);
}
:root.d2[data-theme="dark"] body::before, :root.d2[data-theme="dark"] body::after{ display:none }
:root.d2[data-theme="dark"] header{ background:rgba(14,14,16,.72); box-shadow:none }
:root.d2[data-theme="dark"] .panel, :root.d2[data-theme="dark"] .facts, :root.d2[data-theme="dark"] .notes > div,
:root.d2[data-theme="dark"] .tally, :root.d2[data-theme="dark"] .lookup-result,
:root.d2[data-theme="dark"] .card a, :root.d2[data-theme="dark"] .card, :root.d2[data-theme="dark"] .near{ background:var(--glass) }
:root.d2[data-theme="dark"] .card:has(> a){ background:none }
:root.d2[data-theme="dark"] .card a:hover{ border-color:var(--hair) }
:root.d2[data-theme="dark"] .bigfield{ background:var(--surface); border-color:var(--hair); box-shadow:none; color:var(--ink) }
:root.d2[data-theme="dark"] .rowbtn:hover{ background:var(--raised) }
:root.d2[data-theme="dark"] .tab:hover{ background:var(--raised) }
:root.d2[data-theme="dark"] .tab[aria-pressed="true"]{ background:var(--raised); color:var(--ink); border-color:var(--hair); box-shadow:none }
:root.d2[data-theme="dark"] .btn{ color:var(--ground) }
:root.d2[data-theme="dark"] .btn.quiet, :root.d2[data-theme="dark"] .btn.ghost{ background:var(--raised); color:var(--ink); border-color:var(--hair) }
:root.d2[data-theme="dark"] .tbar{ background:rgba(255,255,255,.08) }
:root.d2[data-theme="dark"] .st-c{ color:var(--accent-on) }
:root.d2[data-theme="dark"] .checks .cn{ color:var(--ground) }
:root.d2[data-theme="dark"] .field{ background:var(--surface); color:var(--ink) }
