/* =========================================================================
   Design system — residenzedicura.com
   Aligned with the React mockup `docs/Casa Riposo Booking.html`.
   Tokens and component classes shared across every page.
   ========================================================================= */

:root {
    /* ── Palette base ───────────────────────────────────────────────────── */
    --cr-bg:               #ffffff;
    --cr-bg-muted:         #f6f7f8;
    --cr-foreground:       #111618;
    --cr-muted:            #6b7280;
    --cr-border:           #e5e7eb;
    --cr-input-bg:         #f3f4f6;
    --cr-card:             #ffffff;
    --cr-card-foreground:  #111618;

    /* ── Accent (indigo by default, brand color) ────────────────────────── */
    --cr-ring:             #4f46e5;
    --cr-ring-hover:       #4338ca;
    --cr-accent:           #eef2ff;
    --cr-accent-foreground:#4338ca;

    /* ── Chips / status tones ───────────────────────────────────────────── */
    --chip-green-bg:  #dcfce7;  --chip-green-fg:  #15803d;
    --chip-amber-bg:  #fef9c3;  --chip-amber-fg:  #92400e;
    --chip-red-bg:    #fee2e2;  --chip-red-fg:    #b91c1c;
    --chip-blue-bg:   #dbeafe;  --chip-blue-fg:   #1d4ed8;
    --chip-indigo-bg: #eef2ff;  --chip-indigo-fg: #4338ca;
    --chip-gray-bg:   #f3f4f6;  --chip-gray-fg:   #6b7280;

    /* ── Typography ─────────────────────────────────────────────────────── */
    --font-sans:    'Manrope', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Manrope', system-ui, sans-serif;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  2rem;
    --text-4xl:  2.5rem;

    /* ── Radii ──────────────────────────────────────────────────────────── */
    --radius-sm: 0.375rem;
    --radius:    0.5rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --cr-radius-pill: 9999px;

    /* ── Shadows ────────────────────────────────────────────────────────── */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow:    0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.08);
    --cr-shadow-card:       0 1px 3px rgba(0, 0, 0, 0.06);
    --cr-shadow-card-hover: 0 4px 16px rgba(15, 23, 42, 0.10);
    --cr-shadow-toast:      0 8px 24px rgba(15, 23, 42, 0.08);
}

/* ── Reset essenziale ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--cr-foreground);
    background: var(--cr-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cr-ring);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover { color: var(--cr-ring-hover); }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--cr-foreground);
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); margin-bottom: .5rem; }
h3 { font-size: var(--text-xl);  margin-bottom: .375rem; }
h4 { font-size: var(--text-lg); }

p  { color: var(--cr-foreground); }
.muted { color: var(--cr-muted); }

/* ── Material Symbols Outlined (self-hosted, same as Casa Riposo mockup) ─── */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/material-symbols-outlined.ttf') format('truetype');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    vertical-align: middle;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Re-apply symbol font inside components that set font-family via shorthand */
.btn .material-symbols-outlined,
.chip .material-symbols-outlined,
.filter-pill .material-symbols-outlined,
.pub-nav .material-symbols-outlined,
.user-menu .material-symbols-outlined,
.user-menu-popover .material-symbols-outlined,
.input-with-icon > .material-symbols-outlined,
summary .material-symbols-outlined,
a .material-symbols-outlined,
button .material-symbols-outlined,
label .material-symbols-outlined {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    letter-spacing: normal;
    text-transform: none;
}

.btn .material-symbols-outlined  { font-size: 1.125rem; }
.chip .material-symbols-outlined { font-size: 0.875rem; }
.filter-pill .material-symbols-outlined { font-size: 1rem; }

/* ── Typography helpers ──────────────────────────────────────────────────── */
.lead {
    font-size: var(--text-lg);
    line-height: 1.55;
    color: var(--cr-muted);
    max-width: 38rem;
    margin-top: .75rem;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.site-container {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    height: 2.5rem;
    padding: 0 1rem;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-primary {
    background: var(--cr-ring);
    color: #fff;
    border-color: var(--cr-ring);
}
.btn-primary:hover { background: var(--cr-ring-hover); border-color: var(--cr-ring-hover); color: #fff; }

.btn-secondary {
    background: #fff;
    color: var(--cr-foreground);
    border-color: var(--cr-border);
    font-weight: 500;
}
.btn-secondary:hover { background: var(--cr-bg-muted); }

.btn-ghost {
    background: transparent;
    color: var(--cr-muted);
    border-color: transparent;
    font-weight: 500;
}
.btn-ghost:hover { background: var(--cr-bg-muted); color: var(--cr-foreground); }

.btn-lg { height: 3rem;   padding: 0 1.25rem; font-size: var(--text-base); }
.btn-sm { height: 2rem;   padding: 0 .75rem;  font-size: var(--text-xs); }
.btn-block { width: 100%; }

/* ── Form fields ─────────────────────────────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.field label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #374151;
}
.field .helper-text { font-size: var(--text-xs); color: var(--cr-muted); }
.field-error { font-size: var(--text-xs); color: var(--chip-red-fg); }

.input, .select, textarea.input {
    font: inherit;
    color: var(--cr-foreground);
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: var(--radius);
    padding: 0 .75rem;
    height: 2.75rem;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
textarea.input { height: auto; min-height: 6rem; padding: .625rem .75rem; line-height: 1.5; }
.input:focus, .select:focus, textarea.input:focus {
    outline: 0;
    border-color: var(--cr-ring);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2rem;
    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='%236b7280' d='M0 0h12L6 8z'/></svg>");
    background-repeat: no-repeat;
    background-position: right .75rem center;
}

.input-with-icon { position: relative; }
.input-with-icon > .material-symbols-outlined {
    position: absolute; left: .75rem; top: 50%;
    transform: translateY(-50%);
    color: var(--cr-muted); font-size: 1.25rem; pointer-events: none;
}
.input-with-icon .input { padding-left: 2.5rem; }

.check {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--text-sm);
    color: var(--cr-foreground);
    cursor: pointer;
}
.check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--cr-ring); }

/* ── Chips ───────────────────────────────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .125rem .625rem;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--cr-radius-pill);
    background: var(--chip-gray-bg);
    color: var(--chip-gray-fg);
}
.chip-green  { background: var(--chip-green-bg);  color: var(--chip-green-fg); }
.chip-amber  { background: var(--chip-amber-bg);  color: var(--chip-amber-fg); }
.chip-red    { background: var(--chip-red-bg);    color: var(--chip-red-fg); }
.chip-blue   { background: var(--chip-blue-bg);   color: var(--chip-blue-fg); }
.chip-indigo { background: var(--chip-indigo-bg); color: var(--chip-indigo-fg); }
.chip-gray   { background: var(--chip-gray-bg);   color: var(--chip-gray-fg); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--cr-shadow-card);
    transition: box-shadow .15s ease, transform .15s ease;
}
.card-pad { padding: 1.25rem; }
.card-bordered { box-shadow: none; }
.card:hover { box-shadow: var(--cr-shadow-card-hover); }

.alert {
    border-radius: var(--radius);
    padding: .75rem 1rem;
    font-size: var(--text-sm);
}
.alert-error { background: var(--chip-red-bg); color: var(--chip-red-fg); }
.alert-info  { background: var(--chip-blue-bg); color: var(--chip-blue-fg); }
.alert-ok    { background: var(--chip-green-bg); color: var(--chip-green-fg); }

/* ── Filter pills ────────────────────────────────────────────────────────── */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    height: 2.25rem;
    padding: 0 .875rem;
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--cr-foreground);
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.filter-pill:hover { background: var(--cr-bg-muted); }
.filter-pill.active,
.filter-pill:has(input:checked) {
    background: var(--cr-accent);
    border-color: var(--cr-ring);
    color: var(--cr-accent-foreground);
}
.filter-pill:has(input:checked) .material-symbols-outlined,
.filter-pill.active .material-symbols-outlined {
    color: currentColor;
}

/* ── Facility card / row + photo placeholder ─────────────────────────────── */
.facility-photo {
    position: relative;
    background: var(--cr-bg-muted);
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 4 / 3;
}
.facility-photo .ph-stripes {
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(99, 102, 241, .04) 0,
        rgba(99, 102, 241, .04) 8px,
        rgba(99, 102, 241, .08) 8px,
        rgba(99, 102, 241, .08) 16px
    );
}
.facility-photo .ph-label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .8125rem; font-weight: 600;
    color: var(--cr-muted);
    text-align: center;
    padding: .75rem;
}
.facility-photo .photo-badge {
    position: absolute; top: .75rem; left: .75rem;
}
.facility-photo > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.facility-card {
    display: flex;
    flex-direction: column;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--cr-shadow-card);
    transition: box-shadow .15s ease, transform .15s ease;
}
.facility-card:hover {
    box-shadow: var(--cr-shadow-card-hover);
    transform: translateY(-2px);
}
.facility-card .facility-photo {
    border-radius: 0;
    aspect-ratio: 16 / 10;
}
.facility-card-body {
    padding: 1rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}
.facility-card-body .title-row h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
}
.facility-card-body .city {
    display: inline-flex; align-items: center; gap: .25rem;
    margin-top: .125rem;
    color: var(--cr-muted);
    font-size: .8125rem;
}
.facility-card-body .services {
    display: flex; flex-wrap: wrap; gap: .25rem;
}
.facility-card-body .footer-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: .25rem;
}

.facility-row {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1rem;
    background: var(--cr-card);
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.facility-row:hover { box-shadow: var(--cr-shadow-card); border-color: #c7cbd1; }
.facility-row .facility-photo { border-radius: 0; aspect-ratio: 4 / 3; min-height: 100%; }
.facility-row-body {
    padding: 1rem 1rem 1rem 0;
    display: flex; flex-direction: column; gap: .375rem;
    min-width: 0;
}

.price-from { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cr-muted); }
.price-value { font-size: var(--text-lg); font-weight: 700; }
.price-value .per { font-size: .8125rem; font-weight: 500; color: var(--cr-muted); }

/* ── Stepper ─────────────────────────────────────────────────────────────── */
.stepper {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.step {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--cr-muted);
    font-weight: 500;
}
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.75rem; height: 1.75rem;
    border-radius: 50%;
    border: 1px solid var(--cr-border);
    background: #fff;
    font-size: .8125rem;
    font-weight: 700;
}
.step-label { font-size: .875rem; }
.step.active { color: var(--cr-foreground); }
.step.active .step-num {
    background: var(--cr-ring); color: #fff; border-color: var(--cr-ring);
}
.step.done { color: var(--cr-foreground); }
.step.done .step-num {
    background: var(--chip-green-bg); color: var(--chip-green-fg); border-color: var(--chip-green-bg);
}
.step-rail {
    flex: 0 0 2.5rem; height: 2px;
    background: var(--cr-border);
    border-radius: 9999px;
}

/* ── Radio cards ─────────────────────────────────────────────────────────── */
.radio-card {
    position: relative;
    display: flex; gap: .75rem; align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    background: #fff;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.radio-card:hover { border-color: #c7cbd1; }
.radio-card:has(input:checked) {
    border-color: var(--cr-ring);
    box-shadow: 0 0 0 1px var(--cr-ring) inset;
    background: var(--cr-accent);
}
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot {
    flex: 0 0 1.25rem; width: 1.25rem; height: 1.25rem;
    border: 1px solid var(--cr-border);
    border-radius: 50%;
    background: #fff;
    margin-top: .125rem;
    position: relative;
}
.radio-card:has(input:checked) .radio-dot {
    border-color: var(--cr-ring);
}
.radio-card:has(input:checked) .radio-dot::after {
    content: ''; position: absolute; inset: .25rem;
    border-radius: 50%; background: var(--cr-ring);
}
.radio-title { font-weight: 600; font-size: var(--text-sm); }
.radio-desc  { font-size: var(--text-xs); color: var(--cr-muted); margin-top: .125rem; }

/* ── Upload box ──────────────────────────────────────────────────────────── */
.upload-box {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .5rem;
    min-width: 0;
    width: 100%;
    padding: 1.5rem;
    border: 2px dashed var(--cr-border);
    border-radius: var(--radius-lg);
    background: var(--cr-bg-muted);
    text-align: center;
    color: var(--cr-muted);
    transition: border-color .12s ease, background .12s ease;
}
.upload-box:hover { border-color: var(--cr-ring); }
.upload-box .upload-title { font-weight: 600; color: var(--cr-foreground); font-size: var(--text-sm); }
.upload-box .upload-hint  { font-size: var(--text-xs); }
.upload-box.uploaded {
    align-items: stretch;
    border-color: var(--chip-green-fg);
    background: var(--chip-green-bg);
    color: var(--chip-green-fg);
    text-align: left;
}
.upload-box.uploaded .upload-title { color: var(--chip-green-fg); }

/* ── Service list ────────────────────────────────────────────────────────── */
.service-list {
    list-style: none;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: .5rem 1rem;
}
.service-list-item {
    display: flex; align-items: center; gap: .5rem;
    font-size: var(--text-sm);
}
.service-list-item .material-symbols-outlined { color: var(--chip-green-fg); font-size: 1.125rem; }
.service-list-item.absent { color: var(--cr-muted); }
.service-list-item.absent .material-symbols-outlined { color: var(--cr-muted); }
@media (max-width: 640px) { .service-list { grid-template-columns: 1fr; } }

/* ── Spec grid ───────────────────────────────────────────────────────────── */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 1rem;
}
.spec-item { display: flex; flex-direction: column; gap: .125rem; }
.spec-label { font-size: var(--text-xs); color: var(--cr-muted); text-transform: uppercase; letter-spacing: .04em; }
.spec-value { font-size: var(--text-lg); font-weight: 700; }

/* ── Detail hero / grid ──────────────────────────────────────────────────── */
.detail-hero {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 12rem 12rem;
    gap: .5rem;
    margin-top: 1.5rem;
}
.detail-hero > :nth-child(1) { grid-row: span 2; }
.detail-hero .facility-photo { aspect-ratio: auto; height: 100%; border-radius: var(--radius-lg); }
@media (max-width: 880px) {
    .detail-hero { grid-template-columns: 1fr 1fr; grid-template-rows: 10rem 10rem 10rem; }
    .detail-hero > :nth-child(1) { grid-column: span 2; grid-row: span 1; }
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 22rem;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.detail-side {
    position: sticky;
    top: 5rem;
    align-self: start;
    display: flex; flex-direction: column; gap: 1rem;
}
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } .detail-side { position: static; } }

/* ── Howitworks ──────────────────────────────────────────────────────────── */
.howitworks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.howitworks-card {
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex; flex-direction: column; gap: .5rem;
}
.howitworks-card .num {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--cr-accent);
    color: var(--cr-accent-foreground);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: var(--text-sm);
}
@media (max-width: 880px) { .howitworks { grid-template-columns: 1fr; } }

/* ── Stat / timeline ─────────────────────────────────────────────────────── */
.fam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 880px) { .fam-grid { grid-template-columns: 1fr; } }

.stat-card {
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex; flex-direction: column; gap: .25rem;
}
.stat-label { font-size: var(--text-xs); color: var(--cr-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: var(--text-2xl); font-weight: 700; }
.stat-icon  { color: var(--cr-ring); }

.timeline-item {
    display: flex; gap: .75rem;
    padding: .625rem 0;
    border-bottom: 1px dashed var(--cr-border);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item .when { font-size: var(--text-xs); color: var(--cr-muted); flex: 0 0 5rem; }
.timeline-item .what { font-size: var(--text-sm); }

/* ── Toggle (iOS-style switch) ───────────────────────────────────────────── */
.toggle {
    display: inline-flex; align-items: center;
    width: 2.25rem; height: 1.25rem;
    background: var(--cr-border);
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background .15s ease;
    flex: 0 0 2.25rem;
}
.toggle::after {
    content: ''; position: absolute;
    top: 2px; left: 2px;
    width: 1rem; height: 1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .15s ease;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle:has(input:checked) { background: var(--cr-ring); }
.toggle:has(input:checked)::after { transform: translateX(1rem); }

/* ── Public nav (.pub-nav) ───────────────────────────────────────────────── */
.pub-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--cr-border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 3.5rem;
    padding: 0 2rem;
}
.pub-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: var(--cr-foreground);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -.01em;
    flex: 0 0 auto;
}
.pub-nav-brand:hover { color: var(--cr-foreground); }
.pub-nav-brand-icon {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}
.pub-nav-brand-wordmark {
    display: block;
    width: 10.5rem;
    height: auto;
}
.pub-nav-brand .mark {
    width: 1.75rem; height: 1.75rem;
    border-radius: .5rem;
    background: var(--cr-ring);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.pub-nav-brand .mark .material-symbols-outlined { font-size: 1rem; }
.pub-nav-brand .domain { color: var(--cr-muted); font-weight: 500; }

.pub-nav-links {
    display: flex;
    gap: 1.25rem;
    flex: 1;
}
.pub-nav-link {
    color: var(--cr-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
}
.pub-nav-link:hover { color: var(--cr-foreground); }
.pub-nav-link.active {
    color: var(--cr-foreground);
    border-bottom-color: var(--cr-ring);
}

.pub-nav-utils {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu-popover {
    position: absolute; right: 0; top: calc(100% + .5rem);
    background: #fff;
    border: 1px solid var(--cr-border);
    border-radius: .625rem;
    box-shadow: var(--cr-shadow-toast);
    min-width: 12rem;
    padding: .375rem;
    z-index: 30;
    display: flex; flex-direction: column;
}
.user-menu-popover a,
.user-menu-popover button {
    display: flex; align-items: center;
    gap: .5rem;
    padding: .5rem .625rem;
    border-radius: .375rem;
    font-weight: 500;
    font-size: var(--text-sm);
    line-height: 1;
    font-family: var(--font-sans);
    color: var(--cr-foreground);
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
}
.user-menu-popover a:hover,
.user-menu-popover button:hover { background: var(--cr-bg-muted); }
.user-menu-sep { height: 1px; background: var(--cr-border); margin: .25rem 0; }
.user-menu-popover form { width: 100%; margin: 0; }

@media (max-width: 720px) {
    .pub-nav { padding: 0 1rem; gap: 1rem; }
    .pub-nav-links { display: none; }
    .pub-nav-utils .btn-ghost { display: none; }
}

/* ── Public footer (.pub-footer) ─────────────────────────────────────────── */
.pub-footer {
    background: var(--cr-bg-muted);
    border-top: 1px solid var(--cr-border);
    margin-top: 4rem;
    padding: 3rem 2rem 1.5rem;
}
.pub-footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}
.pub-footer h4 {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cr-muted);
    margin-bottom: .75rem;
}
.pub-footer ul { list-style: none; padding: 0; margin: 0; }
.pub-footer li { padding: .2rem 0; }
.pub-footer a {
    color: var(--cr-foreground);
    font-size: var(--text-sm);
    text-decoration: none;
}
.pub-footer a:hover { color: var(--cr-ring); }
.pub-footer-bottom {
    max-width: 72rem;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cr-border);
    display: flex;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--cr-muted);
}
@media (max-width: 900px) {
    .pub-footer-inner { grid-template-columns: 1fr 1fr; }
    .pub-footer-bottom { flex-direction: column; gap: .25rem; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.row { display: flex; flex-direction: row; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.divider { height: 1px; background: var(--cr-border); margin: 1rem 0; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

.helper {
    font-size: var(--text-xs);
    color: var(--cr-muted);
    line-height: 1.45;
}
