/* ==========================================================================
   Cortaly — "Exchange Terminal" design system
   Dark-only. Square by default: depth comes from structure (re-tiered
   surfaces + strong borders + a hard, un-blurred drop-lip), never from
   rounding or soft glow. Amber = LIVE/primary, Lime = EARN/up — colour is
   signal, not wallpaper. Mono uppercase is reserved for CHROME labels
   (stat labels, table heads, badges, kickers, nav-credits); body copy and
   long strings stay sans + sentence case so German localisation and
   readability survive. No clip-path on focusable elements — it would clip
   the focus ring/border (WCAG 2.4.7). Contrast held at AA on every label.
   ========================================================================== */

:root {
    /* Surfaces — a real ramp so cards finally separate from the floor */
    --color-bg: #07080b;
    --color-surface: #12151b;
    --color-surface-alt: #1b1f27;
    --color-surface-hi: #232833;
    --color-border: #2b313b;
    --color-border-strong: #444c5a;

    /* Ink — muted bumped brighter so small uppercase labels clear AA */
    --color-text: #f2f4f8;
    --color-text-muted: #a4aebc;
    --color-text-subtle: #79828f;
    --color-placeholder: #8b95a2;

    /* Amber — the exchange primary / "LIVE" signal */
    --color-primary: #f7a81e;
    --color-primary-hover: #ffbb33;
    --color-primary-bright: #ffc44f;
    --color-primary-deep: #a86a0c;     /* keycap lip + border */
    --color-primary-light: rgba(247, 168, 30, 0.14);
    --color-on-primary: #140f04;

    /* Lime — the "EARN / up" signal, a touch more electric */
    --color-success: #c2f24d;
    --color-success-bright: #d6ff5c;
    --color-success-bg: rgba(194, 242, 77, 0.12);
    --color-success-deep: #5f7d0c;
    --color-on-success: #0c1500;

    --color-warning: #e8942c;
    --color-warning-bg: rgba(232, 148, 44, 0.14);
    --color-danger: #ff4d57;
    --color-danger-bg: rgba(255, 77, 87, 0.14);
    --color-danger-deep: #a81f27;

    /* Angular geometry — square is the law */
    --radius: 0px;
    --radius-sm: 0px;
    --edge: 3px;            /* section top / left rule thickness */
    --bevel: 6px;          /* the ONE decorative cut — brand-mark only */

    --tracking-label: 0.13em;

    /* Depth: a hard black lip (physical thickness) + a soft cast shadow.
       No inset white highlight bright enough to read as 2009 gloss. */
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.45);
    --shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 6px 18px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 2px 0 rgba(0, 0, 0, 0.55), 0 18px 42px rgba(0, 0, 0, 0.55);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-snap: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

/* overflow-y:scroll reserves the scrollbar's width on every page (universal
   fallback); scrollbar-gutter:stable does the same without forcing the
   track to show on short pages, so it wins via @supports where available.
   Without this, the navbar/content shift a few px sideways between a page
   short enough to have no scrollbar and one tall enough to have one. */
html { -webkit-text-size-adjust: 100%; height: 100%; overflow-y: scroll; }
@supports (scrollbar-gutter: stable) {
    html { overflow-y: auto; scrollbar-gutter: stable; }
}

/* Sticky footer via flex — see note retained from prior system. */
body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

/* One focus treatment everywhere. Amber reads on dark and on the white
   surfbar viewport; on amber buttons we flip to dark ink (see .btn). Never
   clipped because nothing focusable uses clip-path. */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 0;
}

/* One consistent page width. */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.card-narrow {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Kicker / over-line eyebrow — the editorial "section" cue above a heading --- */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    color: var(--color-primary);
    margin-bottom: 14px;
}
.kicker::before { content: ""; width: 26px; height: var(--edge); background: currentColor; flex-shrink: 0; }

/* --- Terminal "// SECTION ——" label: structural rhythm for sparse panels --- */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 16px;
}
.section-label::before { content: "//"; color: var(--color-primary); font-weight: 800; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

.rule { height: 1px; background: var(--color-border); border: 0; margin: 26px 0; }

/* Navbar — a top instrument rail: amber→lime hairline across the very top. */
.navbar {
    background: rgba(7, 8, 11, 0.9);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    width: 100%;
    margin: 0 auto;
    gap: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}
.brand:hover { text-decoration: none; color: var(--color-text); }
/* The single decorative "cut steel" corner — top-left + bottom-right bevel.
   Non-focusable inner element, so clipping is safe here. */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0;
    clip-path: polygon(var(--bevel) 0, 100% 0, 100% calc(100% - var(--bevel)), calc(100% - var(--bevel)) 100%, 0 100%, 0 var(--bevel));
    background: linear-gradient(150deg, var(--color-primary-bright), var(--color-primary-deep));
    font-size: 1.05rem;
    flex-shrink: 0;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--color-border-strong);
    border-radius: 0;
    background: var(--color-surface-alt);
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--color-text); }
.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
/* Links get an amber underline that wipes in on hover — the pill is dead. */
.nav-links a:not(.btn):not(.nav-credits) {
    position: relative;
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 7px 8px;
    transition: color 0.15s var(--ease);
}
.nav-links a:not(.btn):not(.nav-credits)::after {
    content: "";
    position: absolute;
    left: 10px; right: 10px; bottom: 3px;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s var(--ease);
}
.nav-links a:not(.btn):not(.nav-credits):hover { color: var(--color-text); text-decoration: none; }
.nav-links a:not(.btn):not(.nav-credits):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--color-text); }
/* Credits chip — squared LED module, lime up-tick, terminal left rail. */
.nav-credits {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-success-bg);
    color: var(--color-success);
    padding: 6px 12px 6px 9px;
    border: 1px solid rgba(194, 242, 77, 0.3);
    border-left: 3px solid var(--color-success);
    font-weight: 700;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 6px;
    transition: background 0.15s var(--ease);
}
.nav-credits:hover { background: rgba(194, 242, 77, 0.2); color: var(--color-success); text-decoration: none; }
.nav-credits::before { content: "▲"; font-size: 0.55rem; }

main { padding: 40px 0 72px; flex: 1 0 auto; }

/* Card — an engineered plate: 1px frame, brighter top edge, hard lip below. */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top-color: var(--color-border-strong);
    border-radius: 0;
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 20px;
}
.card h1, .card h2 { margin-top: 0; }

.ad-slot {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ad-slot-label { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); align-self: flex-start; }
.ad-slot-link { display: flex; max-width: 100%; }
.ad-slot-link img { max-height: 90px; max-width: 100%; border-radius: 0; display: block; }
.ad-slot-placeholder { color: var(--color-text-subtle); font-size: 0.85rem; padding: 20px 0; }
.ad-slot-html { width: 100%; max-height: 90px; align-self: stretch; overflow: hidden; }

/* Hero — the command console. Amber top rule, faint engineering grid, a
   single amber corner-bracket pair (this element only, never on every card).
   It's a plain div, so the ::before/::after brackets are safe. */
.hero {
    position: relative;
    overflow: hidden;
    border-top: var(--edge) solid var(--color-primary);
    background-color: var(--color-surface);
    background-image:
        radial-gradient(900px 320px at 10% -30%, rgba(247, 168, 30, 0.16), transparent 60%),
        radial-gradient(700px 300px at 100% -20%, rgba(194, 242, 77, 0.08), transparent 58%),
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: auto, auto, 34px 34px, 34px 34px;
    padding: 56px 40px;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    width: 22px; height: 22px;
    border: 2px solid var(--color-primary);
    opacity: 0.9;
}
.hero::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hero::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.hero h1 { font-size: 2.6rem; letter-spacing: -0.03em; }
.hero > * { position: relative; }

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: var(--color-primary-light);
    border: 1px solid rgba(247, 168, 30, 0.4);
    color: var(--color-primary);
    font-weight: 800;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    margin-bottom: 14px;
}

/* Wizard — squares and straight rails, no circles. */
.wizard-steps {
    display: flex;
    align-items: center;
    margin-bottom: 26px;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.wizard-step-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0;
    font-weight: 800;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border: 2px solid var(--color-border-strong);
    color: var(--color-text-subtle);
    background: var(--color-surface-alt);
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wizard-step-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-subtle);
    white-space: nowrap;
}
.wizard-step.is-active .wizard-step-circle { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.wizard-step.is-active .wizard-step-label,
.wizard-step.is-done .wizard-step-label { color: var(--color-text); }
.wizard-step.is-done .wizard-step-circle { border-color: var(--color-success); background: var(--color-success); color: var(--color-on-success); }
.wizard-step-connector {
    flex: 1 1 auto;
    height: 2px;
    background: var(--color-border-strong);
    margin: 0 14px;
    transition: background 0.15s ease;
}
.wizard-step-connector.is-done { background: var(--color-success); }
.wizard-panel.is-hidden { display: none; }
.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Stat tile — the trading readout. Left amber→lime rail, oversized mono
   figure, stamped mono label. .is-earn flips the accent + figure to lime. */
.stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 0;
    padding: 18px 20px 18px 23px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-success));
}
.stat .label { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.stat .value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 750; letter-spacing: -0.01em; margin-top: 6px; line-height: 1.05; }
.stat.is-earn::before { background: var(--color-success); }
.stat.is-earn .value { color: var(--color-success); }
.stat-link { display: block; text-decoration: none; color: inherit; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.stat-link:hover { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary-light), var(--shadow); text-decoration: none; color: inherit; }

/* Zero-dependency CSS bar chart (site-stats.php) */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.bar-chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 4px; }
.bar-chart-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-success));
    border-radius: 0;
    min-height: 2px;
    transition: opacity 0.15s;
}
.bar-chart-col:hover .bar-chart-bar { opacity: 0.75; }
.bar-chart-empty { background: var(--color-border-strong); }
.bar-chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.68rem; color: var(--color-text-muted); font-family: var(--font-mono); }

/* Forms — square, locatable fields (visible border ≥3:1, alt fill), and a
   terminal amber left-slab on focus. */
label { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 6px; color: var(--color-text); text-transform: uppercase; letter-spacing: 0.04em; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--color-border-strong);
    border-radius: 0;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-surface-alt);
    color: var(--color-text);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--color-placeholder); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: inset 3px 0 0 var(--color-primary), 0 0 0 3px var(--color-primary-light);
}
.field { margin-bottom: 18px; }
.field-hint { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 5px; line-height: 1.45; }
.field-error { color: var(--color-danger); font-size: 0.82rem; margin-top: 4px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; }
.checkbox-field input { width: auto; margin-top: 3px; accent-color: var(--color-primary); }
.checkbox-field label { font-weight: 400; margin: 0; text-transform: none; letter-spacing: normal; }

/* Honeypot */
.hp-field { position: absolute; left: -5000px; top: -5000px; }

/* Buttons — mechanical keycaps: a hard bottom lip that bottoms out on press.
   No soft glow. Uppercase sans (mono buttons cramp German strings). */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 22px;
    border-radius: 0;
    border: 1px solid var(--color-primary-deep);
    font-weight: 750;
    font-size: 0.82rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    color: var(--color-on-primary);
    background: linear-gradient(180deg, var(--color-primary-bright), var(--color-primary) 52%, var(--color-primary-deep));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 0 var(--color-primary-deep), 0 4px 11px rgba(0, 0, 0, 0.4);
    transition: transform 0.08s var(--ease-snap), box-shadow 0.08s var(--ease-snap), filter 0.08s var(--ease-snap);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; color: var(--color-on-primary); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 0 var(--color-primary-deep), 0 6px 18px rgba(247, 168, 30, 0.3); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); filter: brightness(0.98); }
.btn:focus-visible { outline-color: var(--color-on-primary); }
.btn-block { display: flex; width: 100%; text-align: center; }
.btn-secondary {
    background: linear-gradient(180deg, #272d37, #191d24);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 0 #0b0d11, 0 3px 9px rgba(0, 0, 0, 0.38);
}
.btn-secondary:hover { background: linear-gradient(180deg, #2d3540, #1e232b); color: var(--color-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #0b0d11, 0 4px 12px rgba(0, 0, 0, 0.44); }
.btn-secondary:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); }
.btn-secondary:focus-visible { outline-color: var(--color-primary); }
.btn-danger {
    background: linear-gradient(180deg, #ff6b73, var(--color-danger) 52%, var(--color-danger-deep));
    color: #2a0508;
    border: 1px solid var(--color-danger-deep);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 0 var(--color-danger-deep), 0 4px 11px rgba(0, 0, 0, 0.4);
}
.btn-danger:hover { filter: brightness(1.05); color: #2a0508; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 var(--color-danger-deep), 0 6px 18px rgba(255, 77, 87, 0.28); }
.btn-danger:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4); }
.btn-sm { padding: 7px 14px; font-size: 0.74rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; filter: none; }

/* Alerts — squared, thick semantic left rule. */
.alert { padding: 13px 16px; border-radius: 0; margin-bottom: 18px; font-size: 0.9rem; line-height: 1.5; border: 1px solid transparent; border-left-width: var(--edge); }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(194, 242, 77, 0.4); }
.alert-danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: rgba(255, 77, 87, 0.4); }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: rgba(232, 148, 44, 0.4); }

/* Badges — squared status stamps, mono uppercase. */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 0; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid transparent; }
.badge-success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(194, 242, 77, 0.3); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: rgba(232, 148, 44, 0.3); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: rgba(255, 77, 87, 0.3); }
.badge-muted { background: var(--color-surface-alt); color: var(--color-text-muted); border-color: var(--color-border-strong); }

/* VIP benefits list + featured tier (vip.php) */
.benefit-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 26px; }
.benefit { display: flex; gap: 12px; align-items: flex-start; }
.benefit-mark {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid rgba(194, 242, 77, 0.32);
    font-size: 0.9rem;
}
.benefit strong { display: block; font-size: 0.95rem; color: var(--color-text); }
.benefit p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 0.86rem; line-height: 1.5; }
/* Featured ("Beste Wahl") tier card — amber top rule + lift */
.card-featured { border-top: var(--edge) solid var(--color-primary); box-shadow: var(--shadow-lg); }
.tier-ribbon {
    display: inline-block;
    align-self: center;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-family: var(--font-mono);
    font-size: 0.62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 3px 10px;
    margin-bottom: 12px;
}
.tier-features { list-style: none; margin: 14px 0 18px; padding: 0; text-align: left; display: grid; gap: 8px; }
.tier-features li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.84rem; color: var(--color-text-muted); line-height: 1.4; }
.tier-features li::before { content: "✓"; color: var(--color-success); font-weight: 800; flex-shrink: 0; }

/* Tables — a ledger. Mono uppercase heads; row-hover drops an amber
   "selected line" marker down the left edge. */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-text-muted); font-family: var(--font-mono); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--color-surface-alt); }
tbody tr { transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease); }
tbody tr:hover { background: var(--color-surface-alt); box-shadow: inset 3px 0 0 var(--color-primary); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; margin: -4px; padding: 4px; }

footer { flex-shrink: 0; color: var(--color-text-muted); font-size: 0.82rem; text-align: center; padding: 36px 20px 44px; border-top: 1px solid var(--color-border); margin-top: 20px; }
footer a { color: var(--color-text-muted); }

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Sticky skyscraper ads pinned in the left/right page gutters (app/views/
   side-ads.php). Fixed + vertically centred, square to match the system.
   Hidden below ~1480px, where the 1100px content column leaves no gutter
   room. Not rendered on the full-screen surfbar. */
.side-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    width: 160px;
    display: none;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto;
}
.side-ad-left { left: 20px; }
.side-ad-right { right: 20px; }
.side-ad-label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-subtle); }
.side-ad iframe {
    display: block;
    width: 160px;
    height: 600px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}
@media (min-width: 1480px) {
    .side-ad { display: flex; }
}

/* Surfbar — standalone full-page layout. */
.surfbar-body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}
.surfbar-toolbar {
    flex-shrink: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-strong);
    box-shadow: var(--shadow);
    z-index: 10;
    position: relative;
}
.surfbar-toolbar::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
}
.surfbar-row { display: flex; align-items: center; gap: 18px; }
.surfbar-row-controls { padding: 10px 18px; flex-wrap: wrap; row-gap: 8px; justify-content: space-between; }

.surfbar-stat { text-align: center; flex-shrink: 0; }
.surfbar-stat-label { display: block; font-family: var(--font-mono); font-size: 0.66rem; color: var(--color-text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.surfbar-stat-value { font-weight: 700; font-size: 0.88rem; white-space: nowrap; color: var(--color-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.surfbar-controls { display: flex; gap: 8px; flex-shrink: 0; }

.surfbar-banner-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.surfbar-banner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 728px;
    max-width: 100%;
    height: 90px;
    color: var(--color-text-subtle);
    font-size: 0.82rem;
    border: 1px dashed var(--color-border-strong);
    border-radius: 0;
}
.surfbar-banner-link { display: flex; align-items: center; justify-content: center; width: 728px; max-width: 100%; height: 90px; }
.surfbar-banner-link img { max-height: 100%; max-width: 100%; display: block; }
.surfbar-banner-html { display: flex; align-items: center; justify-content: center; width: 728px; max-width: 100%; height: 90px; overflow: hidden; }
/* Admin-pasted ad markup (e.g. A-Ads' "size=Adaptive" unit) ships its own
   inline width:70%/height:auto on the iframe, so it renders smaller than
   the 728x90 slot instead of filling it — override with !important since
   inline styles otherwise always win over an external stylesheet. */
.surfbar-banner-html > * { width: 100% !important; height: 100% !important; }
.surfbar-banner-html iframe { width: 100% !important; height: 100% !important; }

.surfbar-progress-track {
    height: 4px;
    background: var(--color-surface-alt);
    overflow: hidden;
}

/* White by design — it hosts an iframe of an arbitrary external site. */
.surfbar-viewport { flex: 1; min-height: 0; padding: 0; position: relative; background: #fff; overflow: hidden; color: #161a2e; }
.surfbar-viewport iframe { width: 100%; height: 100%; border: 0; display: block; }
.surfbar-viewport .surf-newtab-fallback h2 { color: #161a2e; }
.surfbar-viewport .surf-newtab-fallback p { color: #5b6172; }
.surfbar-viewport .field-hint { color: #5b6172; }

@media (max-width: 900px) {
    .surfbar-row-controls { justify-content: center; }
    .surfbar-banner-slot { width: 100%; flex-basis: 100%; }
    .surfbar-controls { flex-wrap: wrap; justify-content: center; width: 100%; flex-basis: 100%; }
}

/* Nav collapses to the dropdown well before 720 — 11 uppercase items are
   too wide for a tablet/small-laptop row, so anything under a large laptop
   gets the clean hamburger instead of a wrapped two-line bar. */
@media (max-width: 1100px) {
    .navbar-inner { position: relative; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border-strong);
        padding: 8px 40px 16px;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .nav-links a:not(.btn) { padding: 11px 8px; font-size: 0.82rem; }
    .nav-links a:not(.btn):not(.nav-credits)::after { display: none; }
    .nav-links a.is-active { color: var(--color-primary); }
    .nav-links .btn { margin-top: 8px; }
    .nav-credits { justify-content: center; margin: 4px 0; }
}

@media (max-width: 720px) {
    .navbar-inner { padding: 12px 20px; }
    .container { padding: 0 20px; }
    .nav-links { padding: 8px 20px 16px; }
    .hero { padding: 40px 22px; }
    .hero h1 { font-size: 2rem; }

    .wizard-steps { flex-wrap: wrap; row-gap: 10px; }
    .wizard-step-circle { width: 28px; height: 28px; font-size: 0.78rem; }
    .wizard-step-label { font-size: 0.7rem; white-space: normal; }
    .wizard-step-connector { margin: 0 6px; min-width: 10px; }
}

/* Shared by surf.js / click.js: progress bar + start prompt. */
.surf-progress {
    flex: 1;
    min-width: 100px;
    height: 8px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
}
.surf-progress-bar { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-success)); width: 0%; transition: width 0.2s linear; }

/* Advent calendar: 24-door grid, square doors. */
.advent-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.advent-door {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface-alt);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    text-align: center;
}
.advent-door-number { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 800; color: var(--color-text-subtle); }
.advent-door.is-locked { opacity: 0.55; }
.advent-door.is-available {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary) inset;
}
.advent-door.is-available .advent-door-number { color: var(--color-primary); }
.advent-door.is-available:hover { background: rgba(247, 168, 30, 0.24); cursor: pointer; }
.advent-door.is-opened { background: var(--color-success-bg); border-color: var(--color-success); }
.advent-door.is-opened .advent-door-number { color: var(--color-success); }
.advent-door-prize { font-size: 0.62rem; font-weight: 700; color: var(--color-text-muted); line-height: 1.2; }
.advent-door-form { display: contents; }
.advent-door-form button {
    all: unset;
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 0;
}

@media (max-width: 720px) {
    .advent-grid { grid-template-columns: repeat(4, 1fr); }
}
.surf-newtab-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 14px; text-align: center; padding: 20px; }
