/* Shared public-side styles (landing, result, stats, 404, login frame).
 * Relies on design tokens from tokens.css. Admin-only rules live in admin.css.
 */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    background: var(--color-bg);
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

code,
.mono {
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
 * Skip link (a11y)
 * -------------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: var(--sp-3);
    top: -48px;
    padding: var(--sp-2) var(--sp-4);
    background: var(--color-accent);
    color: var(--color-accent-foreground);
    border-radius: var(--radius-md);
    font-weight: 500;
    z-index: var(--z-toast);
    transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: var(--sp-3);
    text-decoration: none;
    outline: 2px solid var(--color-accent-foreground);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * App shell (public pages)
 * -------------------------------------------------------------------------- */

.app-header {
    position: relative;
    padding: var(--sp-5) var(--sp-4);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.app-header .wrap {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.app-header .brand {
    font-size: var(--text-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--color-text);
}

.app-header .brand a {
    color: inherit;
}

.app-header .brand a:hover {
    text-decoration: none;
}

.app-header .spacer {
    flex: 1;
}

.app-header .header-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

/* No-JS account dropdown in the public header (signed-in account users). */
.account-menu {
    position: relative;
}

.account-menu > summary {
    list-style: none;
    cursor: pointer;
}

.account-menu > summary::-webkit-details-marker {
    display: none;
}

.account-menu .menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + var(--sp-2));
    min-width: 184px;
    padding: var(--sp-2);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: var(--z-drawer);
}

.account-menu .menu-panel form {
    margin: 0;
}

.account-menu .menu-panel a,
.account-menu .menu-panel button {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.account-menu .menu-panel a:hover,
.account-menu .menu-panel button:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
    text-decoration: none;
}

/* On narrow screens the brand + theme toggle + New link / My links don't fit
 * one row. Let the actions drop to their own full-width line below the brand
 * (right-aligned) instead of clipping off the right edge. */
@media (max-width: 640px) {
    .app-header .wrap {
        flex-wrap: wrap;
    }

    .app-header .header-actions {
        /* No width:100% — keep the toggle + account/admin button inline with
           the brand on mobile (the compact, label-less controls fit beside it).
           The spacer right-aligns them; flex-wrap is the overflow safety net. */
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

main {
    flex: 1;
    padding: var(--sp-7) var(--sp-4);
    background-image: var(--hero-glow);
    background-repeat: no-repeat;
    background-position: top center;
}

main .wrap {
    max-width: 960px;
    margin: 0 auto;
}

footer.app-footer {
    padding: var(--sp-4);
    text-align: center;
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3);
    font-size: var(--text-xs);
}

.footer-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer-meta {
    color: var(--color-text-subtle);
}

/* --------------------------------------------------------------------------
 * Panels, cards, surfaces
 * -------------------------------------------------------------------------- */

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    box-shadow: var(--shadow-sm);
    /* Long URLs (Short/Target links, Top-links rows, user agents, referers)
     * are unbreakable tokens. Without a wrap hint they inflate the panel's
     * min-content width past the viewport on mobile, pushing the whole
     * admin column off-screen. min-width: 0 lets the panel shrink inside
     * flex/grid parents, overflow-wrap: anywhere breaks the URL token. */
    min-width: 0;
    overflow-wrap: anywhere;
}

.panel + .panel,
.panel + .panel-grid-2,
.panel-grid-2 + .panel,
.panel-grid-2 + .panel-grid-2,
.kpi-grid + .panel,
.kpi-grid + .panel-grid-2 {
    margin-top: var(--sp-5);
}

.panel-title {
    margin: 0 0 var(--sp-4);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.panel-title .meta {
    font-weight: 400;
    color: var(--color-text-subtle);
    font-size: var(--text-sm);
}

h1,
h2,
h3 {
    letter-spacing: var(--tracking-tight);
}

h2 {
    margin-top: 0;
    font-size: var(--text-2xl);
}

/* --------------------------------------------------------------------------
 * Form controls
 * -------------------------------------------------------------------------- */

label {
    display: block;
    margin-bottom: var(--sp-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

input[type="url"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--color-field);
    border: 1px solid var(--color-field-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-ring);
}

input::placeholder {
    color: var(--color-text-subtle);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 10px 16px;
    background: var(--color-accent);
    color: var(--color-accent-foreground);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    transition: background var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

button:hover,
.btn:hover {
    background: var(--color-accent-hover);
    color: var(--color-accent-foreground);
    text-decoration: none;
}

button:active,
.btn:active {
    transform: translateY(1px);
}

.btn.secondary,
button.secondary {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.btn.secondary:hover,
button.secondary:hover {
    background: var(--color-surface-muted);
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.btn.ghost,
button.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
    padding: 8px 12px;
}

.btn.ghost:hover,
button.ghost:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
}

.btn.danger,
button.danger {
    background: var(--color-danger);
    color: #ffffff;
    border-color: transparent;
}

.btn.danger:hover,
button.danger:hover {
    background: var(--color-danger);
    filter: brightness(0.92);
    color: #ffffff;
}

/* Quiet destructive variant — outline rather than solid fill, so a Delete in
   every table row stops reading as a wall of red. Solid .danger stays for the
   deliberate, opt-in actions (e.g. the bulk bar). */
.btn.danger.quiet,
button.danger.quiet {
    background: transparent;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn.danger.quiet:hover,
button.danger.quiet:hover {
    background: var(--color-danger-soft);
    filter: none;
    color: var(--color-danger);
}

/* Reversible-caution variant (amber) — serious but undoable actions such as
   suspending an account, which red would over-signal as destructive. */
.btn.warn,
button.warn {
    background: transparent;
    color: var(--color-warning);
    border-color: var(--color-warning);
}

.btn.warn:hover,
button.warn:hover {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.btn.sm,
button.sm {
    padding: 6px 10px;
    font-size: var(--text-sm);
}

.btn.icon-only,
button.icon-only {
    padding: 8px;
}

/* Focus-visible outlines — consistent across all interactive elements. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}

.form-row {
    margin-bottom: var(--sp-4);
}

.form-error {
    color: var(--color-danger);
    font-size: var(--text-sm);
    margin-top: var(--sp-2);
}

/* Symfony's form_errors() renders a <ul><li>…</li></ul>. With a single error
 * the default disc bullet reads like noise, so strip the marker and indent. */
.form-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* --------------------------------------------------------------------------
 * Hero / landing
 * -------------------------------------------------------------------------- */

.hero {
    text-align: center;
    padding: var(--sp-9) 0 var(--sp-8);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--sp-5);
}

.hero h1 {
    margin: 0 0 var(--sp-4);
    font-size: var(--text-4xl);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
}

.hero-subtitle {
    max-width: 540px;
    margin: 0 auto var(--sp-7);
    color: var(--color-text-muted);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.hero-form {
    max-width: 640px;
    margin: 0 auto;
}

/* Two platform CTAs (Open in Telegram / Open in Viber) — a centered flex row
 * with real breathing room between them, and an icon+label gap inside each. */
.bot-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-4);
}

.bot-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-form .input-row {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    /* When the button wraps to its own line on narrow viewports the default
     * flex-start would pin it to the left. Centering keeps the wrapped CTA
     * visually anchored to the hero column. */
    justify-content: center;
}

.hero-form .input-row input {
    flex: 1 1 320px;
    min-width: 0;
    height: 56px;
    font-size: var(--text-md);
    padding: 0 16px;
    box-shadow: var(--shadow-md);
}

.hero-form .input-row button {
    height: 56px;
    padding: 0 24px;
    font-size: var(--text-md);
    box-shadow: var(--shadow-md);
    /* Full-width CTA on mobile — matches the modern mobile form pattern and
     * avoids the button looking orphaned under a full-width input. */
    width: 100%;
}

/* 560px is where the 320px-basis input + gap + natural button width stop
 * fighting for the same row and settle into a single line. */
@media (min-width: 560px) {
    .hero-form .input-row button {
        width: auto;
    }
}

.hero-note {
    margin-top: var(--sp-3);
    color: var(--color-text-subtle);
    font-size: var(--text-sm);
}

/* Cloudflare Turnstile widget container. `data-appearance="interaction-only"`
   keeps the slot empty whenever Cloudflare clears the visitor without an
   interactive challenge — but we still need the symmetrical vertical
   spacing the rest of the form uses, otherwise the rare visible variant
   sticks to the surrounding text and the empty variant collapses zero-height
   between two `--sp-3` neighbours, which looks like a layout bug. */
.cf-turnstile {
    margin-top: var(--sp-3);
}

.cf-turnstile:empty {
    margin-top: 0;
}

.alias-row {
    margin-top: var(--sp-3);
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--sp-2);
    row-gap: var(--sp-1);
    align-items: center;
}

.alias-label {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.alias-row input {
    height: 40px;
    padding: 0 12px;
    font-size: var(--text-sm);
    min-width: 0;
    width: 100%;
}

.alias-help {
    grid-column: 1 / -1;
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
}

/* --------------------------------------------------------------------------
 * Feature cards (landing)
 * -------------------------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--sp-4);
    margin-top: var(--sp-8);
}

/* Wrapper that pairs the .feature-grid with a visible H2. The grid used to
 * live directly under the hero (H1) with only an aria-label, which made
 * the heading hierarchy skip from H1 straight to the feature-card H3s.
 * Bing/Lighthouse flag that as a skipped heading; the visible H2 fixes it.
 * Existing `.faq-section .section-title` and `.how-it-works .section-title`
 * keep their per-section rules; this block is the same shape so all three
 * section headings render identically.
 *
 * Note: sp-7 not sp-9 — unlike .faq-section / .how-it-works (which sit
 * BELOW a feature-grid whose bottom card edge butts up close to the next
 * heading and so wants the largest break), this wrapper sits BELOW the
 * hero, which already adds sp-8 of its own bottom padding. Stacking sp-9
 * on top of that produced a ~96px void above "Why Shrtr" / "What you get"
 * etc. sp-7 keeps the section clearly delimited without the dead space. */
.features-section {
    margin-top: var(--sp-7);
}

.features-section .section-title {
    margin: 0 0 var(--sp-5);
    font-size: var(--text-xl);
    font-weight: 600;
}

.features-section .feature-grid {
    /* Avoid double top-margin: the wrapper already spaces us from the hero. */
    margin-top: 0;
}

/* Cards keep the icon inline with the title on a single baseline instead of
 * stacking icon-above-title. The icon-above pattern oversized the visual
 * hierarchy (a 36px badge dominates a 16px title) and wasted vertical space
 * on mobile where each card became three stacked rows. The flat treatment
 * keeps the accent tint via the badge background; the 28px pill is large
 * enough to feel deliberate without dwarfing the title. */
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
}

.feature-card h3 {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: 0 0 var(--sp-2);
    font-size: var(--text-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feature-card .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    flex-shrink: 0;
}

.feature-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
 * Result page (short-URL, QR) — two-column grid
 * -------------------------------------------------------------------------- */

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    align-items: start;
}

@media (min-width: 768px) {
    .result-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.short-url {
    display: flex;
    gap: var(--sp-2);
    align-items: stretch;
    margin-bottom: var(--sp-3);
}

.short-url input {
    flex: 1;
    font-size: var(--text-md);
    font-weight: 600;
    font-family: var(--font-mono);
}

.original-url {
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-surface-muted);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    word-break: break-all;
}

.original-url .label {
    display: block;
    color: var(--color-text-subtle);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: 4px;
}

.qr-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
}

.qr-card img {
    max-width: 100%;
    width: 240px;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: var(--sp-2);
}

.qr-card .actions {
    width: 100%;
    display: flex;
    gap: var(--sp-2);
}

.qr-card .actions .btn {
    flex: 1;
}

.actions {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.copied {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-success);
    font-size: var(--text-xs);
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.copied.shown {
    opacity: 1;
}

/* --------------------------------------------------------------------------
 * KPI cards (shared with admin)
 * -------------------------------------------------------------------------- */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--sp-3);
    margin-bottom: var(--sp-6);
}

.kpi {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4) var(--sp-5);
    position: relative;
    overflow: hidden;
}

.kpi .label {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    font-weight: 600;
}

.kpi .value {
    font-size: var(--text-3xl);
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    margin-top: var(--sp-1);
    line-height: 1.1;
}

.kpi .value.sub {
    font-size: var(--text-md);
    font-weight: 500;
}

.kpi .sparkline {
    position: absolute;
    right: var(--sp-4);
    bottom: var(--sp-4);
    width: 72px;
    height: 24px;
    color: var(--color-accent);
    pointer-events: none;
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
 * Definition list (meta)
 * -------------------------------------------------------------------------- */

.meta {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.meta dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--sp-2) var(--sp-4);
    margin: 0;
}

.meta dt {
    font-weight: 600;
    color: var(--color-text);
}

.meta dd {
    margin: 0;
}

/* --------------------------------------------------------------------------
 * Badges
 * -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: var(--text-xs);
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    line-height: 1.4;
    white-space: nowrap;
}

.badge.ok {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.badge.off {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.badge.warn {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.badge.neutral {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
 * Flashes
 * -------------------------------------------------------------------------- */

.flash {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-4);
    font-size: var(--text-sm);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.flash.success {
    background: var(--color-success-soft);
    color: var(--color-success);
    border-color: var(--color-success-soft);
}

.flash.error {
    background: var(--color-danger-soft);
    color: var(--color-danger);
    border-color: var(--color-danger-soft);
}

/* Waitlist confirmation banner — used on /pricing after a successful POST.
 * Bigger and more prominent than .flash because it's the single signal that
 * tells the user the subscription went through. */
.waitlist-success {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5);
    margin-bottom: var(--sp-5);
    background: var(--color-success-soft);
    border: 1px solid var(--color-success-soft);
    border-left: 3px solid var(--color-success);
    border-radius: var(--radius-md);
}

.waitlist-success-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-success);
    color: var(--color-accent-foreground);
    border-radius: var(--radius-pill);
}

.waitlist-success-body {
    min-width: 0;
}

.waitlist-success-title {
    margin: 0 0 4px;
    font-size: var(--text-lg);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

.waitlist-success-text {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-text-muted);
}

/* Tints a heading's leading check icon green so a success panel (the
 * "Your short link is ready" result page) reads as success, not neutral. */
.success-check {
    display: inline-flex;
    color: var(--color-success);
}

/* Long-form text pages (Privacy, Terms): heading rhythm. Text fills the panel
 * like every other page — no narrower measure, which left the wide card
 * looking half-empty. */
.prose h1 {
    margin: 0 0 var(--sp-2);
}

.prose h2 {
    margin: var(--sp-6) 0 var(--sp-2);
    font-size: var(--text-lg);
}

.prose p {
    margin: 0 0 var(--sp-4);
    line-height: var(--leading-relaxed);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
 * Theme segmented control
 * -------------------------------------------------------------------------- */

.theme-toggle {
    display: inline-flex;
    padding: 2px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    gap: 2px;
    margin: 0;
}

.theme-toggle button {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 6px 10px;
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
}

.theme-toggle button:hover {
    color: var(--color-text);
    background: transparent;
}

.theme-toggle button[aria-pressed="true"] {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.theme-toggle .label-text {
    display: none;
}

@media (min-width: 640px) {
    .theme-toggle .label-text {
        display: inline;
    }
}

/* --------------------------------------------------------------------------
 * 404/410 empty states
 * -------------------------------------------------------------------------- */

.empty-card {
    text-align: center;
    max-width: 480px;
    margin: var(--sp-8) auto;
    padding: var(--sp-8) var(--sp-6);
}

.empty-card .glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    margin-bottom: var(--sp-4);
}

.empty-card h2 {
    margin: 0 0 var(--sp-2);
    font-size: var(--text-2xl);
}

.empty-card p {
    color: var(--color-text-muted);
    margin: 0 0 var(--sp-5);
}

/* --------------------------------------------------------------------------
 * Generic utilities
 * -------------------------------------------------------------------------- */

.truncate {
    /* Fill the containing cell/card and ellipsise what doesn't fit.
     * The old 320px cap was inherited from a narrower layout era and
     * left the Original URL column visibly half-empty on the admin
     * Links table whenever the viewport was wider than ~1200px.
     * Table-sibling columns already carry `white-space: nowrap`, so
     * the URL column naturally takes the remaining track width — no
     * risk of it squashing adjacent data. On narrow/mobile flex rows
     * (admin.css mobile media query) a local override still pins
     * `.truncate` to `max-width: 100%; min-width: 0; flex: 1 1 0`,
     * so removing the absolute cap here doesn't regress phone layout. */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.icon {
    flex-shrink: 0;
    vertical-align: middle;
}

.muted {
    color: var(--color-text-muted);
}

/* Subordinate copy that explains a form section or a single field. Both are
 * muted and a notch smaller than body so they read as captions, not content.
 * .section-hint hugs the heading above it (small top gap, larger gap before
 * the form); .field-hint clips to the input it documents and is wired to that
 * input with aria-describedby so screen readers announce it on focus. */
.section-hint,
.field-hint {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.section-hint {
    margin: 0 0 var(--sp-4);
}

.field-hint {
    display: block;
    margin-top: var(--sp-1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
 * QR customiser (result page advanced panel)
 * -------------------------------------------------------------------------- */

.qr-customiser {
    margin-top: var(--sp-5);
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-4);
}

.qr-customiser > summary {
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    list-style: none;
}

.qr-customiser > summary::-webkit-details-marker {
    display: none;
}

.qr-customiser > summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.15s ease;
}

.qr-customiser[open] > summary::before {
    transform: rotate(90deg);
}

.qr-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-3);
    margin-top: var(--sp-3);
}

.qr-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.qr-field label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 600;
}

.qr-field input[type="color"] {
    width: 100%;
    height: 36px;
    padding: 2px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.qr-field input[type="range"] {
    width: 100%;
}

.qr-field select {
    height: 36px;
    padding: 0 var(--sp-2);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
}

.qr-field-actions {
    justify-content: flex-end;
    align-self: flex-end;
}

/* --------------------------------------------------------------------------
 * API docs (templates/docs/api.html.twig)
 * -------------------------------------------------------------------------- */

.api-section {
    margin-top: var(--sp-7);
}

.api-section h2 {
    margin: 0 0 var(--sp-3);
    font-size: var(--text-xl);
    font-weight: 600;
}

.api-section h3 {
    margin: var(--sp-4) 0 var(--sp-2);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-text-muted);
}

.code-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--sp-3);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--text-sm);
    line-height: 1.5;
    margin: 0;
}

.api-section code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
}

/* Code block with a JS-injected Copy button (copy.js). The wrapper is the
 * positioning context; the button floats top-right and only appears once JS
 * has enhanced the block (no button with JS off — the code stays selectable). */
.code-block-wrap {
    position: relative;
}

/* Scoped under .code-block-wrap so this `position: absolute` outranks the
 * generic `[data-copy-pre] { position: relative }` tooltip-anchor rule, which
 * is defined later in this file at equal specificity. */
.code-block-wrap .code-copy {
    position: absolute;
    top: var(--sp-2);
    right: var(--sp-2);
    padding: 2px 8px;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.6;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
}

.code-block-wrap:hover .code-copy,
.code-copy:focus-visible {
    opacity: 1;
}

.code-copy:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.endpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-3);
}

.endpoint {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.endpoint-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.method {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.method-get {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.method-post {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.endpoint p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--sp-3) 0;
    font-size: var(--text-sm);
}

.api-table th,
.api-table td {
    text-align: left;
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--color-border);
}

.api-table th {
    color: var(--color-text-muted);
    font-weight: 600;
}

/* UTM link builder ----------------------------------------------------- */

.utm-panel {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.utm-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3) var(--sp-4);
}

.utm-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 0;
}

.utm-field-wide {
    grid-column: 1 / -1;
}

.utm-field label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.utm-field small {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.utm-field code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95em;
    background: var(--color-surface-strong, var(--color-surface));
    padding: 0 4px;
    border-radius: var(--radius-sm);
}

.utm-field input {
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
}

.utm-field input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.utm-required {
    color: var(--color-danger, #c62828);
    margin-left: 2px;
}

.utm-optional {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: var(--text-xs);
}

.utm-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

.utm-result {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.utm-result label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
}

.utm-shorten-link {
    align-self: flex-start;
}

@media (max-width: 640px) {
    .utm-form {
        grid-template-columns: 1fr;
    }
    .utm-field-wide {
        grid-column: auto;
    }
}

/* --------------------------------------------------------------------------
 * Landing FAQ — visible Q&A list mirrored from the FAQPage JSON-LD.
 *
 * Google's FAQPage policy (developers.google.com/search/docs/appearance/
 * structured-data/faqpage) requires the marked-up Q&A to be visible to
 * users on the page. Hidden FAQ markup is treated as a guideline violation
 * and downranks/penalises the page. Native `<details>/<summary>` gives us
 * the accordion behaviour, accessibility, and keyboard support for free —
 * no JS, no ARIA gymnastics.
 * -------------------------------------------------------------------------- */

.faq-section {
    margin-top: var(--sp-9);
}

.faq-section .section-title {
    margin: 0 0 var(--sp-5);
    font-size: var(--text-xl);
    font-weight: 600;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-4) var(--sp-5);
}

.faq-item > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    font-size: var(--text-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    list-style: none;
}

.faq-item > summary::-webkit-details-marker {
    display: none;
}

.faq-item > summary::after {
    content: '+';
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--color-text-muted);
    transition: transform 0.15s ease;
    line-height: 1;
}

.faq-item[open] > summary::after {
    transform: rotate(45deg);
}

.faq-item > p {
    margin: var(--sp-3) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
 * "How it works" — three-step explainer, used on /free-url-shortener to add
 * unique visible content that's not present on the home page (the primary
 * dedup signal Google uses to merge near-identical landings).
 * -------------------------------------------------------------------------- */

.how-it-works {
    margin-top: var(--sp-9);
}

.how-it-works .section-title {
    margin: 0 0 var(--sp-5);
    font-size: var(--text-xl);
    font-weight: 600;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-4);
}

/* Mirrors the .feature-card inline-icon pattern — the step number sits on
 * the same baseline as the heading so the grid reads as three balanced
 * rows of "1 Title / copy" rather than icon-above-title stacks. */
.step-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
}

.step-card h3 {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: 0 0 var(--sp-2);
    font-size: var(--text-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.step-card .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 700;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.step-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ── Public account lane (/account, /pricing) ────────────────────────
 * Auth pages override {% block shell %} (standalone, no header) and need
 * a centered card. These styles were previously only in admin.css, which
 * the public account pages do not load — so the forms rendered unstyled.
 * Ported here so the account lane is self-contained on the public sheet.
 */
.auth-frame {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5);
    background:
        radial-gradient(500px 300px at 20% 10%, var(--color-accent-soft), transparent 60%),
        radial-gradient(500px 300px at 90% 90%, var(--color-accent-soft), transparent 60%),
        var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: var(--sp-7);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    width: fit-content;
}

.auth-brand:hover {
    color: var(--color-text);
    text-decoration: none;
}

.auth-card h2 {
    margin: 0 0 var(--sp-2);
    font-size: var(--text-xl);
}

.auth-lede {
    margin: 0 0 var(--sp-5);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.auth-card .form-error {
    padding: 10px 12px;
    background: var(--color-danger-soft);
    border: 1px solid var(--color-danger-soft);
    border-radius: var(--radius-md);
    margin-bottom: var(--sp-4);
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: var(--sp-2);
}

.auth-alt {
    margin: var(--sp-5) 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
}

/* The secondary password / forgot / signup-with-password forms are tucked
 * behind a <details> so the primary magic-link path stays uncluttered. */
.auth-disclosure {
    margin-top: var(--sp-4);
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-4);
}

.auth-disclosure > summary {
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-accent);
    user-select: none;
}

/* The password disclosure stacks a field + 1-2 submit buttons + a hint;
 * give them vertical rhythm (the disclosure now lives INSIDE the single
 * sign-in form, so we target its direct children, not a nested form). */
.auth-disclosure > .form-row {
    margin-top: var(--sp-3);
}

.auth-disclosure button {
    width: 100%;
}

.auth-disclosure button + button {
    margin-top: var(--sp-2);
}

.auth-forgot-hint {
    margin: var(--sp-4) 0 var(--sp-2);
}

/* Card container for the signed-in account pages (dashboard, links,
 * settings). Mirrors .panel — kept as a distinct name so the account
 * markup reads intent-first; +spacing between stacked cards. */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: var(--sp-5);
}

/* Two compact cards side by side in one row (e.g. Tags + Scheduling on the
 * link detail) instead of two full-width cards stacked. Keeps the same
 * vertical rhythm as a lone .card above/below; collapses to one column on
 * narrow screens. */
.card-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-5);
    align-items: start;
    margin-top: var(--sp-5);
}

.card-row > .card {
    margin-top: 0;
}

.card-row + .card {
    margin-top: var(--sp-5);
}

@media (max-width: 640px) {
    .card-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Borderless text-style button (sign out, header sign-in). */
.btn.link {
    background: transparent;
    border-color: transparent;
    color: var(--color-accent);
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.btn.link:hover {
    background: transparent;
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* Owner link list + admin/account history tables. */
.links-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--sp-4);
    font-size: var(--text-sm);
}

.links-table th,
.links-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.links-table th {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium, 600);
}

.links-table td.truncate,
.links-table .truncate {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin-top: var(--sp-4);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* /pricing tier cards. */
.pricing-grid {
    display: grid;
    /* Stacked on mobile; a true 3-up row from 860px (the 960px content column
       then gives each card ~280px — the Turnstile widget breaks out across the
       card padding via `.pricing-card .cf-turnstile`, so it isn't clipped).
       `align-items: start` lets each card take its natural height, so the short
       Free card no longer stretches to match the tall waitlist-form cards. */
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--sp-4);
    margin-top: var(--sp-5);
}

@media (min-width: 860px) {
    .pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pricing-card {
    position: relative;
    background: var(--color-surface-elevated, var(--color-surface));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

/* The recommended tier — accent border + lift + a "Most popular" pill that
   straddles the top edge. */
.pricing-card.featured {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md, 0 10px 30px -12px rgba(0, 0, 0, 0.25));
}

.pricing-badge {
    position: absolute;
    top: 0;
    right: var(--sp-5);
    transform: translateY(-50%);
    background: var(--color-accent);
    color: var(--color-accent-foreground, #fff);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.pricing-price {
    color: var(--color-text-muted);
    margin: 0;
}

.pricing-price strong {
    font-size: var(--text-2xl, 1.75rem);
    font-weight: 700;
    color: var(--color-text);
    margin-right: 2px;
}

.pricing-card ul {
    list-style: none;
    padding: var(--sp-4) 0 0;
    margin: 0 0 var(--sp-4);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    font-size: var(--text-sm);
}

/* Accent check before every feature — the same Lucide glyph used elsewhere,
 * drawn as a mask so it tints with --color-accent in both themes. */
.pricing-card li {
    position: relative;
    padding-left: 26px;
    line-height: 1.45;
    color: var(--color-text);
}

.pricing-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 16px;
    height: 16px;
    background-color: var(--color-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* "Everything in Free/Pro" — the first item is a carry-over, set it apart. */
.pricing-card li:first-child {
    color: var(--color-text-muted);
    font-weight: 600;
}

.pricing-card form {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

/* Cloudflare Turnstile has a hard ~300px minimum width in normal/flexible size.
   The 3-up tier row makes each card ~290px (3 columns inside the 960px wrap) —
   below that floor — so a flexible widget overflowed the card's right edge. The
   waitlist form renders Turnstile at `compact` (150x140) instead, which fits
   inside the card's content box at any column width, so no negative-margin
   breakout is needed — just centre it. Scoped to .pricing-card so the wider
   homepage shorten form is untouched. */
.pricing-card .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* Free tier has no waitlist form — align its CTA to the card bottom too. */
.pricing-cta {
    margin: auto 0 0;
}

/* ── Signed-in account area (/account/*) ─────────────────────────────
 * Content column with a contextual sub-nav. Matches the public `main .wrap`
 * width (960px) so the signed-in area and the public site read as one
 * surface — the account pages (link list, the result-grid + QR on the link
 * detail, dashboard tiles) also use the extra room. (Admin is intentionally
 * full-width — a different, sidebar-based layout.) */
.account-shell {
    max-width: 960px;
    margin: 0 auto;
}

.account-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--color-border);
}

.account-nav-tabs {
    display: flex;
    gap: var(--sp-1);
    flex-wrap: wrap;
}

.account-nav-tabs a {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium, 600);
    text-decoration: none;
    white-space: nowrap;
}

.account-nav-tabs a:hover {
    background: var(--color-surface-muted);
    color: var(--color-text);
    text-decoration: none;
}

.account-nav-tabs a.is-active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.account-nav-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-size: var(--text-sm);
}

.account-identity {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-width: 0;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
}

.account-identity-email {
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

@media (max-width: 560px) {
    .account-identity-email {
        display: none;
    }

    /* Stack the section tabs above the identity/sign-out cluster and let
     * the three tabs scroll horizontally instead of wrapping to two lines. */
    .account-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .account-nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .account-nav-meta {
        justify-content: space-between;
    }
}

.account-header {
    margin-bottom: var(--sp-5);
}

.account-header h1 {
    margin: 0 0 var(--sp-1);
}

/* Compact "value + Edit" row for a minor optional setting (display name):
 * a quiet one-line summary that expands to the edit form on click, instead of
 * a standing full form. No-JS via <details>, CSP-safe. */
.edit-disclosure > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}

.edit-disclosure > summary::-webkit-details-marker {
    display: none;
}

.edit-disclosure-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--sp-1) var(--sp-3);
    min-width: 0;
}

.edit-disclosure-value {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.edit-disclosure-toggle {
    flex-shrink: 0;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-accent);
}

.edit-disclosure[open] > summary {
    margin-bottom: var(--sp-4);
}

/* Page lead — the one-line subtitle under an account page's H1
 * (Overview / My links / Settings / New link). A notch larger than body and
 * muted so it reads as a deliberate subtitle, not another body paragraph. */
.page-lead {
    margin: var(--sp-1) 0 0;
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--color-text-muted);
}

/* Link-detail meta: status badge + click/created chips, instead of a
 * middot-separated text run. */
.account-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-2);
}

.account-header-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.account-header-meta .meta-item .icon {
    color: var(--color-text-subtle);
}

.account-breadcrumb {
    margin: 0 0 var(--sp-2);
    font-size: var(--text-sm);
}

.account-breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.account-breadcrumb a:hover {
    color: var(--color-text);
    text-decoration: none;
}

.account-shorturl {
    margin: var(--sp-2) 0 0;
    word-break: break-all;
}

/* Section headings inside account cards sit a notch below the page H1. */
.account-shell .card h2 {
    margin: 0 0 var(--sp-2);
    font-size: var(--text-lg);
}

.account-shell .card h3 {
    margin: var(--sp-4) 0 var(--sp-2);
    font-size: var(--text-md);
}

.account-shell .card form + h3 {
    margin-top: var(--sp-5);
}

.card-divider {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: var(--sp-5) 0;
}

/* Danger-zone card (delete account, link Manage). A full danger border plus a
 * faint danger wash + danger heading so it reads as "careful here", instead of
 * looking like every other neutral card. */
.card-danger {
    border-color: var(--color-danger);
    background: var(--color-danger-soft);
}

.card-danger > h2 {
    color: var(--color-danger);
}

.card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--sp-3);
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-4);
}

/* Manage card — each row pairs an explanation with a single action button,
 * the button right-aligned on wide viewports and stacked underneath on
 * narrow ones. */
.manage-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.manage-action > div {
    flex: 1 1 18rem;
}

.manage-action p {
    margin: var(--sp-1) 0 0;
}

.manage-action form {
    margin: 0;
    flex: 0 0 auto;
}

.schedule-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 var(--sp-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Share affordances under the short URL on the link-detail page. */
.share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
}

.share-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-right: var(--sp-1);
}

/* Share targets are icon-only (copy / email / Telegram / WhatsApp / Viber / X);
 * the accessible name lives in title + aria-label. Each brand keeps its own
 * colour on hover so the row reads as recognisable logos, not grey blobs. */
.share-row .icon-btn:hover {
    color: var(--color-text);
}

.share-row a[href^="https://t.me"]:hover { color: #229ED9; border-color: #229ED9; }
.share-row a[href^="https://wa.me"]:hover { color: #25D366; border-color: #25D366; }
.share-row a[href^="viber:"]:hover { color: #7360F2; border-color: #7360F2; }
.share-row a[href^="https://twitter.com"]:hover { color: var(--color-text); border-color: var(--color-text); }

/* Bulk-select toolbar + the per-row checkbox it drives. */
.bulk-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
    min-height: 36px;
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.bulk-bar[hidden] {
    display: none;
}

.bulk-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-right: var(--sp-1);
}

.bulk-tag-add {
    display: inline-flex;
    gap: var(--sp-1);
    align-items: center;
}

.bulk-tag-add input[type="text"] {
    width: 7rem;
}

.link-row-select {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Tags — chips on rows + detail, the tag filter bar, and the add/remove UI. */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: var(--text-xs);
    line-height: 1.6;
}

.tag-chip a {
    color: inherit;
    text-decoration: none;
}

.link-row-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.tag-chip.removable {
    padding-right: 4px;
}

.tag-chip .tag-remove {
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: 0.75;
}

.tag-chip .tag-remove:hover {
    opacity: 1;
}

.tag-chip form {
    display: inline;
    margin: 0;
}

.tag-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    align-items: center;
}

.tag-add-form input[type="text"] {
    flex: 1 1 16rem;
    min-width: 0;
}

.links-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.links-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-decoration: none;
    background: var(--color-surface);
}

.links-tag-chip:hover {
    color: var(--color-text);
    border-color: var(--color-border-strong);
    text-decoration: none;
}

.links-tag-chip.is-active {
    background: var(--color-accent);
    color: var(--color-accent-foreground);
    border-color: var(--color-accent);
}

/* Settings key/value rows (email, sign-in method, created, last sign-in). */
.account-meta {
    margin: 0;
    display: grid;
    gap: var(--sp-2);
}

.account-meta > div {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-4);
}

.account-meta dt {
    flex: 0 0 9rem;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.account-meta dd {
    margin: 0;
    flex: 1 1 12rem;
    font-size: var(--text-sm);
}

/* Stat tiles on the overview. */
.account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 140px;
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

/* Only the tiles that are links (Links, Active) get the interactive hover;
 * the plain-stat tiles (Total clicks, Clicks · Nd) are <div>s and must not
 * imply they're clickable. */
a.stat-tile:hover {
    border-color: var(--color-accent);
    text-decoration: none;
}

.stat-value {
    font-size: var(--text-2xl, 1.75rem);
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Empty states — icon + headline + supporting copy + a primary CTA,
 * centred. Replaces the bare one-liners. */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-3);
    padding: var(--sp-7) var(--sp-5);
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.empty-state h2 {
    margin: 0;
    font-size: var(--text-lg);
}

.empty-state p {
    margin: 0;
    max-width: 42ch;
}

/* Key-value rows (top referrers, etc.). */
.data-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.data-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.data-list li:last-child {
    border-bottom: 0;
}

/* Link-detail header: short-URL copy row + QR action. */
.account-header .short-url {
    margin-top: var(--sp-3);
}

/* Destination-edit history — a compact change log instead of a wide
 * two-URL table that never fits. Each entry stacks the timestamp over a
 * from → to pair, both truncated. */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.history-item:last-child {
    border-bottom: 0;
}

.history-when {
    display: block;
    font-size: var(--text-xs);
    margin-bottom: 4px;
}

.history-change {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--text-sm);
}

.history-change .truncate {
    max-width: 100%;
}

.history-arrow {
    color: var(--color-text-subtle);
    line-height: 1;
}

/* My links — a list of link rows (modern dashboard pattern) instead of a
 * flat 6-column table. Each row is one big click target to the detail
 * page: short path + destination stacked on the left, stats + status +
 * date on the right. */
.account-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.link-row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--duration-fast) var(--ease-out),
        background var(--duration-fast) var(--ease-out);
}

.link-row:hover {
    border-color: var(--color-accent);
}

/* The anchor fills the row; the action cluster (copy / open) sits outside
 * it so the buttons are not nested inside an <a> (invalid + unclickable). */
.link-row-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.link-row-link:hover {
    text-decoration: none;
}

/* Admin roster identity cell: one link wrapping the display name + the platform
   id so both navigate to the detail page with a single tab stop (rather than
   two separate links to the same page). The id keeps its muted .meta colour and
   stays text-selectable for copy. */
.identity-link {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    text-decoration: none;
}

.identity-link:hover .truncate {
    text-decoration: underline;
}

.link-row-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    flex-shrink: 0;
}

.link-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.link-row-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--color-text);
}

.link-row-dest {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.link-row-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-shrink: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.link-row-clicks strong {
    color: var(--color-text);
}

@media (max-width: 640px) {
    .link-row-link {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-2);
    }

    .link-row-meta {
        gap: var(--sp-3);
    }

    .link-row-date {
        display: none;
    }
}

/* Square icon-only buttons (copy / open) on list rows. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: border-color var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
}

.icon-btn:hover,
.icon-btn:focus-visible {
    /* Pin the background — these are <button>s, so without this they inherit
     * the base button:hover dark accent fill and turn into a dark square. */
    background: var(--color-surface-muted);
    border-color: var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
}

.icon-btn.is-copied {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Transient "Copied" tooltip for any copy trigger. Driven purely by the
 * .is-copied class (a dedicated name — NOT .copied, which is the result-page
 * message span styled opacity:0 until .shown; reusing it hid the buttons).
 * account.js never rewrites the element's content, so this works for
 * icon-only buttons and labelled buttons alike. */
[data-copy],
[data-copy-pre] {
    position: relative;
}

[data-copy].is-copied::after,
[data-copy-pre].is-copied::after {
    content: "Copied";
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    border-radius: var(--radius-sm, 6px);
    background: var(--color-text);
    color: var(--color-surface);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    box-shadow: var(--shadow-md, 0 4px 12px rgb(0 0 0 / 0.2));
}

/* My-links toolbar: search box + state tabs on one wrapping row. */
.links-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}

.links-search {
    display: flex;
    align-items: stretch;
    gap: var(--sp-2);
    flex: 1 1 22rem;
}

/* One cohesive field: search glyph + borderless input + clear, wrapped in a
 * single bordered box that matches the project's inputs and lifts on focus.
 * The bare <input type=search> isn't covered by the base input styles, which
 * is exactly why it looked unfinished — here it's transparent inside the box. */
.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    background: var(--color-field);
    border: 1px solid var(--color-field-border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
}

.search-field:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-ring);
}

.search-field > .icon {
    flex: 0 0 auto;
}

.search-field input[type="search"] {
    flex: 1;
    min-width: 0;
    width: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    padding: 9px 0;
    color: var(--color-text);
    font-size: var(--text-base);
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.search-field input[type="search"]:focus {
    border: 0;
    box-shadow: none;
}

.search-field input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-field-clear {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--color-text-muted);
}

.search-field-clear:hover {
    color: var(--color-text);
}

.links-search > .btn {
    flex: 0 0 auto;
}

.links-filter-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--color-surface-2, var(--color-surface));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
}

.links-filter-tab {
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
}

.links-filter-tab:hover {
    color: var(--color-text);
    text-decoration: none;
}

.links-filter-tab.is-active {
    background: var(--color-accent);
    color: var(--color-accent-foreground);
}

.links-sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.links-sort-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    font-weight: 600;
}

.links-sort-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-decoration: none;
    background: var(--color-surface);
}

.links-sort-chip:hover,
.links-sort-chip:focus-visible {
    color: var(--color-text);
    border-color: var(--color-border-strong);
    text-decoration: none;
}

.links-sort-chip.is-active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    border-color: var(--color-accent-soft);
}

/* Card header with a control cluster on the right (e.g. chart range). */
.card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-bottom: var(--sp-3);
}

.card-head-row h2 {
    margin: 0;
}

.range-chips {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--color-surface-2, var(--color-surface));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
}

.range-chip {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
}

.range-chip:hover {
    color: var(--color-text);
    text-decoration: none;
}

.range-chip.is-active {
    background: var(--color-accent);
    color: var(--color-accent-foreground);
}

.qr-customiser {
    margin-top: var(--sp-4);
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-4);
}

.qr-customiser > summary {
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

/* Clicks chart (shared _macros/chart.html.twig). These rules previously
 * lived only in admin.css; the account link-detail loads app.css only, so
 * without them the .area polygon fell back to the SVG default fill (solid
 * black) — a black triangle instead of a faint accent-tinted area. */
.chart-wrap {
    position: relative;
}

.chart {
    width: 100%;
    height: 200px;
    display: block;
}

.chart .area {
    fill: var(--color-accent);
    fill-opacity: 0.12;
}

.chart .line {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart .dot {
    fill: var(--color-accent);
}

.chart .grid {
    stroke: var(--color-border);
    stroke-dasharray: 3 4;
    stroke-width: 1;
}

.chart-axis {
    position: absolute;
    color: var(--color-text-subtle);
    font-size: 10px;
    font-family: var(--font-mono);
    pointer-events: none;
}

.chart-axis-max {
    top: 4px;
    right: 24px;
}

.chart-axis-start {
    bottom: 2px;
    left: 24px;
}

.chart-axis-end {
    bottom: 2px;
    right: 24px;
}

.upsell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px dashed var(--color-border-strong);
    border-radius: 10px;
    background: var(--color-surface-muted);
}

.upsell-text {
    margin: 0;
    color: var(--color-text-muted);
}

.qr-branding {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.qr-branding h3 {
    margin-top: 0;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 10px;
}
