/* NPPE Prep — app shell (nav + footer) and in-app components.
   Pairs with design-system.css. Shell markup is injected by app.js. */

/* ============================================================================
   APP BAR
   ========================================================================== */
.appbar { position: sticky; top: 0; z-index: 40; background: var(--ink); color: var(--paper);
    border-bottom: 1px solid var(--line-dark); }
.appbar__in { width: min(100% - 2.5rem, 1240px); margin-inline: auto; height: 64px;
    display: flex; align-items: center; gap: 2rem; }
.appbar .wm { display: flex; align-items: center; gap: 0.65rem; }
.appbar .wm .mk { width: 30px; height: 30px; border: 1.5px solid var(--signal); color: var(--signal);
    display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; }
.appbar .wm b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 0.4rem; margin-left: 0.5rem; }
.nav a { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: #A0A7B3; padding: 0.5rem 0.8rem; position: relative; transition: color 0.2s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.35rem; height: 1.5px;
    background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 0.24s var(--ease-mech); }
.nav a:hover { color: var(--paper); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--paper); }

.appbar__right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.lang { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: #A0A7B3;
    display: flex; gap: 0.35rem; align-items: center; }
.lang button { color: #A0A7B3; padding: 0.2rem 0.3rem; }
.lang button.on { color: var(--signal); }
.lang .sep { opacity: 0.4; }

.profile { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line-dark);
    border-radius: var(--radius); cursor: pointer; position: relative; transition: border-color 0.2s var(--ease); }
.profile:hover { border-color: #4A515E; }
.avatar { width: 30px; height: 30px; background: var(--signal); color: #fff; display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; border-radius: 2px; }
.profile .who { line-height: 1.1; }
.profile .who b { font-size: 0.82rem; font-weight: 600; display: block; }
.profile .who span { font-family: var(--font-mono); font-size: 0.62rem; color: #A0A7B3; letter-spacing: 0.04em; }
.profile .caret { color: #A0A7B3; }

.menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: var(--ink-2);
    border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 0.4rem; z-index: 50;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.18s var(--ease); }
.menu.open { opacity: 1; visibility: visible; transform: none; }
.menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem; font-size: 0.85rem; color: #C6CBD3;
    border-radius: 2px; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.menu a:hover { background: rgba(255,255,255,0.05); color: var(--paper); }
.menu a svg { width: 15px; height: 15px; color: #808894; }
.menu .sep { height: 1px; background: var(--line-dark); margin: 0.35rem 0; }
.menu a.danger { color: #E98A7A; }

.burger { display: none; color: var(--paper); padding: 0.4rem; }
.burger svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
    .nav, .appbar .profile .who, .lang { display: none; }
    .burger { display: block; }
    .nav.mobile-open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
        align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line-dark); padding: 0.5rem; }
    .nav.mobile-open a { padding: 0.9rem 1rem; }
    .nav.mobile-open a::after { display: none; }
}

/* ============================================================================
   PAGE + FOOTER
   ========================================================================== */
.page { width: min(100% - 2.5rem, 1240px); margin-inline: auto; padding: clamp(1.8rem, 4vw, 3rem) 0 4rem; }
.page--grid { background:
    linear-gradient(rgba(201,204,209,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,204,209,0.35) 1px, transparent 1px);
    background-size: 28px 28px; }

.appfoot { border-top: 1px solid var(--line); background: var(--paper-2); }
.appfoot__in { width: min(100% - 2.5rem, 1240px); margin-inline: auto; padding: 2rem 0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.appfoot .wm { display: flex; align-items: center; gap: 0.6rem; }
.appfoot .wm .mk { width: 26px; height: 26px; border: 1.5px solid var(--ink); color: var(--ink);
    display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem; }
.appfoot .wm b { font-family: var(--font-display); font-weight: 600; }
.appfoot nav { display: flex; gap: 1.4rem; }
.appfoot nav a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--slate); }
.appfoot nav a:hover { color: var(--signal); }
.appfoot .copy { font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate-2); letter-spacing: 0.04em; width: 100%;
    border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }

/* ============================================================================
   DASHBOARD
   ========================================================================== */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 2.4rem; }
.welcome h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
.welcome h1 em { font-style: normal; color: var(--signal); }
.welcome .sub { color: var(--slate); margin-top: 0.5rem; }

.readouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .readouts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .readouts { grid-template-columns: 1fr; } }
.readout { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 1.3rem; position: relative; overflow: hidden; }
.readout .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--slate-2); display: flex; align-items: center; justify-content: space-between; }
.readout .k svg { width: 16px; height: 16px; color: var(--slate-2); }
.readout .val { font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; letter-spacing: -0.02em;
    line-height: 1; margin-top: 1.4rem; }
.readout .val small { font-size: 1.1rem; color: var(--slate-2); font-weight: 500; }
.readout .foot { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate); margin-top: 0.5rem; }
.readout .dial { position: absolute; top: 1rem; right: 1rem; width: 60px; height: 60px; }
.readout .dial circle { fill: none; }
.readout .dial .track { stroke: var(--line); stroke-width: 5; }
.readout .dial .fill { stroke: var(--signal); stroke-width: 5; stroke-linecap: round;
    stroke-dasharray: 162.31; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 30px 30px;
    transition: stroke-dashoffset 1.1s var(--ease-mech); }

/* section header */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 2.6rem 0 1.1rem; }
.sec-head h2 { font-size: 1.35rem; }
.sec-head .eyebrow { margin-bottom: 0.3rem; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* attempts log */
.log { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.log__row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1rem;
    padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); transition: background 0.15s var(--ease); }
.log__row:last-child { border-bottom: 0; }
.log__row:hover { background: rgba(23,25,31,0.02); }
.log__tick { width: 30px; height: 30px; border-radius: 2px; display: grid; place-items: center; }
.log__tick svg { width: 15px; height: 15px; color: #fff; }
.log__tick.pass { background: var(--pass); }
.log__tick.fail { background: var(--fail); }
.log__title b { font-weight: 600; font-size: 0.95rem; display: block; }
.log__title span { font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate-2); letter-spacing: 0.05em; }
.log__date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate-2); }
.log__score { font-family: var(--font-mono); font-weight: 500; font-size: 0.95rem; text-align: right; min-width: 68px; }
.log__score span { font-size: 0.68rem; color: var(--slate-2); display: block; }

/* side rail */
.rail { display: grid; gap: 1rem; }
.action { display: flex; align-items: center; gap: 0.9rem; background: var(--card); border: 1.5px solid var(--line);
    border-radius: var(--radius); padding: 1rem 1.2rem; transition: border-color 0.2s var(--ease), transform 0.15s var(--ease); }
.action:hover { border-color: var(--ink); transform: translateX(3px); }
.action .ic { width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 2px; display: grid; place-items: center;
    color: var(--signal); flex-shrink: 0; }
.action .ic svg { width: 19px; height: 19px; }
.action .tx b { display: block; font-weight: 600; font-size: 0.92rem; }
.action .tx span { font-size: 0.8rem; color: var(--slate-2); }
.action .arrow { margin-left: auto; color: var(--slate-2); }

/* resume panel */
.resume { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 1.5rem; position: relative;
    overflow: hidden; }
.resume .eyebrow { color: var(--signal); }
.resume h3 { font-size: 1.25rem; margin: 0.7rem 0 0.3rem; color: var(--paper); }
.resume p { color: #A0A7B3; font-size: 0.88rem; margin-bottom: 1.2rem; }
.resume .bar { height: 5px; background: var(--line-dark); border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.resume .bar i { display: block; height: 100%; background: var(--signal); width: 0; transition: width 1.1s var(--ease-mech); }
.resume .barlbl { font-family: var(--font-mono); font-size: 0.68rem; color: #A0A7B3; letter-spacing: 0.06em; margin-bottom: 1.2rem; }

/* module spine */
.spine { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.spine__track { display: flex; gap: 4px; margin-top: 1rem; }
.spine__seg { flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
    position: relative; overflow: hidden; }
.spine__seg.done { border-color: var(--signal); background: var(--signal-wash); }
.spine__seg.done::after { content: ""; position: absolute; inset: 0; background: var(--signal); opacity: 0.55;
    transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-mech); }
.spine.is-in .spine__seg.done::after { transform: scaleY(1); }
.spine__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; }
.spine__meta .n { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; }
.spine__meta .n small { color: var(--slate-2); font-size: 1rem; }

/* ============================================================================
   PAGE HEADER (shared across in-app pages)
   ========================================================================== */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 2.2rem; }
.phead h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.phead h1 em { font-style: normal; color: var(--signal); }
.phead .sub { color: var(--slate); margin-top: 0.45rem; max-width: 60ch; }
.phead .eyebrow { margin-bottom: 0.5rem; }
.backlink { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.74rem;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); margin-top: 2rem; }
.backlink:hover { color: var(--signal); }
.count-chip { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--slate);
    border: 1px solid var(--line); border-radius: 2px; padding: 0.35rem 0.6rem; display: inline-flex; gap: 0.5rem; align-items: center; }

/* ============================================================================
   EXAM GRID
   ========================================================================== */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.2rem; }
.exam-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.exam-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 20px 40px -28px rgba(23,25,31,0.5); }
.exam-card__top { background: var(--ink); color: var(--paper); padding: 0.9rem 1.2rem; display: flex; align-items: center;
    justify-content: space-between; }
.exam-card__top .code { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--signal); }
.exam-card__body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.exam-card h3 { font-size: 1.12rem; }
.exam-card p { color: var(--slate); font-size: 0.9rem; margin: 0.5rem 0 1.1rem; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.exam-card__meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--slate-2); letter-spacing: 0.05em;
    display: flex; gap: 1rem; margin-bottom: 1.1rem; }

/* tips row */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
@media (max-width: 760px) { .tips { grid-template-columns: 1fr; } }
.tip { border: 1px solid var(--line); border-left: 2px solid var(--signal); border-radius: var(--radius);
    padding: 1.1rem 1.2rem; background: var(--card); }
.tip .n { font-family: var(--font-mono); color: var(--signal); font-size: 0.75rem; letter-spacing: 0.1em; }
.tip b { display: block; margin: 0.4rem 0 0.2rem; }
.tip span { font-size: 0.85rem; color: var(--slate); }

/* ============================================================================
   TAKE EXAM — instrument panel
   ========================================================================== */
.take-head { position: sticky; top: 64px; z-index: 20; background: var(--ink); color: var(--paper);
    border-bottom: 1px solid var(--line-dark); }
.take-head__in { width: min(100% - 2.5rem, 900px); margin-inline: auto; padding: 1rem 0;
    display: flex; align-items: center; gap: 1.5rem; }
.take-head .meta { flex: 1; }
.take-head .eyebrow { color: var(--signal); }
.take-head h1 { font-size: 1.25rem; color: var(--paper); margin-top: 0.2rem; }
.take-gauge { text-align: right; font-family: var(--font-mono); }
.take-gauge .big { font-size: 1.5rem; font-weight: 600; }
.take-gauge .lbl { font-size: 0.66rem; color: #A0A7B3; letter-spacing: 0.1em; }
.take-progress { height: 4px; background: var(--line-dark); }
.take-progress i { display: block; height: 100%; background: var(--signal); width: 0; transition: width 0.4s var(--ease-mech); }

.take-body { width: min(100% - 2.5rem, 900px); margin-inline: auto; padding: 2rem 0 4rem; }
.q-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 1.2rem; overflow: hidden; }
.q-card__head { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.q-num { width: 34px; height: 34px; background: var(--ink); color: var(--paper); display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; border-radius: 2px; }
.q-card__head .of { font-family: var(--font-mono); font-size: 0.72rem; color: var(--slate-2); letter-spacing: 0.06em; }
.q-status { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--slate-2);
    display: inline-flex; align-items: center; gap: 0.4rem; }
.q-status.done { color: var(--pass); }
.q-card__body { padding: 1.3rem; }
.q-text { font-size: 1.08rem; font-weight: 600; margin-bottom: 1.1rem; font-family: var(--font-display); letter-spacing: -0.01em; }
.opt { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.95rem 1.1rem; border: 1.5px solid var(--line);
    border-radius: var(--radius); cursor: pointer; margin-bottom: 0.7rem; transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.opt:hover { border-color: var(--slate-2); background: rgba(23,25,31,0.02); }
.opt input { position: absolute; opacity: 0; }
.opt .lab { width: 28px; height: 28px; border: 1.5px solid var(--line); border-radius: 2px; display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; flex-shrink: 0; transition: all 0.15s var(--ease); }
.opt .txt { padding-top: 0.15rem; }
.opt input:checked ~ .lab { background: var(--signal); border-color: var(--signal); color: #fff; }
.opt:has(input:checked) { border-color: var(--signal); background: var(--signal-wash); }
.opt input:focus-visible ~ .lab { outline: 2px solid var(--signal); outline-offset: 2px; }

.take-submit { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.3rem; margin-top: 1.5rem; }
.take-submit b { font-family: var(--font-display); font-size: 1.05rem; }
.take-submit p { font-size: 0.85rem; color: var(--slate-2); }

/* ============================================================================
   RESULTS
   ========================================================================== */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center;
    background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.4rem; }
@media (max-width: 640px) { .result-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } }
.result-ring { width: 148px; height: 148px; position: relative; }
.result-ring svg { width: 100%; height: 100%; }
.result-ring .track { fill: none; stroke: var(--line); stroke-width: 8; }
.result-ring .fill { fill: none; stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 74px 74px;
    stroke-dasharray: 414; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease-mech); }
.result-ring.pass .fill { stroke: var(--pass); }
.result-ring.fail .fill { stroke: var(--fail); }
.result-ring .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.result-ring .ctr .pct { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; line-height: 1; }
.result-ring .ctr .lb { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--slate-2); text-transform: uppercase; }
.result-verdict .eyebrow { margin-bottom: 0.6rem; }
.result-verdict h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.result-verdict h1 em { font-style: normal; }
.result-verdict.pass h1 em { color: var(--pass); }
.result-verdict.fail h1 em { color: var(--fail); }
.result-verdict p { color: var(--slate); margin-top: 0.5rem; }
.result-stats { display: flex; gap: 2rem; margin-top: 1.2rem; }
.result-stats .st .v { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.result-stats .st .k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--slate-2); text-transform: uppercase; }

.review-item { background: var(--card); border: 1.5px solid var(--line); border-left-width: 3px; border-radius: var(--radius);
    padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.review-item.ok { border-left-color: var(--pass); }
.review-item.no { border-left-color: var(--fail); }
.review-item__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.review-item .rtick { width: 26px; height: 26px; border-radius: 2px; display: grid; place-items: center; flex-shrink: 0; }
.review-item .rtick svg { width: 14px; height: 14px; color: #fff; }
.review-item.ok .rtick { background: var(--pass); }
.review-item.no .rtick { background: var(--fail); }
.review-item .qn { font-family: var(--font-mono); font-size: 0.7rem; color: var(--slate-2); letter-spacing: 0.08em; }
.review-item h3 { font-size: 1.02rem; font-family: var(--font-display); }
.ans { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-radius: var(--radius);
    font-size: 0.9rem; margin-bottom: 0.5rem; }
.ans .al { width: 24px; height: 24px; border-radius: 2px; display: grid; place-items: center; font-family: var(--font-mono);
    font-weight: 600; font-size: 0.76rem; background: #fff; flex-shrink: 0; }
.ans.mine-ok { background: var(--pass-wash); color: #1E5A40; }
.ans.mine-no { background: var(--fail-wash); color: #8A2C22; }
.ans.correct { background: var(--pass-wash); color: #1E5A40; }
.explain { font-size: 0.88rem; color: var(--slate); border-top: 1px dashed var(--line); padding-top: 0.8rem; margin-top: 0.7rem; }
.explain b { color: var(--ink); }

/* ============================================================================
   TABLE (payment history, etc.)
   ========================================================================== */
.tbl-wrap { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--slate-2); padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.tbl td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono { font-family: var(--font-mono); font-size: 0.85rem; }

/* ============================================================================
   PROFILE
   ========================================================================== */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }
.pcard { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.pcard.center { text-align: center; }
.big-avatar { width: 84px; height: 84px; margin: 0 auto 1rem; background: var(--ink); color: var(--paper);
    display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 2rem; border-radius: var(--radius);
    position: relative; }
.big-avatar .reg-mark { border-color: var(--signal); }
.pstat { display: flex; justify-content: space-around; border-top: 1px solid var(--line); margin-top: 1.3rem; padding-top: 1.3rem; }
.pstat .v { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.pstat .k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--slate-2); text-transform: uppercase; }
.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 520px) { .info-row { grid-template-columns: 1fr; } }
.info-field .k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-2); }
.info-field .v { font-size: 1rem; margin-top: 0.2rem; }
.card-title { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.3rem; }
.card-title .ic { width: 34px; height: 34px; border: 1.5px solid var(--line); border-radius: 2px; display: grid; place-items: center; color: var(--signal); }
.card-title .ic svg { width: 17px; height: 17px; }
.card-title h2 { font-size: 1.15rem; }

/* ============================================================================
   PRICING / BILLING
   ========================================================================== */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; max-width: 780px; margin: 0 auto; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column;
    position: relative; }
.plan.feat { border-color: var(--signal); }
.plan .badge { position: absolute; top: 0; right: 1.4rem; transform: translateY(-50%); background: var(--signal); color: #fff;
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 2px; }
.plan .eyebrow { margin-bottom: 0.8rem; }
.plan .price { font-family: var(--font-display); font-weight: 600; font-size: 2.8rem; letter-spacing: -0.02em; line-height: 1; }
.plan .price small { font-size: 1rem; color: var(--slate-2); font-weight: 500; }
.plan .price .cur { font-size: 1.2rem; color: var(--slate-2); vertical-align: top; }
.plan .plan-sub { color: var(--slate-2); font-size: 0.9rem; margin: 0.4rem 0 1.3rem; }
.feat-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 0.7rem; flex: 1; }
.feat-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.feat-list li svg { width: 16px; height: 16px; color: var(--signal); flex-shrink: 0; }

.bill-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 620px; }
.bill-card__head { padding: 1.4rem 1.6rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.bill-card__head h2 { font-size: 1.2rem; }
.bill-card__head .price { font-family: var(--font-mono); color: var(--slate); font-size: 0.85rem; margin-top: 0.2rem; }
.bill-card__body { padding: 1.4rem 1.6rem; }
.status-badge { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 0.3rem 0.6rem; border-radius: 2px; }
.status-badge.active { background: var(--pass-wash); color: var(--pass); }
.status-badge.cancel { background: var(--signal-wash); color: var(--signal); }
.info-note { border: 1px solid var(--line); border-left: 2px solid var(--signal); background: var(--signal-wash);
    padding: 0.9rem 1.1rem; border-radius: var(--radius); font-size: 0.9rem; color: var(--slate); }
.info-note.warn { border-left-color: var(--signal); }

/* ============================================================================
   ADMIN
   ========================================================================== */
.adm-list { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adm-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.adm-row:last-child { border-bottom: 0; }
.adm-row .code { font-family: var(--font-mono); font-size: 0.7rem; color: var(--signal); letter-spacing: 0.08em; }
.adm-row h3 { font-size: 1rem; }
.adm-row .grow { flex: 1; }
.adm-row .acts { display: flex; gap: 0.4rem; }
.pill { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.4rem 0.7rem;
    border: 1px solid var(--line); border-radius: 2px; color: var(--slate); transition: all 0.15s var(--ease); }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.danger { color: var(--fail); border-color: transparent; background: var(--fail-wash); }
.pill.danger:hover { background: var(--fail); color: #fff; }
.state-tag { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2rem 0.45rem; border-radius: 2px; }
.state-tag.on { background: var(--pass-wash); color: var(--pass); }
.state-tag.off { background: var(--fail-wash); color: var(--fail); }

.form-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.8rem; max-width: 760px; }
.form-actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; }

/* options editor */
.opt-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .opt-editor { grid-template-columns: 1fr; } }
.opt-edit { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.opt-edit__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.opt-edit .lab { width: 30px; height: 30px; background: var(--ink); color: var(--paper); display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 600; border-radius: 2px; }
.opt-edit.correct { border-color: var(--pass); background: var(--pass-wash); }
.opt-edit.correct .lab { background: var(--pass); }

.confirm-card { background: var(--card); border: 1.5px solid var(--line); border-top: 3px solid var(--fail); border-radius: var(--radius);
    padding: 1.8rem; max-width: 560px; }
.confirm-card .warn-ic { width: 48px; height: 48px; border: 1.5px solid var(--fail); color: var(--fail); border-radius: 2px;
    display: grid; place-items: center; margin-bottom: 1.1rem; }
.preview-box { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
    margin: 1.1rem 0; font-size: 0.95rem; }

.empty { text-align: center; padding: 4rem 1rem; background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .ic { width: 56px; height: 56px; margin: 0 auto 1.1rem; border: 1.5px solid var(--line); border-radius: 2px; display: grid; place-items: center; color: var(--slate-2); }
.empty h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.empty p { color: var(--slate-2); margin-bottom: 1.3rem; }

.success-hero { text-align: center; max-width: 520px; margin: 3rem auto; }
.success-hero .big-ic { width: 76px; height: 76px; margin: 0 auto 1.4rem; border-radius: 2px; display: grid; place-items: center; }
.success-hero .big-ic svg { width: 36px; height: 36px; color: #fff; }
.success-hero .big-ic.pass { background: var(--pass); }
.success-hero .big-ic.warn { background: var(--signal); }
.success-hero h1 { font-size: 2rem; margin-bottom: 0.6rem; }
.success-hero p { color: var(--slate); margin-bottom: 1.6rem; }

/* ---- server-rendered shell extras ---- */
.lang a { color: #A0A7B3; padding: 0.2rem 0.35rem; text-decoration: none; transition: color 0.15s ease; }
.lang a.on { color: var(--signal); }
.lang a:hover { color: var(--paper); }
.menu form { margin: 0; }
.menu button.mi { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.6rem 0.7rem;
    font-size: 0.85rem; color: #E98A7A; border-radius: 2px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu button.mi:hover { background: rgba(255,255,255,0.05); }
.menu button.mi svg { width: 15px; height: 15px; }

/* ============================================================================
   IMPORT WIZARD
   ========================================================================== */
.stepper { display: flex; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.stepper .step { flex: 1; display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.2rem; background: var(--card);
    border-right: 1px solid var(--line); color: var(--slate-2); }
.stepper .step:last-child { border-right: 0; }
.stepper .step .num { font-family: var(--font-mono); width: 30px; height: 30px; border: 1.5px solid var(--line);
    border-radius: 2px; display: grid; place-items: center; font-size: 0.82rem; flex-shrink: 0; transition: all 0.2s var(--ease); }
.stepper .step .tx b { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; display: block; line-height: 1.1; }
.stepper .step .tx span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-2); }
.stepper .step.is-active { color: var(--ink); }
.stepper .step.is-active .num { border-color: var(--signal); background: var(--signal); color: #fff; }
.stepper .step.is-done .num { border-color: var(--pass); background: var(--pass-wash); color: var(--pass); }
@media (max-width: 640px) { .stepper .step .tx span { display: none; } }

.wpanel { display: none; }
.wpanel.is-active { display: block; }

.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: clamp(2rem, 6vw, 3.5rem) 2rem;
    text-align: center; cursor: pointer; background: var(--card); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.dropzone:hover, .dropzone.drag { border-color: var(--signal); background: var(--signal-wash); }
.dropzone .ic { width: 58px; height: 58px; margin: 0 auto 1.1rem; border: 1.5px solid var(--signal); border-radius: 2px;
    display: grid; place-items: center; color: var(--signal); }
.dropzone h3 { font-size: 1.2rem; }
.dropzone p { color: var(--slate-2); font-size: 0.92rem; margin-top: 0.3rem; }
.dropzone .file { font-family: var(--font-mono); font-size: 0.8rem; color: var(--signal); margin-top: 0.8rem; }

.wloader { text-align: center; padding: 3rem 2rem; }
.wloader svg { width: 96px; height: 96px; margin: 0 auto 1.2rem; }
.wloader .lspin { stroke: var(--signal); stroke-width: 6; fill: none; stroke-linecap: round; stroke-dasharray: 80 300;
    transform-origin: 64px 64px; animation: spin 1s linear infinite; }
.wloader .ltrack { stroke: var(--line-dark); stroke-width: 6; fill: none; }
.wloader .lbl { font-family: var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); font-size: 0.78rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.wnav { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1.8rem; }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; box-shadow: none; filter: grayscale(0.3); }
.alert--fail { border: 1px solid transparent; background: var(--fail-wash); color: var(--fail); border-left: 3px solid var(--fail);
    border-radius: var(--radius); padding: 0.85rem 1rem; }

.wchip { display: inline-flex; gap: 1rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
    color: var(--slate); border: 1px solid var(--line); border-radius: 2px; padding: 0.55rem 0.9rem; margin-bottom: 1.3rem; }
.wchip b { color: var(--ink); font-weight: 500; }
.wchip .flagged b { color: var(--pass); }
.wchip .flagged.has b { color: var(--fail); }

/* review question card */
.rev-q { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.1rem; }
.rev-q.invalid { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail); }
.rev-q__head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.rev-q__head .n { width: 34px; height: 34px; background: var(--ink); color: var(--paper); display: grid; place-items: center;
    font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; border-radius: 2px; }
.rev-q__head .flag { margin-left: auto; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--fail); background: var(--fail-wash); padding: 0.25rem 0.5rem; border-radius: 2px; }
.field__input.invalid, .opt-edit.invalid { border-color: var(--fail) !important; box-shadow: inset 0 0 0 1px var(--fail); }
.q-note { font-size: 0.78rem; color: #8a6d3b; background: rgba(217, 164, 65, 0.12); border-left: 2px solid #d9a441;
    padding: 0.5rem 0.75rem; border-radius: 2px; margin: 0 0 0.9rem; }
.q-note svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 0.3rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.phead__acts { display: flex; gap: 0.7rem; align-items: center; }

/* ============================================================================
   ADMIN FINANCE DASHBOARD
   ========================================================================== */
.fin b, .fin .fig { font-variant-numeric: tabular-nums; }

.fin-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.seg a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; padding: 0.5rem 0.9rem;
    border-right: 1px solid var(--line); color: var(--slate); transition: all 0.15s var(--ease); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a:hover { color: var(--ink); background: var(--paper-2); }
.seg a.on { background: var(--ink); color: var(--paper); }
.fin-bar .asof { font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate-2); margin-left: auto; }
.fin-bar .range { display: flex; gap: 0.5rem; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--slate); }
.fin-bar .range input { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.35rem 0.5rem; border: 1.5px solid var(--line); border-radius: 2px; background: var(--card); color: var(--ink); }

.gauge-card { position: relative; background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 1.6rem 1.8rem 1.8rem; overflow: hidden; margin-bottom: 1.4rem; }
.gauge-card .reg { position: absolute; font-family: var(--font-mono); font-size: 0.58rem; color: #5b616d; letter-spacing: 0.1em; }
.gauge-card .reg.tl { top: 0.7rem; left: 0.9rem; } .gauge-card .reg.tr { top: 0.7rem; right: 0.9rem; }
.gauge-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.2rem; }
.gauge-head .lbl { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: #9aa1ad; }
.info-btn { width: 20px; height: 20px; border: 1px solid #5b616d; color: #9aa1ad; border-radius: 50%; background: none; cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; font-style: italic; display: grid; place-items: center; line-height: 1; padding: 0; }
.info-btn:hover { border-color: var(--signal); color: var(--signal); }
.status-pill { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.6rem; border-radius: 2px; }
.status-pill.safe { background: rgba(46,125,91,0.22); color: #7fd0ad; }
.status-pill.caution { background: rgba(240,82,42,0.18); color: #ffb59e; }
.status-pill.danger { background: rgba(178,58,46,0.28); color: #f0a79e; }
.gauge-figs { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1.1rem; }
.gauge-figs .big { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -0.02em; }
.gauge-figs .of { font-family: var(--font-mono); font-size: 0.9rem; color: #9aa1ad; }
.gauge { position: relative; height: 18px; border-radius: 3px; margin: 0.4rem 0 0; background: linear-gradient(to right, rgba(46,125,91,0.28) 0 66.67%, rgba(240,82,42,0.28) 66.67% 83.33%, rgba(178,58,46,0.32) 83.33% 100%); }
.gauge__fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px 0 0 3px; }
.gauge__fill.safe { background: var(--pass); box-shadow: 0 0 12px rgba(46,125,91,0.4); }
.gauge__fill.caution { background: var(--signal); box-shadow: 0 0 12px rgba(240,82,42,0.5); }
.gauge__fill.danger { background: var(--fail); box-shadow: 0 0 12px rgba(178,58,46,0.55); }
.gauge__tick { position: absolute; top: -5px; bottom: -5px; width: 1.5px; background: #5b616d; }
.gauge__caret { position: absolute; top: -9px; width: 0; height: 0; transform: translateX(-5px); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--paper); }
.gauge-scale { position: relative; height: 1.4rem; margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.6rem; color: #9aa1ad; }
.gauge-scale span { position: absolute; transform: translateX(-50%); }
.gauge-sub { margin-top: 1rem; font-size: 0.9rem; color: #c7ccd4; }
.gauge-sub b { color: var(--paper); }
.gauge-legend { display: flex; gap: 1.2rem; margin-top: 1rem; font-family: var(--font-mono); font-size: 0.62rem; color: #9aa1ad; flex-wrap: wrap; }
.gauge-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.4rem; vertical-align: -1px; }
.qstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line-dark); }
.qstrip .q { text-align: center; }
.qstrip .q .qb { height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.qstrip .q .qb i { width: 60%; background: #3a3f4a; border-radius: 2px 2px 0 0; min-height: 2px; }
.qstrip .q:last-child .qb i { background: var(--signal); }
.qstrip .q .qv { font-family: var(--font-mono); font-size: 0.72rem; color: var(--paper); margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.qstrip .q .ql { font-family: var(--font-mono); font-size: 0.58rem; color: #7a828f; letter-spacing: 0.08em; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.9rem; margin-bottom: 1.4rem; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.kpi .k { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-2); }
.kpi .v { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; margin: 0.35rem 0 0.15rem; font-variant-numeric: tabular-nums; }
.kpi .d { font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate-2); }
.kpi .d.up { color: var(--pass); } .kpi .d.down { color: var(--fail); } .kpi .d.flat { color: var(--slate-2); }
.kpi.neg .v { color: var(--fail); } .kpi.profit { border-color: var(--ink); }

.fin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-bottom: 1.4rem; }
@media (max-width: 860px) { .fin-cols { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.panel .psub { font-family: var(--font-mono); font-size: 0.64rem; color: var(--slate-2); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.1rem; }
.split { margin-bottom: 1rem; }
.split .row { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; margin-bottom: 0.5rem; }
.split .row .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.split .track { height: 8px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.split .track i { display: block; height: 100%; }
.split .track i.pack { background: var(--signal); } .split .track i.one { background: var(--ink); } .split .track i.sub { background: var(--slate-2); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger td { padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .prov { display: flex; align-items: center; gap: 0.6rem; }
.ledger .dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.ledger .cat { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-2); }
.ledger .amt { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ledger tfoot td { font-weight: 600; border-top: 1.5px solid var(--ink); border-bottom: 0; padding-top: 0.7rem; }
.addcost { margin-top: 1rem; display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--signal); border: 1px dashed var(--line); border-radius: 2px; padding: 0.5rem 0.8rem; width: 100%; text-align: center; }
.addcost:hover { border-color: var(--signal); }

.chart { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.4rem; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem; align-items: end; height: 180px; margin-top: 1.2rem; }
.bars .bar { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; height: 100%; justify-content: flex-end; }
.bars .bar .stack { width: 70%; border-radius: 2px 2px 0 0; overflow: hidden; display: flex; flex-direction: column-reverse; min-height: 2px; }
.bars .bar .stack .s-pack { background: var(--signal); } .bars .bar .stack .s-sub { background: var(--slate-2); } .bars .bar .stack .s-one { background: var(--ink); }
.bars .bar:hover .stack { opacity: 0.85; }
.bars .bar .m { font-family: var(--font-mono); font-size: 0.56rem; color: var(--slate-2); }

.txn { width: 100%; border-collapse: collapse; }
.txn th { text-align: left; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate-2); padding: 0 0 0.6rem; border-bottom: 1.5px solid var(--line); }
.txn td { padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.txn tr:last-child td { border-bottom: 0; }
.txn .r { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.txn .pill { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.15rem 0.4rem; border-radius: 2px; }
.txn .pill.ok { background: var(--pass-wash); color: var(--pass); }
.txn .pill.pack { background: var(--signal-wash); color: var(--signal-ink); }
.txn .pill.sub { background: var(--paper-2); color: var(--slate); }

.modal-wrap { position: fixed; inset: 0; background: rgba(23,25,31,0.6); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 1.5rem; }
.modal-wrap.on { display: flex; }
.modal { background: var(--paper); border: 1.5px solid var(--line); border-top: 3px solid var(--signal); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 1.8rem; }
.modal .mh { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.3rem; }
.modal .mh .eyebrow { margin: 0; }
.modal .mx { margin-left: auto; background: none; border: 0; font-size: 1.4rem; color: var(--slate); cursor: pointer; line-height: 1; }
.modal h2 { font-size: 1.5rem; margin: 0.3rem 0 0.9rem; }
.modal h2 em { font-style: normal; color: var(--signal); }
.modal p { font-size: 0.92rem; color: var(--slate); margin-bottom: 0.8rem; }
.modal .steps { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.modal .steps li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; font-size: 0.9rem; }
.modal .steps li b { color: var(--ink); }
.modal .steps li::before { content: attr(data-n); position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 0.66rem; color: var(--signal); border: 1px solid var(--signal); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.modal .callout { background: var(--signal-wash); border-left: 3px solid var(--signal); border-radius: 2px; padding: 0.7rem 0.9rem; font-size: 0.86rem; color: var(--slate); }
.modal .fineprint { font-family: var(--font-mono); font-size: 0.64rem; color: var(--slate-2); margin-top: 1rem; }
