/* Vorstandsdinner — one stylesheet, no build step.
 *
 * Design: dark evening look of the print header — near-black, gold accents, EB Garamond for display
 * type (matches the wordmark), Open Sans for text (as on vfm.de). Both fonts are self-hosted
 * (SIL Open Font License, see /assets/fonts/OFL.txt). */

/* --- Fonts ------------------------------------------------------------------------------------ */

@font-face {
    font-family: "EB Garamond";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/assets/fonts/eb-garamond-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "EB Garamond";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/assets/fonts/eb-garamond-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("/assets/fonts/open-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("/assets/fonts/open-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ----------------------------------------------------------------------------------- */

:root {
    --bg: #17191e;
    --bg-deep: #0d0e11;
    --surface: #1f2228;
    --surface-2: #262a31;
    --field: #121418;
    --line: #33363d;
    --line-strong: #4a4e57;

    --gold: #b0985a;
    --gold-bright: #cbb57c;
    --gold-soft: rgb(176 152 90 / 0.22);

    --text: #e9e6df;
    --muted: #a9a59c;
    --danger: #e58a76;
    --ok: #a3c492;
    --warn: #e0bd63;

    --font-display: "EB Garamond", Garamond, "Times New Roman", serif;
    --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --nav-h: 45px; /* sticky top navigation: tap height + border (one line) */
    --container: 1140px;
    --gutter: 24px;
    --tap: 44px;
    --radius: 2px;

    color-scheme: dark;

    /* Scrollbars in the colours of the page instead of the system grey (inherited by every
       scroll container: page, textareas, lists). */
    --scrollbar-thumb: #50545d;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* Hover effects only exist for a real mouse: on touch screens a tap must not leave anything
   "hovered" behind — every :hover rule below sits inside @media (hover: hover) and (pointer: fine). */

/* --- Base ------------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* manipulation: pinch zoom stays possible, the double-tap zoom on iOS does not (taps react at once). */
* { scrollbar-width: thin; touch-action: manipulation; }
/* Anchors and scrollIntoView stop below the sticky navigation. */
html:has(.topnav) { scroll-padding-top: calc(var(--nav-h) + 12px); }
/* An open dialog (picture crop) keeps the page behind it still — also on iOS. */
html:has(dialog[open]) { overflow: hidden; }

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-bright); text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--text); } }

:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

p { margin: 0 0 1em; }

code { font-size: .9em; color: var(--gold-bright); word-break: break-all; }

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

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 50;
    padding: 10px 16px; background: var(--gold); color: var(--bg); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 16px; height: 16px; flex: none; }

/* --- Top navigation (signed in) ---------------------------------------------------------------- */

/* Always at hand: the navigation sticks to the top edge while the page scrolls. */
.topnav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 24px;
    padding: 0 var(--gutter);
    background: var(--bg-deep);
    border-bottom: 1px solid var(--gold-soft);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.topnav__links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.topnav__links a {
    display: inline-flex; align-items: center; min-height: var(--tap);
    color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent;
}
@media (hover: hover) and (pointer: fine) { .topnav__links a:hover { color: var(--text); } }
.topnav__links a[aria-current="page"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.topnav__user { display: flex; align-items: center; gap: 14px; }
.topnav__name { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 14px; }
.topnav__user form { margin: 0; }
.topnav__logout {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: var(--tap); padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--muted); font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.topnav__logout-icon, .topnav__short { display: none; }
@media (hover: hover) and (pointer: fine) { .topnav__logout:hover { color: var(--gold-bright); } }
/* Phones: one line, so the sticky bar stays slim — short labels, logout as an icon. */
@media (max-width: 600px) {
    .topnav { flex-wrap: nowrap; padding: 0 8px 0 16px; gap: 0 10px; font-size: 11.5px; letter-spacing: .05em; }
    .topnav__links { flex-wrap: nowrap; gap: 0 16px; min-width: 0; }
    .topnav__links a { white-space: nowrap; }
    .topnav__full, .topnav__logout-text, .topnav__name { display: none; }
    .topnav__short { display: inline; }
    .topnav__user { margin-left: auto; }
    .topnav__logout { width: var(--tap); }
    .topnav__logout-icon { display: block; width: 20px; height: 20px; }
}

/* --- Hero: the print header, rebuilt in CSS ------------------------------------------------------
 * Two mirrored halves of diagonal stripes meet in the middle (chevrons pointing down), a dark
 * vignette sits behind the logo, a calm band below carries the vfm mark. */

.hero { background: var(--bg-deep); }

.hero__stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    align-content: center;
    gap: clamp(10px, 1.5vw, 20px);
    min-height: clamp(250px, 31vw, 450px);
    padding: clamp(36px, 5vw, 64px) var(--gutter);
    overflow: hidden;
    text-align: center;
}

/* Stripes: left half "\", right half mirrored "/" — mirroring keeps the seam aligned at any width. */
.hero__stage::before,
.hero__stage::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.05%;
    z-index: -2;
    background: repeating-linear-gradient(45deg, #1c1f26 0 10px, #0f1013 10px 22px);
}
.hero__stage::before { left: 0; }
.hero__stage::after { right: 0; transform: scaleX(-1); }

/* Vignette: the centre falls off to near-black, exactly where the logo sits. */
.hero__home {
    position: relative;
    display: block;
    line-height: 0;
}
.hero__home::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 60%;
    width: 190%;
    height: 520%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(closest-side, rgb(9 10 12 / .96) 0%, rgb(9 10 12 / .82) 42%, rgb(9 10 12 / 0) 100%);
}

.hero__logo {
    width: clamp(230px, 46vw, 640px);
    height: auto;
}

.hero__meta {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(15px, 1.75vw, 25px);
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gold);
    font-variant-numeric: lining-nums;
}
.hero__dot { display: inline-block; margin: 0 .55em; font-size: .8em; transform: translateY(-.08em); }

.hero__band {
    display: flex;
    justify-content: center;
    padding: clamp(18px, 2.4vw, 30px) var(--gutter);
    background: var(--bg);
}
.hero__vfm { width: clamp(78px, 7.6vw, 116px); height: auto; }

.hero--compact .hero__stage { min-height: 0; padding: 26px var(--gutter) 22px; gap: 8px; }
.hero--compact .hero__logo { width: clamp(180px, 22vw, 280px); }
.hero--compact .hero__meta { font-size: 14px; }
.hero--compact .hero__stage { border-bottom: 1px solid var(--gold-soft); }

/* --- Layout ------------------------------------------------------------------------------------- */

.main {
    flex: 1;
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter) 80px;
}

.center { text-align: center; margin: 8px 0 40px; }

.intro {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 0 40px;
    text-align: center;
}
.intro p { font-size: 17px; color: var(--muted); }
.intro p:last-child { margin-bottom: 0; }

.rule {
    width: 120px;
    height: 2px;
    margin: 0 auto 36px;
    background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
}

.section-title, .page-title {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--gold);
}
.section-subtitle {
    margin: 40px 0 16px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 26px;
    color: var(--gold);
}

.page-head { padding: 40px 0 24px; }
.page-head .page-title { margin-bottom: 4px; }
.page-lead { margin: 0; color: var(--muted); }
.page-kicker {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* --- Notices, flash, badges ---------------------------------------------------------------------- */

.flash, .notice {
    margin: 24px 0;
    padding: 14px 18px;
    background: var(--surface);
    border-left: 3px solid var(--gold);
}
.flash--success { border-left-color: var(--ok); }
.flash--error { border-left-color: var(--danger); }
.notice--warn { border-left-color: var(--warn); }
.notice--admin { border-left-color: var(--warn); font-size: 15px; }
.notice a, .flash a { margin-left: .3em; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    white-space: nowrap;
    vertical-align: middle;
}
.badge--draft { color: var(--muted); }
.badge--pending { color: var(--warn); }
.badge--approved { color: var(--ok); }
.badge--new { color: var(--muted); border-style: dashed; }

.status-box {
    margin: 0 0 24px;
    padding: 18px 20px;
    background: var(--surface);
    border-top: 2px solid var(--gold);
}
.status-line { margin: 0 0 6px; font-weight: 600; }
.status-box__text { margin: 0; color: var(--muted); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* --- Buttons ---------------------------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 0 22px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: transparent;
    color: var(--gold-bright);
    font: 600 13px/1.2 var(--font-body);
    letter-spacing: .09em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
@media (hover: hover) and (pointer: fine) { .button:hover { background: var(--gold-soft); color: var(--text); } }
.button--primary { background: var(--gold); color: #15171b; }
@media (hover: hover) and (pointer: fine) { .button--primary:hover { background: var(--gold-bright); color: #15171b; border-color: var(--gold-bright); } }
.button--ghost { border-color: var(--line-strong); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .button--ghost:hover { border-color: var(--gold); background: transparent; } }
.button--danger { border-color: var(--danger); color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .button--danger:hover { background: rgb(229 138 118 / .15); color: var(--danger); } }
.button--small { min-height: 36px; padding: 0 14px; font-size: 12px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* --- Landing --------------------------------------------------------------------------------- */

.access {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}
.access__option {
    padding: 32px 28px;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    text-align: center;
}
.access__title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 500; font-size: 24px; color: var(--gold); }
.access__option p { color: var(--muted); }
@media (max-width: 720px) { .access { grid-template-columns: 1fr; } }

/* --- Overview ------------------------------------------------------------------------------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 8px 0 28px;
}
.toolbar__count { margin: 0; color: var(--muted); font-size: 14px; }
.search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 320px;
    max-width: 460px;
    padding: 0 14px;
    background: var(--field);
    border: 1px solid var(--line-strong);
    color: var(--muted);
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search input {
    flex: 1;
    min-height: var(--tap);
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* --- Card --------------------------------------------------------------------------------------- */

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 28px 30px;
    background: var(--surface);
    border-top: 2px solid var(--gold);
    text-align: center;
}
.card[hidden] { display: none; }
.card { position: relative; }

/* Group badge: small, quiet, colour-coded only by its outline so the gold stays the accent. */
.card__kind {
    margin: -18px 0 14px;
    padding: 3px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.5;
}
.card__kind--board { color: var(--gold-bright); background: rgb(176 152 90 / .12); }
.card__kind--partner { color: #b9c3d6; }
.card__kind--staff { color: #a7c3b8; }

.kind-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.kind-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .kind-filter__chip:hover { border-color: var(--gold); } }
.kind-filter__chip[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-bright); }
.kind-filter__count { color: var(--muted); font-variant-numeric: tabular-nums; }

.card__photo {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-2);
}
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__initials { font-family: var(--font-display); font-size: 46px; color: var(--gold); letter-spacing: .04em; }

.card__name {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 25px;
    line-height: 1.25;
    color: var(--gold-bright);
    overflow-wrap: anywhere;
}
.card__company { margin: 0 0 20px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }

.card__facts {
    width: 100%;
    margin: 0 0 20px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
    line-height: 1.55;
}
.card__fact { padding: 5px 0; }
.card__fact dt {
    font-size: 11.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.card__fact dd { margin: 0; overflow-wrap: anywhere; }
.card__fact ul { margin: 0; padding: 0; list-style: none; }
.card__fact li::before { content: "•"; margin-right: .45em; color: var(--gold); }

.card__quote {
    margin: 0 0 18px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 18px;
    line-height: 1.45;
    color: #d6d1c6;
    overflow-wrap: anywhere;
}
.card__quote p { margin: 0; }

.card__contact {
    display: grid;
    gap: 6px;
    width: 100%;
    margin: auto 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}
.card__contact li { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.card__contact li[hidden] { display: none; }
.card__contact a, .card__contact span {
    color: var(--gold-bright);
    text-decoration: none;
    overflow-wrap: anywhere;
    -webkit-user-select: text;
    user-select: text;
}
.card__contact a { padding: 6px 0; }
@media (hover: hover) and (pointer: fine) { .card__contact a:hover { text-decoration: underline; color: var(--text); } }

/* --- Forms ------------------------------------------------------------------------------------ */

.editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: start;
}
.editor__preview { position: sticky; top: calc(var(--nav-h) + 24px); }
.editor__preview-label {
    margin: 0 0 12px;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.editor__preview-label--live { margin-top: 32px; }
@media (max-width: 960px) {
    .editor { grid-template-columns: 1fr; }
    .editor__preview { position: static; max-width: 420px; }
}

.form-section {
    margin: 0 0 32px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}
.form-section:disabled { opacity: .6; }
.form-section__title {
    padding: 0;
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 24px;
    color: var(--gold);
}
.form-section__hint { margin: -6px 0 14px; font-size: 14px; color: var(--muted); }
.form-section--consent p { font-size: 14.5px; color: var(--muted); }

.field { margin: 0 0 18px; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14.5px; }
.field__hint { margin: -2px 0 8px; font-size: 13.5px; color: var(--muted); }
.req { color: var(--gold); }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field textarea,
.stack-form input {
    width: 100%;
    min-height: var(--tap);
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--field);
    color: var(--text);
    font: inherit;
    font-size: 16px; /* below 16px iOS zooms on focus */
    line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .stack-form input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.field input[type="date"] { color-scheme: dark; }

.field--error > input, .field--error > textarea, .list-entry.field--error input,
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field__error { margin: 6px 0 0; font-size: 13.5px; color: var(--danger); }
.field__count { margin: 4px 0 0; min-height: 1.2em; font-size: 12.5px; text-align: right; color: var(--muted); }
.field__count--low { color: var(--warn); }
.field__count--over { color: var(--danger); font-weight: 600; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field-row > .field:first-child:has(#f-postal_code) { max-width: 200px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.field--list { border: 0; padding: 0; }
.list-entries { margin: 0 0 8px; padding: 0; list-style: none; }
.list-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 8px;
    margin-bottom: 8px;
}
.list-entry .field__count, .list-entry .field__error { grid-column: 1 / -1; }
.list-entry__remove {
    width: var(--tap);
    min-height: var(--tap);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .list-entry__remove:hover { color: var(--danger); border-color: var(--danger); } }
.list-entry__remove[hidden] { display: none; }
[data-list-add][hidden] { display: none; }

.field--check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: start;
}
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); }
.field--check label { margin: 0; font-weight: 400; }
.field--check .field__error { grid-column: 2; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.check-inline input { accent-color: var(--gold); }

.image-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.image-picker__preview {
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    flex: none;
    border: 2px solid var(--gold);
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-2);
}
.image-picker__preview img { width: 100%; height: 100%; object-fit: cover; }
.image-picker__empty { font-size: 12px; color: var(--muted); }
.image-picker__controls { flex: 1 1 240px; }
.image-picker__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.image-picker__buttons [hidden] { display: none; }
/* An uncropped source (vfm photo before the first save) shows the same square the server would cut. */
.image-picker__preview img, .card__photo img { object-position: 50% 20%; }

/* --- Cropper: drag the circle over the picture, everything outside it is dimmed ---
 * A modal dialog (<dialog>, top layer: focus stays inside, Esc cancels). Phones get it full screen. */
.cropper {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 20px 24px 24px;
    border: 1px solid var(--line-strong);
    border-top: 3px solid var(--gold);
    background: var(--bg-deep);
    color: var(--text);
    overflow: auto;
    overscroll-behavior: contain;
}
.cropper[open] { display: flex; flex-direction: column; }
.cropper::backdrop { background: rgb(5 6 8 / .82); }
.cropper__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.cropper__title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 26px; color: var(--gold); }
.cropper__close {
    display: grid; place-items: center; flex: none;
    width: var(--tap); height: var(--tap); margin-right: -10px;
    border: 0; background: none; color: var(--muted); cursor: pointer;
}
.cropper__close .icon { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .cropper__close:hover { color: var(--gold-bright); } }
.cropper__help { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.cropper__viewport { display: flex; justify-content: center; align-items: center; min-height: 0; }
.cropper__stage {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    line-height: 0;
    -webkit-user-select: none;
    user-select: none;
}
.cropper__image {
    display: block;
    max-width: 100%;
    max-height: min(60vh, 560px);
    width: auto;
    height: auto;
    pointer-events: none;
    -webkit-user-drag: none;
}
.cropper__circle {
    position: absolute;
    border: 2px solid var(--gold-bright);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgb(8 9 11 / .66);
    cursor: move;
    touch-action: none;
}
.cropper__circle:focus-visible { outline: 2px dashed var(--text); outline-offset: 4px; }
/* The handle sits on the circle's edge at 45° (100% − 85.36% = 14.64%). */
.cropper__handle {
    position: absolute;
    right: 14.64%;
    bottom: 14.64%;
    width: 24px;
    height: 24px;
    transform: translate(50%, 50%);
    border: 2px solid #15171b;
    border-radius: 50%;
    background: var(--gold-bright);
    cursor: nwse-resize;
    touch-action: none;
}
@media (pointer: coarse) { .cropper__handle { width: 32px; height: 32px; } }
.cropper__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-top: 16px;
}
.cropper__zoom { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.cropper__zoom input { width: min(220px, 50vw); accent-color: var(--gold); }
.cropper__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Phones: the whole screen for the picture, controls at the bottom within thumb reach. */
@media (max-width: 760px) {
    .cropper {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: none;
        margin: 0;
        padding: 12px 16px 16px;
        border: 0;
        border-top: 3px solid var(--gold);
        overflow: hidden;
    }
    .cropper__title { font-size: 22px; }
    .cropper__help { margin-bottom: 12px; font-size: 13.5px; }
    /* The picture takes whatever height is left; container units size it to fit (no guessing). */
    .cropper__viewport { flex: 1 1 auto; container-type: size; }
    .cropper__image { max-width: 100cqw; max-height: 100cqh; }
    .cropper__controls { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 14px; }
    .cropper__zoom input { flex: 1; width: auto; }
    .cropper__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cropper__actions .button--primary { grid-column: 1 / -1; order: -1; min-height: 48px; }
}
.field .image-picker__controls label.button { display: inline-flex; margin: 0; font-size: 13px; }
.image-picker__controls .field__hint { margin-top: 10px; }
.visually-hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.image-picker__controls:focus-within label.button { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 24px; }

.danger-zone { margin: 48px 0 0; padding: 16px 20px; border: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; color: var(--muted); }
.danger-zone p { margin: 12px 0; font-size: 14.5px; color: var(--muted); }

/* --- Admin ------------------------------------------------------------------------------------- */

.page-head--admin { padding-bottom: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; border-bottom: 1px solid var(--line); }
.tabs a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--text); } }
.tabs a[aria-current="page"] { color: var(--gold-bright); border-bottom-color: var(--gold); }

.admin-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0;
    font-size: 14.5px;
    color: var(--muted);
}
.admin-summary p { margin: 0; }
.admin-summary strong { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--gold); color: var(--text); } }
.chip[aria-current="true"] { border-color: var(--gold); background: var(--gold-soft); }
.chip__count { color: var(--muted); font-variant-numeric: tabular-nums; }

.admin-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.admin-list__link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .admin-list__link:hover { background: var(--surface); color: var(--text); } }
.admin-list__photo { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--gold); }
.admin-list__photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-list__main { display: grid; min-width: 0; }
.admin-list__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list__meta { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list__status { display: grid; justify-items: end; gap: 4px; }
.admin-list__date { font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) {
    .admin-list__link { grid-template-columns: 40px minmax(0, 1fr); }
    .admin-list__photo { width: 40px; height: 40px; }
    .admin-list__status { grid-column: 2; justify-items: start; }
}

.back { margin: 20px 0 0; font-size: 14px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 20px 0 8px; }
.admin-head__status { display: grid; justify-items: end; gap: 4px; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 32px; }
.admin-actions form { margin: 0; }

.panel { margin: 24px 0; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); }
.panel--hint { border-left: 3px solid var(--gold); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel--hint p { margin: 0; flex: 1 1 400px; }
.panel--hint form { margin: 0; }
.panel__title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 26px;
    color: var(--gold);
}
details.panel > summary { cursor: pointer; list-style-position: outside; }
.panel__text { color: var(--muted); font-size: 15px; }
.inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: end; }
.inline-form .field--check, .inline-form .button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) { .inline-form { grid-template-columns: 1fr; } }
.toggles { margin: 8px 0 16px; display: grid; gap: 4px; }

.board-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.board-list__item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
}
.board-list__item--inactive .board-list__name { color: var(--muted); }
.board-list__main { flex: 1 1 360px; min-width: 0; }
.board-list__name { margin: 0; font-weight: 600; }
.board-list__meta, .board-list__profile { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.board-list__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.board-list__actions form { display: flex; align-items: center; gap: 8px; margin: 0; }
.board-list__edit { width: 100%; }
.board-list__edit[open] { padding: 12px 0 0; }
.board-list__edit summary { list-style: none; display: inline-flex; }
.board-list__edit summary::-webkit-details-marker { display: none; }
.board-list__edit form { margin-top: 12px; }
.stack-form { display: grid !important; gap: 10px; max-width: 420px; }
.stack-form label { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }

.copy-field { display: flex; gap: 10px; margin: 16px 0 6px; }
.copy-field input {
    flex: 1;
    min-height: var(--tap);
    padding: 0 14px;
    border: 1px solid var(--gold);
    background: var(--field);
    color: var(--text);
    font: 15px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    min-width: 0;
}
.copy-feedback { min-height: 1.5em; font-size: 14px; color: var(--ok); }
@media (max-width: 560px) { .copy-field { flex-direction: column; } }

.archive-list { padding-left: 20px; color: var(--muted); }
.archive-list li { margin: 6px 0; }

.diagnosis { max-width: 680px; margin: 24px auto; padding: 16px 20px; background: var(--surface); font-size: 14px; }
.diagnosis summary { cursor: pointer; color: var(--muted); }
.diagnosis dt { margin-top: 10px; color: var(--muted); }
.diagnosis dd { margin: 2px 0 0; }

/* --- Footer --------------------------------------------------------------------------------- */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px var(--gutter);
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
    font-size: 13px;
}
.site-footer__logo { width: 72px; height: auto; opacity: .85; }
.site-footer__links { display: flex; gap: 20px; }
.site-footer__links a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-footer__links a:hover { color: var(--gold-bright); } }

/* --- Motion & print ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
    :root { --bg: #fff; --surface: #fff; --text: #111; --muted: #444; --line: #bbb; --gold: #8a733a; --gold-bright: #8a733a; }
    body { background: #fff; }
    .topnav, .toolbar, .site-footer, .notice, .flash, .skip-link { display: none !important; }
    .hero__stage::before, .hero__stage::after, .hero__home::before { display: none; }
    .hero, .hero__band { background: #fff; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card { break-inside: avoid; border: 1px solid #ccc; border-top: 2px solid var(--gold); }
    .card__quote { color: #222; }
}

.bulk-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: -4px 0 16px; }

/* --- Admin: texts and mail preview --- */
.chips--wrap { margin-top: 20px; }
.texts { margin-top: 8px; }
.texts--mail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 660px); gap: 40px; align-items: start; }
.texts__preview { position: sticky; top: calc(var(--nav-h) + 16px); }
/* Label, frame and note fit into the viewport together while the preview sticks beside the form. */
.mail-frame { display: block; width: 100%; height: calc(100vh - var(--nav-h) - 175px); min-height: 420px; max-height: 1000px; border: 1px solid var(--line); background: #efede8; }
.texts__note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.texts__note + .texts__note { margin-top: 6px; }
.text-field label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.text-field code { font-size: 12.5px; }
.text-field__default { margin-top: 6px; font-size: 13px; color: var(--muted); }
.text-field__default summary { cursor: pointer; }
.text-field__default p { margin: 6px 0 0; padding: 8px 12px; border-left: 2px solid var(--line); }
@media (max-width: 1100px) { .texts--mail { grid-template-columns: 1fr; } .texts__preview { position: static; } .mail-frame { height: 80vh; } }
.panel__subtitle { margin: 22px 0 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.plain-list { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.plain-list li { margin: 6px 0; }

/* --- Overview: view switch, compact list, hover card --- */
.toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.view-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.view-switch__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .view-switch__button:hover { color: var(--text); } }
.view-switch__button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold-bright); }

.grid[hidden], .list-view[hidden], .list-group[hidden], .list-row[hidden] { display: none; }
.list-group { margin: 0 0 36px; }
.list-group__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 24px;
    color: var(--gold);
}
.list-group__count { font-family: var(--font-body); font-size: 14px; color: var(--muted); }
.list-rows { margin: 0; padding: 0; list-style: none; }

/* One grid for header and rows: fixed side columns, so every row lines up — no matter how many
   contact links a row has. Toggle button = photo, name, company, staff; then contact, chevron. */
.list-head, .list-row { --list-cols: minmax(0, 1fr) 96px 40px; }
/* The header is built exactly like a row (outer grid + inner "toggle" grid), so the columns match. */
.list-head {
    display: grid;
    grid-template-columns: var(--list-cols);
    align-items: end;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--line);
    font-size: 11.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.list-head__cells { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.15fr) 104px; gap: 16px; padding-left: 8px; }
.list-head__num { text-align: right; }
/* Centred over the two 40px icon slots of the rows (contact column: 8px padding + 2 × 40px + 4px gap). */
.list-head__contact { padding-left: 8px; text-align: center; }
.list-row {
    display: grid;
    grid-template-columns: var(--list-cols);
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: background-color .15s;
}
.list-row--open { background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .list-row:hover { background: var(--surface); } }
.list-row__toggle {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.15fr) 104px;
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 64px;
    padding: 10px 0 10px 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.list-row__photo {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-2);
}
.list-row__photo img { width: 100%; height: 100%; object-fit: cover; }
.list-row__initials { font-family: var(--font-display); font-size: 17px; color: var(--gold); }
.list-row__main, .list-row__company { display: grid; min-width: 0; }
.list-row__main > span, .list-row__company > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__name { font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--gold-bright); }
.list-row__sub { font-size: 13px; color: var(--muted); }
.list-row__company { font-size: 14.5px; }
.list-row__staff { font-size: 14px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.list-row__contact { display: grid; grid-template-columns: 40px 40px; justify-content: end; gap: 4px; padding-left: 8px; }
.list-row__slot { width: 40px; height: 40px; }
.list-row__contact a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--gold-bright); }
@media (hover: hover) and (pointer: fine) { .list-row__contact a:hover { background: var(--gold-soft); color: var(--text); } }
.list-row__contact .icon { width: 18px; height: 18px; }
.list-row__chevron {
    justify-self: center;
    width: 10px;
    height: 10px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s;
    cursor: pointer;
}
.list-row--open .list-row__chevron { transform: translateY(2px) rotate(-135deg); border-color: var(--gold-bright); }
.list-row__toggle:focus-visible { outline-offset: -2px; }

/* Expanded detail: three columns — picture, person + sentence, facts. */
.list-row__detail { grid-column: 1 / -1; padding: 8px 8px 28px; }
.detail {
    display: grid;
    /* Left column sized for the widest badge ("KOOPERATIONSPARTNER"), so picture and badge sit
       at the same place for every kind of guest. */
    grid-template-columns: var(--detail-aside) minmax(0, 1.25fr) minmax(0, 1fr);
    --detail-aside: 210px;
    gap: 28px 36px;
    padding: 24px 28px;
    border-top: 2px solid var(--gold);
    background: var(--bg);
}
.detail__aside { display: grid; justify-items: center; align-content: start; gap: 14px; width: var(--detail-aside); }
.detail__aside .card__kind { white-space: nowrap; }
.detail__photo {
    display: grid;
    place-items: center;
    width: 140px;
    height: 140px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-2);
}
.detail__photo img { width: 100%; height: 100%; object-fit: cover; }
.detail__aside .card__kind { margin: 0; }
.detail__name { margin: 0 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.15; color: var(--gold-bright); }
.detail__role { margin: 0 0 2px; font-size: 16px; }
.detail__meta { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); }
.detail__quote {
    margin: 0;
    padding: 2px 0 2px 18px;
    border-left: 2px solid var(--gold);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 20px;
    line-height: 1.45;
    color: #d6d1c6;
}
.detail__quote p { margin: 0; }
.detail__facts { display: grid; align-content: start; gap: 18px; }
.detail__label { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 12px; border: 1px solid var(--gold-soft); border-radius: 999px; background: rgb(176 152 90 / .08); font-size: 14px; }
.detail__contact { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.detail__contact li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.detail__contact a, .detail__contact span { color: var(--gold-bright); text-decoration: none; overflow-wrap: anywhere; user-select: text; }
@media (hover: hover) and (pointer: fine) { .detail__contact a:hover { text-decoration: underline; color: var(--text); } }

@media (max-width: 1000px) {
    .detail { grid-template-columns: var(--detail-aside) minmax(0, 1fr); }
    .detail__photo { width: 120px; height: 120px; }
    .detail__facts { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 760px) {
    .list-head { display: none; }
    .list-row { --list-cols: minmax(0, 1fr) auto 32px; }
    .list-row__toggle { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
    .list-row__company, .list-row__staff { display: none; }
    .list-row__contact { padding-left: 4px; }
    .detail { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
    .detail__aside { width: auto; grid-template-columns: 88px auto; justify-items: start; align-items: center; gap: 16px; }
    .detail__photo { width: 88px; height: 88px; }
    .detail__name { font-size: 24px; }
    .detail__quote { font-size: 18px; }
    .detail__facts { grid-template-columns: 1fr; }
}

.card-popover {
    position: fixed;
    z-index: 20;
    width: 340px;
    pointer-events: none;
    box-shadow: 0 18px 50px rgb(0 0 0 / .55);
}
.card-popover[hidden] { display: none; }
.card-popover .card { padding: 26px 22px 22px; }
.card-popover .card__photo { width: 110px; height: 110px; }


.list-row__only-narrow { display: none !important; }
@media (max-width: 760px) { .list-row__only-narrow { display: block !important; } }
@media print {
    .view-switch, .card-popover { display: none !important; }
}
