/* Apollo Events
   Brand colours: swap --brand / --brand-2 for the hex values on page 2 of the Logo & Branding
   Guidelines palette. Everything else derives from those two plus each event's own accent. */
:root {
  --brand: #0C3C6E;            /* navy - masthead, admin chrome */
  --brand-2: #F2801F;          /* warm orange - highlights, home hero shapes */
  --ink: #16243A;
  --muted: #5B6B80;
  --line: #DCE4EE;
  --tint: #EEF4FA;             /* page background */
  --paper: #FFFFFF;
  --accent: var(--brand-2);    /* per-event: overridden by style="--accent:#..." on the event */
  --on-accent: #FFFFFF;
  --danger: #B3261E;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Nunito", "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(12, 60, 110, .10);
  --shadow-lg: 0 18px 50px rgba(12, 60, 110, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-weight: 500; font-size: 17px; line-height: 1.55; color: var(--ink);
  background-color: var(--tint);
  background-image: radial-gradient(rgba(12, 60, 110, .07) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Masthead / page / footer */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; }
.masthead::before { content: ""; display: block; height: 6px; background: linear-gradient(90deg, var(--brand) 0 55%, var(--brand-2) 55%); }
.masthead-inner { max-width: 1080px; margin: 0 auto; padding: .8rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--brand); }
.wordmark:hover { color: var(--brand); }
.wordmark .logo { height: 36px; width: auto; }
.wordmark-text { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.masthead-nav { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; font-size: .95rem; }
.masthead-user { color: var(--muted); font-weight: 700; }
.masthead-link { font: inherit; font-weight: 800; color: var(--brand); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.masthead-link:hover, .masthead-link.is-current { color: var(--brand-2); }
@media (max-width: 480px) { .masthead-user { display: none; } }
.page { max-width: 780px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.page-wide { max-width: 1080px; padding-top: 1.75rem; }
.footer { max-width: 1080px; margin: 2rem auto 0; padding: 1.25rem; font-size: .85rem; color: var(--muted); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer-links { display: flex; gap: 1rem; align-items: center; margin-top: 2rem; }

/* Chips */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.chip { display: inline-block; font-size: .85rem; font-weight: 800; padding: .3rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: var(--shadow); }
.chip-muted { background: rgba(255, 255, 255, .75); color: var(--muted); }
.chip-float { position: absolute; top: .75rem; right: .75rem; }
.eyebrow { font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); margin-bottom: .5rem; }
.section-title { margin: 2rem 0 1.25rem; }
.section-title::after { content: ""; display: block; width: 3.5rem; height: 5px; background: var(--brand-2); border-radius: 3px; margin-top: .5rem; }

/* Home hero */
.home-hero { position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); padding: 4rem 1.25rem 4.5rem; color: #fff; background: linear-gradient(120deg, var(--brand) 0%, #145A9E 100%); }
.home-hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.home-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); margin-bottom: .75rem; }
.home-hero p { font-size: 1.15rem; max-width: 40rem; opacity: .95; margin-bottom: 0; }
.home-hero-shapes .shape { position: absolute; border-radius: 50%; opacity: .9; animation: drift 9s ease-in-out infinite alternate; }
.shape-1 { width: 220px; height: 220px; right: -60px; top: -70px; background: var(--brand-2); }
.shape-2 { width: 90px; height: 90px; right: 18%; bottom: -30px; background: rgba(255, 255, 255, .18); animation-delay: -3s; }
.shape-3 { width: 46px; height: 46px; left: 8%; top: 18%; background: rgba(255, 255, 255, .22); animation-delay: -6s; }
.shape-4 { width: 140px; height: 140px; left: -50px; bottom: -70px; background: rgba(242, 128, 31, .45); animation-delay: -1.5s; }
@keyframes drift { from { transform: translateY(0) } to { transform: translateY(-14px) } }

/* Event list (home) */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card a { display: block; text-decoration: none; color: inherit; background: var(--paper); border-radius: var(--radius); overflow: hidden; height: 100%; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.event-card a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.event-card-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); }
.event-card-media img { width: 100%; height: 100%; object-fit: cover; }
.event-card-media .date-tile { position: absolute; left: 1rem; bottom: -1.1rem; }
.event-card-body { padding: 1.9rem 1.25rem 1.25rem; }
.event-card-body h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.event-card-meta { color: var(--muted); font-size: .92rem; margin-bottom: .5rem; }
.event-card-summary { font-size: .97rem; margin-bottom: .9rem; }
.empty-card { text-align: center; padding: 3rem 1.5rem; margin-top: 2rem; }
.empty-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; margin-bottom: .25rem; }

/* Date tile - the day the event happens, in the event's colour */
.date-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5.5rem; padding: .6rem .8rem; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm); text-align: center; line-height: 1; flex-shrink: 0; box-shadow: var(--shadow); }
.date-tile .date-weekday { font-size: .78rem; font-weight: 800; opacity: .9; }
.date-tile .date-day { font-family: var(--font-display); font-size: 2.7rem; font-weight: 800; margin: .1rem 0; letter-spacing: -0.04em; }
.date-tile .date-month { font-size: .82rem; font-weight: 800; }
.date-tile-sm { min-width: 4rem; padding: .45rem .55rem; }
.date-tile-sm .date-day { font-size: 1.8rem; }
.date-tile-sm .date-month { font-size: .72rem; }
.date-tile-hero { min-width: 7rem; padding: .9rem 1rem; transform: rotate(-4deg); border: 4px solid #fff; box-shadow: var(--shadow-lg); }
.date-tile-hero .date-day { font-size: 3.6rem; }

/* Event hero */
.event { position: relative; }
.preview-bar { width: 100vw; margin-left: calc(50% - 50vw); background: #FFF0C2; color: #5A4300; padding: .6rem 1.25rem; text-align: center; font-size: .9rem; }
.hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); min-height: 480px; display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: var(--accent); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 36, 58, .05) 0%, rgba(22, 36, 58, .35) 45%, rgba(22, 36, 58, .82) 100%); }
.hero-nophoto { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000) 100%); }
.hero-nophoto::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .18) 2px, transparent 2.5px); background-size: 34px 34px; }
.hero-nophoto .hero-shade { background: linear-gradient(180deg, transparent 40%, rgba(22, 36, 58, .35) 100%); }
.hero-nophoto { min-height: 0; }                      /* no picture: just tall enough for the title block */
.hero-nophoto .hero-inner { padding-top: 2.25rem; }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 3rem 1.25rem 2.5rem; display: flex; gap: 1.5rem; align-items: flex-end; }
.hero-text { flex: 1; }
.hero h1 { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); margin-bottom: .5rem; }
.hero-summary { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.hero-meta { font-weight: 700; opacity: .95; margin-bottom: 1.1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
@media (max-width: 600px) {
  .hero { min-height: 400px; }
  .hero-nophoto { min-height: 0; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .date-tile-hero { transform: rotate(-3deg); }
}

/* Event body */
.event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: -1.5rem 0 1.75rem; position: relative; z-index: 2; }
.event-facts > div { background: var(--paper); border-radius: var(--radius-sm); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.event-facts dt { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem; }
.event-facts dd { margin: 0; }
.event-description { font-size: 1.08rem; margin-bottom: 1.75rem; max-width: 62ch; }
.event-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; margin-bottom: 2rem; }
.event-gallery figure { margin: 0; }
.event-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); transform: rotate(-1deg); }
.event-gallery figure:nth-child(even) img { transform: rotate(1.2deg); }
.event-gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* Cards */
.card { background: var(--paper); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card-title { font-size: 1.5rem; margin-bottom: 1rem; }
.card-danger { background: #FFF3F2; }

/* RSVP block */
.rsvp { border-top: 8px solid var(--accent); }
.rsvp-who { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .95rem; margin-bottom: 1rem; }
.rsvp-status { background: color-mix(in srgb, var(--accent) 12%, #fff); padding: .85rem 1.1rem; border-radius: var(--radius-sm); font-weight: 700; }
.rsvp-closed { background: var(--tint); padding: 1rem 1.25rem; border-radius: var(--radius-sm); font-weight: 800; margin: 0; }

/* Celebration (thanks page) */
.celebrate { position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); padding: 4rem 1.25rem 3.5rem; text-align: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 75%, #000)); margin-bottom: 1.5rem; }
.celebrate h1 { color: #fff; font-size: clamp(2.4rem, 7vw, 3.6rem); }
.celebrate-sub { font-size: 1.2rem; font-weight: 700; margin: .5rem 0 0; }
.celebrate-quiet { background: var(--brand); }
.thanks-mark { width: 5.5rem; height: 5.5rem; margin: 0 auto 1.25rem; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--accent); font-size: 2.8rem; font-weight: 800; box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.celebrate-quiet .thanks-mark { color: var(--brand); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti-piece { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; opacity: .95; animation: fall 3.6s linear infinite; }
.confetti-piece:nth-child(1)  { left: 4%;  animation-delay: 0s;   }
.confetti-piece:nth-child(2)  { left: 11%; animation-delay: -.8s; }
.confetti-piece:nth-child(3)  { left: 19%; animation-delay: -2s;  }
.confetti-piece:nth-child(4)  { left: 26%; animation-delay: -1.3s;}
.confetti-piece:nth-child(5)  { left: 33%; animation-delay: -.4s; }
.confetti-piece:nth-child(6)  { left: 41%; animation-delay: -2.6s;}
.confetti-piece:nth-child(7)  { left: 48%; animation-delay: -1.7s;}
.confetti-piece:nth-child(8)  { left: 56%; animation-delay: -.2s; }
.confetti-piece:nth-child(9)  { left: 63%; animation-delay: -3s;  }
.confetti-piece:nth-child(10) { left: 71%; animation-delay: -1s;  }
.confetti-piece:nth-child(11) { left: 78%; animation-delay: -2.3s;}
.confetti-piece:nth-child(12) { left: 86%; animation-delay: -.6s; }
.confetti-piece:nth-child(13) { left: 92%; animation-delay: -1.9s;}
.confetti-piece:nth-child(14) { left: 97%; animation-delay: -2.9s;}
.c0 { background: #FFD166; } .c1 { background: #06D6A0; } .c2 { background: #FFFFFF; } .c3 { background: #EF476F; }
.c4 { background: #118AB2; } .c5 { background: #FFB4A2; } .c6 { background: #C7F9CC; }
@keyframes fall { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(420px) rotate(540deg); opacity: .2; } }

/* Intro block (login, admin pages) */
.intro { margin-bottom: 1.75rem; }
.intro h1 { margin-bottom: .75rem; }
.intro h1::after { content: ""; display: block; width: 3.5rem; height: 5px; background: var(--accent); border-radius: 3px; margin-top: .6rem; }
.intro-compact { margin-bottom: 1.25rem; }
.intro-compact p { color: var(--muted); margin: 0; }
.page:not(.page-wide) > .intro { padding-top: 2rem; }

/* Forms */
.field { margin-bottom: 1.25rem; }
.field-short { max-width: 240px; }
.field label, .field legend { display: block; font-weight: 800; margin-bottom: .4rem; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1 1 200px; }
.field.grow { flex: 2 1 240px; }
.input { font: inherit; width: 100%; padding: .75rem .9rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea.input { resize: vertical; }
select.input { appearance: auto; }
.input-code { letter-spacing: .08em; }
.input-upper { text-transform: uppercase; }
.w-zip { max-width: 10rem; }
.hint { font-size: .88rem; color: var(--muted); margin: .35rem 0 0; }
.field .hint { margin-bottom: 0; }
.field-error { display: block; color: var(--danger); font-size: .88rem; font-weight: 800; margin-top: .35rem; }
.field-error:empty { display: none; }
.validation-summary { color: var(--danger); font-weight: 800; margin-bottom: 1rem; }
.validation-summary:empty, .validation-summary-valid { display: none; }
.validation-summary ul { margin: 0; padding-left: 1.2rem; }
input[type=color] { width: 4rem; height: 2.5rem; padding: .2rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
input[type=file] { font: inherit; }
.slug-field { display: flex; align-items: center; border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); }
.slug-field span { padding: .75rem .6rem; color: var(--muted); font-size: .95rem; border-right: 1px solid var(--line); }
.slug-field .input { border: 0; border-radius: 0; }
.slug-field .input:focus { box-shadow: none; }
.slug-field:focus-within { border-color: var(--accent); }

.choice-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.choice-col { display: flex; flex-direction: column; gap: .5rem; }
.choice { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.choice input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); margin: 0; }

.attend-options { display: flex; gap: .75rem; flex-wrap: wrap; }
.attend-option { flex: 1 1 180px; position: relative; }
.attend-option input { position: absolute; opacity: 0; inset: 0; }
.attend-option span { display: block; padding: 1rem 1rem; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 1.05rem; text-align: center; cursor: pointer; transition: transform .12s ease; }
.attend-option span:hover { transform: translateY(-2px); }
.attend-option input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow); }
.attend-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.attending-only[hidden] { display: none; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 800; padding: .85rem 1.7rem; border: 2px solid transparent; border-radius: 999px; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-primary:hover { color: var(--on-accent); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn-hero { background: #fff; color: var(--ink); font-size: 1.1rem; padding: 1rem 2.1rem; box-shadow: var(--shadow-lg); }
.btn-hero:hover { color: var(--accent); }
.btn-secondary { background: var(--paper); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: color-mix(in srgb, var(--accent) 10%, var(--paper)); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-inline { padding: .55rem 1.2rem; font-size: .95rem; }
.btn-quiet { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-quiet:hover { color: var(--ink); }
.btn-quiet:disabled { opacity: .35; cursor: default; text-decoration: none; }
.btn-delete { color: var(--danger); }
.btn-clear { align-self: center; }
.nav-signout { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.nav-signout:hover { color: var(--ink); }
.inline-form { display: inline; }
.search-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
.search-row .input { flex: 1 1 240px; width: auto; }

/* Admin */
.page-wide .card { padding: 1.5rem; }
.admin-nav { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; font-size: .95rem; }
.admin-nav a { text-decoration: none; font-weight: 800; color: var(--ink); padding: .45rem 1rem; border-radius: 999px; }
.admin-nav a:hover { background: var(--paper); }
.admin-nav a.nav-current { background: var(--brand); color: #fff; }
.admin-nav-exit { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.admin-message { background: var(--brand); color: #fff; padding: .75rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-weight: 800; }
.admin-message-warning { background: #FFF0C2; color: #5A4300; }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding: 1rem 1.5rem; }
.save-bar { position: sticky; bottom: 0; background: var(--tint); padding: 1rem 0; display: flex; gap: .75rem; border-top: 1px solid var(--line); margin-bottom: 1.25rem; }
.status { display: inline-block; font-size: .75rem; font-weight: 800; padding: .15rem .65rem; border-radius: 999px; background: var(--tint); }
.status-published { background: #DCEFE0; color: #1E5B2E; }
.status-draft { background: #EBEDF0; color: #4A5560; }
.status-closed { background: #FBE3D9; color: #7A2E0E; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { padding: 1rem 1.25rem; margin: 0; }
.stat-num { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--brand); }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 700; }

/* Question builder */
.questions { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.question { border-radius: var(--radius-sm); padding: 1rem 1rem .5rem; background: var(--tint); }
.question .field { margin-bottom: .9rem; }
.question .field label { font-size: .85rem; color: var(--muted); }
.question-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid var(--line); }
.question-foot .choice { font-weight: 800; }
.question-tools { display: flex; gap: 1rem; font-size: .9rem; }

/* Pictures (admin) */
.upload-form { display: flex; gap: .75rem 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; padding: 1rem 1.25rem; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: var(--tint); }
.upload-form .upload-label { font-weight: 800; }
.upload-form .upload-count { color: var(--muted); font-size: .95rem; }
.upload-form .btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.visually-hidden:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-form .hint { flex-basis: 100%; margin: 0; }
.subhead { font-size: 1.05rem; margin: 0 0 .75rem; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.image-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--tint); }
.image-card.is-banner { box-shadow: 0 0 0 3px var(--accent); }
.image-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-badge { position: absolute; top: .5rem; left: .5rem; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; padding: .2rem .65rem; border-radius: 999px; }
.image-caption { padding: .5rem .6rem 0; }
.image-caption .input { padding: .4rem .5rem; font-size: .9rem; }
.image-tools { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .5rem .6rem .7rem; font-size: .9rem; }
.image-tools .btn-delete { margin-left: auto; }

/* Tables */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.table .num { text-align: right; }
.table .actions { white-space: nowrap; }
.table .actions a, .table .actions form { margin-right: .9rem; }
.row-title { font-weight: 800; }
.row-sub { color: var(--muted); font-size: .85rem; }
.row-declined td { color: var(--muted); }

/* Confirm dialog */
.confirm-dialog { border: 0; border-radius: var(--radius); padding: 1.5rem; max-width: 420px; font-family: var(--font); color: var(--ink); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgba(22, 36, 58, .5); }
.confirm-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

/* Tooltips - same markup as the jacket site: <button class="... tooltip">Label<span class="tooltip-text">...</span></button>
   The span is never displayed; wwwroot/js/tooltips.js shows its text in a fixed-position bubble
   on <body>, so tooltips float above scrolling tables instead of being clipped by them. */
.tooltip .tooltip-text { display: none !important; }
.tip-bubble {
  position: fixed; z-index: 1000; max-width: 260px; padding: .55rem .8rem; border-radius: 8px;
  background: var(--ink); color: #fff; font-family: var(--font); font-size: .82rem; font-weight: 600; line-height: 1.4; text-wrap: balance;
  box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
}
.tip-bubble.is-visible { opacity: 1; transform: translateY(0); }
.tip-bubble::after { content: ""; position: absolute; top: 100%; left: var(--arrow-x, 50%); margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.tip-bubble.is-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
