/* ==========================================================================
   ilead.to — stylesheet
   Design direction: editorial-modern. Warm cream canvas, deep charcoal text,
   signal-orange for momentum. Fraunces serif display + DM Sans body.
   ========================================================================== */

:root {
    /* Palette */
    --ink:          #0f0e0c;        /* near-black text */
    --ink-soft:     #2a2622;        /* secondary text */
    --ink-mute:     #6b6560;        /* muted text */
    --cream:        #f6f1e7;        /* warm page bg */
    --cream-deep:   #ecdfc5;        /* subtle surfaces */
    --paper:        #fbf7ee;        /* card surfaces */
    --line:         rgba(15, 14, 12, 0.12);
    --line-strong:  rgba(15, 14, 12, 0.22);

    /* Accent (signal orange) */
    --signal:       #ff5b2e;
    --signal-dark:  #e24415;
    --signal-soft:  #ffe8df;

    /* Depths */
    --shadow-sm:    0 1px 2px rgba(15, 14, 12, 0.06);
    --shadow-md:    0 12px 32px -12px rgba(15, 14, 12, 0.18);
    --shadow-lg:    0 32px 64px -24px rgba(15, 14, 12, 0.28);

    /* Type */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --gutter: clamp(20px, 4vw, 40px);
    --maxw: 1180px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink);
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--signal); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

.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;
}

/* Noise overlay — subtle paper texture */
.noise {
    position: fixed; inset: 0; pointer-events: none; z-index: 1;
    opacity: 0.35; mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.05  0 0 0 0 0.05  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Logo mark
   ========================================================================== */
.logo-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--signal);
    margin-right: 6px;
    vertical-align: baseline;
    box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.12);
}
.logo-dim { color: var(--ink-mute); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 22px;
    border-radius: var(--radius-pill);
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
    border: 1px solid transparent;
}
.btn--small  { padding: 10px 16px; font-size: 14px; }
.btn--large  { padding: 18px 30px; font-size: 16px; }
.btn--full   { width: 100%; }

.btn--primary {
    background: var(--ink);
    color: var(--cream);
    box-shadow: var(--shadow-md);
}
.btn--primary:hover {
    background: var(--signal);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -10px rgba(255, 91, 46, 0.45);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn--ghost:hover {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
}

.btn--hero .btn__arrow {
    display: inline-block;
    transition: transform .2s ease;
}
.btn--hero:hover .btn__arrow { transform: translateX(4px); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 32px;
    padding: 18px var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.nav::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(246, 241, 231, 0.72);
    border-bottom: 1px solid var(--line);
    z-index: -1;
}

.nav__logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.nav__logo:hover { color: var(--ink); }

.nav__links {
    display: flex; gap: 30px;
    margin-left: auto;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-soft);
}
.nav__links a { position: relative; }
.nav__links a::after {
    content: ''; position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px; background: var(--signal);
    transition: width .2s ease;
}
.nav__links a:hover::after { width: 100%; }

.nav__cta { display: flex; align-items: center; gap: 16px; }
.nav__signin {
    font-size: 15px; font-weight: 500; color: var(--ink-soft);
}

.nav__burger {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px;
    padding: 0;
}
.nav__burger span {
    display: block; width: 22px; height: 2px; background: var(--ink);
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 840px) {
    .nav__links { display: none; }
    .nav__burger { display: flex; }
    .nav__cta .nav__signin { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(40px, 7vw, 84px) var(--gutter) 0;
    z-index: 2;
}

.hero__orbs {
    position: absolute; inset: 0; pointer-events: none; z-index: -1;
    overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: drift 14s ease-in-out infinite alternate;
}
.orb--1 {
    width: 320px; height: 320px;
    top: -60px; right: -40px;
    background: radial-gradient(circle, var(--signal) 0%, transparent 70%);
}
.orb--2 {
    width: 420px; height: 420px;
    top: 120px; left: -120px;
    background: radial-gradient(circle, #ffc48a 0%, transparent 70%);
    animation-delay: -4s;
}
@keyframes drift {
    to { transform: translate(20px, -20px) scale(1.05); }
}

.hero__inner {
    max-width: 820px;
    text-align: center;
    margin: 0 auto;
}

.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 28px;
    animation: fadeUp .6s ease .1s both;
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
    box-shadow: 0 0 0 0 rgba(255, 91, 46, 0.6);
    animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(255, 91, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 91, 46, 0); }
}

.hero__title {
    font-size: clamp(42px, 6.2vw, 76px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -0.035em;
    animation: fadeUp .7s ease .2s both;
}
.hero__title em {
    font-style: italic;
    font-family: var(--font-display);
    font-weight: 400;
    background: linear-gradient(100deg, var(--signal) 0%, var(--signal-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: 4px;
}
.hero__title-line {
    display: block;
    font-size: 0.55em;
    font-weight: 300;
    color: var(--ink-mute);
    margin-top: 14px;
    letter-spacing: -0.02em;
}

.hero__sub {
    max-width: 620px;
    margin: 26px auto 40px;
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--ink-soft);
    line-height: 1.55;
    animation: fadeUp .7s ease .3s both;
}
.hero__sub strong { color: var(--ink); font-weight: 600; }

/* Shortener form */
.shorten-form {
    display: flex; gap: 10px;
    max-width: 640px;
    margin: 0 auto;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    transition: border-color .2s ease, box-shadow .2s ease;
    animation: fadeUp .7s ease .4s both;
}
.shorten-form:focus-within {
    border-color: var(--signal);
    box-shadow: 0 0 0 6px rgba(255, 91, 46, 0.12), var(--shadow-lg);
}
.shorten-form__field {
    flex: 1;
    display: flex; align-items: center; gap: 12px;
    padding-left: 20px;
    min-width: 0;
}
.shorten-form__prefix {
    display: inline-flex;
    color: var(--ink-mute);
    flex-shrink: 0;
}
.shorten-form input {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    padding: 14px 0;
    min-width: 0;
}
.shorten-form input::placeholder { color: var(--ink-mute); }

.btn--hero {
    padding: 16px 26px;
    font-size: 15px;
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .shorten-form {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 12px;
        gap: 12px;
    }
    .shorten-form__field { padding-left: 12px; }
    .btn--hero { width: 100%; }
}

/* Shortened result */
.shorten-result {
    max-width: 640px;
    margin: 24px auto 0;
    padding: 20px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--signal);
    border-radius: var(--radius-md);
    text-align: left;
    animation: slideIn .4s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.shorten-result__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    margin-bottom: 8px;
    font-weight: 500;
}
.shorten-result__row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.shorten-result__link {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    word-break: break-all;
    min-width: 0;
}
.shorten-result__link:hover { color: var(--signal); }
.shorten-result__save {
    margin-top: 14px;
    font-size: 14px;
    color: var(--ink-mute);
}
.shorten-result__save a {
    color: var(--signal);
    font-weight: 600;
}

.shorten-error {
    max-width: 640px;
    margin: 16px auto 0;
    padding: 14px 18px;
    background: #ffeee7;
    border: 1px solid #ffbfa9;
    color: #8b2d0a;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: center;
}

/* Trust row */
.hero__trust {
    display: flex; justify-content: center; gap: 28px;
    margin-top: 32px;
    font-size: 14px;
    color: var(--ink-soft);
    flex-wrap: wrap;
    animation: fadeUp .7s ease .5s both;
}
.check {
    display: inline-flex; width: 18px; height: 18px;
    align-items: center; justify-content: center;
    background: var(--signal-soft);
    color: var(--signal-dark);
    border-radius: 50%;
    margin-right: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Proof strip */
.proof {
    display: flex; justify-content: center; align-items: center;
    gap: clamp(24px, 4vw, 56px);
    margin: clamp(60px, 9vw, 110px) auto 0;
    padding: 32px var(--gutter);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    animation: fadeUp .8s ease .7s both;
}
.proof__stat { text-align: center; }
.proof__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1;
}
.proof__lbl {
    display: block;
    font-size: 13px;
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
}
.proof__divider {
    width: 1px; height: 40px; background: var(--line);
}

/* ==========================================================================
   Generic sections
   ========================================================================== */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(60px, 10vw, 130px) var(--gutter);
    position: relative;
    z-index: 2;
}

.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(40px, 6vw, 70px);
}
.section__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--signal);
    margin-bottom: 16px;
}
.section__title {
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: -0.03em;
}
.section__sub {
    margin-top: 18px;
    font-size: 17px;
    color: var(--ink-soft);
}

/* ==========================================================================
   Features grid
   ========================================================================== */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.feature {
    padding: 40px 32px;
    background: var(--cream);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background .3s ease;
}
.feature:hover { background: var(--paper); }

.feature__icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--signal-soft);
    color: var(--signal-dark);
    display: grid; place-items: center;
    margin-bottom: 20px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature__title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}
.feature__body {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   Steps / How it works
   ========================================================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    counter-reset: step;
}
.step {
    padding: 32px 28px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.step__num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--signal);
    letter-spacing: 0.05em;
}
.step__title {
    font-size: 24px;
    margin: 12px 0 10px;
    font-weight: 500;
}
.step__body {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing { background: linear-gradient(180deg, transparent 0%, var(--cream-deep) 100%); }

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 780px;
    margin: 0 auto;
    align-items: start;
}

.plan {
    padding: 36px 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.plan--featured {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}
.plan--featured:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px -20px rgba(15, 14, 12, 0.5);
}
.plan--featured .plan__name,
.plan--featured .plan__amount { color: var(--cream); }
.plan--featured .plan__period,
.plan--featured .plan__list li,
.plan--featured .plan__fine { color: rgba(246, 241, 231, 0.75); }

.plan__badge {
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--signal);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 8px 16px -4px rgba(255, 91, 46, 0.4);
}

.plan__name {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    font-weight: 600;
    margin-bottom: 14px;
}
.plan__price {
    display: flex; align-items: baseline; gap: 8px;
    margin-bottom: 26px;
}
.plan__amount {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
}
.plan__period {
    font-size: 15px;
    color: var(--ink-mute);
}
.plan__list {
    margin-bottom: 28px;
    display: flex; flex-direction: column; gap: 12px;
}
.plan__list li {
    font-size: 15px;
    color: var(--ink-soft);
    padding-left: 24px;
    position: relative;
}
.plan__list li::before {
    content: '→';
    position: absolute; left: 0; top: 0;
    color: var(--signal);
    font-weight: 600;
}
.plan--featured .plan__list li::before { color: var(--signal); }
.plan--featured .btn--primary {
    background: var(--signal);
    color: #fff;
}
.plan--featured .btn--primary:hover {
    background: #fff;
    color: var(--ink);
}
.plan__fine {
    margin-top: 14px;
    font-size: 13px;
    color: var(--ink-mute);
    text-align: center;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq__list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.qa {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    overflow: hidden;
    transition: border-color .2s ease;
}
.qa[open] { border-color: var(--line-strong); }
.qa__q {
    padding: 20px 24px;
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
    content: '+';
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    color: var(--signal);
    transition: transform .2s ease;
    flex-shrink: 0;
}
.qa[open] .qa__q::after {
    transform: rotate(45deg);
}
.qa__a {
    padding: 0 24px 22px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.65;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cta {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(60px, 10vw, 130px);
    position: relative;
    z-index: 2;
}
.cta__inner {
    background: var(--ink);
    color: var(--cream);
    padding: clamp(50px, 8vw, 90px) clamp(30px, 6vw, 70px);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta__inner::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255, 91, 46, 0.3) 0%, transparent 60%);
    pointer-events: none;
}
.cta__title {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 400;
    color: var(--cream);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    position: relative;
}
.cta__sub {
    font-size: 17px;
    color: rgba(246, 241, 231, 0.75);
    margin-bottom: 36px;
    position: relative;
}
.cta__buttons {
    display: flex; justify-content: center; gap: 14px;
    flex-wrap: wrap;
    position: relative;
}
.cta .btn--primary {
    background: var(--signal);
    color: #fff;
}
.cta .btn--primary:hover {
    background: var(--cream);
    color: var(--ink);
}
.cta .btn--ghost {
    color: var(--cream);
    border-color: rgba(246, 241, 231, 0.3);
}
.cta .btn--ghost:hover {
    background: var(--cream);
    color: var(--ink);
    border-color: var(--cream);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 60px var(--gutter) 40px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 60px;
    position: relative;
    z-index: 2;
}
.footer__logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
}
.footer__tag {
    margin-top: 12px;
    color: var(--ink-mute);
    font-size: 14px;
}
.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.footer__heading {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 14px;
}
.footer__col a {
    display: block;
    padding: 5px 0;
    font-size: 14px;
    color: var(--ink-soft);
}
.footer__copy {
    grid-column: 1 / -1;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-mute);
}

@media (max-width: 720px) {
    .footer { grid-template-columns: 1fr; gap: 40px; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Alerts / forms (shared)
   ========================================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert--error {
    background: #ffeee7;
    border: 1px solid #ffbfa9;
    color: #8b2d0a;
}
.alert p { margin: 2px 0; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.field__hint {
    font-size: 12px;
    color: var(--ink-mute);
}
.field input {
    padding: 13px 16px;
    font: inherit;
    font-size: 15px;
    background: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
}
.field input:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.14);
}

/* ==========================================================================
   Auth pages
   ========================================================================== */
.page-auth {
    background: var(--cream);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
    position: relative;
}
.page-auth::before {
    content: '';
    position: fixed;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255, 91, 46, 0.18) 0%, transparent 60%);
    pointer-events: none;
    filter: blur(40px);
}
.auth-shell {
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.auth-shell__logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 28px;
}
.auth-card {
    background: var(--paper);
    padding: 36px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: left;
}
.auth-card__title {
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.auth-card__subtitle {
    color: var(--ink-soft);
    margin-bottom: 24px;
    font-size: 15px;
}
.auth-card__subtitle strong { color: var(--ink); }
.auth-card__switch {
    margin-top: 22px;
    font-size: 14px;
    color: var(--ink-soft);
    text-align: center;
}
.auth-card__switch a {
    color: var(--signal);
    font-weight: 600;
}
.auth-shell__fineprint {
    margin-top: 24px;
    font-size: 12px;
    color: var(--ink-mute);
}

/* Shared centered page (404) */
.page-centered {
    background: var(--cream);
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 40px 20px;
}
.notfound { text-align: center; max-width: 520px; }
.notfound__eyebrow {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 400;
    color: var(--signal);
    line-height: 1;
    letter-spacing: -0.04em;
}
.notfound__title {
    font-size: 34px;
    margin: 12px 0 10px;
    font-weight: 400;
}
.notfound__body {
    color: var(--ink-soft);
    margin-bottom: 28px;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.page-dash { background: var(--cream); min-height: 100vh; }

.top {
    display: flex; align-items: center;
    padding: 20px var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
    border-bottom: 1px solid var(--line);
}
.top__logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
}
.top__nav {
    margin-left: auto;
    display: flex; align-items: center; gap: 16px;
    font-size: 14px;
}
.top__user { color: var(--ink-mute); }
.inline-form { display: inline; }

.dash {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px var(--gutter);
    display: flex; flex-direction: column; gap: 32px;
}

.dash__hello { margin-bottom: 12px; }
.dash__eyebrow {
    font-size: 13px; color: var(--signal);
    text-transform: uppercase; letter-spacing: 0.14em;
    margin-bottom: 10px; font-weight: 500;
}
.dash__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.stat {
    padding: 22px 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.stat--accent { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.stat--accent .stat__label { color: rgba(246, 241, 231, 0.7); }
.stat--accent .stat__value { color: var(--cream); }
.stat__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
    font-weight: 500;
    margin-bottom: 8px;
}
.stat__value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat__cta {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--signal);
    font-weight: 600;
}

.dash__card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 28px 32px;
}
.dash__card-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: -0.015em;
}

.shorten-form--dash {
    box-shadow: none;
    border-color: var(--line);
    background: var(--cream);
    margin: 0;
    max-width: none;
}

.link-table-wrap {
    overflow-x: auto;
    margin: 0 -8px;
}
.link-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.link-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--ink-mute);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}
.link-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.link-table tr:last-child td { border-bottom: none; }
.td-url {
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-soft);
}
.mono { font-family: var(--font-mono); font-size: 13px; }
.ta-r { text-align: right; }

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-mute);
    font-size: 15px;
}

/* ==========================================================================
   Alias expand toggle (homepage — below shortener)
   ========================================================================== */
.alias-expand {
    max-width: 640px;
    margin: 18px auto 0;
}
.alias-expand__toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ink-mute);
    background: transparent;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.alias-expand__toggle:hover {
    color: var(--signal);
    border-color: var(--signal);
    background: var(--signal-soft);
}
.alias-expand__toggle code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
    background: var(--cream-deep);
    padding: 2px 6px;
    border-radius: 4px;
}
.alias-expand__chev {
    transition: transform .2s ease;
    font-size: 11px;
}
.alias-expand__toggle.is-open .alias-expand__chev { transform: rotate(180deg); }

.alias-panel {
    margin-top: 14px;
    padding: 18px 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    text-align: left;
    animation: slideIn .3s ease;
}

/* ==========================================================================
   Alias input (prefix + field)
   ========================================================================== */
.alias-input {
    display: flex; align-items: stretch;
    background: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
    min-width: 0;
}
.alias-input:focus-within {
    border-color: var(--signal);
    box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.12);
}
.alias-input__prefix {
    display: flex; align-items: center;
    padding: 0 10px 0 14px;
    background: var(--cream-deep);
    color: var(--ink-mute);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid var(--line);
    white-space: nowrap;
}
.alias-input input {
    flex: 1;
    padding: 12px 14px;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink);
    min-width: 0;
}
.alias-input input::placeholder {
    color: var(--ink-mute);
    font-family: var(--font-body);
}
.alias-input input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alias-input--lg .alias-input__prefix { font-size: 15px; padding: 0 12px 0 18px; }
.alias-input--lg input { padding: 16px 18px; font-size: 17px; }

.alias-input-row {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 10px;
}

.alias-status {
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--ink-mute);
    min-height: 18px;
    font-weight: 500;
}
.alias-status--good     { color: #137333; }
.alias-status--bad      { color: var(--signal-dark); }
.alias-status--pending  { color: var(--ink-mute); }
.alias-status--error    { color: var(--signal-dark); }
.alias-status--reserved { color: #8a5a00; }
.alias-status--lg { font-size: 14px; }

.alias-status__link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 2px;
    font-weight: 600;
    margin-left: 2px;
}
.alias-status__link:hover {
    color: var(--signal);
}

/* ==========================================================================
   Claim page (/claim.php)
   ========================================================================== */
.claim .claim__alias {
    font-family: var(--font-mono);
    font-size: 0.65em;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 500;
    vertical-align: middle;
    white-space: nowrap;
    display: inline-block;
    margin-top: 6px;
}

.claim-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 640px;
    margin: 32px 0 0;
}

.claim-form .field__label .req {
    color: var(--signal);
    font-weight: 600;
}

.claim-form input[type="text"],
.claim-form input[type="email"],
.claim-form input[type="url"],
.claim-form textarea {
    padding: 13px 16px;
    font: inherit;
    font-size: 15px;
    background: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
    font-family: var(--font-body);
    width: 100%;
    resize: vertical;
}
.claim-form input:focus,
.claim-form textarea:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.14);
}
.claim-form textarea {
    min-height: 80px;
    line-height: 1.5;
}

.field--check {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
}
.field--check input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--signal);
    flex-shrink: 0;
    cursor: pointer;
}

.claim-form__actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.claim-success {
    padding: 28px 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--signal);
    border-radius: var(--radius-md);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
    margin-top: 24px;
}
.claim-success p {
    margin: 0 0 14px;
}
.claim-success p:last-of-type {
    margin-bottom: 0;
}
.claim-success strong { color: var(--ink); }
.claim-success code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 2px 8px;
    border-radius: 4px;
}
.claim-success__actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.brand-try__cta-hint {
    font-size: 13px;
    color: var(--ink-mute);
    margin: 8px 0 0;
}

/* ==========================================================================
   Admin queue (/admin/claims.php)
   ========================================================================== */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.admin-tab {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-mute);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
}
.admin-tab:hover {
    color: var(--ink);
}
.admin-tab.is-active {
    color: var(--signal);
    border-bottom-color: var(--signal);
}
.admin-tab__count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    background: var(--cream-deep);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
}
.admin-tab.is-active .admin-tab__count {
    background: var(--signal-soft);
    color: var(--signal-dark);
}

.admin-claims {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-claim {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    transition: border-color .15s ease;
}
.admin-claim--pending {
    border-left: 3px solid var(--signal);
}
.admin-claim--approved {
    opacity: 0.75;
    border-left: 3px solid #137333;
}
.admin-claim--denied {
    opacity: 0.65;
    border-left: 3px solid var(--ink-mute);
}

.admin-claim__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.admin-claim__head strong {
    margin: 0 8px;
    color: var(--ink-mute);
    font-weight: 600;
}
.admin-claim__alias {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}
.admin-claim__time {
    font-size: 12px;
    color: var(--ink-mute);
}

.admin-claim__fields {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
    margin: 0 0 14px;
    font-size: 14px;
}
.admin-claim__fields dt {
    color: var(--ink-mute);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding-top: 2px;
}
.admin-claim__fields dd {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.5;
    word-break: break-word;
}
.admin-claim__fields a {
    color: var(--signal);
    text-decoration: underline;
    text-decoration-color: rgba(255, 91, 46, 0.4);
    text-underline-offset: 2px;
}
.admin-claim__fields a:hover {
    text-decoration-color: var(--signal);
}
.admin-claim__evidence {
    margin: 0;
    padding: 0;
    list-style: none;
}
.admin-claim__evidence li {
    padding: 2px 0;
    word-break: break-all;
}
.admin-claim__msg {
    white-space: pre-wrap;
    font-size: 13px;
    padding: 10px 12px;
    background: var(--paper);
    border-radius: 6px;
    border-left: 2px solid var(--line-strong);
}

@media (max-width: 640px) {
    .admin-claim__fields { grid-template-columns: 1fr; gap: 2px 0; }
    .admin-claim__fields dt { margin-top: 8px; }
}

.admin-claim__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.admin-claim__note {
    flex: 1;
    min-width: 220px;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    background: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    outline: none;
}
.admin-claim__note:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 3px rgba(255, 91, 46, 0.12);
}

.chip--pending  { background: var(--signal); color: #fff; }
.chip--approved { background: #e0f0e4; color: #0b6b33; }
.chip--denied   { background: var(--cream-deep); color: var(--ink-mute); }

.toast--error {
    background: #ffeee7;
    color: #8b2d0a;
    border: 1px solid #ffbfa9;
}

/* ==========================================================================
   Alias hint text, etc.
   ========================================================================== */
.alias-hint {
    font-size: 13px;
    color: var(--ink-mute);
    margin-top: 8px;
}
.alias-hint a { color: var(--signal); font-weight: 600; }

.pro-lock {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--signal-dark);
    font-weight: 600;
}
.pro-lock-inline {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--signal-dark);
    background: var(--signal-soft);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: middle;
    margin-left: 6px;
}

.eyebrow-code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 2px 6px;
    border-radius: 4px;
}

.result-label-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    background: var(--signal);
    color: #fff;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 8px;
    vertical-align: middle;
}

.shorten-error__cta {
    color: var(--signal);
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

/* ==========================================================================
   Brand demo section (homepage, #brand)
   ========================================================================== */
.brand { background: linear-gradient(180deg, transparent 0%, var(--paper) 40%, transparent 100%); }

.brand-demo {
    max-width: 720px;
    margin: 0 auto 60px;
    padding: 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.brand-demo__row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    gap: 20px;
    flex-wrap: wrap;
}
.brand-demo__row--bad {
    background: #f5ebe0;
    opacity: 0.82;
}
.brand-demo__row--good {
    background: var(--ink);
    color: var(--cream);
    position: relative;
    overflow: hidden;
}
.brand-demo__row--good::before {
    content: ''; position: absolute;
    top: 0; right: -40%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 91, 46, 0.25) 100%);
    pointer-events: none;
}

.brand-demo__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--ink-mute);
}
.brand-demo__row--good .brand-demo__label { color: rgba(246, 241, 231, 0.65); }

.brand-demo__link {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.015em;
}
.brand-demo__row--bad .brand-demo__link { color: var(--ink-mute); }
.brand-demo__row--good .brand-demo__link { color: var(--cream); }

.brand-demo__slot {
    color: var(--signal);
    font-weight: 600;
    display: inline-block;
    min-width: 4ch;
    transition: color .2s ease;
}
.brand-demo__slot.is-filled {
    color: #ffb38c;
}

.brand-demo__divider {
    height: 2px;
    background: var(--line);
    margin: 12px 0;
    position: relative;
}
.brand-demo__divider::after {
    content: '→';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    background: var(--paper);
    padding: 0 12px;
    color: var(--signal);
    font-size: 18px;
    font-weight: 700;
}

.brand-try {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.brand-try__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.brand-try__row {
    display: flex; flex-direction: column; gap: 8px;
}
.brand-try__cta {
    margin-top: 14px;
    animation: slideIn .3s ease;
}

.brand-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    max-width: 940px;
    margin: 0 auto;
}
.brand-benefit {
    padding: 20px 0;
}
.brand-benefit h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.015em;
}
.brand-benefit p {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
}
.brand-benefit code,
.brand-demo__link code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   Dashboard: alias row + chips + edit modal
   ========================================================================== */
.shorten-form--dash-wrap {
    display: flex; flex-direction: column; gap: 14px;
    margin-bottom: 18px;
}

.alias-row-dash {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 14px;
    align-items: center;
}
.alias-row-dash__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
}
@media (max-width: 620px) {
    .alias-row-dash {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.td-short .chip,
.chip {
    display: inline-flex; align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
}
.chip--brand {
    background: var(--signal-soft);
    color: var(--signal-dark);
}
.chip--pro {
    background: var(--ink);
    color: var(--cream);
    font-size: 11px;
    padding: 4px 10px;
}
.chip--upgrade {
    background: var(--signal);
    color: #fff;
    padding: 6px 12px;
    font-size: 11px;
    transition: background .2s ease, transform .15s ease;
}
.chip--upgrade:hover {
    background: var(--signal-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-link {
    background: transparent; border: none;
    color: var(--signal);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-link:hover {
    background: var(--signal-soft);
    color: var(--signal-dark);
}
.btn-link--muted {
    color: var(--ink-mute);
}
.btn-link--muted:hover {
    background: var(--cream-deep);
    color: var(--ink);
}

.stat__meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--ink-mute);
}
.stat--accent-pro {
    background: var(--signal);
    color: #fff;
    border-color: var(--signal);
}
.stat--accent-pro .stat__label { color: rgba(255, 255, 255, 0.8); }
.stat--accent-pro .stat__value { color: #fff; }
.stat--accent-pro .stat__meta  { color: rgba(255, 255, 255, 0.75); }

/* Toast */
.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    animation: slideIn .4s ease;
}
.toast--success {
    background: #e8f5ee;
    color: #0b6b33;
    border: 1px solid #9cd3b3;
}

/* Row update flash */
.link-table tr.is-updated {
    animation: rowFlash 1.2s ease;
}
@keyframes rowFlash {
    0%, 100% { background: transparent; }
    20%      { background: var(--signal-soft); }
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: none;
}
.modal.is-open,
.modal[hidden="false"] {
    display: block;
}
.modal:not([hidden]) {
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 14, 12, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn .2s ease;
}
.modal__dialog {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn .25s ease;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.modal__title {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.015em;
}
.modal__close {
    font-size: 18px;
    color: var(--ink-mute);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid; place-items: center;
    transition: background .15s ease, color .15s ease;
}
.modal__close:hover {
    background: var(--cream-deep);
    color: var(--ink);
}
.modal__body {
    padding: 22px 24px 24px;
    display: flex; flex-direction: column; gap: 16px;
}
.modal__actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 6px;
}

/* ==========================================================================
   Legal pages (/terms.php, /privacy.php)
   ========================================================================== */
.page-legal {
    background: var(--cream);
    min-height: 100vh;
}

.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) var(--gutter) 80px;
    position: relative;
    z-index: 2;
}

.legal__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--signal);
    margin-bottom: 14px;
}

.legal__title {
    font-size: clamp(40px, 5.5vw, 64px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0 0 14px;
}

.legal__meta {
    font-size: 14px;
    color: var(--ink-mute);
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

/* The summary box at the top */
.legal__tldr {
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--signal);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
}
.legal__tldr-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--signal-dark);
    font-weight: 600;
    margin: 0 0 8px;
}
.legal__tldr p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0;
}
.legal__tldr code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 1px 6px;
    border-radius: 4px;
}
.legal__tldr a {
    color: var(--signal);
    font-weight: 600;
}

/* Table of contents */
.legal__toc {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px 28px;
    margin-bottom: 48px;
}
.legal__toc-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    font-weight: 600;
    margin: 0 0 12px;
}
.legal__toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}
.legal__toc li {
    padding: 4px 0;
    font-size: 14px;
    break-inside: avoid;
}
.legal__toc a {
    color: var(--ink-soft);
    transition: color .15s ease;
}
.legal__toc a:hover {
    color: var(--signal);
}
@media (max-width: 560px) {
    .legal__toc ol { columns: 1; }
}

/* Body content */
.legal__body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
}
.legal__body section {
    margin-bottom: 44px;
    scroll-margin-top: 80px;
}
.legal__body h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 2.8vw, 30px);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.2;
    margin: 0 0 18px;
    padding-top: 8px;
}
.legal__body h3 {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.005em;
    margin: 28px 0 10px;
    scroll-margin-top: 80px;
}
.legal__body p {
    margin: 0 0 16px;
}
.legal__body ul {
    margin: 0 0 18px;
    padding: 0 0 0 4px;
    list-style: none;
}
.legal__body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}
.legal__body ul li::before {
    content: '';
    position: absolute;
    left: 4px; top: 12px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--signal);
    opacity: 0.6;
}
.legal__body strong {
    color: var(--ink);
    font-weight: 600;
}
.legal__body a {
    color: var(--signal);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(255, 91, 46, 0.35);
    text-underline-offset: 2px;
    transition: text-decoration-color .15s ease, color .15s ease;
}
.legal__body a:hover {
    text-decoration-color: var(--signal);
}
.legal__body code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--cream-deep);
    color: var(--ink);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Compact legal table (used in privacy policy) */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
    font-size: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.legal-table thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-mute);
    background: var(--cream-deep);
    border-bottom: 1px solid var(--line);
}
.legal-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.5;
}
.legal-table tbody tr:last-child td { border-bottom: none; }
@media (max-width: 640px) {
    .legal-table,
    .legal-table thead,
    .legal-table tbody,
    .legal-table th,
    .legal-table td,
    .legal-table tr { display: block; }
    .legal-table thead { display: none; }
    .legal-table tr {
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
    }
    .legal-table tr:last-child { border-bottom: none; }
    .legal-table td {
        padding: 4px 0;
        border: none;
    }
    .legal-table td:nth-child(1) {
        font-weight: 600;
        color: var(--ink);
        margin-bottom: 4px;
    }
    .legal-table td:nth-child(3) {
        font-size: 13px;
        color: var(--ink-mute);
        margin-top: 4px;
    }
}

.legal__back {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-mute) !important;
    text-decoration: none !important;
}
.legal__back:hover {
    color: var(--signal) !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile nav dropdown */
@media (max-width: 840px) {
    .nav__links.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: var(--gutter);
        right: var(--gutter);
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        padding: 16px;
        margin-top: 8px;
        box-shadow: var(--shadow-md);
        gap: 16px;
    }
}
