/* Maxima — sign in / sign up ("base camp") and the Account sheet. 2026-12-06.
   Signed out, <html data-auth="out"> shows only #gate: today's real landscape behind a precise card. */

html[data-auth="out"] .app, html[data-auth="out"] body > .sheet, html[data-auth="out"] body > .story,
html[data-auth="out"] body > .letter, html[data-auth="out"] body > .ambient, html[data-auth="out"] .to-top,
html[data-auth="out"] .tape { display: none !important; }
html:not([data-auth="out"]) #gate { display: none; }
html[data-auth="out"], html[data-auth="out"] body { background: var(--bg); }

.gate { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; isolation: isolate; color: var(--text); }
.gate-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.gate::before { /* depth: a cold dawn high in the sky, darkness under the ridges */
  content: ""; position: fixed; inset: 0; z-index: -3;
  background: radial-gradient(90% 55% at 70% 8%, color-mix(in srgb, var(--bg-top) 90%, transparent) 0%, transparent 70%),
              radial-gradient(60% 40% at 12% 0%, color-mix(in srgb, var(--up) 10%, transparent), transparent 70%), var(--bg);
}
.gate-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.gate-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 0; position: relative; z-index: 2; }
.gate-top .brand-mark { width: 28px; height: 28px; }
.gate-live { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; white-space: nowrap;
  padding: 8px 13px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gate-live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--flat); flex: 0 0 auto; }
.gate-live[data-state="open"] .dot { background: var(--up); box-shadow: 0 0 10px var(--up); animation: pulse 2.2s ease-in-out infinite; }
.gate-live b { font-weight: 500; }
.gate-live .pos { color: var(--up); } .gate-live .neg { color: var(--down); }
.gate-live #gateLiveTxt { overflow: hidden; text-overflow: ellipsis; }

.gate-grid { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, 440px);
  gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(28px, 7vh, 88px) clamp(16px, 4vw, 48px) 40px; }

/* ---- The pitch ---- */
.gate-pitch { padding-top: 8px; }
.gate-pitch h1 { font-family: var(--display); font-weight: 300; font-size: clamp(40px, 5.6vw, 78px); line-height: .98; letter-spacing: -.035em;
  margin: 16px 0 22px; color: var(--value); text-wrap: balance; }
.gate-pitch h1 em { font-style: normal; background: linear-gradient(100deg, var(--up), var(--cta-b) 60%, var(--value)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-sub { max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--text-body); margin: 0 0 34px; }
.gate-feats { list-style: none; margin: 0; padding: 8px 22px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; max-width: 660px;
  border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); }
.gate-feats li:nth-child(-n+2) { border-top: 0; }
.gate-feats li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(8px); animation: gateIn .7s cubic-bezier(.2,.7,.2,1) forwards; }
.gate-feats li:nth-child(1) { animation-delay: .35s } .gate-feats li:nth-child(2) { animation-delay: .42s } .gate-feats li:nth-child(3) { animation-delay: .49s }
.gate-feats li:nth-child(4) { animation-delay: .56s } .gate-feats li:nth-child(5) { animation-delay: .63s } .gate-feats li:nth-child(6) { animation-delay: .7s }
.gate-feats li:nth-child(7) { animation-delay: .77s } .gate-feats li:nth-child(8) { animation-delay: .84s } .gate-feats li:nth-child(9) { animation-delay: .91s }
.gate-feats li:nth-child(10) { animation-delay: .98s }
.gate-feats svg { width: 34px; height: 34px; fill: none; stroke: var(--up); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  padding: 7px; border-radius: 10px; background: color-mix(in srgb, var(--up) 7%, transparent); border: 1px solid color-mix(in srgb, var(--up) 18%, transparent); }
.gate-feats .n { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--muted); }
.gate-feats b { display: block; font-weight: 600; font-size: 14.5px; color: var(--text); margin: 2px 0 3px; }
.gate-feats span.d { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); }
.gate-feats li.soon svg { stroke: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.soon-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; font-family: var(--mono); font-size: 8.5px; font-weight: 600; letter-spacing: .18em; padding: 3px 6px 2px;
  border-radius: 5px; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
@keyframes gateIn { to { opacity: 1; transform: none; } }

/* ---- The card ---- */
.gate-card { position: relative; padding: 26px 26px 22px; border-radius: 24px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sheet) 88%, transparent), color-mix(in srgb, var(--bg) 82%, transparent));
  border: 1px solid var(--line); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0; transform: translateY(14px) scale(.985); animation: gateIn .8s .15s cubic-bezier(.2,.7,.2,1) forwards; }
.gate-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--up) 55%, transparent), transparent 35%, transparent 70%, color-mix(in srgb, var(--up) 25%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.gate-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.gate-card-head .eyebrow b { color: var(--up); font-weight: 500; }

.gate-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); margin-bottom: 22px; }
.gate-tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 11px 8px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: color .25s; }
.gate-tabs button[aria-selected="true"] { color: var(--cta-ink); }
.gate-tabs .ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px;
  background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); box-shadow: 0 6px 24px -6px var(--glow); transition: transform .45s cubic-bezier(.6,0,.2,1); }
.gate-tabs[data-tab="up"] .ink { transform: translateX(100%); }
.gate-tabs[hidden] { display: none; }

.gate-form { display: grid; gap: 14px; }
.gate-form h2 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -.01em; margin: 0; color: var(--value); }
.gate-form > p.muted { margin: -6px 0 2px; line-height: 1.5; }
.fld { display: grid; gap: 7px; }
.fld-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fld-top label, .fld-top .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fld-top label i { font-style: normal; color: var(--up); margin-right: 6px; }
.fld-note { font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; color: var(--muted); text-align: right; min-height: 1em; }
.fld-note.ok { color: var(--up); } .fld-note.bad { color: var(--down); }
.fld-box { position: relative; display: flex; align-items: center; }
.fld input { width: 100%; font: inherit; font-size: 16px; color: var(--text); padding: 14px 15px; border-radius: 12px; outline: none;
  background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, background .2s; }
.fld input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.fld input:hover { border-color: color-mix(in srgb, var(--text) 18%, transparent); }
.fld input:focus { border-color: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 14%, transparent); }
.fld.err input { border-color: var(--down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--down) 12%, transparent); }
.fld-err { font-size: 12.5px; color: var(--down); line-height: 1.4; }
.fld-err:empty { display: none; }
.fld-box input.has-eye { padding-right: 52px; }
.eye { position: absolute; right: 6px; width: 40px; height: 40px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.eye:hover { color: var(--text); background: var(--raise); }
.eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.eye[aria-pressed="true"] .slash { display: none; }
.caps { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--warn); }

/* password strength as five rising peaks */
.meter { display: flex; align-items: flex-end; gap: 4px; height: 18px; }
.meter i { flex: 1; border-radius: 3px 3px 0 0; background: var(--raise-2); transition: background .3s, height .35s cubic-bezier(.2,.7,.2,1); height: 4px; }
.meter i:nth-child(1) { --h: 6px } .meter i:nth-child(2) { --h: 9px } .meter i:nth-child(3) { --h: 12px } .meter i:nth-child(4) { --h: 15px } .meter i:nth-child(5) { --h: 18px }
.meter[data-s="1"] i:nth-child(-n+1), .meter[data-s="2"] i:nth-child(-n+2) { background: var(--down); height: var(--h); }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--warn); height: var(--h); }
.meter[data-s="4"] i:nth-child(-n+4), .meter[data-s="5"] i:nth-child(-n+5) { background: var(--up); height: var(--h); box-shadow: 0 0 10px var(--glow); }

.checks { display: grid; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.chk { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 11px; align-items: start; font-size: 13.5px; line-height: 1.45; color: var(--text-body); cursor: pointer; }
.chk input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--text) 30%, transparent);
  background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.chk input::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--cta-ink); border-bottom: 2px solid var(--cta-ink); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s; }
.chk input:checked { background: var(--up); border-color: var(--up); }
.chk input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.chk input:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 18%, transparent); }
.chk.err input { border-color: var(--down); }
.chk a { color: var(--up); text-underline-offset: 2px; }
.chk small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.chk b { color: var(--text); font-weight: 600; }
.row-split { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-split .chk { grid-template-columns: 18px auto; font-size: 13px; }
.row-split .chk input { width: 18px; height: 18px; }
.linkish { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; color: var(--up); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--up) 40%, transparent); }

.go { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 4px; padding: 15px 18px;
  border: 0; border-radius: 13px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--cta-ink);
  background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); box-shadow: 0 12px 34px -12px var(--glow); transition: transform .15s, box-shadow .25s, filter .2s; }
.go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-120%); }
.go:hover { box-shadow: 0 16px 44px -10px var(--glow); }
.go:hover::after { transition: transform .9s; transform: translateX(120%); }
.go:active { transform: scale(.985); }
.go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.go:hover svg { transform: translateX(3px); }
.go[disabled] { filter: saturate(.4) brightness(.85); cursor: progress; }
.go .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.go.busy .spin { display: block; } .go.busy svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate-alert { font-size: 13.5px; line-height: 1.5; padding: 11px 13px; border-radius: 11px; color: var(--text);
  background: color-mix(in srgb, var(--down) 12%, transparent); border: 1px solid color-mix(in srgb, var(--down) 40%, transparent); }
.gate-alert.ok { background: color-mix(in srgb, var(--up) 10%, transparent); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.gate-alert:empty { display: none; }
.gate-fine { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; margin: 2px 0 0; }
.gate-fine a { color: var(--muted); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.code-in { font-family: var(--mono) !important; font-size: 24px !important; letter-spacing: .55em; text-align: center; padding-left: calc(15px + .55em) !important; }

.gate-done { text-align: center; padding: 30px 6px 18px; }
.gate-done svg { width: 74px; height: 74px; }
.gate-done svg path { stroke-dasharray: 120; stroke-dashoffset: 120; animation: lgDrawIn 1.1s cubic-bezier(.2,.7,.2,1) forwards; }
.gate-done h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 14px 0 6px; color: var(--value); }
@keyframes lgDrawIn { to { stroke-dashoffset: 0; } }

.gate-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; max-width: 1240px; margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px) calc(22px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); }
.gate-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.gate-foot a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; }
.gate-foot a:hover { color: var(--up); }

@media (max-width: 980px) {
  .gate-sky { position: absolute; height: 100vh; }
  .gate-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: calc(25vh + 12px); }
  .gate-feats li:nth-child(2) { border-top: 1px solid var(--line); }
  .gate-pitch { display: contents; }
  .gate-pitch .eyebrow, .gate-pitch h1, .gate-sub { order: 0; }
  .gate-card { order: 1; }
  .gate-feats { order: 2; }
  .gate-pitch h1 { margin: -12px 0 0; }
  .gate-sub { margin: 0; }
  .gate-pitch > .eyebrow { margin-bottom: -16px; }
}
@media (max-width: 560px) {
  .gate-grid { padding-top: calc(25vh + 6px); gap: 22px; }
  .gate-feats { padding: 4px 16px 6px; }
  .gate-pitch h1 { font-size: 40px; }
  .gate-sub { font-size: 15.5px; }
  .gate-feats { grid-template-columns: minmax(0, 1fr); }
  .gate-card { padding: 20px 16px 18px; border-radius: 20px; }
  .gate-top .brand-word { font-size: 12px; }
  .gate-live { padding: 7px 10px; font-size: 9px; letter-spacing: .12em; }
}
@media (prefers-reduced-motion: reduce) {
  .gate-feats li, .gate-card { animation: none; opacity: 1; transform: none; }
}

/* ---- Account sheet (signed in) ---- */
.acct-id { display: flex; gap: 14px; align-items: center; margin: 6px 0 16px; }
.acct-av { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto;
  font-family: var(--display); font-size: 22px; color: var(--cta-ink); background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); box-shadow: 0 10px 30px -10px var(--glow); }
.acct-id b { display: block; font-size: 17px; }
.acct-id span { font-size: 13px; color: var(--muted); word-break: break-all; }
.acct-rows { display: grid; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acct-close { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--down) 40%, transparent); background: color-mix(in srgb, var(--down) 6%, transparent); }
.acct-close p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-body); }
.acct-close input { font: inherit; font-size: 16px; color: var(--text); padding: 12px 13px; border-radius: 11px; background: var(--raise); border: 1px solid var(--line); }
.danger-btn { border: 1px solid var(--down); color: var(--down); background: transparent; border-radius: 999px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.danger-btn.solid { background: var(--down); color: #fff; }
.acct-legal { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.acct-legal a { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---- Not-advice footer in the app ---- */
.app-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 26px 20px 8px; font-size: 12px; color: var(--muted); text-align: center; }
.app-foot a { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.app-foot a:hover { color: var(--up); }

/* ---- AI features: coming soon ---- */
.ask.soon .ask-bar { opacity: 1; cursor: default; border-style: dashed; }
.ask.soon .ask-bar input { cursor: default; }
.ask.soon .ask-bar input::placeholder { color: var(--muted); }
.ask.soon #askGo { display: none; }
.ask.soon .ask-chips { display: none; }
.ask-soon { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ask-soon b { color: var(--text-body); font-weight: 600; }
.menu .soon-tag { margin-left: 8px; }
.letter-soon { position: relative; max-width: 640px; margin: 0 auto; padding: 24px 0 40px; }
.letter-soon .ls-seal { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.letter-soon h1 { font-family: var(--display); font-weight: 300; font-size: clamp(28px, 5vw, 44px); line-height: 1.05; letter-spacing: -.02em; margin: 6px 0 14px; color: var(--value); }
.letter-soon p.lead { font-size: 16.5px; line-height: 1.6; color: var(--text-body); margin: 0 0 22px; }
.ls-preview { position: relative; border-radius: 18px; border: 1px solid var(--line); padding: 22px; overflow: hidden; background: var(--raise); }
.ls-preview .ls-blur { filter: blur(5px); opacity: .55; user-select: none; pointer-events: none; }
.ls-preview .ls-blur i { display: block; height: 10px; border-radius: 5px; background: var(--muted); opacity: .45; margin: 10px 0; }
.ls-preview .ls-blur svg { width: 100%; height: 90px; margin: 8px 0 6px; }
.ls-preview .ls-blur svg path { fill: none; stroke: var(--up); stroke-width: 2; }
.ls-preview .ls-blur h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 6px 0; color: var(--value); }
.ls-preview .ls-stamp { position: absolute; inset: 0; display: grid; place-items: center; }
.ls-preview .ls-stamp span { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; padding: 10px 16px; border-radius: 10px; color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--bg) 70%, transparent); transform: rotate(-4deg); }
.ls-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ls-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.5; color: var(--text-body); }
.ls-list li span { font-family: var(--mono); font-size: 10px; color: var(--up); padding-top: 3px; }
