[hidden] { display: none !important; }
:root {
    --bg: #0b0b0d; --card: #141417; --card-2: #1b1b20; --line: #2a2a31; --text: #f2f0ea; --muted: #a09d94;
    --gold: #d6b25e; --gold-2: #f0d38a; --gold-ink: #1a1405; --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --info: #7dd3fc;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; background: radial-gradient(1200px 600px at 50% -200px, #2a2210 0%, var(--bg) 60%) no-repeat, var(--bg);
    color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--gold-2); }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; margin: .75rem 0 0; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto; padding: 20px 16px 0; }
.brand img { display: block; height: 72px; width: auto; }
.signout { display: flex; align-items: center; gap: .75rem; font-size: .875rem; }
.link { background: none; border: 0; color: var(--gold-2); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; font-size: .8rem; text-align: center; }

.hero { padding: 16px 0 20px; }
.card { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card.subtle { background: transparent; }
.card.narrow { max-width: 440px; }
.stack > * + * { margin-top: 14px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-size: .8rem; font-weight: 700; flex: none; }

.field { display: block; }
.field span { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0f0f12; color: var(--text); font: inherit; }
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: 13px 22px; border-radius: 10px; border: 0; cursor: pointer;
    background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); font: 600 1rem/1.2 inherit; font-family: inherit; text-decoration: none;
    box-shadow: 0 6px 20px -8px rgba(214, 178, 94, .6); transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.wide { width: 100%; }
.btn.paypal { background: linear-gradient(180deg, #ffd666, #ffc439); }

.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.alert.bad { border-color: #7f1d1d; background: rgba(127, 29, 29, .25); color: #fecaca; }
.alert.ok { border-color: #166534; background: rgba(22, 101, 52, .25); color: #bbf7d0; }
.alert.info { border-color: #075985; background: rgba(7, 89, 133, .22); color: #e0f2fe; }
.alert.warn { border-color: #854d0e; background: rgba(133, 77, 14, .22); color: #fef3c7; }

.account .acct-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.value { font-weight: 600; overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pill.ok { background: rgba(74, 222, 128, .15); color: var(--ok); }
.pill.bad { background: rgba(248, 113, 113, .15); color: var(--bad); }

.options { display: grid; gap: 10px; }
.terms, .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.terms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.conns { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; }
.opt-body { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #101013; transition: border-color .12s, background .12s; }
.option.small .opt-body { align-items: center; text-align: center; padding: 10px 6px; }
.option:hover .opt-body { border-color: #4a4537; }
.option input:checked + .opt-body { border-color: var(--gold); background: rgba(214, 178, 94, .1); box-shadow: inset 0 0 0 1px var(--gold); }
.option input:focus-visible + .opt-body { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.opt-title { font-weight: 700; }
.opt-price { font-size: 1.35rem; font-weight: 700; color: var(--gold-2); }
.opt-sub { font-size: .8rem; color: var(--muted); min-height: 1em; }
.opt-sub.save { color: var(--ok); }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.fair-use { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px solid #854d0e; background: rgba(133, 77, 14, .15); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.track { width: 46px; height: 26px; border-radius: 999px; background: #33333b; position: relative; flex: none; transition: background .15s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--gold); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold-2); outline-offset: 2px; }

.total-bar { position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    border-color: #4a4537; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
.total { font-size: 1.8rem; font-weight: 800; color: var(--gold-2); line-height: 1.1; }
.total-bar .hint { margin-top: 2px; }

.summary, .bank { margin: 0; display: grid; gap: 0; }
.summary > div, .bank > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary > div:last-child, .bank > div:last-child { border-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; text-align: right; display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.summary .big dd { font-size: 1.4rem; color: var(--gold-2); }
.copy { border: 1px solid var(--line); background: #101013; color: var(--text); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.copy.done { border-color: var(--ok); color: var(--ok); }

@media (max-width: 640px) {
    .account .acct-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .methods { grid-template-columns: 1fr; }
    .total-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .brand img { height: 60px; }
}

/* ---- portal (v3) ---- */
.nav { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.nav form { margin: 0; }
.small { font-size: .8rem; }
.block { display: block; }
.okc { color: var(--ok); }
.text { color: var(--text); }
.btn.secondary { background: #24242b; color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.split { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.split .card { margin-bottom: 0; }
.tg-login { min-height: 44px; }
.tg-login.inline { margin-top: 10px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 18px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card-2), var(--card)); color: var(--text); text-decoration: none; margin: 0; }
.choice.primary { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .4); }
.choice-title { font-size: 1.2rem; font-weight: 700; }
.choice-text { color: var(--muted); flex: 1; }
.choice .btn { align-self: flex-start; }
.badge { position: absolute; top: -10px; right: 16px; background: var(--gold); color: var(--gold-ink); font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.toolbar input, .toolbar select, .field select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0f0f12; color: var(--text); font: inherit; }
.toolbar input { flex: 1; min-width: 0; }
.accounts { display: grid; gap: 12px; margin-bottom: 16px; }
.acct { margin: 0; padding: 16px 18px; }
.acct-head { display: flex; align-items: center; gap: 12px; }
.acct-name { flex: 1; min-width: 0; }
.acct-user { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: rgba(214, 178, 94, .18); color: var(--gold-2); }
.tag.dim { background: #26262d; color: var(--muted); }
.pill.warn { background: rgba(251, 191, 36, .15); color: var(--warn); }
.pick { position: relative; width: 24px; height: 24px; flex: none; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick span { display: block; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #4a4a55; transition: all .12s; }
.pick input:checked + span { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--card-2); }
.pick input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.facts > div { display: block; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.facts dd { display: block; text-align: left; font-weight: 600; }
.facts dd .small { display: block; font-weight: 400; }
.creds { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.creds summary { cursor: pointer; color: var(--gold-2); font-size: .9rem; }
.creds .bank { margin-top: 6px; }
.reveal { border: 1px solid var(--line); background: #101013; color: var(--text); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.acct-actions { margin-top: 12px; display: flex; justify-content: flex-end; }

.item { padding: 16px 18px; }
.item-head { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.item-head input { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.item-name { font-weight: 700; font-size: 1.1rem; }
.item-sub { margin-left: auto; font-weight: 700; color: var(--gold-2); }
.item-body { margin-top: 14px; }
.item-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline span { margin: 0; }
.suggest { border: 1px dashed #5a4f30; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; background: rgba(214, 178, 94, .04); }
.suggest .item { background: var(--card); }
.suggest .item:last-child { margin-bottom: 0; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.add-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }

@media (max-width: 720px) {
    .split, .choices { grid-template-columns: 1fr; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .add-form { grid-template-columns: 1fr; }
    .item-sub { margin-left: 0; width: 100%; }
}
.pick-none { width: 24px; flex: none; }
.toolbar select { flex: none; width: auto; }
@media (max-width: 720px) {
    .toolbar { flex-direction: column; }
    .total-bar.compact { flex-direction: row; align-items: center; text-align: left; padding: 12px 16px; }
    .total-bar.compact .total { font-size: 1.4rem; }
}
