/* ==========================================================================
   Isabel Romero — Seguros y Tranquilidad
   Palette extracted from proteccionfamiliar.isabelromeroinsurance.com
   ========================================================================== */

:root {
    /* Core palette (HSL matches site tokens) */
    --bg: hsl(40, 11%, 97%);
    --bg-elev: #ffffff;
    --fg: hsl(207, 30%, 24%);
    --muted: hsl(30, 14%, 94%);
    --muted-fg: hsl(207, 10%, 47%);
    --primary: hsl(204, 22%, 30%);
    --primary-hover: hsl(204, 26%, 24%);
    --primary-fg: #ffffff;
    --secondary: hsl(22, 14%, 55%);
    --secondary-soft: hsl(22, 20%, 92%);
    --accent: hsl(204, 22%, 30%);
    --border: hsl(30, 10%, 88%);
    --input: hsl(30, 10%, 88%);
    --ring: hsl(22, 14%, 55%);
    --danger: hsl(0, 72%, 51%);
    --success: hsl(152, 40%, 36%);

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;

    --shadow-sm: 0 1px 2px 0 hsl(207 30% 24% / 0.04);
    --shadow: 0 8px 24px -12px hsl(207 30% 24% / 0.16), 0 2px 6px -2px hsl(207 30% 24% / 0.08);
    --shadow-lg: 0 20px 50px -24px hsl(207 30% 24% / 0.25);

    --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Playfair Display", "Inter", Georgia, serif;

    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container { width: min(1200px, 100% - 2.5rem); margin: 0 auto; }

h1, h2, h3 { font-family: var(--font-display); color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.85rem); line-height: 1.1; margin: 0 0 0.75rem; }
h2 { font-size: 1.55rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
p { margin: 0 0 0.5rem; color: var(--muted-fg); }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }

/* ---------- Header ---------- */
.site-header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--primary);
    color: var(--primary-fg);
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
}
.brand-mark.small { width: 34px; height: 34px; font-size: 0.8rem; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-logo.small { height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--fg); }
.brand-tag { font-size: 0.75rem; color: var(--muted-fg); letter-spacing: 0.06em; text-transform: uppercase; }

.pill {
    display: inline-block;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--fg);
    background: var(--bg);
    transition: all var(--transition);
}
.pill:hover { border-color: var(--secondary); color: var(--secondary); }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(ellipse at 20% 0%, hsl(22, 30%, 92%) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, hsl(204, 28%, 90%) 0%, transparent 50%),
        var(--bg);
    padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(4.5rem, 7vw, 6.5rem);
    border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 780px; }
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.9rem;
    padding: 0.3rem 0.75rem;
    background: var(--secondary-soft);
    border-radius: 999px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4.5vw, 3.3rem);
    line-height: 1.08;
    margin-bottom: 1rem;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--muted-fg);
    max-width: 620px;
    margin-bottom: 1.5rem;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.83rem;
    color: var(--fg);
    box-shadow: var(--shadow-sm);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); }

/* ---------- Form shell ---------- */
.form-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
    align-items: start;
}

/* ---------- Progress rail ---------- */
.progress-rail {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow);
    position: sticky; top: 92px;
}
.progress-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 0.15rem;
}
.progress-list li {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.55rem 0.5rem;
    border-radius: var(--radius);
    color: var(--muted-fg);
    font-size: 0.87rem;
    cursor: pointer;
    transition: all var(--transition);
}
.progress-list li:hover { background: var(--muted); color: var(--fg); }
.progress-list li .num {
    flex: 0 0 26px;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--muted);
    color: var(--muted-fg);
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid var(--border);
}
.progress-list li.active { color: var(--primary); background: var(--secondary-soft); font-weight: 600; }
.progress-list li.active .num { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.progress-list li.done .num {
    background: var(--secondary); color: #fff; border-color: var(--secondary);
}
.progress-list li.done .num::before { content: "✓"; }
.progress-list li.done .num > * { display: none; }

.progress-bar {
    margin-top: 1rem;
    height: 4px; background: var(--muted);
    border-radius: 999px; overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
}

/* ---------- Form card ---------- */
.form-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: clamp(1.75rem, 3vw, 2.75rem);
    box-shadow: var(--shadow);
}

.step { display: none; animation: fadeSlide 280ms ease; }
.step.active { display: block; }
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.step-head { margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.step-head h2 { margin-bottom: 0.25rem; }
.step-head p { margin: 0; font-size: 0.93rem; }

/* ---------- Grid & fields ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.87rem; }
.field.col-2 { grid-column: 1 / -1; }
.field > span { font-weight: 500; color: var(--fg); font-size: 0.84rem; letter-spacing: 0.01em; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea,
input[type="text"]:not(.no-theme),
input[type="number"]:not(.no-theme) {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-elev);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--fg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea { resize: vertical; min-height: 72px; }
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235a6775' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px hsl(22 14% 55% / 0.18);
}
.field input:invalid:not(:placeholder-shown),
.field select:invalid:focus { border-color: var(--danger); }

.checkbox-row { flex-direction: row; align-items: center; gap: 0.65rem; }
.checkbox-row span { font-weight: 400; color: var(--muted-fg); }
.checkbox-row input { margin: 0; }

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--primary);
    width: 18px; height: 18px;
    cursor: pointer;
}

.toggle-row {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.8rem 1rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0.5rem 0 1rem;
    cursor: pointer;
    transition: background var(--transition);
}
.toggle-row:hover { background: var(--secondary-soft); }
.toggle-row span { font-size: 0.9rem; color: var(--fg); }

.conditional { display: none; margin-top: 1rem; }
.conditional.show { display: grid; }

.subheading {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--border);
}

fieldset.subcard {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem 1.5rem;
    background: var(--muted);
    margin: 0 0 1.25rem;
}
fieldset.subcard legend {
    padding: 0 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

/* ---------- Y/N list ---------- */
.yn-list { display: flex; flex-direction: column; gap: 0.75rem; }
.yn-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    background: var(--bg-elev);
    transition: border-color var(--transition), background var(--transition);
}
.yn-item:hover { border-color: hsl(22, 14%, 72%); }
.yn-item.yes { border-color: var(--secondary); background: var(--secondary-soft); }
.yn-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
}
.yn-question { font-size: 0.92rem; color: var(--fg); max-width: 78%; }
.yn-buttons { display: inline-flex; gap: 0.4rem; flex-shrink: 0; }
.yn-btn {
    padding: 0.38rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 999px;
    font-size: 0.82rem; font-weight: 500;
    color: var(--muted-fg);
    cursor: pointer;
    transition: all var(--transition);
}
.yn-btn.active.yn-yes { background: var(--primary); color: #fff; border-color: var(--primary); }
.yn-btn.active.yn-no { background: var(--fg); color: #fff; border-color: var(--fg); }
.yn-btn:hover { transform: translateY(-1px); }
.yn-detail {
    display: none; margin-top: 0.85rem; padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}
.yn-detail textarea { width: 100%; min-height: 62px; }
.yn-item.yes .yn-detail { display: block; }

/* ---------- Medical checks grid ---------- */
.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}
.check-item {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}
.check-item:hover { border-color: var(--secondary); }
.check-item input:checked + span { font-weight: 600; color: var(--primary); }

/* ---------- Beneficiary / contact cards ---------- */
.repeat-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: var(--bg-elev);
    margin-bottom: 0.9rem;
    position: relative;
}
.repeat-card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.85rem;
}
.repeat-card-title { font-weight: 600; color: var(--primary); font-size: 0.95rem; }
.add-more {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: transparent;
    border: 1px dashed var(--secondary);
    color: var(--secondary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.add-more:hover { background: var(--secondary-soft); border-style: solid; }
.add-more:disabled { opacity: 0.4; cursor: not-allowed; }
.remove-btn {
    background: transparent; border: none;
    color: var(--danger);
    font-size: 0.8rem; cursor: pointer;
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.remove-btn:hover { background: hsl(0 72% 51% / 0.08); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem; font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--primary); color: var(--primary-fg);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost {
    background: transparent; color: var(--fg); border-color: var(--border);
}
.btn-ghost:hover { background: var(--muted); border-color: var(--secondary); color: var(--primary); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }

.step-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ---------- Consent & success ---------- */
.consent {
    background: var(--muted);
    border-left: 4px solid var(--secondary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--fg);
}
.step-success { text-align: center; padding: 3rem 1rem; }
.success-card { max-width: 440px; margin: 0 auto; }
.success-icon {
    width: 72px; height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: hsl(152 40% 36% / 0.12);
    color: var(--success);
    display: grid; place-items: center;
    font-size: 2rem; font-weight: 700;
}

/* ---------- Medical Q blocks ---------- */
.med-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    background: var(--bg-elev);
    margin-bottom: 0.85rem;
}
.med-question-title {
    font-size: 0.92rem;
    margin-bottom: 0.75rem;
    color: var(--fg);
}
.med-letters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    background: var(--muted);
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
}
.med-letter {
    display: flex; align-items: flex-start; gap: 0.65rem;
    padding: 0.5rem 0.6rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    line-height: 1.45;
    cursor: pointer;
}
.med-letter input { margin-top: 0.2rem; flex-shrink: 0; }
.med-letter-text strong { color: var(--primary); margin-right: 0.35rem; }
.med-extra {
    display: none;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}
.med-extra.show { display: block; }

.conditional-block { display: none; margin-top: 0.75rem; }
.conditional-block.show { display: grid; }

/* ---------- Beneficiaries table ---------- */
.benef-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--bg-elev);
}
.benef-head {
    display: grid;
    grid-template-columns: 2.5fr 1.4fr 0.7fr 1.3fr;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.benef-head-3 {
    grid-template-columns: 2.5fr 1.4fr 1.3fr;
}
.benef-row {
    display: grid;
    grid-template-columns: 2.5fr 1.4fr 0.7fr 1.3fr;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.benef-row-3 {
    grid-template-columns: 2.5fr 1.4fr 1.3fr;
}
.benef-row:last-child { border-bottom: none; }
.benef-row input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: var(--bg-elev);
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--fg);
}
.benef-row input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px hsl(22 14% 55% / 0.15);
}

.benef-row { position: relative; }
.row-remove {
    position: absolute;
    right: -0.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--muted-fg);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
    display: grid; place-items: center;
    padding: 0;
}
.row-remove:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-add-row {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1rem;
    margin-top: -0.4rem; margin-bottom: 1.25rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--secondary);
    font-size: 0.85rem; font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.btn-add-row:hover:not(:disabled) {
    border-color: var(--secondary);
    background: var(--secondary-soft);
    border-style: solid;
}
.btn-add-row:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Authorization & inline date ---------- */
.auth-block {
    background: var(--muted);
    border-left: 4px solid var(--secondary);
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.auth-text {
    margin: 0 0 0.85rem;
    color: var(--fg);
    font-size: 0.95rem;
    line-height: 1.6;
}
/* ---------- Signature pad ---------- */
.signature-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.signature-box {
    display: flex; flex-direction: column;
    gap: 0.5rem;
}
.signature-box canvas {
    width: 100%;
    height: 180px;
    background: var(--bg-elev);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    cursor: crosshair;
    touch-action: none;
}
.signature-box canvas:hover { border-color: var(--secondary); }
.signature-box canvas.signed { border-style: solid; }
.signature-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.presigned-tag {
    font-size: 0.72rem;
    color: var(--success);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: hsl(152 40% 36% / 0.1);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}
.btn-tiny {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-fg);
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-tiny:hover { border-color: var(--danger); color: var(--danger); }
.signature-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-fg);
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}

.agent-decl {
    background: var(--secondary-soft);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--fg);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Filler placeholder field */
.field .filler {
    height: 2.7rem;
    background: transparent;
}

@media (max-width: 720px) {
    .benef-head, .benef-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .benef-row::before {
        display: none;
    }
    .benef-head { display: none; }
    .benef-row {
        padding: 0.85rem;
        background: var(--muted);
        border-radius: var(--radius);
        margin: 0.4rem;
    }
    .benef-row input { background: var(--bg-elev); }
    .signature-pair { grid-template-columns: 1fr; }
}

/* ---------- Review banner ---------- */
.review-banner {
    background: linear-gradient(90deg, hsl(22 20% 92%), hsl(204 22% 90%));
    border-bottom: 1px solid var(--border);
    animation: fadeSlide 280ms ease;
}
.review-banner-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.25rem; padding: 0.9rem 0;
    flex-wrap: wrap;
}
.review-banner strong {
    font-family: var(--font-display);
    color: var(--primary);
    font-size: 1rem;
}
.review-banner p { margin: 0.15rem 0 0; font-size: 0.83rem; color: var(--fg); }
.review-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Share box (success screen) ---------- */
.share-box {
    text-align: left;
    margin: 1.75rem auto 1.5rem;
    padding: 1.25rem 1.35rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 520px;
}
.share-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.75rem; margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.share-label {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}
.share-expiry {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: var(--secondary);
    background: var(--bg-elev);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.share-hint { font-size: 0.82rem; color: var(--muted-fg); margin-bottom: 0.9rem; }
.share-input-row {
    display: flex; gap: 0.5rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem;
}
.share-input-row input {
    flex: 1; min-width: 0;
    border: none; background: transparent;
    padding: 0.55rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: var(--fg);
}
.share-input-row input:focus { outline: none; }
.share-actions {
    display: flex; gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}
.share-actions .btn { flex: 1 1 auto; }
#copyLinkBtn.copied { background: var(--success); border-color: var(--success); }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 2rem 0;
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
}
.foot-brand { display: flex; align-items: center; gap: 0.75rem; }
.foot-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.foot-brand strong { font-family: var(--font-display); font-weight: 600; color: var(--fg); }
.foot-brand span { font-size: 0.78rem; color: var(--muted-fg); letter-spacing: 0.05em; text-transform: uppercase; }
.foot-legal { margin: 0; font-size: 0.8rem; color: var(--muted-fg); max-width: 620px; text-align: right; }

/* ---------- Error messages ---------- */
.err { display: none; color: var(--danger); font-size: 0.78rem; margin-top: 0.25rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .err { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .form-shell { grid-template-columns: 1fr; margin-top: 1.25rem; }
    .progress-rail { position: static; order: 0; }
    .progress-list { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.35rem; padding-bottom: 0.25rem; }
    .progress-list li { flex-shrink: 0; scroll-snap-align: start; font-size: 0.82rem; }
    .progress-list li .label { display: none; }
    .progress-list li.active .label { display: inline; }
}

@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 0.75rem; padding: 0.9rem 0 1rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .foot-legal { text-align: center; }
    .yn-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
    .yn-question { max-width: 100%; }
    .btn { width: 100%; }
    .step-nav { flex-direction: column-reverse; gap: 0.75rem; }
    .step-nav > * { width: 100%; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .progress-rail, .step-nav, .hero { display: none; }
    .form-shell { grid-template-columns: 1fr; }
    .step { display: block !important; page-break-after: always; }
    .form-card { box-shadow: none; border: none; }
}
