/* =============================================================
   Prodfab — Public Web design system
   No framework. CSS variables + handwritten components. Loads
   after the Google Fonts link so typography is already applied
   by the time this paints.
   ============================================================= */

/* ---- Design tokens ----------------------------------------- */
:root {
    /* Brand — indigo primary, violet→blue gradient for hero surfaces */
    --brand-50:  #EEF2FF;
    --brand-100: #E0E7FF;
    --brand-200: #C7D2FE;
    --brand-500: #6366F1;
    --brand-600: #4F46E5;  /* primary */
    --brand-700: #4338CA;
    --brand-900: #312E81;

    --violet-600: #7C3AED;
    --blue-600:   #2563EB;

    /* Accent — warm counter to the cool brand range */
    --accent-500: #F59E0B;
    --accent-600: #D97706;

    /* Semantic */
    --success-500: #10B981;
    --success-600: #059669;
    --danger-500:  #EF4444;
    --danger-600:  #DC2626;
    --warning-500: #F59E0B;
    --info-500:    #0EA5E9;

    /* Neutrals — slate scale */
    --bg:        #F8FAFC;
    --surface:   #FFFFFF;
    --surface-2: #F1F5F9;
    --border:    #E2E8F0;
    --border-strong: #CBD5E1;
    --text:      #0F172A;
    --text-2:    #334155;
    --muted:     #64748B;
    --subtle:    #94A3B8;

    /* Radii */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows — layered, subtle */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow:    0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -12px rgba(79, 70, 229, 0.18), 0 10px 20px -10px rgba(15, 23, 42, 0.1);

    /* Gradient */
    --gradient-brand: linear-gradient(135deg, var(--violet-600) 0%, var(--blue-600) 100%);
    --gradient-soft:  linear-gradient(135deg, #EEF2FF 0%, #EDE9FE 50%, #E0F2FE 100%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    /* Layout */
    --container: 1120px;
    --container-narrow: 760px;
}

/* ---- Reset-ish --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

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

/* ---- Layout helpers ---------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

.container-narrow {
    width: 100%;
    max-width: var(--container-narrow);
    margin-inline: auto;
    padding-inline: 24px;
}

.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 96px 0; }

.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 0.875rem; }
.text-break { word-break: break-all; }
.text-center { text-align: center; }

/* ---- Navigation bar ---------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 68px;
}
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.nav-brand:hover { text-decoration: none; color: var(--text); }
.nav-brand-mark {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: var(--gradient-brand);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700;
    box-shadow: 0 4px 10px -2px rgba(79, 70, 229, 0.5);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0; padding: 0;
}
.nav-links a {
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}
.nav-links a:hover { color: var(--brand-600); }
.nav-cta { margin-left: 8px; }

/* CTA button inside the header nav: .nav-links a has higher specificity
   than .btn-primary on its own, so without this override the CTA text
   inherits the nav link color and ends up dark on the purple gradient
   (unreadable). Scoped to .btn-primary so any .btn-secondary / .btn-ghost
   dropped into the nav later keeps its intended colors. */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary:focus { color: #fff; }

/* Language switcher — pill toggle with both languages visible. The active
   one is highlighted; the other is a clickable link to the same page in
   that language. */
.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.lang-switch-opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.lang-switch-opt:hover {
    color: var(--brand-700);
    background: var(--brand-50);
    text-decoration: none;
}
.lang-switch-opt.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: default;
}

/* ---- Hamburger menu (mobile only) ----------------------------
   CSS-only checkbox hack: checkbox is hidden offscreen, the <label> is
   the visible button. When checkbox is :checked, the drawer opens via
   the general-sibling combinator. No JS, no aria-expanded toggling, but
   the checkbox carries the state semantically for assistive tech.
   Desktop (>640px) hides the button and shows links inline as before. */
.nav-toggle {
    /* Hide the checkbox visually but keep it focusable / readable. */
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.nav-toggle-label {
    display: none; /* hidden on desktop */
    cursor: pointer;
    padding: 10px 8px;
    margin-right: -8px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle-label:hover { background: var(--surface-2); }
.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-toggle-bar + .nav-toggle-bar { margin-top: 5px; }
.nav-toggle:focus-visible + .nav-toggle-label {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    /* Show the hamburger button. */
    .nav-toggle-label { display: block; }

    /* Pull the menu out of the flex flow into a drawer below the header.
       `position: absolute` so the brand + button row keeps its size,
       drawer overlays content underneath. */
    .nav-primary {
        position: absolute;
        top: 68px; /* matches .nav-inner height */
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(14px);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        border-bottom: 1px solid var(--border);
        padding: 12px 20px 18px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
        pointer-events: none;
    }
    .nav-toggle:checked ~ .nav-primary {
        max-height: 80vh;
        opacity: 1;
        pointer-events: auto;
    }

    /* Stack links vertically with full-width tap targets. */
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 12px 8px;
        font-size: 1rem;
        border-radius: 8px;
    }
    .nav-links a:hover { background: var(--surface-2); }

    /* CTA inside drawer: full width, centered text. */
    .nav-links a.btn-primary {
        text-align: center;
        margin-top: 10px;
        padding: 12px;
    }
    .nav-cta { margin-left: 0; }

    /* Language switcher row — center the pill. */
    .nav-links .lang-switch {
        margin: 8px auto;
    }

    /* Animate three bars into an X when the menu is open. */
    .nav-toggle:checked ~ .nav-toggle-label .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle:checked ~ .nav-toggle-label .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-toggle-label .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* ---- Buttons ------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; }

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.5);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px -6px rgba(79, 70, 229, 0.6); }

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

.btn-ghost {
    background: transparent;
    color: var(--muted);
    padding: 10px 12px;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---- Cards -------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.card-hover {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--brand-200);
}
.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0 0 6px;
}
.card-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 0 0 14px;
}

/* ---- Feature icon bubble ----------------------------------- */
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.feature-icon.accent { background: #FEF3C7; color: var(--accent-600); }
.feature-icon.success { background: #D1FAE5; color: var(--success-600); }

/* ---- Grid --------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Forms -------------------------------------------------- */
.form-section { padding: 0; margin: 0 0 36px; border: 0; }
.form-section > legend {
    width: 100%;
    padding: 0;
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}
.form-field { grid-column: span 12; display: flex; flex-direction: column; }
.form-field.col-6 { grid-column: span 6; }
.form-field.col-4 { grid-column: span 4; }
.form-field.col-8 { grid-column: span 8; }
@media (max-width: 700px) {
    .form-field.col-6, .form-field.col-4, .form-field.col-8 { grid-column: span 12; }
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-control,
.form-select,
textarea.form-control {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    width: 100%;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
textarea.form-control { resize: vertical; min-height: 96px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748B' d='M5.25 7.5L10 12.25l4.75-4.75z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px; }

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100);
}

.form-help {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--muted);
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    cursor: pointer;
    user-select: none;
}
.form-check-input {
    width: 18px; height: 18px;
    accent-color: var(--brand-600);
    cursor: pointer;
}
.form-check-label { font-size: 0.95rem; color: var(--text-2); cursor: pointer; }

.field-error {
    color: var(--danger-600);
    font-size: 0.82rem;
    margin-top: 6px;
}
.form-control.input-invalid,
.form-select.input-invalid { border-color: var(--danger-500); }

/* File input — make it look intentional, not like a 1998 relic */
.form-control[type="file"] { padding: 8px 10px; }
.form-control[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text-2);
    font-weight: 500;
    cursor: pointer;
}
.form-control[type="file"]::file-selector-button:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }

/* ---- Alerts / badges --------------------------------------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.92rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert strong { font-weight: 600; }

.alert-danger { background: #FEF2F2; color: #7F1D1D; border-color: #FECACA; }
.alert-warning { background: #FFFBEB; color: #78350F; border-color: #FDE68A; }
.alert-info { background: var(--brand-50); color: var(--brand-900); border-color: var(--brand-200); }
.alert-success { background: #ECFDF5; color: #064E3B; border-color: #A7F3D0; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}
.badge-neutral   { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge-primary   { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.badge-accent    { background: #FEF3C7; color: var(--accent-600); border-color: #FDE68A; }
.badge-success   { background: #D1FAE5; color: var(--success-600); border-color: #A7F3D0; }
.badge-info      { background: #E0F2FE; color: #0369A1; border-color: #BAE6FD; }
.badge-danger    { background: #FEE2E2; color: var(--danger-600); border-color: #FECACA; }

/* ---- Hero (home page) -------------------------------------- */
.hero {
    position: relative;
    padding: 96px 0 72px;
    overflow: hidden;
    background: var(--gradient-soft);
    border-bottom: 1px solid var(--border);
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    pointer-events: none;
}
.hero::before {
    width: 520px; height: 520px;
    background: radial-gradient(circle at center, var(--violet-600), transparent 60%);
    top: -180px; right: -120px;
}
.hero::after {
    width: 460px; height: 460px;
    background: radial-gradient(circle at center, var(--blue-600), transparent 60%);
    bottom: -200px; left: -140px;
}
.hero-inner {
    position: relative;
    text-align: center;
    max-width: 760px;
    margin-inline: auto;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--brand-200);
    color: var(--brand-700);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 20px;
    backdrop-filter: blur(6px);
}
.hero-eyebrow-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}
.hero h1 { margin-bottom: 20px; }
.hero .lead {
    font-size: 1.15rem;
    color: var(--text-2);
    margin-bottom: 32px;
    max-width: 620px;
    margin-inline: auto;
}
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Gradient text utility */
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---- How it works / step list ------------------------------ */
.steps { counter-reset: step; }
.step-number {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand-700);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 16px;
}

/* ---- Timeline (tracking page) ------------------------------ */
.timeline {
    position: relative;
    padding-left: 28px;
    margin: 0; list-style: none;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 10px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}
.timeline-step {
    position: relative;
    padding: 4px 0 22px;
}
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step::before {
    content: "";
    position: absolute;
    left: -22px; top: 8px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
}
.timeline-step.active::before {
    background: var(--gradient-brand);
    border-color: transparent;
    box-shadow: 0 0 0 4px var(--brand-100);
}
.timeline-step.done::before {
    background: var(--success-500);
    border-color: transparent;
}
.timeline-title {
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--text);
    margin: 0 0 2px;
    font-size: 0.98rem;
}
.timeline-sub { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ---- Definition list (detail pages) ------------------------ */
.dl {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    gap: 12px 24px;
    margin: 0;
}
.dl dt { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; color: var(--text); }
@media (max-width: 540px) {
    .dl { grid-template-columns: 1fr; gap: 4px 0; }
    .dl dd { margin-bottom: 10px; }
}

/* ---- Footer ------------------------------------------------- */
.footer {
    margin-top: 96px;
    background: var(--text);
    color: #CBD5E1;
    padding: 48px 0;
}
.footer a { color: #E2E8F0; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.footer small { font-size: 0.85rem; }

/* ---- Tracking URL box -------------------------------------- */
.tracking-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: left;
}
.tracking-box .url {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--brand-700);
    word-break: break-all;
}

/* ---- Utility spacing --------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 20px; }

/* ---- Pagination --------------------------------------------- */
/* Used on paginated index pages (currently: printed-models gallery).
   Server-rendered <a> links, zero JS — each page is a real URL that a
   crawler can follow. Disabled prev/next states render as <span> so
   assistive tech doesn't announce them as actionable. */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 40px 0 8px;
}
.pagination-pages {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pagination-nav,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.pagination-nav:hover,
.pagination-page:hover {
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
}
.pagination-page.is-current {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
    cursor: default;
}
.pagination-nav.is-disabled {
    color: var(--muted);
    background: transparent;
    cursor: default;
    opacity: 0.5;
}
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--muted);
    user-select: none;
}

/* ---- Cookie consent banner ----------------------------------
 * Fixed to the bottom so it never blocks the main content flow
 * but stays in view until dismissed. Slides out when accepted.
 */
.cookie-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    max-width: 860px;
    margin: 0 auto;
    transition: transform 280ms ease, opacity 280ms ease;
}
.cookie-consent-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-consent-text {
    flex: 1 1 360px;
    min-width: 0;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.5;
}
.cookie-consent-text strong {
    color: var(--text);
    display: block;
    margin-bottom: 2px;
    font-size: 1rem;
}
.cookie-consent-text a {
    white-space: nowrap;
}
.cookie-consent--hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
@media (max-width: 520px) {
    .cookie-consent { padding: 14px 16px; }
    .cookie-consent-inner { gap: 12px; }
    .cookie-consent-inner .btn { width: 100%; }
}

/* ---- A11y utilities -----------------------------------------
   .sr-only visually hides content while keeping it reachable by
   screen readers. Standard WCAG-recommended recipe. */
.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;
}

/* ---- Upload progress ---------------------------------------
   Revealed by form-upload-progress.js when a file is attached
   to the request form. The track sits beside the submit area
   so the user sees percentage ticking up without losing focus
   on the button they just pressed. */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
    border-radius: var(--radius);
}
.upload-progress[hidden] {
    display: none;
}
.upload-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 999px;
    overflow: hidden;
}
.upload-progress-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gradient-brand);
    border-radius: 999px;
    /* 120ms matches the typical chunk cadence from upload.onprogress on a
       sluggish connection — slower transitions make the bar feel laggy, faster
       ones strobe during bursts. */
    transition: width 120ms ease-out;
}
.upload-progress-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-700);
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.upload-progress--failed {
    background: #FEE2E2;
    border-color: #FECACA;
}
.upload-progress--failed .upload-progress-bar {
    background: var(--danger-500);
}
.upload-progress--failed .upload-progress-label {
    color: var(--danger-600);
    font-family: var(--font-sans);
    min-width: 0;
    text-align: left;
}
