/* App side (login, signup, portal, terminal): cream and orange, same theme as the homepage (OptionB). */
:root {
  --bg: #F3EEE3; --bg2: #EBE5D6; --panel: #FBF8F1; --line: #DDD5C2; --line2: #E6DFCD; --line3: #CFC6B0;
  --text: #111111; --white: #111111; --muted: #6B655A; --soft: #4A463E; --dim: #8A8478;
  --amber: #D9541E; --ink: #B8430F; --green: #1E8E5A; --red: #B91C1C;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --serif: "Newsreader", Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", system-ui, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.wide { grid-column: 1 / -1; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; font-weight: 500; font-family: var(--serif); }
h3 { margin: 0; font-weight: 500; }
button { font-family: inherit; }
.mono { font-family: var(--mono); }
.logo { font-family: var(--serif); font-weight: 600; color: var(--text); font-size: 22px; display: inline-flex; align-items: center; gap: 10px; }
.logo::before { content: "B"; width: 30px; height: 30px; border-radius: 50%; background: #111; color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.logo:hover { text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; background: var(--amber); color: #111; border: 0; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn[disabled], .btn.off { background: var(--line2); color: var(--dim); cursor: not-allowed; filter: none; }
.btn-ghost { background: none; border: 1px solid var(--line3); color: var(--soft); font: 500 12px var(--mono); min-height: 32px; padding: 0 14px; border-radius: 4px; cursor: pointer; }
.btn-ghost:hover { color: var(--white); border-color: var(--dim); text-decoration: none; }
.btn-block { width: 100%; min-height: 48px; margin-top: 24px; }

/* split auth layout */
.split { min-height: 100vh; display: flex; }
.split-brand { flex: 1 1 52%; padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line2); background: var(--bg2); }
.split-brand .logo { font-size: 24px; }
.split-brand h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.02em; }
.split-brand .lead { margin: 24px 0 0; max-width: 460px; color: var(--soft); font-size: 18px; }
.split-brand .fine { margin: 0; font-size: 12px; color: var(--dim); max-width: 520px; }
.split-form { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.form-box { width: 100%; max-width: 380px; }
.form-box h2 { font-size: 28px; }
.form-box .sub { margin: 8px 0 28px; color: var(--muted); }
label { display: block; font-size: 13px; color: var(--soft); margin: 18px 0 6px; }
label:first-of-type { margin-top: 0; }
input[type=email], input[type=password], input[type=text] { width: 100%; background: var(--panel); border: 1px solid var(--line3); border-radius: 6px; color: var(--white); padding: 13px 14px; font: 16px "IBM Plex Sans", sans-serif; }
input:focus { outline: 2px solid rgba(217, 84, 30, .55); outline-offset: 1px; border-color: transparent; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--soft); margin: 18px 0 0; }
.check input { margin-top: 3px; accent-color: var(--amber); }
.hint { color: var(--dim); font-size: 12px; margin-top: 6px; }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 6px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(185, 28, 28, .07); border: 1px solid rgba(185, 28, 28, .35); color: #7f1d1d; }
.msg.ok { background: rgba(30, 142, 90, .08); border: 1px solid rgba(30, 142, 90, .35); color: #14532d; }
.links { margin-top: 18px; display: flex; justify-content: space-between; font-size: 14px; }
.form-box .btn-block + .btn-block { margin-top: 12px; }

/* google sign-in */
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--dim); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#google-btn { display: flex; justify-content: center; min-height: 44px; }

/* top bar */
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line2); background: var(--bg2); }
.topbar .left { display: flex; align-items: center; gap: 40px; }
.topbar .logo { font-size: 17px; }
.topnav { display: flex; gap: 28px; font-size: 15px; }
.topnav a { color: var(--muted); padding: 21px 0; }
.topnav a.on { color: var(--white); border-bottom: 2px solid var(--amber); }
.topnav a:hover { text-decoration: none; color: var(--white); }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--line2); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.who button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; }
.who button:hover { color: var(--white); }

/* portal */
.shell { background: var(--bg2); min-height: 100vh; }
.portal { max-width: 1360px; margin: 0 auto; padding: 40px; display: flex; gap: 32px; }
.portal-main { flex: 1 1 66%; min-width: 0; }
.portal-side { flex: 1 1 34%; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.portal h1 { font-size: 36px; letter-spacing: -.01em; }
.portal .sub { margin: 8px 0 28px; color: var(--muted); font-size: 17px; }
.steps { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.step { display: flex; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line2); align-items: flex-start; }
.step:last-child { border-bottom: 0; }
.dot { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line3); color: var(--dim); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--panel); }
.dot.now { border-color: var(--amber); color: var(--amber); }
.dot.done { background: var(--amber); border-color: var(--amber); color: #111; }
.step .t { font-weight: 600; font-size: 17px; }
.step .d { color: var(--muted); margin-top: 2px; max-width: 520px; }
.step.locked .t { color: var(--muted); }
.step .mono { margin-top: 12px; font-size: 13px; color: var(--soft); }
.step .btn { margin-top: 16px; }
.tiles { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile .k { font-size: 12px; color: var(--muted); }
.agree { margin-top: 16px; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--text); font-size: 15px; cursor: pointer; padding: 6px 0; text-align: left; }
.agree .box { flex: 0 0 22px; height: 22px; border: 1px solid var(--amber); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: var(--amber); font-weight: 700; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--panel); }
.card .k { font-size: 12px; letter-spacing: .08em; color: var(--muted); font-family: var(--mono); text-transform: uppercase; }
.card .big { margin-top: 10px; font-size: 24px; font-weight: 500; }
.card p { margin: 10px 0 0; color: var(--soft); }
.card .muted { color: var(--muted); margin-top: 4px; }

/* handoff */
.center-screen { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.handoff { width: 100%; max-width: 520px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 44px; text-align: center; }
.handoff h2 { margin-top: 24px; font-size: 26px; }
.handoff p { margin: 10px 0 0; color: var(--soft); }
.handoff ol { margin: 24px 0 0; padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 10px; color: var(--soft); }
.handoff li { display: flex; gap: 12px; }
.handoff li span { color: var(--amber); font-family: var(--mono); }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* launch */
.launch { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.launch .inner { width: 100%; max-width: 640px; padding: 0 24px; }
.launch .name { color: var(--amber); font-weight: 600; letter-spacing: .14em; font-size: 15px; }
.launch .sub2 { color: var(--dim); margin-top: 4px; font-size: 12px; letter-spacing: .06em; }
.launch .lines { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.launch .line { display: flex; justify-content: space-between; opacity: 0; transition: opacity .2s; }
.launch .line.on { opacity: 1; }
.launch .line b { color: var(--amber); font-weight: 400; }
.launch .line.bad b { color: var(--red); }
.bar { margin-top: 32px; height: 4px; background: var(--line2); }
.bar div { height: 4px; width: 0; background: var(--amber); transition: width .4s; }
.ready { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; }
.ready .r { color: var(--amber); font-size: 26px; letter-spacing: .22em; opacity: 0; transition: opacity .3s; }
.ready .r.on { opacity: 1; }

/* terminal */
.term { min-height: 100vh; background: var(--bg); font-family: var(--mono); font-size: 12px; display: flex; flex-direction: column; }
.tbar { flex: 0 0 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.tbar .tag { background: var(--amber); color: #111; font-weight: 600; padding: 4px 10px; letter-spacing: .06em; }
.tbar .grp { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.tbar .grp.r { color: var(--soft); gap: 14px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 6px; }
.live-dot.live { background: var(--green); }
.live-dot.stale { background: var(--amber); }
.live-dot.down { background: var(--red); }
.tbody { flex: 1; padding: 16px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-content: start; }
.panel { border: 1px solid var(--line); background: var(--panel); padding: 16px; overflow-x: auto; }
.panel h3 { font: 500 11px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.mtm-big { font: 600 44px var(--mono); margin-top: 8px; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); } .neg { color: var(--red); }
.sub-row { display: flex; gap: 28px; margin-top: 6px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.sub-row b { color: var(--text); font-weight: 500; }
#spark { width: 100%; height: 120px; margin-top: 14px; display: block; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
th { text-align: right; color: var(--muted); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line2); }
th:first-child, td:first-child { text-align: left; }
.empty { color: var(--dim); padding: 14px 0; font-family: "IBM Plex Sans", sans-serif; font-size: 14px; }
.tfoot { padding: 0 16px 16px; color: var(--dim); font-family: "IBM Plex Sans", sans-serif; font-size: 12px; }
.banner { grid-column: 1 / -1; border: 1px solid rgba(217, 84, 30, .4); background: rgba(217, 84, 30, .08); color: #7a2e0c; padding: 10px 14px; font-family: "IBM Plex Sans", sans-serif; font-size: 14px; display: none; }
.banner.show { display: block; }

@media (max-width: 900px) {
  .split { flex-direction: column; }
  .split-brand { padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--line2); gap: 24px; }
  .split-brand .fine { display: none; }
  .split-brand .lead { font-size: 16px; }
  .portal { flex-direction: column; padding: 24px 16px; }
  .topbar { padding: 0 16px; }
  .topnav { display: none; }
  .tbody { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .mtm-big { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } * { transition: none !important; } }
