/* ==========================================================================
   Speakerdatenbank design system
   shadcn/ui "new-york" look, hand-written, no build step.
   Sections:
    1. Tokens          2. Reset & base      3. Layout          4. Utilities
    5. Header/Footer   6. Buttons           7. Forms           8. Card
    9. Badge & chips  10. Alerts           11. Table          12. Avatar
   13. Speaker card   14. Profile          15. Toolbar/filter 16. Empty/skeleton
   17. Dialog         18. Dropdown         19. Toast          20. Subnav/status
   21. Upload         22. Icons            23. Motion
   ========================================================================== */

/* 1. Tokens --------------------------------------------------------------- */
:root {
  color-scheme: light;

  --background: hsl(0 0% 100%);
  --foreground: hsl(240 10% 4%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(240 10% 4%);
  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(240 10% 4%);
  --primary: hsl(243 75% 59%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(240 5% 96%);
  --secondary-foreground: hsl(240 6% 10%);
  --muted: hsl(240 5% 96%);
  --muted-foreground: hsl(240 4% 40%);
  --accent: hsl(243 80% 96%);
  --accent-foreground: hsl(243 60% 40%);
  --destructive: hsl(0 72% 47%);
  --destructive-foreground: hsl(0 0% 100%);
  --success: hsl(142 72% 28%);
  --warning: hsl(30 92% 32%);
  --border: hsl(240 6% 90%);
  --input: hsl(240 6% 86%);
  --ring: hsl(243 75% 59%);
  --radius: 0.6rem;

  --radius-sm: calc(var(--radius) - 0.2rem);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 10px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 14px 28px -8px rgb(0 0 0 / 0.16), 0 6px 10px -6px rgb(0 0 0 / 0.08);
  --header-h: 3.5rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 2. Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1 0 auto; padding-block: 2rem 4rem; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--primary); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
p { text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 1.5rem; }
code, kbd { font-family: var(--font-mono); font-size: 0.875em; background: var(--muted); padding: 0.1em 0.35em; border-radius: 0.3rem; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* 3. Layout --------------------------------------------------------------- */
.container, .container-narrow, .container-mid {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
}
.container { max-width: 72rem; }
.container-mid { max-width: 56rem; }
.container-narrow { max-width: 40rem; }
@media (min-width: 40rem) {
  .container, .container-narrow, .container-mid { padding-inline: 1.5rem; }
}

.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.025em; }
.page-description { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 1.0625rem; max-width: 60ch; }
@media (min-width: 40rem) { .page-title { font-size: 2.25rem; } }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 48rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 40rem) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid > .span-2 { grid-column: span 2; }
}

.sidebar-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 64rem) {
  .sidebar-layout { grid-template-columns: 16rem minmax(0, 1fr); gap: 2rem; align-items: start; }
  .sidebar-layout > aside { position: sticky; top: calc(var(--header-h) + 1rem); }
}

/* 4. Utilities ------------------------------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden-mobile { display: none; }
@media (min-width: 40rem) { .hidden-mobile { display: revert; } }
@media (min-width: 64rem) { .hidden-desktop { display: none !important; } }
.text-muted { color: var(--muted-foreground); }
.text-xs { font-size: 0.75rem; line-height: 1.4; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }

.prose { max-width: 68ch; line-height: 1.75; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.375rem; margin-top: 2rem; }
.prose h3 { font-size: 1.125rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.35rem; }
.prose blockquote { border-left: 3px solid var(--border); padding-left: 1rem; color: var(--muted-foreground); }
.prose a { font-weight: 500; }

/* 5. Header & footer ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem;
  width: 100%; max-width: 72rem; margin-inline: auto;
  padding: 0 1rem; min-height: var(--header-h);
}
@media (min-width: 40rem) { .site-nav { padding-inline: 1.5rem; } }
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; letter-spacing: -0.02em; font-size: 1.0625rem;
  color: var(--foreground); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .icon { color: var(--primary); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; width: 2.25rem; height: 2.25rem;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--foreground); cursor: pointer;
}
.nav-toggle:hover { background: var(--muted); }
.nav-links {
  display: none; flex-direction: column; align-items: stretch; gap: 0.25rem;
  flex-basis: 100%; order: 3; padding-block: 0.5rem 0.75rem; margin: 0; list-style: none;
}
.nav-links[data-open="true"], .nav-links[data-open=""] { display: flex; }
.nav-links a:not(.btn), .nav-links > li > a:not(.btn) {
  padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--muted-foreground); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.nav-links a:not(.btn):hover { color: var(--foreground); background: var(--muted); }
.nav-links a[aria-current="page"]:not(.btn) { color: var(--foreground); background: var(--muted); }
.nav-links form { display: contents; }
@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex; flex-direction: row; align-items: center; gap: 0.25rem;
    flex-basis: auto; order: 0; margin-left: auto; padding: 0;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem; color: var(--muted-foreground); font-size: 0.875rem;
}
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--foreground); }

/* 6. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.25rem; padding: 0 1rem;
  font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--foreground);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; }
.btn .icon { flex: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, black); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: color-mix(in srgb, var(--secondary) 80%, var(--foreground)); }
.btn-outline { background: var(--background); border-color: var(--input); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); box-shadow: var(--shadow-xs); }
.btn-destructive:hover { background: color-mix(in srgb, var(--destructive) 88%, black); }
.btn-link { height: auto; padding: 0; color: var(--primary); text-underline-offset: 0.2em; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-lg { height: 2.75rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-icon.btn-sm { width: 2rem; }
.btn[disabled], .btn[aria-busy="true"], .btn[aria-disabled="true"] {
  opacity: 0.55; pointer-events: none; cursor: not-allowed;
}
.btn[aria-busy="true"]::before {
  content: ""; width: 0.9em; height: 0.9em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 7. Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.label { font-size: 0.875rem; font-weight: 500; line-height: 1.2; }
.help { font-size: 0.8125rem; color: var(--muted-foreground); }
.field-error { font-size: 0.8125rem; font-weight: 500; color: var(--destructive); }

.input, .textarea, .select {
  width: 100%; min-width: 0; height: 2.25rem; padding: 0.375rem 0.75rem;
  font-size: 0.875rem; line-height: 1.4;
  background: var(--background); color: var(--foreground);
  border: 1px solid var(--input); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); opacity: 0.8; }
.textarea { height: auto; min-height: 6rem; resize: vertical; padding-block: 0.5rem; line-height: 1.5; }
.select {
  appearance: none; padding-right: 2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 1rem;
}
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 28%, transparent);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--destructive); }
.input[aria-invalid="true"]:focus-visible, .textarea[aria-invalid="true"]:focus-visible, .select[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 25%, transparent);
}
.input:disabled, .textarea:disabled, .select:disabled { opacity: 0.55; cursor: not-allowed; background: var(--muted); }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
input[type="file"].input { padding: 0; line-height: 2.1rem; }
input[type="file"]::file-selector-button {
  height: 100%; margin-right: 0.75rem; padding: 0 0.75rem; cursor: pointer;
  border: 0; border-right: 1px solid var(--input); background: var(--muted); color: var(--foreground);
  font-size: 0.8125rem; font-weight: 500;
}

.checkbox {
  appearance: none; flex: none; width: 1rem; height: 1rem; margin: 0;
  display: inline-grid; place-content: center; vertical-align: middle;
  border: 1px solid var(--input); border-radius: 0.25rem; background: var(--background);
  box-shadow: var(--shadow-xs); cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.checkbox:checked {
  background-color: var(--primary); border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 0.75rem; background-position: center; background-repeat: no-repeat;
}
.checkbox:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.checkbox:disabled { opacity: 0.5; cursor: not-allowed; }
label:has(> .checkbox) { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 2.25rem; }
.input-icon {
  position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%;
  width: 1rem; height: 1rem; color: var(--muted-foreground); pointer-events: none;
}
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }

/* 8. Card ----------------------------------------------------------------- */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 0.2rem);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-header { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 1.5rem 0; }
.card-title { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.card-description { font-size: 0.875rem; color: var(--muted-foreground); }
.card-content { padding: 1.25rem 1.5rem; }
.card-header + .card-content { padding-top: 1rem; }
.card-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 50%, transparent);
}

/* 9. Badge & chips -------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.6rem; font-size: 0.75rem; font-weight: 500; line-height: 1.4; white-space: nowrap;
  color: var(--primary-foreground); background: var(--primary);
  border: 1px solid transparent; border-radius: 999px;
}
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.badge-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.badge-destructive { background: color-mix(in srgb, var(--destructive) 12%, transparent); color: var(--destructive); border-color: color-mix(in srgb, var(--destructive) 25%, transparent); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  position: relative; display: inline-flex; align-items: center;
  padding: 0.3rem 0.75rem; font-size: 0.8125rem; font-weight: 500; line-height: 1.3;
  color: var(--foreground); background: var(--background);
  border: 1px solid var(--input); border-radius: 999px; cursor: pointer; user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { background: var(--muted); }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip:has(input:checked) {
  background: var(--accent); color: var(--accent-foreground);
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
}
.chip:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.chip:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

/* 10. Alerts -------------------------------------------------------------- */
.alert {
  --alert: var(--muted-foreground);
  padding: 0.875rem 1rem; font-size: 0.875rem; line-height: 1.5;
  color: var(--foreground);
  background: color-mix(in srgb, var(--alert) 8%, var(--background));
  border: 1px solid color-mix(in srgb, var(--alert) 30%, transparent);
  border-left: 3px solid var(--alert);
  border-radius: var(--radius);
}
.alert-title { display: block; font-weight: 600; color: var(--alert); margin-bottom: 0.15rem; }
.alert-success { --alert: var(--success); }
.alert-error { --alert: var(--destructive); }
.alert-warning { --alert: var(--warning); }
.alert-info { --alert: var(--primary); }

/* 11. Table --------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table thead th {
  background: color-mix(in srgb, var(--muted) 70%, transparent);
  color: var(--muted-foreground); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.table tbody tr { transition: background-color 0.1s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 12. Avatar -------------------------------------------------------------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; overflow: hidden;
  background: var(--accent); color: var(--accent-foreground); font-size: 0.875rem; font-weight: 600;
  border: 1px solid var(--border);
}
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-lg { width: 6rem; height: 6rem; font-size: 1.75rem; }

/* 13. Speaker card -------------------------------------------------------- */
.speaker-card {
  display: flex; flex-direction: column; overflow: hidden;
  color: var(--card-foreground); text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.2rem); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.speaker-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.speaker-card:focus-visible { outline-offset: 3px; border-radius: calc(var(--radius) + 0.2rem); }
.speaker-card-media {
  position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden;
  background: var(--muted); object-fit: cover;
}
img.speaker-card-media { transition: transform 0.4s ease; }
.speaker-card:hover img.speaker-card-media { transform: scale(1.04); }
.speaker-card:has(img.speaker-card-media) { overflow: hidden; }
.speaker-card-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1;
  font-size: 3.25rem; font-weight: 700; letter-spacing: 0.02em; color: var(--accent-foreground);
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
    linear-gradient(135deg, var(--accent), var(--muted));
}
.speaker-card-body { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; padding: 1rem 1.125rem 1.125rem; }
.speaker-card-name { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.speaker-card-tagline {
  font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.speaker-card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 0.5rem; }

/* 14. Speaker profile ----------------------------------------------------- */
.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 56rem) { .profile { grid-template-columns: 18rem minmax(0, 1fr); gap: 3rem; align-items: start; } }
.profile-portrait { display: flex; flex-direction: column; gap: 0.5rem; max-width: 22rem; }
@media (min-width: 56rem) { .profile-portrait { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.profile-portrait img, .profile-portrait .speaker-card-placeholder {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: calc(var(--radius) + 0.2rem); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.profile-credit { font-size: 0.75rem; color: var(--muted-foreground); }
.profile-section { padding-block: 1.5rem; border-top: 1px solid var(--border); }
.profile-section:first-child { border-top: 0; padding-top: 0; }
.profile-section h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }
.link-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.link-list li, .link-list a {
  display: flex; align-items: center; gap: 0.75rem;
}
.link-list a {
  padding: 0.5rem 0.75rem; margin-inline: -0.75rem; border-radius: var(--radius-sm);
  color: var(--foreground); text-decoration: none; font-size: 0.9375rem; min-width: 0;
}
.link-list a:hover { background: var(--muted); }
.link-list .icon { color: var(--muted-foreground); flex: none; }
.stat { display: flex; flex-direction: column; gap: 0.15rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.8125rem; color: var(--muted-foreground); }

/* 15. Directory toolbar & filters ---------------------------------------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  padding-block: 0.75rem; margin-bottom: 1rem;
}
.toolbar .input-group, .toolbar > .input { flex: 1 1 14rem; }
.toolbar .select { width: auto; min-width: 9rem; flex: 0 1 12rem; }
@media (min-width: 64rem) {
  .toolbar {
    position: sticky; top: var(--header-h); z-index: 20;
    padding-inline: 0; background: color-mix(in srgb, var(--background) 90%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
}
.result-count { font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 1rem; }

.filter-panel {
  display: none; flex-direction: column; gap: 1.25rem; padding: 1.25rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.filter-panel[data-open="true"], .filter-panel[data-open=""] { display: flex; }
@media (min-width: 64rem) { .filter-panel { display: flex; } }
.filter-group { display: flex; flex-direction: column; gap: 0.6rem; }
.filter-group + .filter-group { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.filter-title {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-foreground);
}
.filter-group .chip-list { max-height: 15rem; overflow-y: auto; padding: 2px; margin: -2px; }

/* 16. Empty state & skeleton --------------------------------------------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 3.5rem 1.5rem; text-align: center; color: var(--muted-foreground);
  border: 1px dashed var(--input); border-radius: var(--radius);
}
.empty > .icon, .empty > svg { width: 2.5rem; height: 2.5rem; padding: 0.6rem; box-sizing: content-box; border-radius: 50%; background: var(--muted); margin-bottom: 0.5rem; }
.empty > h2, .empty > h3, .empty > .empty-title, .empty strong { color: var(--foreground); font-size: 1.125rem; font-weight: 600; }
.empty p { max-width: 36ch; font-size: 0.9375rem; }

.skeleton {
  display: block; min-height: 1rem; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--muted) 25%, color-mix(in srgb, var(--muted) 60%, var(--background)) 50%, var(--muted) 75%);
  background-size: 200% 100%; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.htmx-indicator:not(.htmx-request *, .htmx-request) { display: none; }
#results { transition: opacity 0.15s; }
#results.htmx-request { opacity: 0.6; }

/* 17. Dialog -------------------------------------------------------------- */
.dialog {
  width: min(28rem, calc(100% - 2rem)); margin: auto; padding: 1.5rem;
  color: var(--popover-foreground); background: var(--popover);
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 0.2rem); box-shadow: var(--shadow-lg);
}
.dialog[open] { display: flex; flex-direction: column; gap: 0.75rem; animation: dialog-in 0.18s ease-out; }
.dialog::backdrop { background: rgb(9 9 11 / 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dialog-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.dialog p { font-size: 0.875rem; color: var(--muted-foreground); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
@media (max-width: 30rem) { .dialog-actions { flex-direction: column-reverse; } .dialog-actions .btn { width: 100%; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* 18. Dropdown ------------------------------------------------------------ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 50;
  min-width: 12rem; padding: 0.3rem; display: flex; flex-direction: column;
  color: var(--popover-foreground); background: var(--popover);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  animation: dialog-in 0.12s ease-out;
}
.dropdown-item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.45rem 0.65rem; font-size: 0.875rem; text-align: left; text-decoration: none;
  color: inherit; background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--muted); text-decoration: none; outline: none; }
.dropdown-item:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }
.dropdown-item .icon { color: var(--muted-foreground); }

/* 19. Toast / flash ------------------------------------------------------- */
.toast-region {
  position: fixed; z-index: 100; right: 1rem; bottom: 1rem; left: 1rem;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; pointer-events: none;
}
@media (min-width: 30rem) { .toast-region { left: auto; width: 24rem; } }
.toast {
  --toast: var(--primary);
  pointer-events: auto; width: 100%;
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem; font-size: 0.875rem; line-height: 1.5;
  color: var(--popover-foreground); background: var(--popover);
  border: 1px solid var(--border); border-left: 3px solid var(--toast); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); animation: toast-in 0.25s ease-out;
}
.toast[data-state="closing"] { opacity: 0; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; }
.toast-success { --toast: var(--success); }
.toast-error { --toast: var(--destructive); }
.toast-info { --toast: var(--primary); }
.toast .btn-icon { margin: -0.35rem -0.5rem -0.35rem auto; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 20. Sub navigation & status -------------------------------------------- */
.subnav {
  display: flex; gap: 0.25rem; overflow-x: auto; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; padding: 0.6rem 0.9rem; margin-bottom: -1px;
  font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); text-decoration: none;
  border-bottom: 2px solid transparent; border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}
.subnav a:hover { color: var(--foreground); }
.subnav a[aria-current="page"] { color: var(--foreground); border-bottom-color: var(--primary); }
.subnav a:focus-visible { outline-offset: -2px; }

.status-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.4rem; background: var(--muted-foreground); vertical-align: middle; }
.status-published { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.status-pending { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 22%, transparent); }
.status-draft { background: var(--muted-foreground); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted-foreground) 20%, transparent); }
.status-rejected { background: var(--destructive); box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 22%, transparent); }

/* 21. Image upload -------------------------------------------------------- */
.upload {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted-foreground);
  border: 2px dashed var(--input); border-radius: var(--radius);
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  transition: border-color 0.15s, background-color 0.15s;
}
.upload:hover, .upload:has(input:focus-visible) { border-color: var(--primary); background: var(--accent); }
.upload:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.upload input[type="file"] { max-width: 100%; font-size: 0.8125rem; }
.upload-preview {
  width: 8rem; height: 8rem; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* 22. Icons --------------------------------------------------------------- */
.icon {
  width: 1rem; height: 1rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 1.25rem; height: 1.25rem; }

/* 23. Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .speaker-card:hover { transform: none; }
  .skeleton { animation: none; }
}

/* ==========================================================================
   Pages: hero, sections, landing pages, profile, wizard (added with the templates)
   ========================================================================== */
.skip-link:focus { position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; clip: auto; z-index: 100; padding: 0.5rem 1rem; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius); }
.env-banner { background: var(--warning); color: #fff; text-align: center; font-size: 0.75rem; padding: 0.25rem 1rem; font-weight: 500; }
.main-narrow { max-width: 30rem; margin-inline: auto; padding: 2.5rem 1rem 4rem; }

.hero { border-bottom: 1px solid var(--border); background:
  radial-gradient(60rem 24rem at 15% -10%, var(--accent), transparent 70%),
  radial-gradient(40rem 20rem at 95% 0%, hsl(30 100% 96%), transparent 70%); }
.hero-inner { padding-block: clamp(2.5rem, 6vw, 4.5rem); max-width: 56rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; font-weight: 500; color: var(--accent-foreground); background: var(--accent); border-radius: 999px; padding: 0.25rem 0.75rem; margin: 0 0 1rem; }
.hero-title { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 1rem; text-wrap: balance; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted-foreground); max-width: 44rem; margin: 0 0 1.75rem; text-wrap: pretty; }
.hero-actions { gap: 0.75rem; }
.hero-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--muted-foreground); }
.hero-points li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-points .icon { color: var(--success); }

.section { padding-block: 2rem; }
.section-muted { background: var(--muted); border-block: 1px solid var(--border); padding-block: 3rem; margin-top: 3rem; }
.section-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 1rem; }
.page-header { padding-block: 2rem 0.5rem; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-compact { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--primary); transform: translateY(-1px); }
.card-title .icon, .card-title svg { vertical-align: -0.15em; margin-right: 0.25rem; color: var(--primary); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.75rem; }
.steps li::before { content: counter(step); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--accent-foreground); font-weight: 600; font-size: 0.875rem; }
.steps li strong { font-weight: 600; }
.steps li span { color: var(--muted-foreground); font-size: 0.9375rem; }
.steps-row { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.75rem; border-radius: calc(var(--radius) * 1.5); background: linear-gradient(135deg, var(--primary), hsl(265 70% 55%)); color: var(--primary-foreground); }
.cta-band h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.cta-band p { margin: 0; opacity: 0.9; }
.cta-band .btn-primary { background: #fff; color: var(--primary); }
.cta-band .btn-primary:hover { background: hsl(0 0% 96%); }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding-top: 1.25rem; color: var(--muted-foreground); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--foreground); text-decoration: underline; }
.breadcrumb .icon { width: 0.85rem; height: 0.85rem; }

/* Directory */
.directory { padding-top: 2rem; }
.directory-form { display: block; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; }
.toolbar-search { flex: 1 1 18rem; }
.toolbar-sort { flex: 0 0 auto; width: auto; min-width: 11rem; }
.directory-main { min-width: 0; }
.results { transition: opacity .15s; }
.results.htmx-request, .htmx-request > .results, #results.htmx-request { opacity: 0.55; }
.result-count { margin: 0 0 0.75rem; }
.load-more { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 0.5rem; }
.load-more.htmx-request .btn { opacity: 0.6; pointer-events: none; }
.input-sm { height: 2rem; font-size: 0.8125rem; margin-bottom: 0.5rem; }
.chip-list-scroll { max-height: 22rem; overflow: auto; padding-right: 0.25rem; overscroll-behavior: contain; }
@media (min-width: 64rem) { .filter-panel { position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); overflow: auto; } }
.chip-link { text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.chip-link .icon { width: 0.85rem; height: 0.85rem; color: var(--muted-foreground); }
.badge-lg { font-size: 0.8125rem; padding: 0.3rem 0.7rem; text-decoration: none; }
.badge .icon { width: 0.8rem; height: 0.8rem; margin-right: 0.15rem; }
.how .card-title { font-size: 1.125rem; }

/* Topic index */
.letter-nav { gap: 0.15rem; margin-bottom: 1rem; position: sticky; top: 4rem; background: var(--background); padding-block: 0.5rem; z-index: 2; }
.letter-groups { columns: 16rem auto; column-gap: 2rem; }
.letter-group { break-inside: avoid; margin-bottom: 1.25rem; scroll-margin-top: 7rem; }
.letter { font-size: 1.125rem; font-weight: 700; color: var(--primary); margin: 0 0 0.35rem; border-bottom: 1px solid var(--border); }
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.topic-list a { color: var(--foreground); text-decoration: none; }
.topic-list a:hover { color: var(--primary); text-decoration: underline; }

/* Profile */
.profile { display: grid; gap: 2rem; padding-block: 1.25rem 1rem; }
@media (min-width: 56rem) { .profile { grid-template-columns: 20rem minmax(0, 1fr); align-items: start; } .profile-aside { position: sticky; top: 5rem; } }
.profile-portrait { margin: 0; }
.profile-portrait img, .profile-placeholder { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) * 1.5); border: 1px solid var(--border); background: var(--muted); }
.profile-placeholder { font-size: 4rem; }
.profile-credit { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.4rem; }
.profile-credit a { color: inherit; }
.profile-tagline { font-size: 1.15rem; color: var(--muted-foreground); margin: 0; text-wrap: pretty; }
.profile-section h2 { font-size: 1.125rem; margin: 0 0 0.75rem; }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.stats .stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--card); }
.social-row { gap: 0.4rem; }
.contact-card .card-content .icon { vertical-align: -0.15em; }
.claim-card { border-style: dashed; border-color: var(--primary); background: var(--accent); }

/* Footer */
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); padding-block: 2.5rem; }
.footer-grid a { text-decoration: none; }

/* Toasts built from HX-Trigger events */
.toast-icon:empty { display: none; }

/* Wizard */
.wizard { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 56rem) { .wizard { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; } .wizard-nav { position: sticky; top: 5rem; } }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; overflow-x: auto; }
@media (min-width: 56rem) { .stepper { flex-direction: column; } }
.stepper a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: var(--radius); color: var(--muted-foreground); text-decoration: none; white-space: nowrap; font-size: 0.9375rem; }
.stepper a:hover { background: var(--muted); color: var(--foreground); }
.stepper a[aria-current="step"] { background: var(--accent); color: var(--accent-foreground); font-weight: 600; }
.step-num { width: 1.6rem; height: 1.6rem; flex: none; border-radius: 999px; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border); background: var(--background); }
.stepper a[data-done="true"] .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.stepper a[aria-current="step"] .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.progress { height: 0.375rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.upload-progress { margin-top: 0.5rem; }
.upload-progress[hidden] { display: none; }
.wizard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 0.5rem; }
.photo-panel { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .photo-panel { grid-template-columns: 12rem 1fr; align-items: start; } }
.photo-panel img, .photo-panel .speaker-card-placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.check-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.875rem; }
.check-row input { margin-top: 0.2rem; }
.preview-frame { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--card); }

/* Account */
.speaker-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.speaker-row:last-child { border-bottom: 0; }
.owned-card .speaker-card-body { gap: 0.5rem; }
.owned-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0 1rem 1rem; }
.device-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
.device-row:last-child { border-bottom: 0; }
.code-display { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(2rem, 8vw, 3rem); font-weight: 700; letter-spacing: 0.2em; text-align: center; padding: 1rem; border-radius: var(--radius); background: var(--muted); border: 1px dashed var(--border); }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; height: 3.25rem; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted-foreground); font-size: 0.8125rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* View transitions for boosted navigation */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 120ms ease-out both vt-fade-out; }
  ::view-transition-new(root) { animation: 180ms ease-in both vt-fade-in; }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* Progress widths without inline styles (account dashboard, wizard) */
.progress > span[data-pct="0"] { width: 0; }
.progress > span[data-pct="33"] { width: 33%; }
.progress > span[data-pct="67"] { width: 67%; }
.progress > span[data-pct="100"] { width: 100%; }

/* ==========================================================================
   Theme layer: bright, corporate, warm (overrides the base tokens above)
   Ink navy for text, petrol as the working colour, amber as the warm accent,
   one soft tint per category.
   ========================================================================== */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  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: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --ink: #172033;
  --petrol: #0b6e79;
  --petrol-deep: #075560;
  --petrol-soft: #e6f2f3;
  --amber: #f0a33a;
  --amber-soft: #fff3df;
  --surface: #f5f7f9;

  --background: #ffffff;
  --foreground: var(--ink);
  --card: #ffffff;
  --card-foreground: var(--ink);
  --popover: #ffffff;
  --popover-foreground: var(--ink);
  --primary: var(--petrol);
  --primary-foreground: #ffffff;
  --secondary: #eef1f4;
  --secondary-foreground: var(--ink);
  --muted: var(--surface);
  --muted-foreground: #5a6474;
  --accent: var(--petrol-soft);
  --accent-foreground: var(--petrol-deep);
  --success: #1f7a4d;
  --warning: #b4690e;
  --border: #e3e7ec;
  --input: #d3d9e0;
  --ring: var(--petrol);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-sm: 0 1px 2px rgb(23 32 51 / 0.06);
  --shadow-md: 0 6px 16px -6px rgb(23 32 51 / 0.14);
  --shadow-lg: 0 18px 36px -14px rgb(23 32 51 / 0.24);
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body { font-family: var(--font); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .page-title, .section-title, .card-title { letter-spacing: -0.02em; color: var(--ink); }

/* One width for everything */
.container { max-width: 78rem; }
.container-mid { max-width: 60rem; }

/* Header */
.site-header { background: rgb(255 255 255 / 0.88); border-bottom: 1px solid var(--border); }
.brand { font-weight: 750; color: var(--ink); }
.brand .icon { color: var(--amber); }
@media (min-width: 48rem) { .site-nav .nav-toggle { display: none; } }
.nav-links a[aria-current="page"]:not(.btn) { background: var(--petrol-soft); color: var(--petrol-deep); }
.env-banner { background: var(--amber-soft); color: #7a4a0a; border-bottom: 1px solid #f4d9ad; }

/* Buttons */
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-deep); }
.btn-outline { background: #fff; }

/* Hero: text left, a wall of real speaker portraits right */
.hero { background: linear-gradient(180deg, var(--surface), #fff 85%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4.5rem); align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; } }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 1.1rem; font-size: 0.875rem; font-weight: 600; color: var(--petrol-deep); }
.hero-kicker .icon { color: var(--amber); }
.hero-title { font-size: clamp(2.25rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; max-width: 15ch; }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; max-width: 36rem; }
.hero-search {
  display: flex; align-items: center; gap: 0.5rem; max-width: 34rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem; background: #fff;
  border: 1px solid var(--input); border-radius: 999px; box-shadow: var(--shadow-md);
}
.hero-search:focus-within { border-color: var(--petrol); box-shadow: 0 0 0 4px var(--petrol-soft), var(--shadow-md); }
.hero-search-icon { color: var(--muted-foreground); display: inline-flex; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--ink); padding-block: 0.5rem; }
.hero-search .btn { border-radius: 999px; padding-inline: 1.25rem; }
.hero-points { margin-top: 1.5rem; }
.hero-points .icon { color: var(--petrol); }
.hero-points a { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 2px; }

.hero-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.875rem; }
.wall-item {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 1rem; background: var(--muted); box-shadow: var(--shadow-md);
}
.wall-item:nth-child(3n + 2) { transform: translateY(1.75rem); }
.wall-item img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.5s ease; }
.wall-name {
  position: absolute; inset: auto 0 0 0; padding: 1.5rem 0.75rem 0.6rem;
  color: #fff; font-size: 0.8125rem; font-weight: 600; line-height: 1.25;
  background: linear-gradient(180deg, transparent, rgb(23 32 51 / 0.75));
  opacity: 0; transform: translateY(0.4rem); transition: opacity 0.25s ease, transform 0.25s ease;
}
.wall-item:hover img, .wall-item:focus-visible img { transform: scale(1.05); }
.wall-item:hover .wall-name, .wall-item:focus-visible .wall-name { opacity: 1; transform: none; }
@media (max-width: 59.99rem) { .hero-wall { display: none; } }

/* Directory toolbar */
.directory { padding-top: 2.5rem; }
.toolbar { background: rgb(255 255 255 / 0.92); }

/* Speaker cards: portrait 4:5, cover-cropped, gentle hover */
.speaker-card { border-radius: 1rem; box-shadow: none; border-color: var(--border); }
.speaker-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfd8df; }
.speaker-card-media { aspect-ratio: 4 / 5; }
.speaker-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.5s ease; }
.speaker-card:hover .speaker-card-media img { transform: scale(1.04); }
.speaker-card-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -3px 0 transparent; transition: box-shadow 0.25s ease; }
.speaker-card:hover .speaker-card-media::after { box-shadow: inset 0 -3px 0 var(--amber); }
.speaker-card-placeholder { aspect-ratio: 4 / 5; height: 100%; color: var(--petrol-deep); background: linear-gradient(160deg, var(--petrol-soft), var(--amber-soft)); }
.speaker-card-name { font-size: 1.0625rem; font-weight: 700; }

/* Category tags: one soft colour per category */
.cat-tag {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  background: var(--tag-bg, var(--secondary)); color: var(--tag-fg, var(--ink));
}
.cat-tag::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; opacity: 0.8; }
[data-cat="business"] { --tag-bg: #e7eefb; --tag-fg: #2a4f9a; }
[data-cat="ernaehrung"] { --tag-bg: #e8f5e6; --tag-fg: #2f6b2a; }
[data-cat="gesundheit"] { --tag-bg: #e4f3f3; --tag-fg: #0b6670; }
[data-cat="partnerschaft"] { --tag-bg: #fbe9ec; --tag-fg: #a23a51; }
[data-cat="persoenlichkeit"] { --tag-bg: #efeafb; --tag-fg: #5a3fa0; }
[data-cat="spiritualitaet"] { --tag-bg: #fff1dc; --tag-fg: #92570c; }

/* Sections */
.section-muted { background: var(--surface); }
.steps li::before { background: var(--amber-soft); color: #8a520b; }
.cta-band { background: var(--ink); color: #fff; }
.cta-band .btn-primary { background: var(--amber); color: var(--ink); }
.cta-band .btn-primary:hover { background: #f5b45a; }
.eyebrow { background: var(--petrol-soft); color: var(--petrol-deep); }
.site-footer { background: var(--surface); }

/* Refinements after the browser review */
.filter-title { text-transform: none; letter-spacing: -0.01em; font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.filter-panel { border-radius: 1rem; }
.chip-cat:has(input:checked) { background: var(--tag-bg); color: var(--tag-fg); border-color: color-mix(in srgb, var(--tag-fg) 35%, transparent); }
.chip-cat span::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.4rem; border-radius: 50%; background: var(--tag-fg); vertical-align: 0.08em; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 1.25rem; }
.grid-cards.grid-compact { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
a.cat-tag { text-decoration: none; }
a.cat-tag:hover { filter: brightness(0.96); text-decoration: none; }
.table thead th { text-transform: none; letter-spacing: 0; font-size: 0.8125rem; }

/* Category cards on the topics page carry their colour as a left rule */
.card-link[data-cat] { border-left: 4px solid var(--tag-fg); }
.brand-mark { flex: none; border-radius: 8px; }
.brand-mark { border-radius: 0; }

/* Contact */
.contact-grid { display: grid; gap: 2rem; padding-block: 2.5rem 4rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; } }
.contact-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1rem; }
.contact-points li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem; align-items: start; }
.contact-points li > .icon { width: 2.25rem; height: 2.25rem; padding: 0.55rem; border-radius: 0.6rem; background: var(--petrol-soft); color: var(--petrol-deep); }
.contact-points strong { display: block; color: var(--ink); }
.contact-points span { color: var(--muted-foreground); }

/* Numbered steps inside cards keep the card padding */
.card-content.steps { padding: 1rem 1.5rem 1.25rem; }
.card-header + .card-content.steps { padding-top: 1rem; }

/* Search mode: once someone searches, the hero steps aside */
body[data-mode="search"] .hero, body[data-mode="search"] .section-muted { display: none; }
body[data-mode="search"] .directory, .directory-searching { padding-top: 1.25rem; }

/* Organiser guide */
.guide-grid { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .guide-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; align-items: start; } .guide-aside { position: sticky; top: calc(var(--header-h) + 1rem); } }
.guide-body { max-width: 44rem; }
.guide-steps { margin: 1rem 0 1.5rem; }
.request-template { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem 1rem 3.25rem; }
.request-template pre { margin: 0; white-space: pre-wrap; font-family: var(--font); font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.request-template .btn { position: absolute; right: 0.75rem; bottom: 0.75rem; }
.faq details { border-bottom: 1px solid var(--border); padding: 0.85rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; color: var(--petrol); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.5rem 0 0; color: var(--muted-foreground); }
/* Admin area extras. Link after app.css: <link rel="stylesheet" href="/assets/admin.css"> */
.admin dl { margin: 0; }
.admin dd { margin: 0; }
.admin code { word-break: break-all; }
.admin .table td .row { flex-wrap: wrap; gap: 0.25rem; }
.admin .table td form { margin: 0; }
.admin .stat { text-decoration: none; color: inherit; transition: border-color 0.15s; }
.admin .stat:hover { border-color: var(--primary); }
.admin .sidebar-layout > aside .btn.w-full { justify-content: flex-start; }
.admin .table th a { color: inherit; text-decoration: none; }
.admin .table th a:hover { text-decoration: underline; }
.admin dialog .field { margin-top: 0.5rem; }
a.badge, a.badge:hover { text-decoration: none; }

.badge-preview { padding: 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }

/* Kongress-Planer */
.planner-hero { background: linear-gradient(180deg, var(--surface), #fff 85%); border-bottom: 1px solid var(--border); }
.planner-inner { padding-block: clamp(2.5rem, 6vw, 4rem); max-width: 56rem; }
.planner-inner .hero-title { max-width: 22ch; }
.planner-form { margin-top: 1.5rem; box-shadow: var(--shadow-md); }
.planner-row { align-items: end; gap: 1rem; flex-wrap: wrap; }
.planner-size { min-width: 9rem; }
.planner-examples { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.planner-actions { margin-top: 1rem; gap: 0.5rem; }
.planner-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
@media (min-width: 64rem) { .planner-list { grid-template-columns: 1fr 1fr; } }
.planner-item { display: grid; grid-template-columns: 1.75rem 4.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 1rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.planner-item:hover { border-color: #cfd8df; box-shadow: var(--shadow-md); }
.planner-num { font-weight: 700; color: var(--muted-foreground); font-variant-numeric: tabular-nums; text-align: right; }
.planner-photo { display: block; width: 4.5rem; height: 4.5rem; border-radius: 0.75rem; overflow: hidden; background: var(--muted); }
.planner-photo img, .planner-photo .speaker-card-placeholder { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; font-size: 1.25rem; aspect-ratio: 1; }
.planner-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.planner-name:hover { text-decoration: underline; }
.planner-tagline { margin: 0.15rem 0 0; font-size: 0.875rem; color: var(--muted-foreground); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.planner-why { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--petrol-deep); display: flex; gap: 0.35rem; align-items: center; }
.planner-why .icon { flex: none; }
.topic-intro { max-width: 46rem; }
