/* FuturIQ Command Center (member page).
   Layout: quiet left rail + one content column. Today = a cream Morning Brief cover, three cards, then a Mission Control panel with a royal blue day ring and a Day 1 to 30 track.
   Single dark theme in navy, cream and black with a royal blue accent. Poppins for headings, numbers, labels and buttons; Lora for reading text. */
:root {
  color-scheme: dark;
  --bg: #05080F;
  --rail: #070C18;
  --panel: #0D1630;
  --line: #1B2644;
  --line-2: #283657;
  --cream: #F4ECE0;
  --paper: #EADBCA;
  --ink-paper: #0D1833;
  --muted: #A2AABE;
  --dim: #6E7894;
  --accent: #6F8BFF;
  --accent-soft: #A9B9FF;
  --accent-muted: #2B3E85;
  --accent-deep: #1F3FC4;
  --accent-fill: #2D4FE8;
  --accent-wash: rgba(79, 112, 255, 0.10);
  --ok: #5FB38E;
  --err: #e5b4a8;
  --display: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --label: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--cream); }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-fill); color: var(--cream); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; font-family: var(--display); }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; border-radius: 6px; }
a { color: var(--accent-soft); }
a.btn, a.lnk, a.b-ink { text-decoration: none; }
.mono { font-family: var(--label); }
.k { font-family: var(--label); font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }

/* Boot: the page stays hidden until the member data arrives. */
.app[data-booting] { visibility: hidden; }
.boot { max-width: 520px; margin: 18vh auto 0; padding: 0 16px; text-align: center; color: var(--muted); }
.boot[hidden] { display: none; }
.boot h1 { font-family: var(--display); font-weight: 300; font-size: 30px; line-height: 1.2; color: var(--cream); margin: 0 0 12px; }

/* App frame */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; background: var(--rail); border-right: 1px solid #141D36; padding: calc(28px + env(safe-area-inset-top, 0px)) 18px calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 34px; z-index: 10; }
.logo { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding-left: 8px; }
.logo img { height: 18px; width: auto; display: block; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; color: #8C95AD; font-size: 14.5px; padding: 9px 10px; border-radius: 9px; transition: color 140ms, background 140ms; white-space: nowrap; }
.nav button svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.nav button:hover { color: var(--cream); }
.nav button[aria-current="page"] { color: var(--cream); background: #121D3A; }
.nav button[aria-current="page"] svg { color: var(--accent); opacity: 1; }
.nav .live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.rail-bottom { margin-top: auto; display: grid; gap: 18px; min-width: 0; }
.who { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; margin: 0; font-family: var(--body); font-size: 13px; line-height: 1.45; color: #8C95AD; text-align: left; background: transparent; border: 0; border-radius: 10px; transition: background 140ms; min-width: 0; }
.who:hover, .who[aria-current="page"] { background: #121D3A; }
.who i { width: 32px; height: 32px; border-radius: 50%; background: #111C3A center / cover no-repeat; border: 1px solid var(--accent-muted); display: grid; place-items: center; font-style: normal; font-size: 11.5px; letter-spacing: 0.02em; color: var(--accent-soft); font-family: var(--display); flex-shrink: 0; }
.who i.has-photo { border-color: var(--accent); }
.who .nm { min-width: 0; }
.who .nm > b, .who .nm > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { color: var(--cream); font-weight: 500; font-size: 13.5px; }
.rail-foot { display: grid; gap: 10px; padding: 0 8px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.rail-foot a { color: var(--muted); overflow-wrap: anywhere; }
.signout { justify-self: start; background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 500; transition: color 140ms, border-color 140ms; }
.signout:hover { color: var(--cream); border-color: var(--accent-muted); }
.mfoot { display: none; }

.content { min-width: 0; padding: calc(24px + env(safe-area-inset-top, 0px)) max(36px, env(safe-area-inset-right, 0px)) 90px 36px; max-width: 1240px; width: 100%; }
.view[hidden] { display: none !important; }
.vhead { margin: 6px 0 30px; }
.vhead h1 { font-family: var(--display); font-weight: 300; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 10px 0 0; text-wrap: balance; }
.vhead h1 em { color: var(--accent); font-family: var(--body); font-style: italic; font-weight: 500; }
.vhead p { color: var(--muted); max-width: 620px; margin: 14px 0 0; font-size: 16.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; padding: 12px 20px; font-size: 14px; font-weight: 600; border: 1px solid transparent; transition: background 140ms, border-color 140ms, transform 140ms, color 140ms; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-accent { background: var(--accent-fill); color: #F4ECE0; }
.btn-accent:hover { background: #3D5EF6; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent-soft); border-color: var(--accent-muted); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-quiet { background: rgba(255,255,255,0.04); color: var(--cream); border-color: var(--line-2); }
.btn-quiet:hover { border-color: var(--accent-muted); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--label); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.pill svg { width: 12px; height: 12px; }
.pill.accent { color: var(--accent-soft); border-color: var(--accent-muted); background: var(--accent-wash); }
.pill.done { color: var(--ok); border-color: rgba(95,179,142,0.45); }
.av { border-radius: 50%; background: url("../img/edwina-blue.jpg") center 18% / cover no-repeat; flex-shrink: 0; display: inline-block; }
.av.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent), 0 0 22px rgba(79,112,255,0.4); }

/* ===== TODAY: photo nudge ===== */
.topline { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.topline[hidden] { display: none; }
.nudge { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 12.5px; font-weight: 500; transition: color 140ms, border-color 140ms; }
.nudge i { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--accent-muted); display: grid; place-items: center; color: var(--accent-soft); }
.nudge svg { width: 12px; height: 12px; }
.nudge:hover { color: var(--cream); border-color: var(--accent-muted); }

/* ===== TODAY: Morning Brief ===== */
.cover { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 38%; min-height: 480px; background: var(--paper); color: var(--ink-paper); border-radius: 20px; overflow: hidden; }
.cover .side { position: absolute; top: 50%; font-family: var(--label); font-size: 11px; letter-spacing: 0.32em; white-space: nowrap; z-index: 2; }
.cover .side.l { left: 30px; transform: translate(-50%, -50%) rotate(-90deg); color: #6B6A78; }
.cover .side.r { right: 30px; transform: translate(50%, -50%) rotate(90deg); color: #6B6A78; }
.cover .copy { padding: 50px 46px 42px 82px; display: flex; flex-direction: column; min-width: 0; }
.cover .copy .k { color: #1F3FC4; }
.cover h2 { font-family: var(--display); font-weight: 300; font-size: clamp(44px, 5.8vw, 78px); line-height: 1; letter-spacing: -0.03em; margin: 16px 0 0; }
.cover h2 em { font-family: var(--body); font-style: italic; font-weight: 500; color: var(--accent-deep); }
.cover .note { font-family: var(--body); font-style: italic; font-weight: 400; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.38; color: #26314F; margin: 26px 0 0; max-width: 500px; }
.cover .acts { margin-top: auto; padding-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.cover .acts .slot { display: contents; }
.cover .b-ink { background: var(--ink-paper); color: #F4ECE0; font-family: var(--display); font-size: 14.5px; font-weight: 600; line-height: 1.3; padding: 14px 22px; border-radius: 11px; border: 0; display: inline-flex; gap: 10px; align-items: center; max-width: 100%; }
.cover .b-ink:hover { background: #142252; }
.cover .b-ink svg { width: 16px; height: 16px; flex-shrink: 0; }
.cover .b-link { background: none; border: 0; padding: 0 0 2px; font-size: 14.5px; color: #26314F; border-bottom: 1px solid #9AA6CF; display: inline-flex; gap: 8px; align-items: center; }
.cover .b-link .av { width: 24px; height: 24px; }
.cover .photo { position: relative; background: url("../img/edwina-blue.jpg") center 22% / cover no-repeat; filter: saturate(0.93) contrast(1.04); }
.cover .photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(234,219,202,0.95), rgba(234,219,202,0) 26%); }

.cards { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-top: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.card .sub { color: #8C95AD; font-size: 13.5px; }
.card .count { font-family: var(--label); font-size: 26px; color: var(--accent-soft); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.card .count span { color: var(--dim); font-size: 13px; margin: 0 4px 0 2px; }
.card .count em { font-style: normal; }
.card .count.soon { font-size: 15px; color: var(--muted); letter-spacing: 0.02em; margin: 6px 0 4px; }
.card .lnk { margin-top: auto; padding-top: 8px; background: none; border: 0; color: var(--accent-soft); font-size: 13.5px; font-weight: 600; text-align: left; padding-left: 0; display: inline-flex; gap: 6px; align-items: center; }
.card .lnk svg { width: 14px; height: 14px; }
.card .push { margin-top: auto; padding-top: 8px; }

/* ===== TODAY: Mission Control ===== */
.mission { position: relative; margin-top: 30px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: radial-gradient(900px 360px at 50% -80px, rgba(79,112,255,0.14), transparent 70%), radial-gradient(circle, rgba(79,112,255,0.12) 1px, transparent 1.3px) 0 0 / 22px 22px, #04070E; }
.mhead { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 26px; border-bottom: 1px solid #141D36; flex-wrap: wrap; }
.mhead h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 4px 0 0; letter-spacing: -0.01em; }
.mhead .clock { font-family: var(--label); font-size: 12px; letter-spacing: 0.1em; color: var(--cream); }
.mgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 10px; padding: 18px 26px 6px; align-items: center; }
.mcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lbl { font-family: var(--label); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #6E7894; }
.steps { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14.5px; color: #8C95AD; line-height: 1.4; }
.steps li i { width: 17px; height: 17px; border-radius: 50%; border: 1px solid #2F3D63; margin-top: 1px; transition: border-color 140ms, background 140ms; }
.steps li.done { color: #C9CFDE; } .steps li.done i { background: var(--accent); border-color: var(--accent); }
.steps li.now { color: var(--cream); } .steps li.now i { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,112,255,0.18); }
.steps li small { display: block; font-family: var(--label); font-size: 11px; color: var(--accent-soft); letter-spacing: 0.04em; margin-top: 2px; }
.steps li > .stepbtn { grid-column: 1 / -1; display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; background: none; border: 0; padding: 0; margin: 0; text-align: left; color: inherit; font: inherit; line-height: inherit; }
.steps li > .stepbtn:hover i { border-color: var(--accent); }
.tickhint { font-size: 12.5px; color: var(--dim); margin: -6px 0 0; }
.tickhint[hidden] { display: none; }
.inst-wrap { position: relative; width: 100%; max-width: 540px; margin: 0 auto; }
.inst { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.inst svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.inst .core { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.inst .core .d { font-family: var(--display); font-weight: 300; font-size: clamp(46px, 6.4vw, 82px); line-height: 1; letter-spacing: -0.03em; }
.inst .core .o { font-family: var(--label); font-size: 12px; letter-spacing: 0.32em; color: var(--accent); margin-top: 20px; text-transform: uppercase; }
.inst .core .s { font-size: 13px; color: #8C95AD; margin-top: 10px; }
.node { position: absolute; width: 130px; font-size: 12px; line-height: 1.25; }
.node span { display: block; font-family: var(--label); font-size: 9.5px; letter-spacing: 0.18em; color: #8C95AD; text-transform: uppercase; margin-bottom: 3px; }
.node b { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--cream); }
.node.done span { color: var(--accent); }
.node.now b { color: var(--accent-soft); }
.node.tr { right: 0; top: 2%; text-align: right; }
.node.br { right: 0; bottom: 2%; text-align: right; }
.node.bl { left: 0; bottom: 2%; text-align: left; }
.node.tl { left: 0; top: 2%; text-align: left; }
.legend { display: none; }
.edmini { border: 1px solid #22305A; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008)); }
.edmini .h { display: flex; gap: 12px; align-items: center; }
.edmini .h .av { width: 42px; height: 42px; }
.edmini .h b { display: block; font-size: 15px; font-weight: 600; }
.edmini .h small { font-family: var(--label); font-size: 10px; letter-spacing: 0.1em; color: var(--accent-soft); text-transform: uppercase; }
.edmini .say { background: #0A1124; border: 1px solid #1B2644; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: #E3E7F2; }
.edmini form { display: flex; gap: 8px; }
.edmini input { flex: 1; min-width: 0; background: #0A1124; border: 1px solid #283657; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.edmini input:focus { outline: none; border-color: var(--accent-muted); }
.edmini form button { background: var(--accent-fill); color: #F4ECE0; border: 0; border-radius: 10px; width: 40px; display: grid; place-items: center; }
.edmini form button svg { width: 16px; height: 16px; }
.vsq { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.vsq i { aspect-ratio: 1; border-radius: 6px; border: 1px solid #22305A; }
.vsq i.on { background: rgba(79,112,255,0.22); border-color: var(--accent-muted); }
.track { padding: 34px 44px 30px; border-top: 1px solid #141D36; }
.track .bar { position: relative; height: 2px; background: #22305A; margin-top: 30px; }
.track .fill { position: absolute; left: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.track .g { position: absolute; top: -7px; width: 16px; height: 16px; border-radius: 3px; transform: translateX(-50%) rotate(45deg); border: 1px solid #34446E; background: #05080F; }
.track .g.done { background: var(--accent); border-color: var(--accent); }
.track .now { position: absolute; bottom: 14px; transform: translateX(-50%); font-family: var(--label); font-size: 10px; letter-spacing: 0.2em; color: var(--accent-soft); white-space: nowrap; }
.track .now::after { content: ""; position: absolute; left: 50%; top: 16px; width: 1px; height: 26px; background: var(--accent-soft); box-shadow: 0 0 8px var(--accent-soft); }
.track .now.start { transform: translateX(-8px); }
.track .now.start::after { left: 8px; }
.track .now.end { transform: translateX(calc(-100% + 8px)); }
.track .now.end::after { left: calc(100% - 8px); }
.track .lab { position: absolute; top: 18px; transform: translateX(-50%); font-size: 12px; color: #8C95AD; white-space: nowrap; }
.track .lab.end { color: var(--accent); }

/* ===== BUILDS ===== */
.blist { display: grid; gap: 14px; }
.brow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 260px; gap: 24px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; }
.brow.now { border-color: var(--accent-muted); box-shadow: 0 0 0 1px rgba(79,112,255,0.15), 0 20px 50px rgba(0,0,0,0.35); }
.brow .n { font-family: var(--display); font-weight: 300; font-size: 62px; line-height: 0.95; color: rgba(79,112,255,0.35); }
.brow.now .n, .brow.done .n { color: var(--accent); }
.brow h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 6px 0 8px; letter-spacing: -0.01em; }
.brow p { margin: 0; color: var(--muted); }
.brow .leave { margin-top: 14px; font-size: 14px; }
.brow .leave b { display: block; font-family: var(--label); font-weight: 500; font-size: 10px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
.brow .side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.brow .side .when { font-size: 13.5px; color: #C9CFDE; }
.brow .steps { margin-top: 18px; }
.brow .tickhint { margin: 12px 0 0; }
.cert { margin-top: 14px; display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 24px; align-items: center; border: 1px dashed var(--accent-muted); border-radius: 18px; padding: 24px 28px; }
.cert .seal { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); font-family: var(--display); font-size: 28px; box-shadow: 0 0 24px rgba(79,112,255,0.2); }
.cert h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 4px; }
.cert p { margin: 0; color: var(--muted); }

/* ===== VAULT ===== */
.gate { display: flex; gap: 14px; align-items: center; border: 1px solid var(--accent-muted); background: var(--accent-wash); border-radius: 14px; padding: 16px 20px; margin: -6px 0 0; font-family: var(--display); font-size: 17px; font-weight: 500; line-height: 1.4; color: var(--cream); }
.gate svg { width: 22px; height: 22px; color: var(--accent-soft); flex-shrink: 0; }
.gate.ok { border-color: rgba(95,179,142,0.45); background: rgba(95,179,142,0.07); }
.gate.ok svg { color: var(--ok); }
.ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.ghead h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.agent { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: left; min-height: 196px; transition: border-color 200ms, transform 200ms; }
.agent.ready { cursor: pointer; border-color: #2B3E85; background: linear-gradient(180deg, rgba(79,112,255,0.07), rgba(79,112,255,0.01)), var(--panel); }
.agent.ready:hover { border-color: var(--accent); transform: translateY(-2px); }
.agent .top { display: flex; justify-content: space-between; align-items: center; }
.agent .idx { font-family: var(--display); font-weight: 300; font-size: 34px; line-height: 1; color: rgba(79,112,255,0.4); }
.agent.ready .idx { color: var(--accent); }
.agent .nm { font-family: var(--display); font-size: 21px; line-height: 1.2; }
.agent .ds { font-size: 14px; color: var(--muted); }
.agent .why { margin-top: auto; font-size: 12.5px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.agent .why svg { width: 13px; height: 13px; flex-shrink: 0; }
.agent .go { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--accent-soft); display: inline-flex; gap: 6px; align-items: center; }
.agent .go svg { width: 14px; height: 14px; }
.agent.locked .nm, .agent.locked .ds { opacity: 0.5; }

/* ===== CALLS ===== */
.clist { display: grid; gap: 12px; }
.call { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 20px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.call.tonight { border-color: var(--accent-muted); }
.call .date { text-align: center; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 0; }
.call.tonight .date { border-color: var(--accent); }
.call .date small { display: block; font-family: var(--label); font-size: 10px; letter-spacing: 0.18em; color: var(--accent); }
.call .date b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.call h3 { margin: 0; font-size: 16px; font-weight: 600; }
.call p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }

/* ===== EDWINA AI ===== */
.ed { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.ed-side { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; position: sticky; top: 24px; }
.ed-side .ph { height: 240px; background: url("../img/edwina-blue.jpg") center 18% / cover no-repeat; position: relative; }
.ed-side .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--panel) 2%, rgba(13,22,48,0) 55%); }
.ed-side .in { padding: 0 24px 24px; margin-top: -30px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.ed-side h2 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0; }
.ed-side p { margin: 0; color: var(--muted); font-size: 14.5px; }
.prompts { display: grid; gap: 8px; }
.prompts button { text-align: left; background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--cream); }
.prompts button:hover { border-color: var(--accent-muted); }
.ed-note { font-size: 12.5px; color: var(--dim); }
.chat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 560px; max-height: 860px; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.chat-head .who2 { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.chat-head .av { width: 30px; height: 30px; }
.chat-head .state { font-family: var(--label); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.chat-head .state.busy { color: var(--accent-soft); }
.chat-head .used { font-family: var(--label); font-size: 12px; color: var(--dim); }
.log { flex: 1; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 82%; padding: 13px 16px; border-radius: 14px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; } .msg li { margin: 2px 0; }
.msg.me { align-self: flex-end; background: #142252; border: 1px solid #2B3E85; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err { border-color: #6b3a30; color: var(--err); }
.thinking { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; animation: blink 1.2s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: 0.2s; } .thinking i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.composer { border-top: 1px solid var(--line); padding: 14px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; resize: none; background: #0A1124; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; max-height: 160px; }
.composer textarea:focus { outline: none; border-color: var(--accent-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== PROFILE ===== */
.pf { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; max-width: 1000px; }
.pf-col { display: grid; gap: 14px; min-width: 0; }
.pf .card { padding: 24px; gap: 10px; }
.pf-photo-card { align-items: center; text-align: center; }
.pf-photo { position: relative; width: 168px; height: 168px; margin: 14px 0 10px; }
.pf-av { position: absolute; inset: 0; border-radius: 50%; background: #111C3A center / cover no-repeat; border: 1px solid var(--accent-muted); display: grid; place-items: center; font-family: var(--display); font-weight: 300; font-size: 54px; letter-spacing: 0.02em; color: var(--accent-soft); transition: opacity 220ms, filter 220ms, box-shadow 420ms; }
.pf-av.has-photo { border-color: transparent; box-shadow: 0 0 0 4px var(--panel), 0 0 0 5px var(--accent-muted); }
.pf-ring { position: absolute; inset: -10px; border-radius: 50%; opacity: 0; pointer-events: none; background: conic-gradient(from 0deg, rgba(45,79,232,0) 0deg, rgba(45,79,232,0.2) 70deg, #2D4FE8 250deg, #8FA4FF 352deg, rgba(45,79,232,0) 360deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); transition: opacity 260ms; }
.pf-photo.busy .pf-ring, .pf-photo.spin .pf-ring { opacity: 1; animation: pf-spin 0.9s linear infinite; }
.pf-photo.busy .pf-av { opacity: 0.45; filter: saturate(0.4); }
.pf-photo.settled .pf-av { box-shadow: 0 0 0 4px var(--panel), 0 0 0 7px var(--accent-fill), 0 0 34px rgba(79,112,255,0.45); }
.pf-av.pop { animation: pf-pop 720ms cubic-bezier(0.18, 1.35, 0.4, 1) both; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
@keyframes pf-pop { 0% { transform: scale(0.35); opacity: 0; } 55% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.pf-photo-card .sub { max-width: 260px; }
.pf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.pf-fields label { display: grid; gap: 6px; font-family: var(--label); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); min-width: 0; }
.pf-fields input { width: 100%; min-width: 0; background: #0A1124; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; font-family: var(--body); font-size: 15px; letter-spacing: normal; text-transform: none; color: var(--cream); }
.pf-fields input:focus { outline: none; border-color: var(--accent); }
.pf-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pf-status { font-size: 13.5px; color: var(--muted); }
.pf-status.err { color: var(--err); }
.pf-acct { display: grid; gap: 10px; margin: 6px 0 0; }
.pf-acct div { display: grid; gap: 2px; }
.pf-acct dt { font-family: var(--label); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.pf-acct dd { margin: 0; font-size: 15px; color: var(--cream); overflow-wrap: anywhere; }

/* ===== Setup sheet ===== */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.scrim[hidden] { display: none; }
.sheet { width: min(760px, 100%); max-height: 100%; overflow: auto; background: #0B1329; border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.sheet-head { padding: 26px 28px 18px; border-bottom: 1px solid var(--line); position: relative; }
.sheet-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 38px); margin: 8px 0 0; padding-right: 30px; }
.sheet-head p { margin: 10px 0 0; color: var(--muted); }
.close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--muted); display: grid; place-items: center; }
.close:hover { color: var(--cream); border-color: var(--accent-muted); }
.close svg { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tabs { display: flex; gap: 6px; padding: 16px 28px 0; }
.tab { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; }
.tab[aria-selected="true"] { color: #F4ECE0; background: var(--accent-fill); border-color: var(--accent-fill); }
.panel { padding: 20px 28px 28px; }
.before { background: rgba(79,112,255,0.06); border: 1px solid rgba(43,62,133,0.6); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.dl { margin: 16px 0 6px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dl .status { font-size: 13.5px; color: var(--muted); }
ol.howto { list-style: none; counter-reset: s; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
ol.howto > li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; min-width: 0; }
ol.howto > li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent-muted); color: var(--accent); display: grid; place-items: center; font-family: var(--label); font-size: 12.5px; }
ol.howto > li > div { min-width: 0; padding-top: 3px; }
.copyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.code { font-family: var(--code); font-size: 13px; background: #0A1124; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.instr { margin-top: 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; font-family: var(--code); font-size: 12.5px; line-height: 1.55; color: #D3D8E6; background: #0A1124; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.starter { background: rgba(255,255,255,0.03); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--cream); }
.starter:hover { border-color: var(--accent-muted); }
.after { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
kbd { font-family: var(--code); font-size: 12.5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; color: var(--cream); background: #0A1124; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: #0F1A38; border: 1px solid var(--accent-muted); color: var(--cream); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast[hidden] { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1320px) {
  .mgrid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .mgrid .center { grid-column: 1 / -1; order: -1; }
  .inst-wrap { max-width: 560px; }
}
@media (max-width: 1080px) {
  .brow { grid-template-columns: 80px minmax(0, 1fr); }
  .brow .side { grid-column: 2; }
  .brow .n { font-size: 56px; }
  .ed { grid-template-columns: 1fr; }
  .ed-side { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--rail); }
  .rail { min-width: 0; position: sticky; top: env(safe-area-inset-top, 0px); height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid #141D36; background: rgba(7,12,24,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .logo { padding-left: 0; }
  .rail-bottom { margin: 0 0 0 auto; display: block; }
  .rail-foot { display: none; }
  .who { padding: 0; width: auto; }
  .who:hover, .who[aria-current="page"] { background: none; }
  .who[aria-current="page"] i { border-color: var(--accent); }
  .who .nm { display: none; }
  .nav { order: 3; width: 100%; display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { width: auto; padding: 7px 12px; font-size: 13.5px; }
  .nav button svg { display: none; }
  .content { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  .mfoot { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
  .mfoot a { color: var(--muted); }
  .topline { margin: 0 0 12px; }
  .cover { grid-template-columns: 1fr; min-height: 0; }
  .cover .photo { order: -1; height: 280px; }
  .cover .photo::before { background: linear-gradient(0deg, rgba(234,219,202,1) 0%, rgba(234,219,202,0) 45%); }
  .cover .side { display: none; }
  .cover .copy { padding: 4px 24px 28px; }
  .cards { grid-template-columns: 1fr; }
  .call { grid-template-columns: 64px minmax(0, 1fr); }
  .call > :last-child { grid-column: 2; justify-self: start; }
  .cert { grid-template-columns: 1fr; }
  .pf { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mgrid { grid-template-columns: 1fr; padding: 16px; }
  .node { display: none; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; font-size: 13px; }
  .legend div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: #8C95AD; }
  .legend div.done { border-color: #2B3E85; color: #C9CFDE; }
  .legend div.now { border-color: var(--accent); color: var(--cream); }
  .legend b { display: block; font-family: var(--label); font-size: 9.5px; letter-spacing: 0.16em; color: var(--accent); font-weight: 500; }
  .track { padding: 30px 22px 28px; }
  .track .lab { font-size: 10.5px; }
  .track .lab.mid { display: none; }
  .brow { grid-template-columns: 1fr; padding: 22px; }
  .brow .side { grid-column: auto; }
  .msg { max-width: 92%; }
  .sheet-head, .panel { padding-left: 20px; padding-right: 20px; }
  .tabs { padding-left: 20px; padding-right: 20px; }
  .gate { font-size: 15.5px; padding: 14px 16px; }
  .pf-fields { grid-template-columns: 1fr; }
  .cover .b-ink { white-space: normal; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* No spinning: the upload ring shows as a solid royal blue ring instead. */
  .pf-photo.busy .pf-ring, .pf-photo.spin .pf-ring { background: #2D4FE8; }
}
