/* TMS look system. Every person picks their own look (light, dark, glass, liquid glass, metal, navy, or follow the device).
   A look is a set of colour tokens on <html data-skin="...">; components only ever use the tokens. */
:root {
  --brand: #D50032; --brand-2: #ff3d5e; --brand-dark: #B0002A;
  --ink: #171c28; --ink-soft: #4a5367; --ink-faint: #7d8699;
  --paper: #f3f4f8; --card: #ffffff; --line: #e3e6ee; --chip: #eef0f6; --hover: #f6f7fb;
  --side-a: #f7f8fb; --side-b: #e4e7ee;
  --ok: #1E7A46; --ok-bg: #e2f4ea; --amb: #A96500; --amb-bg: #fff0d2; --no: #B3261E; --no-bg: #fde4e2; --none-bg: #eceff5;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 30px rgba(16,24,40,.07); --pop: 0 12px 40px rgba(16,24,40,.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); background-attachment: fixed; min-height: 100%; color-scheme: light; }
body { margin: 0; background: transparent; color: var(--ink); font: 15px/1.55 var(--font); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1 { margin: 0 0 2px; font-size: 26px; letter-spacing: -.02em; }
h2 { letter-spacing: -.005em; }
.muted, .lede { color: var(--ink-soft); } .lede { margin: 0 0 20px; max-width: 72ch; }
a { color: var(--brand); }

.demo { background: #fff4c2; color: #5a4300; text-align: center; padding: 6px 16px; font-size: 13px; border-bottom: 1px solid #e8d27a; position: relative; z-index: 60; }
.signin { min-height: 80vh; display: grid; place-items: center; padding: 24px; }
.signin .card { width: min(420px, 100%); }
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--side-a), var(--side-b)); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 16px; z-index: 20; }
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 10px 10px; }
.logo i { width: 10px; height: 32px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 3px; flex: none; }
.logo small { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.logo b { font-size: 16px; letter-spacing: -.01em; }
.menu { position: relative; display: grid; gap: 4px; }
.pill { position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: 11px; background: linear-gradient(180deg, #e8164a, var(--brand-dark)); box-shadow: 0 4px 14px rgba(213,0,50,.35); transition: transform .32s var(--ease); z-index: 0; opacity: 0; pointer-events: none; }
.navl { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 11px; color: var(--ink-soft); font-weight: 500; text-decoration: none; transition: color .2s, background .2s, transform .15s; }
.navl svg, .iconbtn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.navl:hover { background: rgba(0,0,0,.05); color: var(--ink); } .navl:active { transform: scale(.98); }
.navl[aria-current="page"] { color: #fff; background: transparent; font-weight: 600; }
.me { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-soft); }
.me b { display: block; color: var(--ink); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: linear-gradient(135deg, #4b5470, #2a3048); flex: none; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 28px 0; }
main { padding: 12px 28px 56px; max-width: 1400px; width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); transition: transform .15s var(--ease), box-shadow .2s; }
.iconbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.14); }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; padding: 4px; }
.sec > * { animation: rise .45s var(--ease) both; } .sec > *:nth-child(2) { animation-delay: .04s; } .sec > *:nth-child(3) { animation-delay: .08s; } .sec > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.narrow { max-width: 420px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
input, select, textarea { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px; min-height: 42px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(213,0,50,.12); outline: none; }
.btn, button.primary { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 16px; min-height: 40px; font-weight: 600; text-decoration: none; color: var(--ink); display: inline-block; transition: transform .15s var(--ease), box-shadow .2s; }
.btn:hover, button.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.14); } .btn:active, button.primary:active { transform: scale(.97); }
button.primary, .btn.primary { background: linear-gradient(180deg, #e8164a, var(--brand)); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(213,0,50,.3); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { display: flex; align-items: center; gap: 14px; border-radius: 16px; padding: 16px 18px; transition: transform .2s var(--ease), box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); } .tile b { display: block; font-size: 30px; line-height: 1.05; letter-spacing: -.02em; } .tile span { font-size: 12.5px; }
.tile.ok { background: var(--ok-bg); color: var(--ok); } .tile.soon { background: var(--amb-bg); color: var(--amb); } .tile.out { background: var(--no-bg); color: var(--no); }
.ring { width: 54px; height: 54px; flex: none; transform: rotate(-90deg); } .ring circle { fill: none; stroke-width: 6; stroke-linecap: round; } .ring .bg { stroke: currentColor; opacity: .18; } .ring .fg { stroke: currentColor; stroke-dasharray: 0 100; transition: stroke-dasharray 1s var(--ease); }
.controls { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: end; } .controls .grow { flex: 1 1 220px; }
.key { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; } .chip.na::before { display: none; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.soon { background: var(--amb-bg); color: var(--amb); } .chip.out { background: var(--no-bg); color: var(--no); } .chip.none { background: var(--none-bg); color: var(--ink-soft); } .chip.na { background: transparent; color: var(--ink-faint); font-weight: 400; border: 1px dashed var(--line); }
.tablewrap { overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-height: 70vh; box-shadow: var(--shadow); }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 14px; }
thead th { position: sticky; top: 0; background: var(--card); z-index: 2; font-size: 12.5px; color: var(--ink-faint); font-weight: 600; vertical-align: bottom; white-space: normal; min-width: 110px; }
thead th small { display: block; font-weight: 400; } tbody th, thead th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 210px; } thead th:first-child { z-index: 3; }
tbody th { font-weight: 500; } tbody th small { display: block; color: var(--ink-faint); font-weight: 400; }
.row { cursor: pointer; } .row:hover th, .row:hover td { background: var(--hover); } td .when { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--pop); padding: 22px 24px; overflow: auto; z-index: 70; animation: slide .35s var(--ease); }
@keyframes slide { from { transform: translateX(40px); opacity: .3; } }
.drawer .close { position: absolute; top: 14px; right: 16px; } .drawer h2 { margin: 0 0 2px; font-size: 20px; } .drawer h3 { margin: 22px 0 8px; font-size: 13px; color: var(--ink-faint); }
.drawer ul { list-style: none; padding: 0; margin: 0; } .drawer li { padding: 10px 0; border-bottom: 1px solid var(--line); } .drawer li small { display: block; color: var(--ink-soft); }
.quallist li { display: flex; justify-content: space-between; gap: 12px; align-items: center; } .drawer li .link { padding: 4px 0 0; font-size: 13px; }
/* Record a result */
#record { max-width: 680px; } .rf { display: grid; gap: 18px; } .field { display: grid; gap: 6px; position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; color: var(--ink); font-weight: 600; padding: 0; margin: 0; } .field input, .field select, .field textarea { width: 100%; }
.radio { display: flex; gap: 12px; align-items: center; font-weight: 400 !important; font-size: 15px !important; padding: 11px 14px; margin: 0 0 8px; color: var(--ink) !important; border: 1px solid var(--line); border-radius: 12px; background: var(--card); transition: border-color .2s, background .2s, transform .15s var(--ease); display: flex !important; }
.radio:hover { transform: translateY(-1px); } .radio:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--card) 94%, var(--brand)); }
.radio input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--card) center / 12px no-repeat; transition: all .2s var(--ease); flex: none; }
.radio input:checked { background-color: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E"); transform: scale(1.08); }
.matches { list-style: none; margin: 0; padding: 4px; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop); z-index: 5; max-height: 280px; overflow: auto; }
.matches button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; min-height: 42px; } .matches button:hover, .matches button:focus-visible { background: var(--hover); } .pad { padding: 8px 10px; }
.picked { padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--chip); }
.alert { background: var(--no-bg); color: var(--no); padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; } .orig { margin-bottom: 14px; background: var(--amb-bg); border-color: transparent; color: var(--amb); }
.review dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 20px; } .review dt { color: var(--ink-faint); font-size: 14px; } .review dd { margin: 0; } .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 12px; align-items: center; } .logo { padding: 0 8px 0 0; } .menu { display: flex; gap: 6px; overflow-x: auto; flex: 1; } .pill, .me { display: none; } .navl { white-space: nowrap; } .navl[aria-current="page"] { background: var(--brand); }
  .tiles { grid-template-columns: 1fr; } main { padding: 12px 14px 48px; } .topbar { padding: 10px 14px 0; } .review dl { grid-template-columns: 1fr; gap: 2px; } .review dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== per-user themes: set on .app by data-skin ===== */
html[data-skin="light"] { --brand:#D50032; --ink:#171c28; --ink-soft:#4a5367; --ink-faint:#7d8699; --paper:#f3f4f8; --card:#fff; --line:#e3e6ee; --chip:#eef0f6; --hover:#f6f7fb; --side-a:#f7f8fb; --side-b:#e4e7ee; --ok:#1E7A46; --ok-bg:#e2f4ea; --amb:#A96500; --amb-bg:#fff0d2; --no:#B3261E; --no-bg:#fde4e2; --none-bg:#eceff5; color-scheme: light; }
html[data-skin="dark"] { --brand:#ff4d6d; --ink:#eef0f6; --ink-soft:#b7bfce; --ink-faint:#8993a7; --paper:#0f1218; --card:#1a1e27; --line:#2a303d; --chip:#252b37; --hover:#212631; --side-a:#181c24; --side-b:#12151b; --ok:#7fd3a0; --ok-bg:#173a27; --amb:#f2c46a; --amb-bg:#46330d; --no:#f5a1ab; --no-bg:#4a1a20; --none-bg:#2a303b; color-scheme: dark; }
html[data-skin="navy"] { --brand:#D50032; --ink:#1b2236; --ink-soft:#4a5470; --ink-faint:#7d869c; --paper:#f4f6fa; --card:#fff; --line:#dfe3ec; --chip:#edf0f6; --hover:#f5f7fb; --side-a:#25325a; --side-b:#1a2442; --ok:#1E7A46; --ok-bg:#e2f4ea; --amb:#A96500; --amb-bg:#fff0d2; --no:#B3261E; --no-bg:#fde4e2; --none-bg:#eceff5; color-scheme: light; }
html[data-skin="navy"] .side { border-right-color: #121a33; } html[data-skin="navy"] .logo b, html[data-skin="navy"] .navl, html[data-skin="navy"] .me b { color: #eef1f9; } html[data-skin="navy"] .logo small, html[data-skin="navy"] .grp h3, html[data-skin="navy"] .me { color: #93a9d6; } html[data-skin="navy"] .navl:hover { background: rgba(255,255,255,.08); color: #fff; }
html[data-skin="navy"] .navl[aria-current="page"] { color: #fff; } html[data-skin="navy"] .logo i { background: linear-gradient(180deg, #ff4d6d, #D50032); } html[data-skin="navy"] .me { border-top-color: rgba(255,255,255,.15); }
/* glass: frosted panels over a rich backdrop (red, indigo, navy: never teal) */
html[data-skin="glass"] { --brand:#ff4d6d; --ink:#f5f7fc; --ink-soft:#d3d9e8; --ink-faint:#a9b2c7; --paper:transparent; --card:rgba(255,255,255,.13); --line:rgba(255,255,255,.24); --chip:rgba(255,255,255,.12); --hover:rgba(255,255,255,.1); --side-a:rgba(255,255,255,.1); --side-b:rgba(255,255,255,.05);
  --ok:#8ae0ac; --ok-bg:rgba(60,190,120,.22); --amb:#ffd27a; --amb-bg:rgba(255,190,70,.22); --no:#ffb0b8; --no-bg:rgba(255,80,100,.26); --none-bg:rgba(255,255,255,.14); --shadow:0 8px 32px rgba(0,0,0,.28); color-scheme: dark;
  background: radial-gradient(60% 50% at 12% 8%, rgba(213,0,50,.75), transparent 60%), radial-gradient(50% 45% at 88% 18%, rgba(88,70,230,.7), transparent 60%), radial-gradient(70% 55% at 55% 100%, rgba(31,42,68,.95), transparent 70%), #0d1220; }
html[data-skin="glass"] :is(.card, .side, .drawer, .pal, .search, .item:hover, .note, .device, .tile) { backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
html[data-skin="glass"] .card, html[data-skin="glass"] .device { border-color: rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 32px rgba(0,0,0,.28); }
html[data-skin="glass"] .side { border-right-color: rgba(255,255,255,.2); }
html[data-skin="glass"] .drawer, html[data-skin="glass"] .pal { background: rgba(24,28,44,.72); }
html[data-skin="glass"] .in { background: rgba(255,255,255,.1); }
html[data-skin="glass"] .btn { background: rgba(255,255,255,.14); }
/* liquid glass: only the controls and navigation are glass; content sits on a solid layer above a soft, bright backdrop */
html[data-skin="liquid"] { --brand:#D50032; --ink:#1b2030; --ink-soft:#4d566b; --ink-faint:#7b859a; --paper:transparent; --card:rgba(255,255,255,.86); --line:rgba(255,255,255,.7); --chip:rgba(255,255,255,.55); --hover:rgba(255,255,255,.65); --side-a:rgba(255,255,255,.35); --side-b:rgba(255,255,255,.2);
  --ok:#1E7A46; --ok-bg:#dff3e7; --amb:#9a5a00; --amb-bg:#ffeccc; --no:#B3261E; --no-bg:#fde0de; --none-bg:rgba(255,255,255,.7); --shadow:0 10px 30px rgba(60,40,90,.14); color-scheme: light;
  background: radial-gradient(55% 45% at 8% 6%, #ffc9d4, transparent 65%), radial-gradient(45% 40% at 92% 10%, #cfc8ff, transparent 65%), radial-gradient(60% 50% at 70% 100%, #ffe3c2, transparent 65%), #eef0f8; }
html[data-skin="liquid"] :is(.side, .search, .seg, .btn, .pal, .toast, .tip, .pop, .ctx, .themes, .grade button, .choice, .in) { backdrop-filter: blur(22px) saturate(1.9); -webkit-backdrop-filter: blur(22px) saturate(1.9); }
html[data-skin="liquid"] .side { background: rgba(255,255,255,.34); border-right: 1px solid rgba(255,255,255,.7); box-shadow: inset -1px 0 0 rgba(255,255,255,.5); }
html[data-skin="liquid"] :is(.search, .btn:not(.pri), .seg, .choice, .in, .grade button:not(.on)) { background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.4)); border: 1px solid rgba(255,255,255,.85); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(60,40,90,.12); }
html[data-skin="liquid"] .seg .thumb { background: linear-gradient(180deg, #fff, rgba(255,255,255,.7)); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(60,40,90,.2); }
html[data-skin="liquid"] .pill { border-radius: 999px; background: linear-gradient(180deg, rgba(255,90,120,.95), rgba(213,0,50,.9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 22px rgba(213,0,50,.4); }
html[data-skin="liquid"] .pill.morph { animation: squish .5s var(--ease); } @keyframes squish { 35% { scale: 1.07 .86; } 70% { scale: .98 1.06; } }
html[data-skin="liquid"] .navl { border-radius: 999px; }
html[data-skin="liquid"] .card { border: 1px solid rgba(255,255,255,.9); }
html[data-skin="liquid"] .tile { box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
/* brushed metal: fine grain, bevels, tactile controls */
html[data-skin="metal"] { --brand:#D50032; --ink:#1c2029; --ink-soft:#434b5a; --ink-faint:#6b7585; --paper:#d5d9e0; --card:#eceff3; --line:#b9bfca; --chip:#d9dde4; --hover:#e3e7ed; --side-a:#e9ecf1; --side-b:#bfc5cf;
  --ok:#17653a; --ok-bg:#d3ebdc; --amb:#8a5200; --amb-bg:#f6e2b8; --no:#a3201a; --no-bg:#f3cfcc; --none-bg:#d6dae1; --shadow:0 1px 0 rgba(255,255,255,.8) inset, 0 2px 4px rgba(20,26,40,.25); color-scheme: light;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, rgba(0,0,0,.025) 1px 2px), linear-gradient(180deg, #e2e5eb, #c3c8d1); }
html[data-skin="metal"] .side { background: repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 1px, rgba(0,0,0,.04) 1px 2px), linear-gradient(180deg, #eef0f4, #b4bbc6); border-right: 1px solid #98a0ad; box-shadow: inset -1px 0 0 rgba(255,255,255,.6); }
html[data-skin="metal"] .card, html[data-skin="metal"] .device { background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, rgba(0,0,0,.02) 1px 2px), linear-gradient(180deg, #f6f7fa, #dde1e8); border: 1px solid #a9b0bc; box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,.08), 0 3px 8px rgba(20,26,40,.2); }
html[data-skin="metal"] .tile { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 2px 5px rgba(20,26,40,.2); border: 1px solid rgba(0,0,0,.12); }
html[data-skin="metal"] :is(.btn:not(.pri), .search, .seg, .choice, .grade button:not(.on)) { background: linear-gradient(180deg, #fafbfc, #cfd4dc); border: 1px solid #98a0ad; box-shadow: inset 0 1px 0 #fff, 0 2px 3px rgba(20,26,40,.25); }
html[data-skin="metal"] .btn:active { box-shadow: inset 0 2px 4px rgba(20,26,40,.35); }
html[data-skin="metal"] .in { background: linear-gradient(180deg, #d4d9e0, #eef0f4); border: 1px solid #98a0ad; box-shadow: inset 0 2px 3px rgba(20,26,40,.25); }
html[data-skin="metal"] .switch { background: linear-gradient(180deg, #9aa2af, #c6ccd5); box-shadow: inset 0 2px 3px rgba(20,26,40,.4); } html[data-skin="metal"] .switch::after { background: linear-gradient(180deg, #fff, #b8bec9); box-shadow: 0 2px 3px rgba(20,26,40,.5); }
html[data-skin="metal"] .switch[aria-checked="true"] { background: linear-gradient(180deg, #a40028, #e8164a); }
html[data-skin="metal"] .seg { background: linear-gradient(180deg, #b7bdc8, #d4d8df); box-shadow: inset 0 2px 3px rgba(20,26,40,.3); } html[data-skin="metal"] .seg .thumb { background: linear-gradient(180deg, #fff, #cdd2da); }
html[data-skin="metal"] .drawer, html[data-skin="metal"] .pal { background: linear-gradient(180deg, #f6f7fa, #d9dde4); }
html[data-skin="glass"], html[data-skin="liquid"], html[data-skin="metal"] { transition: background .4s; }
@media (prefers-reduced-transparency: reduce) { html[data-skin="glass"] { background: #1a2036; } html[data-skin="glass"] :is(.card, .side, .drawer, .pal, .search, .note, .device, .tile) { backdrop-filter: none; background: #232a42; }
  html[data-skin="liquid"] { background: #eef0f8; } html[data-skin="liquid"] :is(.side, .search, .seg, .btn, .pal, .toast, .tip, .pop, .ctx, .themes, .grade button, .choice, .in) { backdrop-filter: none; background: #fff; } }


/* ===== hover tips, smart popovers, right-click menu, theme picker ===== */
.tip { position: fixed; z-index: 50; max-width: 270px; background: #171c28; color: #fff; border-radius: 12px; padding: 9px 12px; box-shadow: var(--pop); pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .16s, transform .2s var(--ease); font-size: 12.5px; line-height: 1.45; }
.tip.on { opacity: 1; transform: none; } .tip b { display: block; font-size: 13px; margin-bottom: 1px; } .tip i { display: block; margin-top: 5px; font-style: normal; color: #aeb7ca; font-size: 11.5px; }
.pop, .ctx, .themes { position: fixed; z-index: 45; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--pop); padding: 8px; min-width: 250px; opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top left; pointer-events: none; transition: opacity .18s, transform .22s var(--ease); }
.pop.on, .ctx.on, .themes.on { opacity: 1; transform: none; pointer-events: auto; }
.pop h4 { margin: 6px 10px 6px; font-size: 12px; color: var(--ink-faint); font-weight: 600; letter-spacing: .02em; }
.opt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 11px; transition: background .15s, transform .15s var(--ease); }
.opt:hover, .opt:focus-visible { background: var(--hover); transform: translateX(2px); } .opt small { display: block; color: var(--ink-soft); font-size: 12px; } .opt b { display: block; }
.opt.best { background: color-mix(in srgb, var(--card) 92%, var(--brand)); } .opt .hint { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--brand); }
.opt svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; flex: none; }
.themes { min-width: 290px; padding: 12px; } .themes h4 { margin: 0 4px 8px; font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.sw3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin { border: 2px solid transparent; background: transparent; border-radius: 14px; padding: 6px; text-align: center; font-size: 12px; font-weight: 600; transition: transform .2s var(--ease), border-color .2s; } .skin:hover { transform: translateY(-2px); }
.skin[aria-pressed="true"] { border-color: var(--brand); } .skin i { display: block; height: 44px; border-radius: 10px; margin-bottom: 5px; border: 1px solid rgba(0,0,0,.12); position: relative; overflow: hidden; }
.skin i::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 7px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.7); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.k-light i { background: linear-gradient(135deg, #fff, #e8ebf2); } .k-dark i { background: linear-gradient(135deg, #1f2430, #0f1218); } .k-dark i::after { background: rgba(255,255,255,.25); }
.k-glass i { background: radial-gradient(circle at 20% 20%, #d50032, transparent 60%), radial-gradient(circle at 85% 30%, #5846e6, transparent 60%), #0d1220; } .k-liquid i { background: radial-gradient(circle at 15% 20%, #ffc9d4, transparent 60%), radial-gradient(circle at 85% 25%, #cfc8ff, transparent 60%), #eef0f8; }
.k-navy i { background: linear-gradient(90deg, #1a2442 30%, #f4f6fa 30%); } .k-metal i { background: repeating-linear-gradient(90deg, rgba(255,255,255,.3) 0 1px, rgba(0,0,0,.05) 1px 2px), linear-gradient(180deg, #eef0f4, #b4bbc6); } .k-auto i { background: linear-gradient(90deg, #fff 50%, #1f2430 50%); }
.chip[data-smart], .tile[data-filter], [data-person] .chip { cursor: pointer; } .chip[data-smart]:hover { filter: brightness(.96); transform: translateY(-1px); } .chip { transition: transform .15s, filter .15s; }
.filter { display: inline-flex; gap: 8px; align-items: center; background: var(--brand); color: #fff; border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; animation: rise .3s var(--ease) both; } .filter button { border: 0; background: rgba(255,255,255,.25); color: #fff; width: 20px; height: 20px; border-radius: 50%; line-height: 1; }
.item.leave { animation: leave .45s var(--ease) forwards; } @keyframes leave { to { opacity: 0; transform: translateX(40px); height: 0; padding: 0; } }
.tile.active { outline: 2px solid currentColor; outline-offset: 2px; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); transition: transform .15s var(--ease), box-shadow .2s; } .iconbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.14); } .iconbtn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.top .right { display: flex; gap: 10px; align-items: center; }
.app { color: var(--ink); }
.app :is(h1, h2, h3, b, button, input, select) { color: inherit; }
.app .btn.pri, .app .navl[aria-current="page"], .app .tag, .app .filter, .app .grade button.on, .app .pick[aria-pressed="true"] { color: #fff; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #171c28; color: #fff; border-radius: 12px; padding: 11px 18px; box-shadow: var(--pop); opacity: 0; transition: all .35s var(--ease); z-index: 90; display: flex; gap: 10px; align-items: center; pointer-events: none; } .toast.on { opacity: 1; transform: translate(-50%, 0); } .toast svg { width: 18px; height: 18px; stroke: #5fe0a0; fill: none; stroke-width: 3; }
.scrim { position: fixed; inset: 0; background: transparent; opacity: 0; pointer-events: none; z-index: 40; } .scrim.on { opacity: 1; pointer-events: auto; }
.tip { z-index: 95; } .themes, .pop { z-index: 80; }

.me .link { padding: 0; } .fine { font-size: 12px; margin: 10px 4px 2px; }
/* pop-ups must stay readable in the see-through looks: near-opaque, still frosted at the edge */
html[data-skin="glass"] :is(.themes, .pop, .ctx, .drawer, .matches) { background: rgba(22,26,42,.95); border-color: rgba(255,255,255,.2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
html[data-skin="liquid"] :is(.themes, .pop, .ctx, .drawer, .matches) { background: rgba(255,255,255,.95); }
html[data-skin="glass"] .tablewrap, html[data-skin="glass"] thead th, html[data-skin="glass"] tbody th, html[data-skin="glass"] .picked { background: rgba(20,24,40,.55); }
html[data-skin="glass"] .tablewrap { backdrop-filter: blur(18px) saturate(1.4); }
@media (prefers-reduced-transparency: reduce) { html[data-skin="glass"] .tablewrap, html[data-skin="glass"] thead th, html[data-skin="glass"] tbody th { background: #1c2238; } }

/* Add or update staff */
#staff { max-width: 980px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 34px 20px; margin: 0 0 18px; border: 2px dashed var(--line); border-radius: 16px; background: var(--hover); text-align: center; color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--card) 92%, var(--brand)); transform: translateY(-2px); }
.drop svg { width: 34px; height: 34px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cols { margin-top: 16px; } .cols summary { cursor: pointer; font-weight: 600; } .cols summary:hover { color: var(--brand); }
table.mini { min-width: 0; margin: 12px 0; } table.mini th { position: static; background: transparent; width: 140px; font-size: 13.5px; color: var(--ink); white-space: nowrap; vertical-align: top; } table.mini td { white-space: normal; color: var(--ink-soft); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tile.none { background: var(--none-bg); color: var(--ink-soft); }
.actions.top { margin: 0 0 16px; } button.primary[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
table.review { min-width: 560px; } table.review td.wrap { white-space: normal; max-width: 460px; }
.probs, .diff { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; } .probs li { color: var(--no); } .diff li span { color: var(--ink-faint); }
@media (max-width: 900px) { .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pw { display: flex; gap: 10px; align-items: center; } .pw input { flex: 1; min-width: 0; }
