/* Paper design: the site's default look. Loaded last so it wins over the older defaults.
   Colours apply to the default light theme only, so dark mode and the palettes in Appearance keep working. */
:root[data-theme="light"]:not([data-palette]) {
  --bg: #F7F7F5; --panel: #FFFFFF; --panel2: #F1F1EE; --line: #E6E6E1;
  --text: #16181D; --muted: #6B6F78; --acc: #2F5BFF; --up: #12A06A; --dn: #E0464E;
}
:root { --font-head: "Inter", system-ui, sans-serif; --r: 10px; --r2: 14px; font-variant-numeric: tabular-nums; }
.brand, .sf-brand { text-transform: lowercase; font-weight: 600; letter-spacing: -0.02em; }

/* ---- Layout safety: nothing may spill out of its box or sit on top of other text ---- */
/* Two columns only while each is at least 440px wide; below that the second box drops under the first (like word wrap). */
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(440px, calc(50% - 8px))), 1fr)); }
.kpi { min-width: 0; }
.kpi span, .kpi b, .card h2, .card h3, .page h1 { overflow-wrap: anywhere; }
:is(.card, div):has(> .dp-tbl) { overflow-x: auto; }   /* wide desk tables scroll inside their card */
.kpi small, .kpi small span { white-space: normal; }   /* the change line wraps inside a narrow tile instead of spilling out */

/* ---- Access ---- */
/* #ochain: the option chain table on its own page (symbol/expiry picker kept) */
#page-options.chain-only > section:not(.row-between):not(.o-chain-card), #page-options.chain-only #o-order { display: none; }
#page-options.chain-only .o-chain-wrap { max-height: none; overflow-x: auto; overflow-y: hidden; }  /* every strike on the page: no up-down scroll box; sideways only when the screen is too narrow */
#page-options .o-chain-card { padding-left: 8px; padding-right: 8px; }
@media (max-width: 1300px) { #page-options #o-chain :is(td, th, td *) { font-size: 11px; } #page-options #o-chain :is(td, th) { padding-left: 4px; padding-right: 4px; } }  /* all puts columns fit on a laptop screen */
:root[data-nobt] #sw-card, :root[data-nobt] #ib-card { display: none; }             /* heavy backtests switched off on the server */
:root[data-limited] #nav a.need-broker { display: none; }                           /* pages this account cannot open (backend/access.py) */
:root[data-nobroker] #page-brokers::before { content: "Connect Fyers or Firstock to open Option Chain, OI Analysis, Gamma Exposure, Chain Analytics, Volatility, Expiry Day, Desk Pro, Strategy Builder and the Optimizer with live data from your own account. Research, Events, Learn and the calculators work without a broker.";
  display: block; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--acc); border-radius: var(--r2); background: var(--panel); color: var(--text); }

/* ---- OI analysis: build-up quadrant ---- */
#oi-quad { display: block; }
#oi-quad > .oq-grid { background: none; border-radius: 0; font-size: inherit; padding: 0 0 26px 22px; }
#oi-quad .oq-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
@media (min-width: 1100px) { #oi-quad .oq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.oq-bias { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel2); margin-bottom: 12px; }
.oq-bias-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.oq-bias-head b { font-size: 15px; }
.oq-meter { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; background: var(--line); }
.oq-meter .up { background: var(--up); } .oq-meter .dn { background: var(--dn); }
.oq-bias-foot { display: flex; justify-content: space-between; }
.oq-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 0 22px 22px; }
.oq-cell { min-width: 0; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); padding: 10px 12px; }
.oq-cell header b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--qc); margin-right: 6px; vertical-align: 1px; }
.oq-0, .oq-1 { --qc: var(--up); } .oq-2, .oq-3 { --qc: var(--dn); }
.oq-cell header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.oq-cell header b { display: block; font-size: 13px; } .oq-cell header small { color: var(--muted); font-size: 11px; }
.oq-n { font: 600 20px/1 var(--font-head); text-align: right; } .oq-n small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.oq-cell ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.oq-cell li { display: grid; grid-template-columns: 74px minmax(30px, 1fr) auto 58px; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.oq-k i { font-style: normal; font-size: 10px; margin-left: 4px; padding: 1px 4px; border-radius: 4px; background: var(--panel2); color: var(--muted); }
.oq-bar { height: 6px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.oq-bar span { display: block; height: 100%; border-radius: 99px; }
li.up .oq-bar span { background: var(--up); } li.dn .oq-bar span { background: var(--dn); }
.oq-v { text-align: right; } .oq-p { text-align: right; font-size: 11px; }
.oq-ax { position: absolute; font-size: 10px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.oq-ax-y, .oq-ax-y2 { left: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
.oq-ax-y { top: 20%; } .oq-ax-y2 { bottom: 30%; }
.oq-ax-x { bottom: 4px; left: 50%; transform: translateX(-40%); white-space: nowrap; }
.oq-key { margin: 8px 0 0; }
@media (max-width: 560px) { .oq-grid { grid-template-columns: 1fr; padding-left: 0; } .oq-ax { display: none; } }

/* ---- Build-up live: site colours instead of the dark panel ---- */
.bu-wrap { background: var(--panel); color: var(--text); border-color: var(--line); }
.bu-head { color: var(--muted); } .bu-head b { color: var(--text); }
.bu-q { background: var(--panel2); border: 1px solid var(--line); border-top: 1px solid var(--line); }
.bu-q h3 { color: var(--text); } .bu-q h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bu); margin: 5px 6px 0 0; flex: none; }
.bu-q h3 { justify-content: flex-start; } .bu-q h3 span { margin-left: auto; color: var(--muted); }
.bu-row a, .bu-bar b { color: var(--text); } .bu-num, .bu-empty { color: var(--muted); }
.bu-live { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); vertical-align: 2px; }
.bu-live[hidden] { display: none; }

/* Brokers page, signed out: the brokers on offer */
#bc-grid:has(.bc-public) { display: grid; gap: 10px; grid-template-columns: 1fr; }
.bc-public { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--panel); }
.bc-public p { margin: 2px 0 0; }
@media (max-width: 560px) { .bc-public { grid-template-columns: auto 1fr; } .bc-public .btn { grid-column: 1 / -1; } }

/* ---- top-bar broker switcher ---- */
.bk-pill { gap: 8px; padding: 3px 10px 3px 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.bk-pill:hover { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.bk-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font: 700 10px/1 var(--font-head); letter-spacing: .02em; flex: none; }
.bk-logo-empty { background: var(--panel2); color: var(--muted); font-size: 14px; }
.bk-txt { display: grid; line-height: 1.15; text-align: left; }
.bk-txt b { font-size: 12px; font-weight: 600; } .bk-txt small { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.bk-pill .bk-txt .bk-dot { width: 6px; height: 6px; }
.bk-menu { min-width: 320px; padding: 0; overflow: hidden; background: var(--panel); box-shadow: 0 16px 40px rgb(22 24 29 / .14); }
.bk-menu-top { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel2); }
.bk-menu-top b { display: block; font-size: 13px; } .bk-menu-top small { color: var(--muted); font-size: 11px; }
.bk-menu-list { padding: 6px; display: grid; gap: 2px; }
.bk-mi { grid-template-columns: auto 1fr auto 14px; gap: 10px; padding: 8px; font-weight: 400; }
.bk-mi.on { background: color-mix(in srgb, var(--acc) 8%, transparent); font-weight: 400; }
.bk-mi-txt { display: grid; text-align: left; line-height: 1.25; } .bk-mi-txt b { font-size: 13px; } .bk-mi-txt small { font-size: 11px; color: var(--muted); }
.bk-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.bk-chip.g { color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); }
.bk-chip.r { color: var(--dn); background: color-mix(in srgb, var(--dn) 12%, transparent); }
.bk-chip.x { color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.bk-mi i { color: var(--acc); }
.bk-manage { display: block; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--acc); text-decoration: none; }
.bk-manage:hover { background: var(--panel2); }

/* ---- top-bar market status: one badge (state, next open / last update) ---- */
.status #dot, .status #updated { display: none; }  /* folded into the badge */
.top #stream.ms { display: inline-flex; }
body .top #stream.ms { color: var(--text); border-color: var(--line); }  /* not the old 'socket on = green' pill rule */
body .top #stream.ms-live { border-color: color-mix(in srgb, var(--up) 35%, var(--line)); }
.ms { align-items: center; gap: 8px; padding: 3px 12px 3px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.ms-txt { display: grid; line-height: 1.15; } .ms-txt b { font-size: 12px; font-weight: 600; } .ms-txt small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ms-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ms); flex: none; }
.ms-live { --ms: var(--up); border-color: color-mix(in srgb, var(--up) 35%, var(--line)); }
.ms-live .ms-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--up); opacity: 0; animation: ms-ping 1.6s ease-out infinite; }
.ms-delayed { --ms: var(--warn, #C98A2B); } .ms-down { --ms: var(--dn); } .ms-closed { --ms: var(--muted); }
@keyframes ms-ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ms-live .ms-dot::after { animation: none; } }

/* ---- top-bar account chip and menu ---- */
#acct { position: relative; }
.ac-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.ac-chip:hover { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.ac-av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #4F7BFF, #2440E0); color: #fff; font: 700 10px/1 var(--font-head); flex: none; }
.ac-av.lg { width: 36px; height: 36px; font-size: 13px; }
.ac-txt { display: grid; line-height: 1.15; text-align: left; } .ac-txt b { font-size: 12px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-txt small, .ac-top small { font-size: 10.5px; color: var(--muted); }
.ac-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: 0 16px 40px rgb(22 24 29 / .14); overflow: hidden; }
.ac-top { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.ac-top b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.ac-list { display: grid; padding: 6px; gap: 2px; }
.ac-mi { display: grid; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; line-height: 1.25; }
.ac-mi b { font-size: 13px; font-weight: 500; } .ac-mi small { font-size: 11px; color: var(--muted); }
.ac-mi:hover, .ac-mi:focus-visible { background: var(--panel2); }
.ac-out { display: block; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--dn); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.ac-out:hover { background: var(--panel2); }
@media (max-width: 720px) { .ac-txt { display: none; } }

/* ================= Design upgrade patterns (design/audit) ================= */
/* A · tables */
table th { position: sticky; top: 0; z-index: 1; background: var(--panel); padding: 8px 6px; letter-spacing: .04em; }
table td { padding: 8px 6px; border-bottom-color: var(--panel2); }
table:not(.chain) tbody tr:hover td { background: color-mix(in srgb, var(--acc) 4%, transparent); }
td.hx-up, td.hx-dn { position: relative; font-weight: 500; }
td.hx-up { color: var(--up); background: color-mix(in srgb, var(--up) calc(var(--hx) * 18%), transparent); }
td.hx-dn { color: var(--dn); background: color-mix(in srgb, var(--dn) calc(var(--hx) * 18%), transparent); }
tr.tbl-empty td { text-align: center; padding: 28px 12px; color: var(--muted); white-space: normal; }
tr.tbl-empty b { display: block; color: var(--text); font-size: 13px; margin: 6px 0 2px; } tr.tbl-empty small { font-size: 12px; }
tr.tbl-empty:hover td { background: none; }

/* B · empty states */
.es { display: grid !important; justify-items: center; text-align: center; gap: 4px; padding: 28px 16px !important; color: var(--text) !important; font-size: 13px !important; font-weight: 500; white-space: normal !important; }
.es::before, .es-ic { content: ""; display: inline-block; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--acc) 9%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5BFF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 12h4l3-8 4 16 3-8h4'/%3E%3C/svg%3E") center / 20px no-repeat; }
.es[data-sub]::after { content: attr(data-sub); color: var(--muted); font-size: 12px; font-weight: 400; }

/* C · KPI tiles */
.kpi { padding: 12px 14px; border-radius: var(--r2); transition: border-color .15s; }
.kpi:hover { border-color: color-mix(in srgb, var(--acc) 30%, var(--line)); }
.kpi b { font-size: 11.5px; letter-spacing: .02em; }
.kpi span { font: 600 21px/1.2 var(--font-head); letter-spacing: -.02em; margin-top: 4px; }
.kpi small { color: var(--muted); }

/* D · chart cards */
.card > h2:first-child, .card > .row-between:first-child h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card h2 .muted, .card h2 small { font-weight: 400; }
.legend { gap: 8px; } .legend > span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.svgbox, .card canvas { border-radius: 8px; }

/* E · sign-in screens */
.sg { display: grid !important; grid-template-columns: 1.1fr 1fr; padding: 0 !important; overflow: hidden; }
.sg-l { padding: 32px; } .sg-l h2 { font-size: 22px; letter-spacing: -.02em; margin: 10px 0 8px; } .sg-l p { color: var(--muted); margin: 0 0 18px; max-width: 460px; }
.sg-tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.sg-step { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.sg-step > span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 12px; color: var(--acc); background: color-mix(in srgb, var(--acc) 9%, transparent); }
.sg-step b { display: block; font-size: 13px; } .sg-step small { color: var(--muted); }
.sg-r { padding: 28px; border-left: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 6%, var(--panel)), var(--bg)); }
.sg-r > small { display: block; color: var(--muted); margin-bottom: 8px; }
.sg-r table { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (max-width: 760px) { .sg { grid-template-columns: 1fr; } .sg-r { border-left: 0; border-top: 1px solid var(--line); } }

/* F · forms and calculators */
#page-calc label, #page-tools label { font-size: 12px; color: var(--muted); }
#page-calc .inp, #page-tools .inp, #page-calc select, #page-tools select, #page-calc input, #page-tools input { border-radius: 9px; padding: 8px 10px; font-size: 13px; }
#page-calc .inp:focus, #page-tools .inp:focus, #page-calc input:focus, #page-tools input:focus { outline: 2px solid color-mix(in srgb, var(--acc) 35%, transparent); outline-offset: 1px; border-color: var(--acc); }
/* Sectors: index table fits its card (no sideways scrollbar): tighter cells, "vs NIFTY" wraps to two lines */
#s-idx :is(td, th) { padding: 8px 6px; }
#s-idx td:nth-child(7) { white-space: normal; min-width: 96px; }

/* No sideways scrollbar on any table: text cells may wrap (numbers have no spaces, so they stay on one line);
   a table that is still wider than its card scrolls by trackpad/touch without showing a bar. */
table:not(.chain) td:not(.num) { white-space: normal; }
table:not(.chain) th { white-space: normal; }
:is(.tbl-wrap, .card, div):has(> table)::-webkit-scrollbar:horizontal { height: 0; }
/* tables that also scroll up-down keep their vertical bar (webkit rule above hides only the sideways one) */
.tbl-wrap:not(.o-chain-wrap):not(#page-futures .tbl-wrap):not(#page-chainpro .tbl-wrap) { scrollbar-width: none; }
@media (max-width: 1300px) { #sth-tbl :is(td, th, td *) { font-size: 11px; } #sth-tbl :is(td, th) { padding-left: 4px; padding-right: 4px; } }  /* Stealth: all columns fit a laptop screen */
#sth-tbl td, #jr-rows td { white-space: normal; }   /* long "was … · … of chain" notes wrap instead of widening the table */
#jr-rows select { max-width: 120px; }
@media (max-width: 1300px) { #jr-rows :is(td, th) { padding-left: 4px; padding-right: 4px; font-size: 12px; } }
/* SMC map: the map scales to its box (it is an SVG with a viewBox) instead of a 980px minimum and a scrollbar; full screen shows it larger */
.smf-map .smmap-svg, .smmap-svg { min-width: 0; }
.smf-map { overflow-x: hidden; }
/* Option Chain page: the chain table now lives on its own page (#ochain, "Chain Table"); this page keeps the stats and OI charts */
#page-options:not(.chain-only) #o-chain-card { display: none; }

/* Straddle toolbar: symbols, then labelled expiry / strike / candle on one line */
.sd-bar { display: grid; gap: 12px; padding: 12px 14px; }
.sd-bar .sym-chips { flex-wrap: wrap; }
.sd-ctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; padding-top: 10px; border-top: 1px solid var(--line); }
.sd-f { display: grid; gap: 4px; } .sd-f > span { font-size: 11px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.sd-f select { min-width: 150px; height: 34px; padding: 0 10px; border-radius: 9px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel2); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgb(22 24 29 / .08); }
.seg button:hover:not(.on) { color: var(--text); }
#page-straddle > section.row-between { order: -2; } #page-straddle > .sd-bar { order: -1; }  /* toolbar right under the title, above the readings */
.sg[hidden], .es[hidden] { display: none !important; }  /* the !important layouts above must not beat the hidden attribute */

/* chain: build-up column as a compact tag (LB / SB / SC / LU, full name on hover) */
#o-chain td.bu-cell { text-align: center; }
#o-chain td.bu-cell .tag { display: inline-block; min-width: 26px; padding: 1px 6px; border-radius: 6px; font: 600 10.5px/1.5 var(--font-head);
  background: color-mix(in srgb, currentColor var(--d, 12%), transparent); }
#o-chain td.bu-cell .tag.strong { color: #fff; }  /* biggest OI changes: solid tag, white text */
#o-chain td.bu-cell .tag.strong.up { background: var(--up); } #o-chain td.bu-cell .tag.strong.dn { background: var(--dn); }
@media (max-width: 1300px) { #page-options #o-chain td small.muted { display: none; } }  /* laptop: IV cell drops the delta (kept in its tooltip) so the 15 columns fit */
@media (max-width: 1300px) { #page-options #o-chain td.pick small { display: block; line-height: 1.1; } }  /* laptop: premium change sits under the price */

/* Sidebar icons: logo blue tiles (Ribbon S gradient #4F7BFF -> #2440E0); the open page gets the full logo gradient */
.side .nav a i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; opacity: 1; font-size: 12px;
  color: #2440E0; background: color-mix(in srgb, #4F7BFF 14%, transparent); }
.side .nav a.on i { color: #fff; background: linear-gradient(135deg, #4F7BFF, #2440E0); }
/* chain heat in the logo blue: volume like the OI bars (OI change keeps green/red: it shows direction) */
.chain td.heat.vol { background: color-mix(in srgb, #4F7BFF min(100%, calc(var(--a) * 40% * var(--hk, 1))), transparent); }

/* ================= Sign in / create account + landing (bento) ================= */
dialog.auth { padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text); width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 30px 80px rgb(22 24 29 / .25); }
dialog.auth::backdrop { background: rgb(22 24 29 / .45); backdrop-filter: blur(3px); }
.au-wrap { display: grid; grid-template-columns: 1fr 400px; gap: 20px; padding: 24px; }
.au-bento { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.au-head { grid-column: 1 / -1; display: grid; gap: 10px; }
.au-brand { display: flex; align-items: center; gap: 10px; } .au-brand b { font-size: 18px; letter-spacing: -.02em; display: block; } .au-brand small { color: var(--muted); font-size: 11px; }
.au-head h1 { margin: 2px 0 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.03em; }
.au-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.au-box > b { font-size: 14px; } .au-box p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.au-tags { display: flex; gap: 6px; } .au-tags span { font: 600 12px/1 var(--font-head); padding: 7px 10px; border-radius: 8px; }
.t-lb { background: var(--up); color: #fff; } .t-sb { background: var(--dn); color: #fff; } .t-sc { background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); } .t-lu { background: color-mix(in srgb, var(--dn) 18%, transparent); color: var(--dn); }
.au-gam { width: 100%; height: 72px; } .au-gam .ax { stroke: var(--line); } .au-gam .ln { fill: none; stroke: #2440E0; stroke-width: 2.5; } .au-gam .fl { stroke: #C98A2B; stroke-dasharray: 3 3; }
.au-chain { display: grid; gap: 5px; font: 500 11.5px/1.3 var(--mono, monospace); }
.au-chain > div { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 8px; align-items: center; } .au-chain .h { color: var(--muted); font-size: 11px; } .au-chain .h span:first-child { text-align: right; }
.au-chain b, .au-chain .h span:nth-child(2) { text-align: center; }
.au-chain i { height: 8px; border-radius: 4px; justify-self: end; width: var(--w); background: #2440E0; } .au-chain i.c { background: var(--dn); } .au-chain i.p { justify-self: start; background: var(--up); }
.au-chain .atm b { background: #2440E0; color: #fff; border-radius: 5px; }
.au-byob { background: linear-gradient(135deg, #4F7BFF, #2440E0); border: 0; color: #fff; } .au-byob p { color: rgb(255 255 255 / .85); }
.au-fine { grid-column: 1 / -1; margin: 0; font-size: 11px; color: var(--muted); }
.au-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; display: grid; gap: 12px; align-content: start; box-shadow: 0 24px 60px rgb(22 24 29 / .08); }
.au-tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel2); }
.au-tabs button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.au-tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgb(22 24 29 / .08); }
.au-card h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; } .au-sub { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.au-f { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.au-f .inp { height: 44px; padding: 0 12px; border-radius: 11px; font-size: 14px; width: 100%; }
.au-pw { position: relative; display: block; } .au-pw .inp { padding-right: 68px; }
.au-eye { position: absolute; right: 6px; top: 7px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--panel2); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.au-meter { display: grid; gap: 4px; } .au-meter span { height: 4px; border-radius: 4px; background: var(--panel2); position: relative; overflow: hidden; }
.au-meter span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--s, 0) * 25%); background: var(--c, var(--dn)); transition: width .2s; }
.au-meter[data-s="1"] { --s: 1; } .au-meter[data-s="2"] { --s: 2; --c: #C98A2B; } .au-meter[data-s="3"] { --s: 3; --c: var(--up); } .au-meter[data-s="4"] { --s: 4; --c: var(--up); }
.au-meter small { color: var(--muted); font-size: 11px; }
.au-go { height: 46px; border-radius: 11px; font-size: 14px; margin-top: 4px; background: linear-gradient(135deg, #4F7BFF, #2440E0); border: 0; color: #fff; }
.au-switch { margin: 0; text-align: center; }
#auth-err:not(:empty) { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--dn) 10%, transparent); }
dialog.auth.landing { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
dialog.auth.landing::backdrop { background: var(--bg); }
dialog.auth.landing .au-wrap { min-height: 100dvh; max-width: 1240px; margin: 0 auto; padding: clamp(20px, 4vw, 48px); align-items: center; grid-template-columns: 1fr 420px; gap: 28px; }
@media (max-width: 900px) { .au-wrap, dialog.auth.landing .au-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .au-bento { grid-template-columns: 1fr; } .au-box:nth-of-type(3) { display: none; } }

/* landing: top bar, hero band, how it works, footer (only on the full-screen landing) */
dialog.auth:not(.landing) :is(.au-top, .au-heroband, .au-how, .au-foot) { display: none; }
.au-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px clamp(20px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.au-top nav { display: flex; gap: 8px; align-items: center; } .au-top nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; padding: 0 10px; }
.au-top .btn { height: 38px; padding: 0 14px; border-radius: 10px; }
.au-cta { background: linear-gradient(135deg, #4F7BFF, #2440E0); color: #fff; border: 0; font-weight: 600; }
.au-heroband { max-width: 1240px; margin: 0 auto; padding: clamp(36px, 7vw, 88px) clamp(20px, 4vw, 48px) 24px; display: grid; gap: 18px; justify-items: start; }
.au-kicker { font-size: 12px; font-weight: 600; color: #2440E0; background: color-mix(in srgb, #4F7BFF 12%, transparent); padding: 5px 12px; border-radius: 99px; }
.au-heroband h1 { margin: 0; font-size: clamp(32px, 5vw, 60px); line-height: 1.08; letter-spacing: -.035em; max-width: 16ch; } .au-heroband h1 em { font-style: normal; color: #2440E0; }
.au-heroband > p { margin: 0; font-size: clamp(15px, 1.4vw, 18px); color: var(--muted); max-width: 60ch; line-height: 1.55; }
.au-ctas { display: flex; gap: 10px; flex-wrap: wrap; } .au-ctas .btn { height: 46px; padding: 0 20px; border-radius: 11px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.au-stats { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; margin: 12px 0 0; } .au-stats dt { font: 700 clamp(22px, 2.4vw, 30px)/1 var(--font-head); letter-spacing: -.02em; } .au-stats dd { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.au-how { max-width: 1240px; margin: 0 auto; padding: 24px clamp(20px, 4vw, 48px) 40px; } .au-how h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 14px; }
.au-how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.au-how li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 4px; }
.au-how li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: #2440E0; background: color-mix(in srgb, #4F7BFF 12%, transparent); margin-bottom: 6px; }
.au-how li span { color: var(--muted); font-size: 13px; }
.au-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 28px clamp(20px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: center; }
.au-foot nav { display: flex; gap: 18px; } .au-foot nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.au-foot p { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
dialog.auth.landing { overflow: auto; } dialog.auth.landing .au-wrap { min-height: 0; }
.au-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; } .au-or::before, .au-or::after { content: ""; height: 1px; background: var(--line); }
.au-or[hidden], .au-google[hidden] { display: none; }
.au-google { height: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; background: var(--panel); border: 1px solid var(--line); }
.au-google:hover { border-color: color-mix(in srgb, #2440E0 40%, var(--line)); }
@media (max-width: 760px) { .au-top nav a { display: none; } .au-how ol { grid-template-columns: 1fr; } .au-foot { grid-template-columns: 1fr; } }
dialog.auth.landing .au-head .au-brand { display: none; }  /* the top bar already shows the logo */
