:root {
  --bg: #090e13;
  --bg-2: #0d141c;
  --panel: #111923;
  --panel-2: #151f2b;
  --panel-soft: rgba(255,255,255,.035);
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.17);
  --text: #f4f6f8;
  --muted: #9ca7b3;
  --muted-2: #7d8996;
  --gold: #e6b65a;
  --gold-2: #f3d18d;
  --red: #d85c56;
  --blue: #64a8e8;
  --green: #6bc28a;
  --purple: #ad8ce7;
  --orange: #e88b4d;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1240px;
  --header-h: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% -10%, rgba(230,182,90,.12), transparent 34rem),
    radial-gradient(circle at -10% 45%, rgba(100,168,232,.08), transparent 38rem),
    linear-gradient(180deg, #090e13 0%, #0b1118 48%, #080d12 100%);
  color: var(--text);
  line-height: 1.55;
}

body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--gold-2);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; }
h1 { font-size: clamp(2.25rem, 6vw, 5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2.15rem); margin-bottom: .7rem; }
h3 { font-size: 1.08rem; margin-bottom: .55rem; }
p { color: var(--muted); }

.button {
  min-height: 44px;
  padding: .78rem 1.05rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary {
  color: #17110a;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 30px rgba(230,182,90,.18);
}
.button.primary:hover { background: linear-gradient(135deg, #ffe0a5, #eab85a); }
.button.secondary {
  color: var(--text);
  background: rgba(255,255,255,.055);
  border-color: var(--line-strong);
}
.button.secondary:hover { background: rgba(255,255,255,.09); }
.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.button.compact { min-height: 38px; padding: .56rem .8rem; font-size: .86rem; }
.button.wide { width: 100%; }

.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--gold-2);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.text-button:hover { color: #ffe4ae; }

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.icon-button:hover { color: var(--text); background: rgba(255,255,255,.075); border-color: var(--line-strong); }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Gate */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.gate::before,
.gate::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(230,182,90,.12);
  border-radius: 50%;
  width: 42rem;
  height: 42rem;
}
.gate::before { right: -18rem; top: -22rem; }
.gate::after { left: -20rem; bottom: -24rem; border-color: rgba(100,168,232,.1); }
.gate-card {
  width: min(540px, 100%);
  padding: clamp(2rem, 6vw, 3.5rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: rgba(13,20,28,.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  z-index: 2;
}
.gate-mark {
  width: 92px;
  height: 104px;
  margin: 0 auto 1.4rem;
  clip-path: polygon(50% 0, 92% 16%, 92% 63%, 50% 100%, 8% 63%, 8% 16%);
  background: linear-gradient(145deg, #1a2430, #0c1219);
  border: 2px solid var(--gold);
  display: grid;
  place-content: center;
  line-height: .9;
  box-shadow: 0 15px 35px rgba(0,0,0,.35);
}
.gate-mark span { color: var(--gold-2); font-size: .88rem; font-weight: 900; letter-spacing: .13em; }
.gate-mark b { color: white; font-size: 2.1rem; }
.gate-card h1 { font-size: clamp(2.1rem, 8vw, 3.7rem); margin-bottom: .35rem; }
.gate-motto { color: var(--gold-2); font-size: 1.35rem; font-weight: 800; margin-bottom: .35rem; }
.gate-copy { margin-bottom: 2rem; }
.gate-form { text-align: left; }
.gate-form label { display: block; color: var(--muted); font-size: .84rem; font-weight: 700; margin-bottom: .55rem; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #0a1118;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: .8rem .85rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus { border-color: rgba(230,182,90,.75); box-shadow: 0 0 0 3px rgba(230,182,90,.11); }
textarea { resize: vertical; }
.form-message { min-height: 1.3rem; margin: .55rem 0 0; color: #ef8d89; font-size: .84rem; }
.form-note, .fine-print { color: var(--muted-2); font-size: .78rem; }
.fine-print { margin: 1.35rem 0 0; }

/* Header */
.topbar {
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0 max(1rem, calc((100vw - var(--max)) / 2));
  background: rgba(9,14,19,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: .72rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: .2rem;
}
.brand img { width: 42px; height: 42px; }
.brand span { display: grid; line-height: 1; }
.brand strong { font-size: 1rem; letter-spacing: .08em; }
.brand small { margin-top: .28rem; color: var(--muted); font-size: .62rem; letter-spacing: .14em; }
.main-nav { display: flex; justify-content: center; gap: .25rem; }
.nav-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: .58rem .85rem;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 750;
}
.nav-button:hover, .nav-button.active { color: var(--text); background: rgba(255,255,255,.055); }
.top-actions { display: flex; align-items: center; gap: .45rem; }
.profile-pill {
  min-width: 98px;
  height: 42px;
  padding: .4rem .7rem;
  border: 1px solid rgba(230,182,90,.28);
  border-radius: 11px;
  background: rgba(230,182,90,.07);
  cursor: pointer;
  display: grid;
  line-height: 1.05;
  text-align: left;
}
.profile-pill span { color: var(--gold-2); font-weight: 900; }
.profile-pill small { color: var(--muted); font-size: .67rem; margin-top: .2rem; }

main { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.view { display: none; min-height: calc(100vh - var(--header-h)); padding: 3rem 0 5rem; }
.view.active { display: block; }

/* Setup */
.profile-setup {
  min-height: calc(100vh - var(--header-h) - 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  padding: 3rem 0 7rem;
}
.setup-copy h1 { max-width: 13ch; }
.setup-copy p:not(.eyebrow) { max-width: 58ch; font-size: 1.08rem; }
.hq-form {
  padding: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: var(--shadow);
}
.hq-form > label { display: block; font-weight: 800; margin-bottom: .8rem; }
.hq-control { display: grid; grid-template-columns: 58px 1fr 58px; gap: .6rem; align-items: center; }
.hq-control button {
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  font-size: 1.65rem;
  cursor: pointer;
}
.hq-control input {
  height: 74px;
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
  color: var(--gold-2);
}
.hq-form input[type="range"] {
  appearance: none;
  margin: 1.25rem 0 .4rem;
  padding: 0;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) 0 26%, rgba(255,255,255,.13) 26%);
}
.hq-form input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-2);
  border: 4px solid #121820;
  box-shadow: 0 0 0 1px var(--gold);
}

/* Route */
.route-dashboard { display: grid; gap: 1.25rem; }
.stage-hero {
  min-height: 430px;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(110deg, rgba(17,25,35,.97), rgba(13,20,28,.75)),
    radial-gradient(circle at 80% 20%, rgba(230,182,90,.16), transparent 30rem);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.stage-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 35%;
  height: 60%;
  background: linear-gradient(90deg, transparent, rgba(230,182,90,.08), transparent);
  transform: rotate(-10deg);
}
.stage-copy { position: relative; z-index: 2; }
.stage-copy h1 { max-width: 12ch; margin-bottom: 1rem; }
.stage-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: .28rem .55rem;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .08em;
}
.status-chip.gold { border-color: rgba(230,182,90,.38); background: rgba(230,182,90,.1); color: var(--gold-2); }
.stage-subtitle { max-width: 62ch; font-size: 1.08rem; }
.stage-actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.5rem; }
.stage-orbit { width: min(360px, 100%); aspect-ratio: 1; position: relative; margin: auto; z-index: 2; }
.orbit-ring { position: absolute; inset: 6%; border: 1px solid rgba(230,182,90,.18); border-radius: 50%; }
.orbit-ring::before, .orbit-ring::after { content: ""; position: absolute; background: rgba(230,182,90,.25); }
.orbit-ring::before { width: 1px; top: 0; bottom: 0; left: 50%; }
.orbit-ring::after { height: 1px; left: 0; right: 0; top: 50%; }
.ring-two { inset: 22%; border-color: rgba(100,168,232,.18); transform: rotate(45deg); }
.orbit-core {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(circle at 35% 30%, #28313a, #0a1117 72%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 55px rgba(230,182,90,.16), inset 0 0 30px rgba(255,255,255,.04);
}
.orbit-core span { color: var(--muted); letter-spacing: .18em; font-size: .75rem; }
.orbit-core b { color: var(--gold-2); font-size: 3.2rem; line-height: 1; }
.orbit-label { position: absolute; font-size: .65rem; letter-spacing: .13em; color: var(--muted); font-weight: 900; }
.orbit-label.a { left: 3%; top: 47%; }
.orbit-label.b { right: 4%; top: 25%; }
.orbit-label.c { right: 10%; bottom: 12%; }

.milestone-strip {
  padding: 1.25rem 1.4rem 1.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.milestone-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; font-size: .82rem; }
.milestone-heading span { color: var(--muted); }
.milestone-heading strong { color: var(--gold-2); }
.milestone-track { height: 4px; position: relative; background: rgba(255,255,255,.12); border-radius: 99px; }
.milestone-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 0 12px rgba(230,182,90,.5); transition: width .55s ease; }
.milestone-track span { position: absolute; top: 12px; transform: translateX(-50%); color: var(--muted-2); font-size: .64rem; }

.briefing-grid { display: grid; grid-template-columns: 1.4fr .65fr 1fr; gap: 1rem; }
.brief-card {
  min-height: 190px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.brief-card p:last-child { margin-bottom: 0; }
.next-hq-card { display: grid; grid-template-columns: 68px 1fr; gap: 1rem; align-items: start; }
.brief-icon { width: 58px; height: 58px; border-radius: 16px; background: rgba(230,182,90,.09); border: 1px solid rgba(230,182,90,.22); position: relative; }
.building-icon::before { content: ""; position: absolute; left: 13px; right: 13px; bottom: 12px; height: 25px; border: 2px solid var(--gold-2); border-top: 0; }
.building-icon::after { content: ""; position: absolute; width: 26px; height: 26px; border-left: 2px solid var(--gold-2); border-top: 2px solid var(--gold-2); transform: rotate(45deg); left: 15px; top: 9px; }
.big-number { display: block; color: var(--gold-2); font-size: 4rem; line-height: .9; margin: .45rem 0 .8rem; }
.accent-card { background: linear-gradient(145deg, rgba(230,182,90,.12), rgba(230,182,90,.025)); border-color: rgba(230,182,90,.25); }


.assessment-shell {
  margin-top: 1.3rem;
  padding: 0;
  overflow: hidden;
  border-color: rgba(230,182,90,.28);
  background:
    radial-gradient(circle at 8% 5%, rgba(230,182,90,.11), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.038), rgba(255,255,255,.012));
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
}
.assessment-main { padding: clamp(1.5rem, 3.5vw, 2.35rem); }
.assessment-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.2rem; }
.assessment-status, .assessment-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: .36rem .62rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .065em;
}
.assessment-status.neutral { color: #b8d8f7; border-color: rgba(100,168,232,.35); background: rgba(100,168,232,.08); }
.assessment-status.opportunity { color: #ffd69d; border-color: rgba(232,139,77,.38); background: rgba(232,139,77,.09); }
.assessment-status.building { color: #f0cc8f; border-color: rgba(230,182,90,.38); background: rgba(230,182,90,.09); }
.assessment-status.good { color: #a8d4ff; border-color: rgba(100,168,232,.38); background: rgba(100,168,232,.09); }
.assessment-status.strong { color: #a8e0bb; border-color: rgba(107,194,138,.38); background: rgba(107,194,138,.09); }
.assessment-confidence { color: var(--muted-2); background: rgba(255,255,255,.025); }
.assessment-main h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); max-width: 19ch; }
.assessment-summary { max-width: 68ch; font-size: 1.02rem; line-height: 1.7; }
.assessment-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.25rem; }
.assessment-side {
  padding: 1rem;
  border-left: 1px solid var(--line);
  background: rgba(0,0,0,.13);
  display: grid;
  gap: .8rem;
}
.assessment-panel {
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.assessment-panel h3 { margin-bottom: .55rem; font-size: 1.2rem; }
.assessment-panel p:last-of-type { margin-bottom: .65rem; }
.assessment-panel small { display: block; color: var(--muted); line-height: 1.55; }
.assessment-panel small b { color: var(--gold-2); }
.assessment-strengths { display: grid; gap: .72rem; margin: .85rem 0 0; padding: 0; list-style: none; }
.assessment-strengths li { position: relative; padding-left: 1.55rem; color: var(--muted); line-height: 1.5; }
.assessment-strengths li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -.02rem;
  color: #87d8a3;
  font-weight: 950;
}
.assessment-next-panel { border-color: rgba(230,182,90,.24); background: rgba(230,182,90,.05); }
.assessment-verdict {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1.5rem, 3.5vw, 2.35rem);
  border-top: 1px solid rgba(230,182,90,.19);
  background: rgba(230,182,90,.055);
}
.assessment-verdict span { color: var(--gold-2); font-size: .69rem; font-weight: 900; letter-spacing: .09em; }
.assessment-verdict strong { font-size: .98rem; line-height: 1.5; }

.section-shell {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.022);
}
.soft-shell { background: linear-gradient(135deg, rgba(100,168,232,.05), rgba(255,255,255,.016)); }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.section-title-row p:last-child { margin-bottom: 0; max-width: 62ch; }
.compact-row { align-items: center; }
.next-moves-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.move-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: #0d151e;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.move-card::before { content: attr(data-number); position: absolute; right: .85rem; top: .2rem; color: rgba(255,255,255,.035); font-size: 4.5rem; font-weight: 900; line-height: 1; }
.move-card .move-label { color: var(--gold-2); font-size: .7rem; letter-spacing: .1em; font-weight: 850; }
.move-card h3 { margin-top: .7rem; max-width: 18ch; }
.move-card p { margin-bottom: 0; font-size: .9rem; }

.systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.system-card {
  min-height: 235px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.system-card:hover { transform: translateY(-3px); border-color: var(--system-color, var(--line-strong)); background: linear-gradient(155deg, rgba(255,255,255,.06), rgba(255,255,255,.017)); }
.system-card .system-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.system-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--system-color, var(--gold));
  background: color-mix(in srgb, var(--system-color, var(--gold)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--system-color, var(--gold)) 32%, transparent);
}
.system-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.system-card .system-stage { color: var(--muted-2); font-size: .66rem; font-weight: 800; letter-spacing: .07em; }
.system-card h3 { font-size: 1.25rem; }
.system-card p { font-size: .88rem; margin-bottom: 1rem; }
.system-card .system-cta { margin-top: auto; color: var(--system-color, var(--gold-2)); font-weight: 850; font-size: .82rem; }

.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.support-card {
  border: 1px solid var(--line);
  background: rgba(0,0,0,.13);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  cursor: pointer;
  text-align: left;
}
.support-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.support-card span:first-child { font-size: 1.35rem; }
.support-card b { display: block; }
.support-card small { color: var(--muted); }
.support-card .arrow { color: var(--gold-2); }

.quick-win {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(110deg, rgba(216,92,86,.09), rgba(255,255,255,.018));
}
.quick-win-copy { max-width: 75ch; }
.quick-win-copy p:last-child { margin-bottom: 0; }
.ask-chatgpt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  background: linear-gradient(120deg, rgba(100,168,232,.09), rgba(173,140,231,.06));
}
.chatgpt-badge {
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px;
  border: 1px solid rgba(100,168,232,.35); background: rgba(100,168,232,.1); color: #a8d4ff; font-weight: 900;
}
.ask-chatgpt h2 { margin-bottom: .35rem; }
.ask-chatgpt p { margin-bottom: 0; }

/* Learn */
.page-heading { padding: 2.5rem 0 1.6rem; max-width: 900px; }
.page-heading h1 { font-size: clamp(2rem, 5vw, 3.9rem); }
.page-heading > p:last-child { font-size: 1.02rem; max-width: 72ch; }
.system-nav, .tool-nav {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: .25rem 0 1rem;
  scrollbar-width: thin;
}
.system-tab, .tool-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--muted);
  border-radius: 999px;
  padding: .68rem .9rem;
  cursor: pointer;
  font-weight: 800;
  font-size: .85rem;
}
.system-tab:hover, .tool-tab:hover, .system-tab.active, .tool-tab.active { color: var(--text); border-color: rgba(230,182,90,.35); background: rgba(230,182,90,.08); }
.learn-content, .tool-content { margin-top: .5rem; }
.guide-hero {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: 2rem;
  align-items: center;
}
.guide-hero h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.guide-hero p:last-child { margin-bottom: 0; }
.guide-visual {
  min-height: 220px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--guide-color, var(--gold)) 35%, transparent);
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--guide-color, var(--gold)) 20%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(0,0,0,.18));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.guide-visual::before, .guide-visual::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--guide-color, var(--gold)) 23%, transparent); }
.guide-visual::before { width: 180px; height: 180px; }
.guide-visual::after { width: 120px; height: 120px; }
.guide-visual .system-icon { width: 78px; height: 78px; border-radius: 23px; z-index: 2; }
.guide-visual .system-icon svg { width: 42px; height: 42px; }
.guide-stage-card {
  margin-top: 1rem;
  padding: 1.3rem;
  border-left: 4px solid var(--guide-color, var(--gold));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: color-mix(in srgb, var(--guide-color, var(--gold)) 8%, transparent);
}
.guide-stage-card p:last-child { margin-bottom: 0; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.guide-section { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.02); }
.guide-section.full { grid-column: 1 / -1; }
.guide-section ul, .guide-section ol { margin: .8rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.guide-section li { margin: .5rem 0; }
.simple-list { display: grid; gap: .65rem; margin-top: 1rem; }
.simple-item { display: grid; grid-template-columns: minmax(120px, .34fr) 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.simple-item:first-child { border-top: 0; padding-top: 0; }
.simple-item b { color: var(--text); }
.simple-item p { margin: 0; font-size: .9rem; }
.confidence-line { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.confidence-badge { display: inline-flex; padding: .32rem .55rem; border-radius: 999px; font-size: .66rem; font-weight: 850; letter-spacing: .06em; border: 1px solid var(--line-strong); color: var(--muted); }
.confidence-badge.verified { color: #9ee1b4; border-color: rgba(107,194,138,.35); background: rgba(107,194,138,.08); }
.confidence-badge.supported { color: #b8d8f7; border-color: rgba(100,168,232,.35); background: rgba(100,168,232,.08); }
.confidence-badge.check { color: #f0c590; border-color: rgba(232,139,77,.35); background: rgba(232,139,77,.08); }

/* Tools */
.tool-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
}
.tool-panel > p { max-width: 70ch; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.tool-card { padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(0,0,0,.14); }
.tool-card label { display: block; color: var(--muted); font-size: .82rem; font-weight: 750; margin-bottom: .85rem; }
.tool-result {
  margin-top: 1.15rem;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(230,182,90,.25);
  background: rgba(230,182,90,.07);
}
.tool-result h3 { color: var(--gold-2); }
.tool-result p:last-child { margin-bottom: 0; }
.counter-wheel {
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: 1rem auto 0;
  border-radius: 50%;
  position: relative;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle, rgba(255,255,255,.05), transparent 62%);
}
.counter-node { position: absolute; width: 105px; min-height: 68px; padding: .6rem; border-radius: 14px; display: grid; place-content: center; text-align: center; border: 1px solid var(--line-strong); font-size: .75rem; font-weight: 850; background: #111923; }
.counter-node.blood { top: 3%; left: 50%; transform: translateX(-50%); color: #f08f89; }
.counter-node.wings { bottom: 8%; left: 7%; color: #9acdf8; }
.counter-node.order { bottom: 8%; right: 7%; color: #c7b1ed; }
.counter-arrow { position: absolute; color: var(--muted-2); font-size: .72rem; }
.counter-arrow.one { top: 41%; left: 10%; transform: rotate(-53deg); }
.counter-arrow.two { top: 41%; right: 10%; transform: rotate(53deg); }
.counter-arrow.three { bottom: 2%; left: 50%; transform: translateX(-50%); }
.copy-box { position: relative; }
.copy-box textarea { min-height: 190px; padding-right: 5rem; }
.copy-box .button { position: absolute; right: .6rem; top: .6rem; }
.vehicle-track { display: grid; gap: .7rem; margin-top: 1.2rem; }
.vehicle-step { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.02); }
.vehicle-step.current { border-color: rgba(230,182,90,.4); background: rgba(230,182,90,.06); }
.vehicle-step span:first-child { color: var(--gold-2); font-weight: 900; }
.vehicle-step small { color: var(--muted); }
.vehicle-step b:last-child { color: var(--muted); font-size: .82rem; }
.hq-plan-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.hq-plan-table th, .hq-plan-table td { text-align: left; padding: .9rem .75rem; border-bottom: 1px solid var(--line); }
.hq-plan-table th { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

/* Officers */
.officer-heading { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.officer-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1rem; margin-bottom: 1rem; }
.officer-panel h2 { font-size: 1.5rem; }
.stack-form { display: grid; gap: 1rem; }
.stack-form label { display: grid; gap: .45rem; color: var(--muted); font-size: .82rem; font-weight: 750; }
.request-list { display: grid; gap: .7rem; }
.request-item { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .85rem; border-radius: var(--radius-md); border: 1px solid var(--line); background: rgba(0,0,0,.12); }
.request-item span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--gold-2); background: rgba(230,182,90,.08); font-weight: 900; }
.request-item b { display: block; margin-bottom: .2rem; }
.request-item small { color: var(--muted); }
.notes-list { display: grid; gap: .75rem; }
.note-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.02); display: grid; grid-template-columns: 1fr auto; gap: 1rem; }
.note-card p { margin-bottom: .35rem; }
.note-card small { color: var(--muted-2); }
.note-card button { align-self: start; }
.empty-state { padding: 2rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.sources-shell { margin-top: 1rem; }
.source-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.source-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(0,0,0,.12); }
.source-card a { color: var(--gold-2); text-decoration: none; font-weight: 800; }
.source-card a:hover { text-decoration: underline; }
.source-card p { font-size: .86rem; margin: .5rem 0; }
.source-card small { color: var(--muted-2); }

/* Dialogs */
dialog {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: #0d151e;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(3,6,9,.78); backdrop-filter: blur(7px); }
.modal-card { width: min(520px, calc(100% - 2rem)); border-radius: var(--radius-xl); padding: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-bottom: 0; }
.modal-body { padding: 1.35rem; }
.goal-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.goal-choice { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.02); text-align: left; cursor: pointer; }
.goal-choice:hover { border-color: rgba(230,182,90,.35); background: rgba(230,182,90,.06); }
.goal-choice b { display: block; margin-bottom: .25rem; }
.goal-choice small { color: var(--muted); }
.search-modal { width: min(760px, calc(100% - 2rem)); max-height: min(720px, calc(100vh - 3rem)); border-radius: var(--radius-xl); padding: 0; }
.search-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.search-head svg { width: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-head input { border: 0; background: transparent; font-size: 1.1rem; box-shadow: none; }
.search-results { padding: .85rem; overflow-y: auto; max-height: 580px; display: grid; gap: .55rem; }
.search-result { padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.02); text-align: left; cursor: pointer; }
.search-result:hover { border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.search-result b { display: block; }
.search-result small { color: var(--muted); }
.system-dialog { width: min(980px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border-radius: var(--radius-xl); padding: 0; overflow: hidden; }
.system-dialog-shell { max-height: calc(100vh - 2rem); overflow-y: auto; }
.system-dialog-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; background: rgba(13,21,30,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.system-dialog-head h2 { margin-bottom: 0; }
.system-dialog-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(230,182,90,.08); color: var(--gold-2); }
.system-dialog-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.system-dialog-content { padding: 1.25rem; }

footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
footer div { display: grid; }
footer strong { letter-spacing: .08em; }
footer span { color: var(--gold-2); }
footer p { margin: 0; font-size: .8rem; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translate(-50%, 18px);
  z-index: 999;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: #17222e;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-weight: 750;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .topbar { grid-template-columns: auto 1fr; }
  .main-nav { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 200; padding: .35rem; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(9,14,19,.94); box-shadow: var(--shadow); }
  .nav-button { padding: .55rem .65rem; font-size: .76rem; }
  .top-actions { justify-self: end; }
  .profile-setup { grid-template-columns: 1fr; min-height: auto; padding: 3rem 0 5rem; }
  .stage-hero { grid-template-columns: 1fr; }
  .stage-orbit { width: 300px; }
  .briefing-grid { grid-template-columns: 1fr 1fr; }
  .next-hq-card { grid-column: 1 / -1; }
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: 1fr; }
  .guide-hero { grid-template-columns: 1fr; }
  .guide-visual { min-height: 180px; }
  .assessment-shell { grid-template-columns: 1fr; }
  .assessment-side { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
  .officer-grid { grid-template-columns: 1fr; }
  .source-cards { grid-template-columns: 1fr; }
  footer { padding-bottom: 6rem; }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; }
  body { font-size: 15px; }
  main { width: min(100% - 1rem, var(--max)); }
  .topbar { padding: 0 .55rem; gap: .5rem; }
  .brand img { width: 38px; height: 38px; }
  .brand small { display: none; }
  .brand strong { font-size: .88rem; }
  .profile-pill { min-width: 78px; }
  .top-actions .icon-button:last-child { display: none; }
  .view { padding-top: 1.2rem; }
  .gate { padding: .8rem; }
  .gate-card { padding: 1.5rem; }
  .input-row { grid-template-columns: 1fr; }
  .profile-setup { gap: 1.4rem; padding: 2rem 0 4.5rem; }
  .hq-form { padding: 1.25rem; }
  .stage-hero { min-height: auto; padding: 1.4rem; }
  .stage-orbit { width: 240px; }
  .orbit-core b { font-size: 2.5rem; }
  .stage-actions .button { flex: 1 1 100%; }
  .briefing-grid { grid-template-columns: 1fr; }
  .assessment-side { grid-template-columns: 1fr; }
  .assessment-verdict { grid-template-columns: 1fr; gap: .35rem; }
  .next-hq-card { grid-column: auto; grid-template-columns: 50px 1fr; }
  .brief-icon { width: 46px; height: 46px; }
  .building-icon::before { left: 10px; right: 10px; bottom: 9px; height: 21px; }
  .building-icon::after { width: 21px; height: 21px; left: 12px; top: 8px; }
  .section-shell { padding: 1.05rem; border-radius: 20px; }
  .section-title-row, .quick-win, .officer-heading { align-items: flex-start; flex-direction: column; }
  .next-moves-grid, .systems-grid, .guide-grid, .tool-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 190px; }
  .ask-chatgpt { grid-template-columns: auto 1fr; }
  .ask-chatgpt .button { grid-column: 1 / -1; width: 100%; }
  .simple-item { grid-template-columns: 1fr; gap: .25rem; }
  .goal-choices { grid-template-columns: 1fr; }
  .vehicle-step { grid-template-columns: 58px 1fr; }
  .vehicle-step b:last-child { grid-column: 2; }
  .hq-plan-table { font-size: .82rem; }
  .hq-plan-table th, .hq-plan-table td { padding: .75rem .35rem; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Generated interactive content */
.resource-item-button {
  width: 100%;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.resource-item-button:hover b { color: var(--gold-2); }
.lead { font-size: 1.08rem; color: var(--text); }
.table-scroll { overflow-x: auto; }
.guide-section label { display: grid; gap: .45rem; color: var(--muted); font-size: .82rem; font-weight: 750; }
.tool-tab span { color: var(--gold-2); margin-right: .25rem; }
.tool-card input, .tool-card select, .guide-section input { width: 100%; margin-top: .4rem; }
.system-dialog-content > .button { margin-top: 1rem; }
.system-dialog-content strong, .guide-stage-card strong, .tool-result strong { color: var(--text); }
.counter-node small { color: var(--muted); }
@media (max-width: 720px) {
  .resource-item-button { padding-left: 0; padding-right: 0; }
  .main-nav { max-width: calc(100vw - 1rem); overflow-x: auto; }
}

/* --------------------------------------------------------------------------
   v6 personal briefing and commander assessment
   -------------------------------------------------------------------------- */
.personalisation-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  margin: 1rem 0 1.35rem;
  border: 1px solid rgba(230,182,90,.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(230,182,90,.09), rgba(255,255,255,.025));
}
.personalisation-copy h2 { margin-bottom: .35rem; }
.personalisation-copy p:last-of-type { margin-bottom: .8rem; }
.personalisation-actions { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: flex-end; }
.profile-meter { height: 6px; max-width: 480px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.075); }
.profile-meter span { display: block; height: 100%; width: 8%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--green)); transition: width .35s ease; }

.diagnostic-shell,
.benchmark-shell { margin-top: 1.3rem; }
.optimization-grid { display: grid; gap: .85rem; }
.optimization-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.optimization-card.rank-1 { border-color: rgba(230,182,90,.35); background: linear-gradient(135deg, rgba(230,182,90,.105), rgba(255,255,255,.02)); }
.optimization-rank {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}
.optimization-rank span { font-size: 2.45rem; line-height: 1; font-weight: 900; color: var(--gold-2); }
.optimization-rank small { margin-top: .5rem; font-size: .67rem; letter-spacing: .11em; text-align: center; color: var(--muted); font-weight: 900; }
.optimization-content h3 { font-size: 1.28rem; margin-bottom: .42rem; }
.optimization-content > p { margin-bottom: .8rem; }
.optimization-step,
.optimization-timing { padding: .72rem .85rem; border-radius: 10px; background: rgba(255,255,255,.035); color: var(--muted); margin-bottom: .55rem; }
.optimization-step b { color: var(--green); }
.optimization-timing b { color: var(--gold-2); }

.benchmark-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.benchmark-card {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.027);
  min-width: 0;
}
.benchmark-card.good,
.benchmark-card.ahead { border-color: rgba(107,194,138,.28); }
.benchmark-card.gap { border-color: rgba(216,92,86,.36); }
.benchmark-card.watch { border-color: rgba(232,139,77,.35); }
.benchmark-head { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: .75rem; align-items: start; }
.benchmark-head h3 { margin-bottom: 0; }
.benchmark-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: rgba(230,182,90,.1); color: var(--gold-2); font-weight: 900; }
.benchmark-status { padding: .3rem .48rem; border-radius: 999px; background: rgba(255,255,255,.055); color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.benchmark-card.good .benchmark-status,
.benchmark-card.ahead .benchmark-status { color: var(--green); background: rgba(107,194,138,.1); }
.benchmark-card.gap .benchmark-status { color: #ff918b; background: rgba(216,92,86,.12); }
.benchmark-card.watch .benchmark-status { color: #ffb47e; background: rgba(232,139,77,.11); }
.benchmark-values { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 1rem 0 .7rem; }
.benchmark-values > div { padding: .72rem; border-radius: 11px; background: rgba(255,255,255,.035); }
.benchmark-values small { display: block; color: var(--muted-2); font-size: .62rem; font-weight: 900; letter-spacing: .1em; margin-bottom: .25rem; }
.benchmark-values strong { display: block; font-size: .96rem; overflow-wrap: anywhere; }
.benchmark-progress { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); margin-bottom: .85rem; }
.benchmark-progress span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.benchmark-card.good .benchmark-progress span,
.benchmark-card.ahead .benchmark-progress span { background: var(--green); }
.benchmark-card.gap .benchmark-progress span { background: var(--red); }
.benchmark-card.watch .benchmark-progress span { background: var(--orange); }
.benchmark-action { padding: .7rem .8rem; border-left: 2px solid var(--gold); background: rgba(230,182,90,.055); color: var(--muted); margin-bottom: .7rem; }
.benchmark-action b { color: var(--text); }

.today-shell {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: 180px minmax(0,1fr) auto;
  gap: 1.4rem;
  align-items: center;
  border-color: rgba(100,168,232,.25);
  background: linear-gradient(130deg, rgba(100,168,232,.075), rgba(255,255,255,.022));
}
.today-clock { display: grid; place-items: center; text-align: center; padding: 1rem; border-right: 1px solid var(--line); }
.today-clock span { color: var(--blue); font-size: .65rem; font-weight: 900; letter-spacing: .11em; }
.today-clock strong { font-size: 2.2rem; line-height: 1.1; margin: .25rem 0; }
.today-clock small { color: var(--muted-2); }
.today-copy h2 { margin-bottom: .45rem; }
.today-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.today-chip { padding: .34rem .58rem; border-radius: 999px; background: rgba(255,255,255,.055); color: var(--muted); font-size: .7rem; font-weight: 800; }
.today-chip.live { color: var(--green); background: rgba(107,194,138,.11); }
.today-chip.warning { color: #ffb47e; background: rgba(232,139,77,.11); }

.mechanic-search { display: grid; gap: .42rem; max-width: 620px; margin-top: 1.2rem; }
.mechanic-search span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.mechanic-search input { width: 100%; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,255,255,.04); color: var(--text); }
.mechanics-library { margin-top: 1.2rem; }
.mechanic-group + .mechanic-group { margin-top: 1.7rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.mechanic-group-head h2 { margin-bottom: .9rem; }
.mechanic-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.mechanic-card { border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); overflow: hidden; }
.mechanic-card summary { cursor: pointer; list-style: none; padding: .9rem 1rem; display: grid; gap: .2rem; }
.mechanic-card summary::-webkit-details-marker { display: none; }
.mechanic-card summary span { font-weight: 850; }
.mechanic-card summary small { color: var(--muted); line-height: 1.45; }
.mechanic-card[open] summary { background: rgba(230,182,90,.045); border-bottom: 1px solid var(--line); }
.mechanic-body { padding: .9rem 1rem; }
.mechanic-body p { margin-bottom: .65rem; }
.mechanic-body b { color: var(--text); }
.mechanic-mistake { padding: .65rem .75rem; border-radius: 9px; background: rgba(216,92,86,.07); }

.profile-studio { width: min(980px, calc(100% - 2rem)); max-height: 92vh; }
.profile-form { display: grid; gap: .8rem; }
.studio-intro { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid rgba(230,182,90,.22); border-radius: 12px; background: rgba(230,182,90,.055); }
.studio-intro > div { display: grid; gap: .15rem; }
.studio-intro span { color: var(--muted); font-size: .85rem; }
.studio-group { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.023); overflow: hidden; }
.studio-group summary { list-style: none; display: flex; gap: .8rem; align-items: center; padding: .95rem 1rem; cursor: pointer; }
.studio-group summary::-webkit-details-marker { display: none; }
.studio-group summary > span { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(230,182,90,.12); color: var(--gold-2); font-weight: 900; }
.studio-group summary > div { display: grid; gap: .08rem; }
.studio-group summary small { color: var(--muted); }
.studio-group[open] summary { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.022); }
.studio-group .form-grid,
.studio-group .hero-editor-head,
.studio-group .hero-rows { margin: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; }
.form-grid label,
.hero-row label { display: grid; gap: .35rem; color: var(--muted); font-size: .77rem; font-weight: 750; }
.form-grid input,
.form-grid select,
.hero-row input,
.hero-row select,
.scan-paste textarea { width: 100%; min-width: 0; padding: .73rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,9,13,.66); color: var(--text); }
.checkbox-label { grid-template-columns: auto 1fr !important; align-items: center; align-content: center; }
.checkbox-label input { width: auto; }
.hero-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero-editor-head > div { display: grid; }
.hero-editor-head small { color: var(--muted); }
.hero-rows { display: grid; gap: .65rem; }
.hero-row { display: grid; grid-template-columns: 1.5fr .95fr .72fr .62fr .62fr .72fr .72fr .78fr 42px; gap: .45rem; align-items: end; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.hero-row label span { white-space: nowrap; }
.hero-first-label { display: flex !important; flex-direction: row; align-items: center; padding-bottom: .75rem; gap: .4rem !important; }
.hero-first-label input { width: auto; }
.hero-remove { margin-bottom: .13rem; }
.studio-footer { display: flex; justify-content: flex-end; gap: .7rem; padding-top: .3rem; }

.scan-studio { width: min(820px, calc(100% - 2rem)); max-height: 92vh; }
.scan-body { display: grid; gap: 1rem; }
.scan-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .7rem; padding: 0; margin: 0; list-style: none; }
.scan-steps li { display: grid; grid-template-columns: 34px 1fr; gap: .65rem; align-items: start; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.scan-steps li > span { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(230,182,90,.12); color: var(--gold-2); font-weight: 900; }
.scan-steps li div { display: grid; gap: .15rem; }
.scan-steps small { color: var(--muted); }
.scan-actions,
.scan-import-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.scan-paste { display: grid; gap: .4rem; color: var(--muted); font-weight: 800; font-size: .8rem; }
.scan-paste textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; line-height: 1.45; }
.file-button { display: inline-grid; place-items: center; min-height: 44px; padding: .78rem 1.05rem; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,255,255,.055); color: var(--text); font-weight: 800; cursor: pointer; }
.file-button input { display: none; }
.scan-result > div { padding: .8rem .9rem; border-radius: 11px; display: grid; gap: .2rem; }
.scan-success { background: rgba(107,194,138,.1); color: var(--green); }
.scan-error { background: rgba(216,92,86,.1); color: #ff918b; }
.scan-info { background: rgba(100,168,232,.1); color: var(--blue); }
.scan-result span,
.scan-result p { color: inherit; margin: 0; }
.direct-transfer-note { display: grid; gap: .2rem; padding: .85rem; border-left: 2px solid var(--blue); background: rgba(100,168,232,.055); }
.direct-transfer-note span { color: var(--muted); }

@media (max-width: 1020px) {
  .benchmark-grid { grid-template-columns: 1fr; }
  .today-shell { grid-template-columns: 150px minmax(0,1fr); }
  .today-shell > .button { grid-column: 1 / -1; justify-self: start; }
  .form-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-row { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hero-name-field { grid-column: span 2; }
  .hero-remove { align-self: end; }
}

@media (max-width: 700px) {
  .personalisation-bar { grid-template-columns: 1fr; }
  .personalisation-actions { justify-content: stretch; }
  .personalisation-actions .button { flex: 1 1 160px; }
  .optimization-card { grid-template-columns: 1fr; }
  .optimization-rank { min-height: auto; grid-template-columns: auto 1fr; justify-items: start; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 .65rem; }
  .optimization-rank span { font-size: 1.8rem; }
  .optimization-rank small { margin: 0 0 0 .65rem; text-align: left; }
  .benchmark-values { grid-template-columns: 1fr; }
  .benchmark-head { grid-template-columns: 40px minmax(0,1fr); }
  .benchmark-status { grid-column: 2; justify-self: start; }
  .today-shell { grid-template-columns: 1fr; }
  .today-clock { border-right: 0; border-bottom: 1px solid var(--line); }
  .mechanic-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-name-field { grid-column: 1 / -1; }
  .hero-remove { justify-self: end; }
  .scan-steps { grid-template-columns: 1fr; }
  .studio-intro { align-items: flex-start; flex-direction: column; }
  .studio-footer { flex-direction: column-reverse; }
  .studio-footer .button { width: 100%; }
}
