/*
 * shadcn/ui design tokens, hand-ported.
 *
 * The names are shadcn's own — --background, --foreground, --card, --primary,
 * --muted, --border, --input, --ring, --radius — so anyone who has read a
 * shadcn theme can read this one, and a theme generated by the shadcn theme
 * editor can be pasted in wholesale.
 *
 * What is NOT here is Tailwind or the shadcn CLI. The board renders server-side
 * with Hono's JSX and ships plain CSS, so the React components cannot be used
 * directly; what is ported is their *anatomy* and their token vocabulary. See
 * components.css, where each class mirrors a shadcn component's structure.
 *
 * Theme resolution has three states, and all three are handled:
 *   - light lives on bare :root, so a page always has a complete palette
 *   - dark is redefined under prefers-color-scheme for the default "system"
 *     setting, guarded so an explicit light choice still wins
 *   - dark is redefined again under [data-theme="dark"] so the toggle wins in
 *     both directions
 * A colour whose only definition sits inside a media query is a colour that
 * disappears when someone picks the other theme.
 */

:root {
  --radius: 0.625rem;

  --background: oklch(0.995 0.004 70);
  --foreground: oklch(0.18 0.015 55);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.015 55);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.015 55);

  --primary: oklch(0.66 0.2 42);
  --primary-foreground: oklch(0.16 0.02 40);

  --secondary: oklch(0.965 0.011 68);
  --secondary-foreground: oklch(0.28 0.05 42);

  --muted: oklch(0.965 0.011 68);
  --muted-foreground: oklch(0.545 0.028 55);

  --accent: oklch(0.955 0.022 62);
  --accent-foreground: oklch(0.28 0.05 42);

  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);

  --success: oklch(0.596 0.145 163.225);
  --success-foreground: oklch(0.985 0 0);

  --warning: oklch(0.681 0.162 75.834);
  --warning-foreground: oklch(0.141 0.005 285.823);

  --border: oklch(0.905 0.014 65);
  --input: oklch(0.885 0.016 65);
  --ring: oklch(0.66 0.2 42);

  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);

  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.141 0.005 285.823);
  --sidebar-primary: oklch(0.66 0.2 42);
  --sidebar-primary-foreground: oklch(0.16 0.02 40);
  --sidebar-accent: oklch(0.967 0.001 286.375);
  --sidebar-accent-foreground: oklch(0.21 0.006 285.885);
  --sidebar-border: oklch(0.92 0.004 286.32);
  --sidebar-ring: oklch(0.66 0.2 42);

  /* Board-specific roles, layered on the shadcn palette rather than beside it. */
  --unread: var(--primary);
  --staff: oklch(0.577 0.245 27.325);
  --sticky: oklch(0.72 0.18 72);
  --online: oklch(0.62 0.16 158);

  --font-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  --font-mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.1), 0 4px 6px -4px oklch(0 0 0 / 0.1);

  /*
   * The visual layer. Everything below is derived from --primary, so retheming
   * the board is still a matter of moving one hue — the highlights follow.
   */
  --primary-hot: oklch(0.72 0.205 62);
  --gradient-brand: linear-gradient(135deg, var(--primary) 0%, var(--primary-hot) 100%);
  --glow-primary: 0 0 0 1px oklch(0.66 0.2 42 / 0.28), 0 6px 20px -6px oklch(0.66 0.2 42 / 0.45);
  --page-wash:
    radial-gradient(1100px 460px at 12% -8%, oklch(0.66 0.2 42 / 0.07), transparent 60%),
    radial-gradient(900px 400px at 92% -4%, oklch(0.72 0.205 62 / 0.06), transparent 62%);
  --row-hover: oklch(0.66 0.2 42 / 0.05);

  /* Per-forum accent hues, so the board index is not a column of one colour. */
  --hue-1: oklch(0.66 0.2 28);
  --hue-2: oklch(0.68 0.17 55);
  --hue-3: oklch(0.66 0.15 95);
  --hue-4: oklch(0.66 0.16 150);
  --hue-5: oklch(0.66 0.15 215);
  --hue-6: oklch(0.66 0.17 300);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --background: oklch(0.155 0.014 50);
    --foreground: oklch(0.985 0 0);

    --card: oklch(0.205 0.017 52);
    --card-foreground: oklch(0.985 0 0);

    --popover: oklch(0.205 0.017 52);
    --popover-foreground: oklch(0.985 0 0);

    --primary: oklch(0.76 0.175 48);
    --primary-foreground: oklch(0.16 0.03 45);

    --secondary: oklch(0.275 0.02 52);
    --secondary-foreground: oklch(0.985 0 0);

    --muted: oklch(0.275 0.02 52);
    --muted-foreground: oklch(0.72 0.025 60);

    --accent: oklch(0.30 0.035 50);
    --accent-foreground: oklch(0.985 0 0);

    --destructive: oklch(0.704 0.191 22.216);
    --destructive-foreground: oklch(0.141 0.005 285.823);

    --success: oklch(0.696 0.17 162.48);
    --success-foreground: oklch(0.141 0.005 285.823);

    --warning: oklch(0.769 0.188 70.08);
    --warning-foreground: oklch(0.141 0.005 285.823);

    --border: oklch(1 0 0 / 13%);
    --input: oklch(1 0 0 / 17%);
    --ring: oklch(0.76 0.175 48);

    --sidebar: oklch(0.205 0.017 52);
    --sidebar-foreground: oklch(0.985 0 0);
    --sidebar-primary: oklch(0.76 0.175 48);
    --sidebar-primary-foreground: oklch(0.16 0.03 45);
    --sidebar-accent: oklch(0.30 0.035 50);
    --sidebar-accent-foreground: oklch(0.985 0 0);
    --sidebar-border: oklch(1 0 0 / 13%);
    --sidebar-ring: oklch(0.76 0.175 48);

    --unread: var(--primary);
    --staff: oklch(0.704 0.191 22.216);
    --sticky: oklch(0.769 0.188 70.08);
    --online: oklch(0.696 0.17 162.48);
  }
}

:root[data-theme='dark'] {
  --background: oklch(0.155 0.014 50);
  --foreground: oklch(0.985 0 0);

  --card: oklch(0.205 0.017 52);
  --card-foreground: oklch(0.985 0 0);

  --popover: oklch(0.205 0.017 52);
  --popover-foreground: oklch(0.985 0 0);

  --primary: oklch(0.76 0.175 48);
  --primary-foreground: oklch(0.16 0.03 45);

  --secondary: oklch(0.275 0.02 52);
  --secondary-foreground: oklch(0.985 0 0);

  --muted: oklch(0.275 0.02 52);
  --muted-foreground: oklch(0.72 0.025 60);

  --accent: oklch(0.30 0.035 50);
  --accent-foreground: oklch(0.985 0 0);

  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.141 0.005 285.823);

  --success: oklch(0.696 0.17 162.48);
  --success-foreground: oklch(0.141 0.005 285.823);

  --warning: oklch(0.769 0.188 70.08);
  --warning-foreground: oklch(0.141 0.005 285.823);

  --border: oklch(1 0 0 / 13%);
  --input: oklch(1 0 0 / 17%);
  --ring: oklch(0.76 0.175 48);

  --sidebar: oklch(0.205 0.017 52);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.76 0.175 48);
  --sidebar-primary-foreground: oklch(0.16 0.03 45);
  --sidebar-accent: oklch(0.30 0.035 50);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(1 0 0 / 13%);
  --sidebar-ring: oklch(0.76 0.175 48);

  --unread: var(--primary);
  --staff: oklch(0.704 0.191 22.216);
  --sticky: oklch(0.769 0.188 70.08);
  --online: oklch(0.696 0.17 162.48);
}

/* Reset and base typography. Everything below reads from the shadcn tokens. */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Tells the browser which form controls and scrollbars to paint. Without it a
     dark board keeps light scrollbars and light native widgets. */
  color-scheme: light dark;
}

:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.011em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

code, kbd, pre, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

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

/* A skip link that is invisible until focused, so keyboard users can jump the
   nav without a visible control cluttering the header for everyone else. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

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

@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;
  }
}

/*
 * shadcn/ui components, hand-ported to plain CSS.
 *
 * Each block below mirrors one shadcn component's anatomy — the same element
 * structure, the same variant names, the same tokens. `.btn` is shadcn's
 * Button, `.card` + `.card-header` + `.card-title` is its Card, and so on. A
 * developer who knows shadcn should be able to guess the class names.
 */

/* --- Button -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  height: 2.25rem;
  padding-inline: 1rem;
  border: 1px solid transparent;
  /* A gradient plus a coloured shadow, so the primary action is the brightest
     thing on the page rather than merely the filled thing. */
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.08), 0 4px 14px -6px oklch(0.66 0.2 42 / 0.55);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  user-select: none;
}

.btn:hover {
  filter: saturate(1.08) brightness(1.04);
  box-shadow: 0 2px 4px oklch(0 0 0 / 0.1), 0 8px 22px -6px oklch(0.66 0.2 42 / 0.6);
  text-decoration: none;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-secondary {
  background: var(--secondary);
  box-shadow: none;
  color: var(--secondary-foreground);
}
.btn-secondary:hover { background: color-mix(in oklab, var(--secondary) 85%, var(--foreground) 8%); }

.btn-outline {
  background: var(--background);
  box-shadow: none;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--foreground);
}
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }

.btn-destructive {
  background: var(--destructive);
  box-shadow: none;
  color: var(--destructive-foreground);
}
.btn-destructive:hover { background: color-mix(in oklab, var(--destructive) 90%, black); }

.btn-link {
  background: transparent;
  box-shadow: none;
  color: var(--primary);
  height: auto;
  padding: 0;
}
.btn-link:hover { background: transparent; text-decoration: underline; }

.btn-sm { height: 2rem; padding-inline: 0.75rem; font-size: 0.8125rem; border-radius: calc(var(--radius) - 4px); }
.btn-lg { height: 2.75rem; padding-inline: 1.5rem; font-size: 0.9375rem; }
.btn-icon { width: 2.25rem; padding: 0; }
.btn-icon.btn-sm { width: 2rem; }
.btn-block { display: flex; width: 100%; }

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

.card {
  background: var(--card);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-title { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.006em; }
.card-description { font-size: 0.8125rem; color: var(--muted-foreground); }
.card-content { padding: 1.25rem; }
.card-content.flush { padding: 0; }
.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}

/* --- Badge --------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  white-space: nowrap;
}

.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.badge-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.badge-success { background: var(--success); color: var(--success-foreground); }
.badge-warning { background: var(--warning); color: var(--warning-foreground); }
.badge-staff { background: color-mix(in oklab, var(--staff) 15%, transparent); color: var(--staff); border-color: color-mix(in oklab, var(--staff) 30%, transparent); }

/* --- Avatar -------------------------------------------------------------- */

.avatar {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9999px;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--muted);
  user-select: none;
}

.avatar img,
.avatar svg { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 1.5rem; height: 1.5rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; }
.avatar-xl { width: 5rem; height: 5rem; border-radius: var(--radius); }
.avatar-fallback {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* --- Input, Textarea, Label, Select -------------------------------------- */

.input,
.textarea,
.select {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  min-height: 2.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder,
.textarea::placeholder { color: var(--muted-foreground); }

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent);
}

.textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.textarea.mono { font-family: var(--font-mono); font-size: 0.8125rem; }

.select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

.field { margin-bottom: 1rem; }
.field-hint { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.375rem; }
.field-error { font-size: 0.75rem; color: var(--destructive); margin-top: 0.375rem; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.375rem 0;
}
.checkbox-row input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  flex: none;
}

/* --- Alert --------------------------------------------------------------- */

.alert {
  display: flex;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  background: var(--card);
  font-size: 0.875rem;
}
.alert-title { font-weight: 600; margin-bottom: 0.125rem; }
.alert-description { color: var(--muted-foreground); }
.alert-destructive {
  border-color: color-mix(in oklab, var(--destructive) 35%, transparent);
  background: color-mix(in oklab, var(--destructive) 8%, var(--card));
}
.alert-destructive .alert-title { color: var(--destructive); }
.alert-success {
  border-color: color-mix(in oklab, var(--success) 35%, transparent);
  background: color-mix(in oklab, var(--success) 8%, var(--card));
}
.alert-warning {
  border-color: color-mix(in oklab, var(--warning) 40%, transparent);
  background: color-mix(in oklab, var(--warning) 10%, var(--card));
}

/* --- Separator ----------------------------------------------------------- */

.separator { height: 1px; background: var(--border); border: none; margin: 1rem 0; }
.separator-vertical { width: 1px; height: auto; align-self: stretch; margin: 0 0.5rem; }

/* --- Tabs ---------------------------------------------------------------- */

.tabs-list {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  overflow-x: auto;
  max-width: 100%;
}

.tabs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.tabs-trigger:hover { color: var(--foreground); text-decoration: none; }
.tabs-trigger[aria-selected='true'],
.tabs-trigger.active {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-xs);
}

/* --- Table --------------------------------------------------------------- */

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: color-mix(in oklab, var(--muted) 45%, transparent); }

/* --- Dropdown menu ------------------------------------------------------ */
/* Built on <details> so it works with JavaScript disabled. shadcn's menu is a
   Radix popover; the anatomy and class names are kept, the mechanism is not. */

.dropdown { position: relative; }
.dropdown > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.dropdown > summary::-webkit-details-marker { display: none; }

.dropdown-content {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  z-index: 50;
  min-width: 12rem;
  padding: 0.25rem;
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.dropdown-content.align-left { right: auto; left: 0; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4375rem 0.625rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.8125rem;
  color: var(--popover-foreground);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--accent); color: var(--accent-foreground); text-decoration: none; }
.dropdown-item.destructive { color: var(--destructive); }
.dropdown-label {
  padding: 0.375rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dropdown-separator { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* --- Skeleton ------------------------------------------------------------ */

.skeleton {
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  50% { opacity: 0.5; }
}

/* --- Breadcrumb ---------------------------------------------------------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted-foreground); }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb-separator { opacity: 0.5; }
.breadcrumb-page { color: var(--foreground); font-weight: 500; }

/* --- Pagination ---------------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 1.25rem 0;
}
.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.8125rem;
  color: var(--foreground);
  border: 1px solid transparent;
  text-decoration: none;
}
.pagination-item:hover { background: var(--accent); text-decoration: none; }
.pagination-item[aria-current='page'] {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
}
.pagination-ellipsis { color: var(--muted-foreground); padding-inline: 0.25rem; }

/* --- Tooltip (CSS only) -------------------------------------------------- */

.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.375rem);
  left: 50%;
  translate: -50% 0;
  padding: 0.25rem 0.5rem;
  background: var(--foreground);
  color: var(--background);
  font-size: 0.6875rem;
  border-radius: calc(var(--radius) - 4px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 60;
}
.tooltip:hover::after,
.tooltip:focus-visible::after { opacity: 1; }

/* --- Empty state --------------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
}
.empty-title { font-weight: 600; color: var(--foreground); }

/* "or" between two ways of doing one thing, such as signing in. */
.separator-label { display: flex; align-items: center; gap: 0.75rem; margin-block: 1rem; font-size: 0.75rem; color: var(--muted-foreground); }
.separator-label::before, .separator-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* --- The tsbb network directory (/boards) -------------------------------- */

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}
.board-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--card-foreground);
}
/* Cards in one row line their parts up where subgrid is available. */
@supports (grid-template-rows: subgrid) {
  .board-grid { grid-auto-rows: auto; }
  .board-card { grid-row: span 4; grid-template-rows: subgrid; gap: 0; }
}
.board-shot {
  display: block;
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.board-shot-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: var(--muted);
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.board-card-title { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem 0; font-weight: 600; }
.board-card-title img { width: 1rem; height: 1rem; border-radius: 3px; }
.board-card-body { padding: 0.375rem 1rem 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.board-card-body p { margin: 0 0 0.375rem; }
.board-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.board-detail-shot { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.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;
}

/* The paste widget (@profullstack/bulk-submit), in the board's own colours. */
.bulk-submit {
  --bs-accent: var(--primary);
  --bs-pass: var(--success);
  --bs-fail: var(--destructive);
  --bs-flag: var(--warning);
  --bs-bg: var(--card);
  --bs-fg: var(--card-foreground);
  --bs-muted: var(--muted-foreground);
  --bs-border: var(--border);
  --bs-radius: var(--radius);
  --bs-font: var(--font-sans);
  --bs-mono: var(--font-mono);
}
.bulk-submit.bulk-submit { max-width: none; padding: 0; }

/* Board layout, composed from the shadcn primitives in components.css. */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  /* A warm wash behind the whole page. Fixed, so it does not slide under the
     content while scrolling and turn into a distraction. */
  background: var(--page-wash);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.main { flex: 1; padding-block: 1.5rem 3rem; }

/* --- Site header --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--background) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
/* A hairline of brand colour under the header, so the chrome is not one flat
   band of neutral across the top of every page. */
.site-header::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hot) 40%, transparent 85%);
  opacity: 0.85;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
  font-size: 0.9375rem;
  color: var(--foreground);
  letter-spacing: -0.014em;
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: calc(var(--radius) - 3px);
  background: var(--gradient-brand);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: var(--glow-primary);
}

/*
 * A board that has set board.logoUrl renders its own artwork here instead of
 * the generated letter mark. Capped in height rather than width so a wordmark
 * and a square mark both land on the same 3.5rem header without the board
 * having to supply a particular aspect ratio.
 */
.brand-logo {
  height: 1.75rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
}
/* The board name beside a logo is for the skins that set a wordmark next to a
   mark (paper). Everywhere else the artwork is the whole brand. */
.brand-logo + .brand-name { display: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  padding: 0.375rem 0.625rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.nav-link:hover { color: var(--foreground); background: var(--accent); text-decoration: none; }
.nav-link.active {
  color: var(--accent-foreground);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--primary) 22%, transparent);
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

.search-form { position: relative; display: none; }
@media (min-width: 48rem) { .search-form { display: block; } }
.search-form .input { height: 2rem; min-height: 2rem; width: 13rem; font-size: 0.8125rem; }
/* The button exists for the skins that show it (deals); Enter submits everywhere else. */
.search-submit { display: none; }

/* The unread count sits on the bell rather than beside it, so the header keeps
   its height whether or not there is anything to report. */
.notif-button { position: relative; }
.notif-dot {
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  min-width: 1rem;
  height: 1rem;
  padding-inline: 0.1875rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: var(--destructive);
  color: var(--destructive-foreground);
  font-size: 0.625rem;
  font-weight: 700;
  border: 2px solid var(--background);
}

/* --- Board index --------------------------------------------------------- */

.category { margin-bottom: 1.5rem; }
.category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.625rem;
  padding-inline: 0.125rem;
}
.category-title {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--foreground);
}

/* A short gradient rule after each category name — the cheapest way to make a
   long index scan as sections rather than one undifferentiated list. */
.category-title::after {
  content: '';
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 70%);
  opacity: 0.55;
}

.forum-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.875rem;
  align-items: center;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.forum-row:last-child { border-bottom: none; }
.forum-row { transition: background-color 0.15s ease; }
.forum-row:hover { background: var(--row-hover); }

/*
 * Forum icons take one of six hues rather than all being the accent. A board
 * index is the page people scan most, and a column of identical marks gives the
 * eye nothing to land on. The hue is assigned by position, so it is stable.
 */
.forum-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklab, var(--forum-hue, var(--primary)) 46%, var(--card));
  color: color-mix(in oklab, var(--forum-hue, var(--primary)) 42%, black);
  font-size: 1.0625rem;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--forum-hue, var(--primary)) 70%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.forum-row.tone-1 { --forum-hue: var(--hue-1); }
.forum-row.tone-2 { --forum-hue: var(--hue-2); }
.forum-row.tone-3 { --forum-hue: var(--hue-3); }
.forum-row.tone-4 { --forum-hue: var(--hue-4); }
.forum-row.tone-5 { --forum-hue: var(--hue-5); }
.forum-row.tone-6 { --forum-hue: var(--hue-6); }

.forum-row:hover .forum-icon { transform: scale(1.06); }
.forum-row.unread .forum-icon {
  background: var(--forum-hue, var(--primary));
  color: var(--background);
  box-shadow: 0 4px 14px -4px color-mix(in oklab, var(--forum-hue, var(--primary)) 60%, transparent);
}

/* The count of unread topics sits beside the forum name in the row's own hue,
   so a lit icon and a lit badge read as one signal rather than two. */
.forum-unread {
  display: inline-block;
  vertical-align: 0.1em;
  margin-left: 0.25rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: color-mix(in oklab, var(--forum-hue, var(--primary)) 18%, var(--card));
  color: color-mix(in oklab, var(--forum-hue, var(--primary)) 55%, var(--foreground));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--forum-hue, var(--primary)) 40%, transparent);
}

/* "N unread · Mark all read" above a listing. One line, the button at the end;
   on a narrow screen the two stack rather than squeeze. */
.read-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.read-bar-status strong { color: var(--foreground); font-weight: 650; }
.read-bar-status.has-unread::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: var(--unread);
  vertical-align: 0.05em;
}


.forum-name { font-weight: 600; font-size: 0.9375rem; color: var(--foreground); }
.forum-name:hover { color: var(--primary); }
.forum-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: right;
}
.forum-stat { display: none; }
@media (min-width: 40rem) { .forum-stat { display: block; min-width: 3.5rem; } }
.forum-stat strong {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.0625rem 0.375rem;
  margin-bottom: 0.125rem;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.forum-last { display: none; max-width: 14rem; }
@media (min-width: 60rem) { .forum-last { display: block; } }
.forum-last-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--foreground);
  font-weight: 500;
}

/* --- Topic list ---------------------------------------------------------- */

.topic-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  gap: 0.875rem;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.topic-row:last-child { border-bottom: none; }
.topic-row { transition: background-color 0.15s ease; }
.topic-row:hover { background: var(--row-hover); }

/* An unread topic gets a rail rather than a bold row: it marks the row without
   changing its height, so the list does not reflow as things are read. */
/* A rail plus a soft bloom: visible at a glance without changing row height,
   so the list does not reflow as things are read. */
.topic-row.unread {
  box-shadow: inset 3px 0 0 var(--unread);
  background: linear-gradient(90deg, oklch(0.66 0.2 42 / 0.06) 0%, transparent 22%);
}
.topic-row.unread .topic-title { font-weight: 650; }

.topic-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  display: inline;
}
.topic-title:hover { color: var(--primary); }

.topic-tags { display: inline-flex; gap: 0.25rem; margin-right: 0.375rem; vertical-align: 1px; }
.topic-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.1875rem;
}
.topic-sub a { color: var(--muted-foreground); font-weight: 500; }
.topic-sub a:hover { color: var(--foreground); }
.dot::before { content: '·'; margin-inline: 0.125rem; }

.topic-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: right;
}
.topic-count { display: none; }
@media (min-width: 40rem) { .topic-count { display: block; min-width: 3rem; } }
.topic-count strong {
  display: inline-block;
  min-width: 2rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- Topic view ---------------------------------------------------------- */

.topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.topic-heading { font-size: 1.375rem; letter-spacing: -0.018em; }
.topic-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}

.post {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 0.875rem;
  overflow: hidden;
  scroll-margin-top: 4.5rem;
}
@media (min-width: 48rem) {
  .post { grid-template-columns: 11rem minmax(0, 1fr); }
}

/* The author column is a sidebar on desktop and a byline on mobile — the same
   markup, reordered, so the post body is never squeezed into a narrow column. */
.post-author {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--primary) 6%, transparent) 0%, transparent 55%),
    color-mix(in oklab, var(--muted) 45%, transparent);
}
@media (min-width: 48rem) {
  .post-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.375rem;
    padding: 1.25rem 1rem;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}

.post-author-name { font-weight: 600; font-size: 0.875rem; color: var(--foreground); }
.post-author-name:hover { color: var(--primary); }
.post-author-title { font-size: 0.6875rem; color: var(--muted-foreground); }
.post-author-stats { font-size: 0.6875rem; color: var(--muted-foreground); display: none; }
@media (min-width: 48rem) { .post-author-stats { display: block; } }

.post-main { display: flex; flex-direction: column; min-width: 0; }
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.post-permalink { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

.post-body {
  padding: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  flex: 1;
}
.post-body > *:first-child { margin-top: 0; }
.post-body > *:last-child { margin-bottom: 0; }
.post-body p { margin-block: 0 0.875rem; }
.post-body h2, .post-body h3, .post-body h4 { margin-block: 1.5rem 0.625rem; }
.post-body ul, .post-body ol { margin-block: 0 0.875rem; padding-left: 1.5rem; }
.post-body li { margin-bottom: 0.25rem; }
.post-body img { border-radius: calc(var(--radius) - 2px); margin-block: 0.5rem; }
.post-body hr { margin-block: 1.25rem; }

.post-body blockquote,
.post-body .bb-quote {
  margin: 0 0 0.875rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0;
  background: color-mix(in oklab, var(--muted) 55%, transparent);
  color: var(--muted-foreground);
}
.post-body blockquote cite,
.post-body .bb-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.post-body code {
  background: var(--muted);
  padding: 0.125rem 0.3125rem;
  border-radius: calc(var(--radius) - 5px);
  font-size: 0.85em;
}
.post-body pre {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.875rem 1rem;
  overflow-x: auto;
  margin-block: 0 0.875rem;
  line-height: 1.55;
}
.post-body pre code { background: none; padding: 0; font-size: 0.8125rem; }

.md-table-wrap { overflow-x: auto; margin-bottom: 0.875rem; }
.md-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.md-table th { background: var(--muted); font-weight: 600; }

.bb-center { text-align: center; }
.bb-right { text-align: right; }
.bb-spoiler { border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); padding: 0.5rem 0.75rem; margin-bottom: 0.875rem; }
.bb-spoiler summary { cursor: pointer; font-weight: 500; font-size: 0.8125rem; }
.bb-video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 0.875rem; }
.bb-video iframe { width: 100%; height: 100%; border: 0; border-radius: calc(var(--radius) - 2px); }

.mention {
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  padding: 0.0625rem 0.25rem;
  border-radius: calc(var(--radius) - 5px);
}
.mention:hover { text-decoration: none; background: color-mix(in oklab, var(--primary) 20%, transparent); }

/*
 * The signature is separated by a rule and set smaller and quieter than the
 * post. It only appears once its author has earned it — see signatureGate in
 * @tsbb/core — so an empty separator never shows up under a new member's post.
 */
.post-signature {
  margin: 0 1.25rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.post-signature a { color: var(--muted-foreground); text-decoration: underline; text-underline-offset: 2px; }
.post-signature a:hover { color: var(--primary); }

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, transparent);
}
.post-actions { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }

.post.is-hidden { opacity: 0.6; border-style: dashed; }
.post.is-solution { border-color: var(--success); box-shadow: 0 0 0 1px color-mix(in oklab, var(--success) 40%, transparent); }

/* --- Composer ------------------------------------------------------------ */

.composer { margin-top: 1.25rem; }
.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--input);
  border-bottom: none;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: var(--muted);
}
.composer .textarea {
  border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px);
}
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* --- Profile ------------------------------------------------------------- */

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.profile-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.profile-stat strong { display: block; font-size: 1.125rem; font-weight: 650; }
.profile-stat span { font-size: 0.75rem; color: var(--muted-foreground); }

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

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.page-title { font-size: 1.25rem; letter-spacing: -0.016em; }
.page-subtitle { font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.125rem; }

.stack > * + * { margin-top: 0.75rem; }
.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.8125rem; }
.tiny { font-size: 0.75rem; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }

.layout-with-sidebar { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) {
  .layout-with-sidebar { grid-template-columns: minmax(0, 1fr) 18rem; }
}
.sidebar { display: flex; flex-direction: column; gap: 1rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.site-footer a { color: var(--muted-foreground); }
/* An icon beside its label. This cannot be a style attribute: style-src has no
   'unsafe-inline', and that governs attributes too. */
.footer-link { display: inline-flex; align-items: center; gap: 0.3rem; }
.site-footer a:hover { color: var(--foreground); }
/* Narrow pages. Classes rather than style attributes, which the board's CSP
   refuses ('unsafe-inline' is not in style-src). */
.auth-page { max-width: 26rem; margin: 2rem auto; }
.composer-page { max-width: 48rem; }

/* The full site footer is drawn only by the skins that ask for it (paper). */
.footer-columns { display: none; }

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

.admin-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) {
  .admin-layout { grid-template-columns: 13rem minmax(0, 1fr); }
}
.admin-nav { display: flex; flex-direction: column; gap: 0.125rem; }
.admin-nav-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  padding: 0.75rem 0.625rem 0.25rem;
}


/* --- Board statistics (the vBulletin strip) ------------------------------- */

.board-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem 1.25rem;
}
@media (min-width: 48rem) {
  .board-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.board-stat {
  position: relative;
  padding: 0.75rem 0.875rem;
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--stat-hue, var(--primary)) 12%, transparent), transparent 70%),
    var(--muted);
  overflow: hidden;
}
.board-stat::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--stat-hue, var(--primary));
}
.board-stat strong {
  display: block;
  font-size: 1.375rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
.board-stat span {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.board-stat:nth-child(1) { --stat-hue: var(--hue-2); }
.board-stat:nth-child(2) { --stat-hue: var(--hue-4); }
.board-stat:nth-child(3) { --stat-hue: var(--hue-5); }
.board-stat:nth-child(4) { --stat-hue: var(--hue-6); }

.board-newest {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}


/* --- Ad units ------------------------------------------------------------ */
/*
 * Thin bars only, at the edges of content. The unit is centred on the content
 * column and given no chrome of its own: an advert that looks like part of the
 * board is worse than one that looks like an advert, and the creative already
 * carries its own "Sponsored" mark.
 */
.cp-ad-unit {
  width: 100%;
  max-width: 76rem;
  margin: 1rem auto;
  padding-inline: 1rem;
  opacity: 0.92;
}
.cp-ad-unit:hover { opacity: 1; }
.site-header .cp-ad-unit { margin: 0 auto; padding-block: 0.375rem; }
.cp-ad-unit iframe { border-radius: calc(var(--radius) - 4px); }

/* --- Front page hero ------------------------------------------------------ */
/*
 * The board's name and tagline, said once at the top of the index. Compact for
 * a member, who reads it on every visit; a little more generous for a guest,
 * who is being told what the place is and given the way in.
 */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.hero-title { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.hero-tagline { font-size: 0.9375rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.hero-description { font-size: 0.875rem; margin-top: 0.5rem; max-width: 60ch; }
.hero-compact { margin-bottom: 0.75rem; }
.hero-compact .hero-title { font-size: 1.25rem; }
.hero-compact .hero-tagline { font-size: 0.8125rem; }
.about-body h2 { font-size: 1.0625rem; margin-top: 1.25rem; }
.about-body h2:first-child { margin-top: 0; }
.about-actions { margin-top: 1rem; }

/* --- What the software is -------------------------------------------------- */
/*
 * The panel that says what tsbb can do: on the front page for a guest, on the
 * About page, and at the top of the documentation index. One grid, one set of
 * classes, so a skin styles it once.
 */
.platform-lead {
  font-size: 0.9375rem;
  max-width: 72ch;
  margin-bottom: 1rem;
}
.platform-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.platform-item {
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
}
.platform-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.platform-item-title {
  font-weight: 650;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}
a.platform-item-title { color: var(--foreground); }
a.platform-item-title:hover { color: var(--primary); }
.platform-item-summary {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}
.platform-actions { margin-top: 1rem; }
.docs-list { margin-top: 1rem; }
.doc-source { margin-top: 1rem; }

/* --- Community features (0.17.0): reactions, polls, prefixes, trophies ---- */

.topic-prefix { margin-right: 0.375rem; vertical-align: 0.0625rem; }
.topic-heading .topic-prefix { vertical-align: 0.25rem; }

.reaction-tally {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.reaction-tally .reaction-total { margin-left: 0.25rem; font-variant-numeric: tabular-nums; }

.reaction-picker { position: relative; display: inline-block; }
.reaction-picker > summary { list-style: none; cursor: pointer; }
.reaction-picker > summary::-webkit-details-marker { display: none; }
.reaction-menu {
  position: absolute;
  bottom: calc(100% + 0.375rem);
  left: 0;
  z-index: 20;
  display: flex;
  gap: 0.125rem;
  padding: 0.25rem;
  background: var(--popover);
  color: var(--popover-foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 6px 24px oklch(0 0 0 / 0.18);
}
.reaction-option {
  font-size: 1.375rem;
  line-height: 1;
  padding: 0.3125rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.reaction-option:hover,
.reaction-option:focus-visible { transform: scale(1.25); background: var(--accent); }
.reaction-option.is-mine { background: var(--accent); outline: 2px solid var(--primary); }

.solution-banner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0.375rem 0.625rem;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklch, var(--success) 14%, transparent);
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 600;
}

.poll { margin-bottom: 1rem; }
.poll-choice { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.poll-result.is-mine { font-weight: 600; }
.poll-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-top: 0.25rem;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--muted);
}
.poll-bar::-webkit-progress-bar { background: var(--muted); }
.poll-bar::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.poll-bar::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

.composer-poll { margin-top: 0.75rem; }
.composer-poll > summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; }
.composer-poll[open] > summary { margin-bottom: 0.5rem; }

.thread-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin-bottom: 1rem; }
.thread-tools .label { margin: 0; }
.thread-tools form { display: inline-flex; gap: 0.25rem; align-items: center; }
.thread-tools .select { width: auto; }

.trophy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.trophy { display: flex; gap: 0.625rem; align-items: center; opacity: 0.45; }
.trophy.earned { opacity: 1; }
.trophy-points {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.8125rem;
}

.item-list { list-style: none; margin: 0; padding: 0; }
.item-list > li { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); }
.item-list > li:last-child { border-bottom: 0; }
.item-list > li.unread { border-left: 3px solid var(--primary); }
.item-title { font-weight: 600; }
.item-excerpt { margin-top: 0.25rem; color: var(--muted-foreground); font-size: 0.875rem; }

.tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1rem; }

.message { display: flex; gap: 0.875rem; padding: 1rem; border-bottom: 1px solid var(--border); }
.message:last-child { border-bottom: 0; }
.message-main { min-width: 0; flex: 1; }
.message-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 0.375rem; }
.message-head a { font-weight: 600; color: var(--foreground); }

.featured-strip .topic-row { border-left: 3px solid var(--warning, var(--primary)); }

/*
 * @profullstack/css looks: whole-page art directions, opt-in.
 *
 *   @import "@profullstack/css";        (or <link> profullstack.css)
 *   @import "@profullstack/css/looks";
 *   <html data-look="neon|matrix|terminal|amber|synthwave|geocities|vaporwave">
 *
 * A look re-points the --pf-* tokens, so every component and widget follows it,
 * then adds its decoration (glow, scanlines, a grid floor, tiled stars). No new
 * classes: the only extra hooks are [data-look-marquee] (a scrolling banner the
 * geocities look shows) and canvas[data-look-fx] (a background canvas; the matrix
 * rain in examples/examples.js draws into it). All motion stops under
 * prefers-reduced-motion. Each look forces its own color-scheme.
 */
@layer pf.tokens, pf.reset, pf.base, pf.layout, pf.components, pf.widgets, pf.platform, pf.looks, pf.utilities;

@layer pf.looks {
  [data-look] h1 { text-shadow: var(--pf-look-glow, none); }
  [data-look] .badge { background: transparent; color: var(--pf-color-accent); border: 1px solid currentColor; }
  canvas[data-look-fx] { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100vw; height: 100vh; }
  [data-look-marquee] { display: none; }

  @keyframes pf-look-blink { 50% { opacity: 0; } }
  @keyframes pf-look-flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .55; } }
  @keyframes pf-look-grid { to { background-position: 0 40px, 0 0; } }
  @keyframes pf-look-marquee { to { transform: translateX(-100%); } }
  @keyframes pf-look-pulse { 50% { box-shadow: 0 0 0 10px rgb(225 29 72 / 0); } 0%, 100% { box-shadow: 0 0 0 0 rgb(225 29 72 / .45); } }
  @keyframes pf-look-aurora { to { background-position: 100% 60%; } }

  /* neon: pink and cyan tubes on black --------------------------------- */
  :root[data-look="neon"] {
    color-scheme: dark;
    --pf-color-canvas: #07020f; --pf-color-surface: #12051f; --pf-color-surface-raised: #1b0830;
    --pf-color-ink: #f2e9ff; --pf-color-ink-muted: #c7b4e8; --pf-color-border: #ff2bd6;
    --pf-color-primary: #33f6ff; --pf-color-primary-hover: #8ffaff; --pf-color-on-primary: #07020f;
    --pf-color-accent: #ff2bd6; --pf-color-focus: #33f6ff;
    --pf-look-glow: 0 0 6px #ff2bd6, 0 0 22px #ff2bd6, 0 0 48px #b3009a;
  }
  :root[data-look="neon"] body {
    background: radial-gradient(60rem 30rem at 80% -10%, rgb(255 43 214 / .25), transparent),
                radial-gradient(50rem 30rem at -10% 110%, rgb(51 246 255 / .2), transparent), #07020f;
  }
  :root[data-look="neon"] h1 { color: #ff2bd6; }
  :root[data-look="neon"] .card { box-shadow: 0 0 0 1px #ff2bd6, 0 0 24px rgb(255 43 214 / .35), inset 0 0 18px rgb(51 246 255 / .12); }
  :root[data-look="neon"] button, :root[data-look="neon"] .button { box-shadow: 0 0 14px #33f6ff; }

  /* matrix: phosphor green on black, rain canvas behind ------------------ */
  :root[data-look="matrix"] {
    color-scheme: dark;
    --pf-font-sans: var(--pf-font-mono);
    --pf-color-canvas: #000; --pf-color-surface: rgb(0 10 2 / .82); --pf-color-surface-raised: #001a06;
    --pf-color-ink: #b6ffc8; --pf-color-ink-muted: #6fdc8c; --pf-color-border: #00b32c;
    --pf-color-primary: #00ff41; --pf-color-primary-hover: #7dff9b; --pf-color-on-primary: #000;
    --pf-color-accent: #00ff41; --pf-color-focus: #7dff9b;
    --pf-look-glow: 0 0 8px #00ff41, 0 0 24px #008f11;
  }
  :root[data-look="matrix"] h1 { color: #00ff41; }

  /* terminal: a CLI session, prompt and block cursor -------------------- */
  :root[data-look="terminal"] {
    color-scheme: dark;
    --pf-font-sans: var(--pf-font-mono);
    --pf-color-canvas: #0b0b0b; --pf-color-surface: #121212; --pf-color-surface-raised: #1c1c1c;
    --pf-color-ink: #d0d0d0; --pf-color-ink-muted: #9e9e9e; --pf-color-border: #3a3a3a;
    --pf-color-primary: #5fd700; --pf-color-primary-hover: #87ff00; --pf-color-on-primary: #000;
    --pf-color-accent: #5fd7ff; --pf-color-focus: #5fd700;
    --pf-radius-md: 4px; --pf-radius-lg: 6px;
  }
  :root[data-look="terminal"] h1::before { content: "$ "; color: #5fd700; }
  :root[data-look="terminal"] h1::after { content: "\2588"; margin-inline-start: .1em; color: #5fd700; }
  :root[data-look="terminal"] .card { position: relative; padding-block-start: 2.2rem; }
  :root[data-look="terminal"] .card::before {
    content: "\25CF"; position: absolute; inset-block-start: .5rem; inset-inline-start: .9rem;
    font-size: .8rem; color: #ff5f56; text-shadow: 1.1em 0 #ffbd2e, 2.2em 0 #27c93f;
  }
  :root[data-look="terminal"] main li::marker { content: "> "; color: #5fd700; }

  /* amber: 1983 phosphor CRT with scanlines ------------------------------ */
  :root[data-look="amber"] {
    color-scheme: dark;
    --pf-font-sans: "VT323", var(--pf-font-mono);
    --pf-color-canvas: #0d0800; --pf-color-surface: #140c00; --pf-color-surface-raised: #1e1200;
    --pf-color-ink: #ffb000; --pf-color-ink-muted: #d99a2b; --pf-color-border: #8a5a00;
    --pf-color-primary: #ffb000; --pf-color-primary-hover: #ffcc66; --pf-color-on-primary: #1a0f00;
    --pf-color-accent: #ffcc66; --pf-color-focus: #ffcc66;
    --pf-look-glow: 0 0 6px #ffb000, 0 0 18px #a36b00;
  }
  :root[data-look="amber"] h1::after { content: "_"; }
  :root[data-look="amber"] body::after {
    content: ""; position: fixed; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(transparent 0 2px, rgb(0 0 0 / .28) 2px 3px);
  }

  /* synthwave: 1986 sunset, chrome type, a moving grid floor ------------- */
  :root[data-look="synthwave"] {
    color-scheme: dark;
    --pf-color-canvas: #12002b; --pf-color-surface: rgb(20 0 40 / .72); --pf-color-surface-raised: #2b0057;
    --pf-color-ink: #fff; --pf-color-ink-muted: #f3c6ff; --pf-color-border: #8c1eff;
    --pf-color-primary: #ff2975; --pf-color-primary-hover: #ff5c97; --pf-color-on-primary: #fff;
    --pf-color-accent: #ffd319; --pf-color-focus: #ffd319;
  }
  :root[data-look="synthwave"] body { background: linear-gradient(#0b0019 0%, #2b0057 45%, #ff2975 70%, #ffd319 72%, #12002b 72.2%) fixed; }
  :root[data-look="synthwave"] body::before {
    content: ""; position: fixed; inset-inline: -50%; inset-block-end: 0; block-size: 32vh; z-index: -1; pointer-events: none;
    transform: perspective(300px) rotateX(60deg); transform-origin: bottom;
    background: linear-gradient(transparent 0 94%, #ff2975 94%) 0 0 / 100% 40px,
                linear-gradient(90deg, transparent 0 96%, #ff2975 96%) 0 0 / 60px 100%;
  }
  :root[data-look="synthwave"] h1 {
    background: linear-gradient(#fff 0 45%, #ff9de2 50%, #8c1eff 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 12px #ff2975); font-style: italic;
  }

  /* geocities: a 1997 homepage. Tiled stars, Comic Sans, bevels, marquee -- */
  :root[data-look="geocities"] {
    color-scheme: dark;
    --pf-font-sans: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
    --pf-color-canvas: #000033; --pf-color-surface: #000080; --pf-color-surface-raised: #0000a8;
    --pf-color-ink: #fff; --pf-color-ink-muted: #00ff00; --pf-color-border: #c0c0c0;
    --pf-color-primary: #c0c0c0; --pf-color-primary-hover: #e0e0e0; --pf-color-on-primary: #000;
    --pf-color-accent: #00ffff; --pf-color-focus: #ffff00;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="geocities"] body {
    background-color: #000033;
    background-image: radial-gradient(#fff 1px, transparent 1.5px), radial-gradient(#ffff66 1px, transparent 1.5px);
    background-size: 46px 46px, 73px 73px; background-position: 0 0, 20px 30px;
  }
  :root[data-look="geocities"] h1 { color: #ffff00; font-family: Impact, "Arial Black", sans-serif; text-shadow: 3px 3px 0 #f00, 6px 6px 0 #00f; }
  :root[data-look="geocities"] .card { border: 4px ridge #c0c0c0; }
  :root[data-look="geocities"] button, :root[data-look="geocities"] .button { border: 3px outset #fff; font-family: Tahoma, "MS Sans Serif", sans-serif; }
  :root[data-look="geocities"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]), :root[data-look="geocities"] textarea, :root[data-look="geocities"] select { background: #fff; color: #000; border: 2px inset #c0c0c0; }
  :root[data-look="geocities"] a { text-decoration: underline; }
  :root[data-look="geocities"] a:visited { color: #ff00ff; }
  :root[data-look="geocities"] .badge::before, :root[data-look="geocities"] .badge::after { content: "\1F6A7"; margin-inline: .25em; }
  :root[data-look="geocities"] [data-look-marquee] {
    display: block; overflow: hidden; white-space: nowrap; padding-block: .25rem;
    background: #ffff00; color: #f00; font-weight: 700; border-block: 3px dashed #f00;
  }
  :root[data-look="geocities"] [data-look-marquee] > * { display: inline-block; padding-inline-start: 100%; }

  /* vaporwave: pastel 1995 desktop, window chrome on every card ---------- */
  :root[data-look="vaporwave"] {
    color-scheme: light;
    --pf-color-canvas: #ffd6f5; --pf-color-surface: rgb(255 255 255 / .8); --pf-color-surface-raised: #fff;
    --pf-color-ink: #2d1b46; --pf-color-ink-muted: #5b3f7a; --pf-color-border: #2d1b46;
    --pf-color-primary: #b967ff; --pf-color-primary-hover: #a04bff; --pf-color-on-primary: #fff;
    --pf-color-accent: #01a3cc; --pf-color-focus: #ff71ce;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="vaporwave"] body { background: linear-gradient(135deg, #ffd6f5, #c2f0ff 50%, #fffb96) fixed; }
  :root[data-look="vaporwave"] h1 { color: #ff71ce; letter-spacing: .3em; text-transform: uppercase; text-shadow: 3px 3px 0 #01cdfe, 6px 6px 0 #b967ff; }
  :root[data-look="vaporwave"] .card { position: relative; border: 2px solid #2d1b46; box-shadow: 6px 6px 0 #2d1b46; padding-block-start: 2.2rem; }
  :root[data-look="vaporwave"] .card::before {
    content: "\25AB  \25AB  \2715"; position: absolute; inset: 0 0 auto 0; block-size: 1.6rem; padding: .1rem .6rem;
    text-align: end; font-size: .85rem; color: #fff; background: linear-gradient(90deg, #b967ff, #01cdfe);
  }


  /* prodigy: 1990 Prodigy service. Navy screen, chunky NAPLPS-style blocks, the gray command bar */
  :root[data-look="prodigy"] {
    color-scheme: dark;
    --pf-font-sans: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #00006b; --pf-color-surface: #0000a8; --pf-color-surface-raised: #0010c8;
    --pf-color-ink: #fff; --pf-color-ink-muted: #ffff55; --pf-color-border: #55ffff;
    --pf-color-primary: #ff55ff; --pf-color-primary-hover: #ff8cff; --pf-color-on-primary: #000;
    --pf-color-accent: #55ffff; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="prodigy"] body { padding-block-end: 3.25rem; }
  :root[data-look="prodigy"] h1 {
    display: inline-block; padding: .1em .45em; color: #000; background: #55ffff;
    box-shadow: .25em .25em 0 #ff55ff, .5em .5em 0 #ffff55; text-transform: uppercase; letter-spacing: .04em; margin-block-end: .7em;
  }
  :root[data-look="prodigy"] .card { border: 0; background: repeating-linear-gradient(90deg, #0000a8 0 24px, #0008b8 24px 48px); box-shadow: inset 0 6px 0 #55ffff; }
  :root[data-look="prodigy"] body::after {
    content: "NEXT \00a0\00a0 BACK \00a0\00a0 MENU \00a0\00a0 PATH \00a0\00a0 JUMP \00a0\00a0 HELP \00a0\00a0 EXIT";
    position: fixed; inset: auto 0 0 0; z-index: 10; pointer-events: none;
    padding: .7rem 1rem; text-align: center; font: 700 .85rem/1 Arial, sans-serif; letter-spacing: .12em;
    color: #000; background: linear-gradient(#e0e0e0, #a8a8a8); border-block-start: 3px solid #fff;
  }

  /* aol: 1996 AOL 3.0 on Windows. Teal desktop, gray chrome, navy title bars, You've Got Mail yellow */
  :root[data-look="aol"] {
    color-scheme: light;
    --pf-font-sans: Tahoma, "MS Sans Serif", Arial, sans-serif;
    --pf-color-canvas: #008080; --pf-color-surface: #c0c0c0; --pf-color-surface-raised: #d4d0c8;
    --pf-color-ink: #000; --pf-color-ink-muted: #202020; --pf-color-border: #808080;
    --pf-color-primary: #c0c0c0; --pf-color-primary-hover: #d4d0c8; --pf-color-on-primary: #000;
    --pf-color-accent: #000080; --pf-color-focus: #000080;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="aol"] main > header, :root[data-look="aol"] main > :first-child { color: #fff; }
  :root[data-look="aol"] h1 { color: #fff; text-shadow: 2px 2px 0 #000; }
  :root[data-look="aol"] h1::before { content: "\25B2 "; color: #ffcc00; text-shadow: 2px 2px 0 #0033cc; }
  :root[data-look="aol"] .card {
    position: relative; padding-block-start: 2.3rem; color: #000;
    border: 2px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 1px 1px 0 #000;
  }
  :root[data-look="aol"] .card::before {
    content: "America Online"; position: absolute; inset: 2px 2px auto 2px; block-size: 1.5rem; padding: .15rem .5rem;
    font: 700 .8rem/1.2rem Tahoma, sans-serif; color: #fff; background: linear-gradient(90deg, #000080, #1084d0);
  }
  :root[data-look="aol"] .card::after {
    content: "_ \25A1 \2715"; position: absolute; inset: 4px 8px auto auto; font: 700 .7rem/1.1rem Tahoma, sans-serif; color: #fff;
  }
  :root[data-look="aol"] button, :root[data-look="aol"] .button { border: 2px solid; border-color: #fff #404040 #404040 #fff; color: #000; }
  :root[data-look="aol"] .badge { background: #ffcc00; color: #000; border-color: #000; }
  :root[data-look="aol"] .badge::before { content: "\2709  "; }
  :root[data-look="aol"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]) { background: #fff; border: 2px solid; border-color: #404040 #fff #fff #404040; }

  /* compuserve: CompuServe Information Manager for DOS. Blue screen, cyan menu bar, double-line boxes */
  :root[data-look="compuserve"] {
    color-scheme: dark;
    --pf-font-sans: "Perfect DOS VGA 437", "Px437 IBM VGA8", ui-monospace, Consolas, monospace;
    --pf-color-canvas: #0000aa; --pf-color-surface: #0000aa; --pf-color-surface-raised: #0000c4;
    --pf-color-ink: #fff; --pf-color-ink-muted: #aaaaaa; --pf-color-border: #fff;
    --pf-color-primary: #00aaaa; --pf-color-primary-hover: #55ffff; --pf-color-on-primary: #000;
    --pf-color-accent: #ffff55; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="compuserve"] body { padding-block-start: 1.6rem; }
  :root[data-look="compuserve"] body::before {
    content: " File  Edit  Services  Mail  Forums  Special  Window  Help          GO: "; white-space: pre;
    position: fixed; inset: 0 0 auto 0; z-index: 10; pointer-events: none; padding: .15rem .5rem;
    font: 1rem/1.3rem var(--pf-font-mono); color: #000; background: #00aaaa;
  }
  :root[data-look="compuserve"] h1 { color: #ffff55; }
  :root[data-look="compuserve"] .card { border: 6px double #fff; box-shadow: 8px 8px 0 #000; }
  :root[data-look="compuserve"] h2 { display: inline-block; padding-inline: .4em; color: #0000aa; background: #aaaaaa; }

  /* bbs: a 1993 dial-up board in ANSI. Black, CP437 shading, bright cyan and magenta */
  :root[data-look="bbs"] {
    color-scheme: dark;
    --pf-font-sans: "Perfect DOS VGA 437", "Px437 IBM VGA8", ui-monospace, Consolas, monospace;
    --pf-color-canvas: #000; --pf-color-surface: #000; --pf-color-surface-raised: #0a0a0a;
    --pf-color-ink: #aaaaaa; --pf-color-ink-muted: #55ffff; --pf-color-border: #aa00aa;
    --pf-color-primary: #ff55ff; --pf-color-primary-hover: #ff8cff; --pf-color-on-primary: #000;
    --pf-color-accent: #55ffff; --pf-color-focus: #ffff55;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="bbs"] h1 { color: #55ffff; text-shadow: 3px 0 #aa00aa; }
  :root[data-look="bbs"] h1::before, :root[data-look="bbs"] h1::after {
    content: "\2591\2592\2593\2588"; display: block; font-size: .5em; letter-spacing: 0; color: #aa00aa; text-shadow: none;
  }
  :root[data-look="bbs"] h1::after { content: "\2588\2593\2592\2591  [ C ]onnect  [ J ]oin  [ G ]oodbye"; color: #ff55ff; }
  :root[data-look="bbs"] .card { border: 2px dashed #aa00aa; box-shadow: 0 0 0 4px #000, 0 0 0 6px #55ffff; }
  :root[data-look="bbs"] h2 { color: #ffff55; }
  :root[data-look="bbs"] h2::before { content: "\00bb "; color: #ff55ff; }

  /* minitel: France, 1982. Videotex teletext: eight colors, double height, mosaic bars */
  :root[data-look="minitel"] {
    color-scheme: dark;
    --pf-font-sans: "Bedstead", "VT323", ui-monospace, monospace;
    --pf-color-canvas: #000; --pf-color-surface: #000; --pf-color-surface-raised: #111;
    --pf-color-ink: #fff; --pf-color-ink-muted: #00ffff; --pf-color-border: #0000ff;
    --pf-color-primary: #ffff00; --pf-color-primary-hover: #ffff80; --pf-color-on-primary: #000;
    --pf-color-accent: #00ff00; --pf-color-focus: #ff00ff;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="minitel"] body::before {
    content: ""; position: fixed; inset: 0 0 auto 0; block-size: 10px; z-index: 10; pointer-events: none;
    background: linear-gradient(90deg, #f00 0 14.28%, #0f0 0 28.56%, #ff0 0 42.84%, #00f 0 57.12%, #f0f 0 71.4%, #0ff 0 85.68%, #fff 0);
  }
  :root[data-look="minitel"] h1 { color: #ffff00; transform: scaleY(1.6); transform-origin: top left; margin-block-end: .6em; text-transform: uppercase; }
  :root[data-look="minitel"] .card { border: 0; border-inline-start: 12px solid #0000ff; background: #000; }
  :root[data-look="minitel"] h2 { color: #000; background: #00ffff; display: inline-block; padding-inline: .3em; }
  :root[data-look="minitel"] .badge::after { content: " 3615"; }


  /* ===== Modern magazine ============================================= */

  /* editorial: a print magazine. Serif display, drop cap, hairline rules, red kicker */
  :root[data-look="editorial"] {
    color-scheme: light;
    --pf-font-sans: "Iowan Old Style", "Charter", "Georgia", serif;
    --pf-color-canvas: #faf7f2; --pf-color-surface: #fffdf9; --pf-color-surface-raised: #fff;
    --pf-color-ink: #141414; --pf-color-ink-muted: #5a5550; --pf-color-border: #141414;
    --pf-color-primary: #141414; --pf-color-primary-hover: #333; --pf-color-on-primary: #faf7f2;
    --pf-color-accent: #c8102e; --pf-color-focus: #c8102e;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="editorial"] h1 { font-size: clamp(3rem, 9vw, 7rem); font-weight: 400; font-style: italic; letter-spacing: -.03em; line-height: .95; border-block-end: 1px solid #141414; padding-block-end: .2em; }
  :root[data-look="editorial"] .badge { border: 0; padding: 0; color: #c8102e; font-family: Helvetica, Arial, sans-serif; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
  :root[data-look="editorial"] .card { border: 0; border-block-start: 4px double #141414; box-shadow: none; background: transparent; }
  :root[data-look="editorial"] h1 + p::first-letter { float: left; font-size: 3.4em; line-height: .8; padding: .05em .08em 0 0; color: #c8102e; }
  :root[data-look="editorial"] h2 { font-style: italic; font-weight: 400; }

  /* swiss: International Typographic Style. Helvetica, flush left, red block, a strict grid */
  :root[data-look="swiss"] {
    color-scheme: light;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #f2f2f2;
    --pf-color-ink: #000; --pf-color-ink-muted: #333; --pf-color-border: #000;
    --pf-color-primary: #e30613; --pf-color-primary-hover: #b8000b; --pf-color-on-primary: #fff;
    --pf-color-accent: #e30613; --pf-color-focus: #e30613;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="swiss"] body { background: linear-gradient(90deg, #e30613 0 12px, transparent 12px), repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgb(0 0 0 / .05) calc(8.333% - 1px) 8.333%), #fff; }
  :root[data-look="swiss"] h1 { font-size: clamp(3rem, 10vw, 8rem); font-weight: 700; letter-spacing: -.05em; line-height: .88; text-transform: lowercase; }
  :root[data-look="swiss"] .badge { background: #e30613; color: #fff; border: 0; border-radius: 0; }
  :root[data-look="swiss"] .card { border: 0; border-block-start: 8px solid #000; box-shadow: none; }
  :root[data-look="swiss"] h2 { font-weight: 700; letter-spacing: -.02em; }

  /* brutalist: raw and loud. Mono labels, giant grotesk, black borders, hard offset shadows */
  :root[data-look="brutalist"] {
    color-scheme: light;
    --pf-font-sans: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #f4f400; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #000; --pf-color-ink-muted: #000; --pf-color-border: #000;
    --pf-color-primary: #000; --pf-color-primary-hover: #ff3b00; --pf-color-on-primary: #fff;
    --pf-color-accent: #ff3b00; --pf-color-focus: #0047ff;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="brutalist"] h1 { font-size: clamp(3.2rem, 12vw, 9rem); line-height: .85; text-transform: uppercase; letter-spacing: -.04em; -webkit-text-stroke: 2px #000; color: #fff; text-shadow: 6px 6px 0 #000; }
  :root[data-look="brutalist"] .card { border: 4px solid #000; box-shadow: 10px 10px 0 #000; }
  :root[data-look="brutalist"] button, :root[data-look="brutalist"] .button { border: 3px solid #000; box-shadow: 5px 5px 0 #000; text-transform: uppercase; }
  :root[data-look="brutalist"] button:hover, :root[data-look="brutalist"] .button:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; }
  :root[data-look="brutalist"] .badge { background: #000; color: #f4f400; font-family: var(--pf-font-mono); }
  :root[data-look="brutalist"] input:not([type="radio"], [type="checkbox"], [type="range"], [type="color"]) { border: 3px solid #000; }

  /* glass: flashy modern. Aurora gradient mesh, frosted translucent cards, gradient type */
  :root[data-look="glass"] {
    color-scheme: dark;
    --pf-font-sans: "Inter", "SF Pro Display", system-ui, sans-serif;
    --pf-color-canvas: #0b0620; --pf-color-surface: rgb(255 255 255 / .08); --pf-color-surface-raised: rgb(255 255 255 / .14);
    --pf-color-ink: #f5f3ff; --pf-color-ink-muted: #c4b5fd; --pf-color-border: rgb(255 255 255 / .22);
    --pf-color-primary: #a78bfa; --pf-color-primary-hover: #c4b5fd; --pf-color-on-primary: #0b0620;
    --pf-color-accent: #22d3ee; --pf-color-focus: #f0abfc;
    --pf-radius-md: 18px; --pf-radius-lg: 28px;
  }
  :root[data-look="glass"] body {
    background: radial-gradient(40rem 30rem at 15% 10%, #7c3aed99, transparent 60%), radial-gradient(35rem 30rem at 85% 20%, #06b6d488, transparent 60%),
                radial-gradient(40rem 35rem at 50% 100%, #db277788, transparent 60%), #0b0620 fixed;
  }
  :root[data-look="glass"] h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: -.04em; background: linear-gradient(100deg, #fff, #c4b5fd 40%, #22d3ee 70%, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="glass"] .card { background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .18); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 20px 60px rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .25); }
  :root[data-look="glass"] button, :root[data-look="glass"] .button { background: linear-gradient(100deg, #a78bfa, #22d3ee); border: 0; border-radius: 999px; color: #0b0620; }
  :root[data-look="glass"] .badge { background: rgb(255 255 255 / .1); color: #f0abfc; border-color: rgb(255 255 255 / .25); backdrop-filter: blur(8px); }

  /* bento: product-launch keynote. Soft off-white, big tight type, rounded tiles of mixed sizes */
  :root[data-look="bento"] {
    color-scheme: light;
    --pf-font-sans: "SF Pro Display", "Inter", system-ui, sans-serif;
    --pf-color-canvas: #f5f5f7; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #1d1d1f; --pf-color-ink-muted: #6e6e73; --pf-color-border: transparent;
    --pf-color-primary: #0071e3; --pf-color-primary-hover: #0077ed; --pf-color-on-primary: #fff;
    --pf-color-accent: #bf4800; --pf-color-focus: #0071e3;
    --pf-radius-md: 18px; --pf-radius-lg: 28px;
  }
  :root[data-look="bento"] h1 { font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; }
  :root[data-look="bento"] .card { border: 0; box-shadow: 0 2px 12px rgb(0 0 0 / .06); padding: clamp(1.25rem, 3vw, 2.25rem); }
  :root[data-look="bento"] .grid > .card:first-child { background: linear-gradient(160deg, #1d1d1f, #3a3a3c); color: #f5f5f7; }
  :root[data-look="bento"] .grid > .card:first-child h2 { background: linear-gradient(90deg, #ff9f0a, #ff375f, #bf5af2); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="bento"] .grid > .card:first-child :is(.alert, input, select, textarea) { color: #1d1d1f; }
  :root[data-look="bento"] button, :root[data-look="bento"] .button { border-radius: 999px; }
  :root[data-look="bento"] .badge { border: 0; background: transparent; color: #bf4800; font-weight: 600; padding: 0; }


  /* ===== High converting =============================================
     Built on landing-page conversion basics: one focal headline, one high-contrast
     call to action, short line length, trust cues near the button, nothing that
     competes with the form. A/B test them against each other (@profullstack/abtest). */

  /* The call to action is always a filled primary button, also inside a .field-group. */
  :root:is([data-look="clarity"], [data-look="split"], [data-look="midnight"], [data-look="urgency"]) :is(.field-group > button, button[type="submit"]) {
    background: var(--pf-color-primary); color: var(--pf-color-on-primary); border-color: var(--pf-color-primary); font-weight: 700;
  }
  :root:is([data-look="clarity"], [data-look="split"], [data-look="midnight"], [data-look="urgency"]) :is(.field-group > button, button[type="submit"]):hover { background: var(--pf-color-primary-hover); }

  /* clarity: white, centered, one huge benefit line and an orange button */
  :root[data-look="clarity"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #f8fafc;
    --pf-color-ink: #0f172a; --pf-color-ink-muted: #475569; --pf-color-border: #e2e8f0;
    --pf-color-primary: #f97316; --pf-color-primary-hover: #ea580c; --pf-color-on-primary: #fff;
    --pf-color-accent: #16a34a; --pf-color-focus: #f97316;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="clarity"] main > header { text-align: center; align-items: center; margin-inline: auto; max-inline-size: 46rem; }
  :root[data-look="clarity"] main > header form { margin-inline: auto; }
  :root[data-look="clarity"] h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
  :root[data-look="clarity"] button, :root[data-look="clarity"] .button { font-weight: 700; font-size: 1.05rem; padding-inline: 1.4rem; box-shadow: 0 8px 20px rgb(249 115 22 / .35); }
  :root[data-look="clarity"] .badge { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
  :root[data-look="clarity"] .card { box-shadow: 0 1px 3px rgb(15 23 42 / .08); }

  /* split: copy on white at left, a saturated brand panel at right, one indigo button */
  :root[data-look="split"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #eef2ff;
    --pf-color-ink: #111827; --pf-color-ink-muted: #4b5563; --pf-color-border: #e5e7eb;
    --pf-color-primary: #4f46e5; --pf-color-primary-hover: #4338ca; --pf-color-on-primary: #fff;
    --pf-color-accent: #4f46e5; --pf-color-focus: #4f46e5;
    --pf-radius-md: 8px; --pf-radius-lg: 12px;
  }
  :root[data-look="split"] body { background: linear-gradient(90deg, #fff 0 58%, #4f46e5 58% 100%) fixed; }
  :root[data-look="split"] body::before {
    content: ""; position: fixed; inset: 0 0 0 58%; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / .25) 0 8rem, transparent 8rem), radial-gradient(circle at 70% 75%, rgb(255 255 255 / .12) 0 12rem, transparent 12rem);
  }
  :root[data-look="split"] main > header { max-inline-size: 52%; }
  :root[data-look="split"] h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; letter-spacing: -.03em; }
  :root[data-look="split"] .card { box-shadow: 0 10px 30px rgb(17 24 39 / .12); }
  @media (max-width: 52rem) {
    :root[data-look="split"] body { background: linear-gradient(#fff 0 70%, #4f46e5 70%) fixed; }
    :root[data-look="split"] body::before { display: none; }
    :root[data-look="split"] main > header { max-inline-size: none; }
  }

  /* midnight: dark SaaS launch. Faint grid, a glowing violet CTA, social-proof friendly */
  :root[data-look="midnight"] {
    color-scheme: dark;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #08090a; --pf-color-surface: #111214; --pf-color-surface-raised: #17181b;
    --pf-color-ink: #f7f8f8; --pf-color-ink-muted: #8a8f98; --pf-color-border: #23252a;
    --pf-color-primary: #7c5cff; --pf-color-primary-hover: #9278ff; --pf-color-on-primary: #fff;
    --pf-color-accent: #a78bfa; --pf-color-focus: #a78bfa;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="midnight"] body { background: radial-gradient(50rem 22rem at 50% -6rem, rgb(124 92 255 / .35), transparent 70%), linear-gradient(rgb(255 255 255 / .03) 1px, transparent 1px) 0 0 / 100% 48px, linear-gradient(90deg, rgb(255 255 255 / .03) 1px, transparent 1px) 0 0 / 48px 100%, #08090a; }
  :root[data-look="midnight"] h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 600; letter-spacing: -.04em; background: linear-gradient(180deg, #fff 30%, #8a8f98); -webkit-background-clip: text; background-clip: text; color: transparent; }
  :root[data-look="midnight"] button, :root[data-look="midnight"] .button { box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 0 24px rgb(124 92 255 / .55); }
  :root[data-look="midnight"] .badge { background: rgb(124 92 255 / .12); border-color: rgb(124 92 255 / .4); color: #c4b5fd; }

  /* urgency: limited-launch energy. Black on yellow, a red badge, a pulsing CTA */
  :root[data-look="urgency"] {
    color-scheme: light;
    --pf-font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
    --pf-color-canvas: #fff8db; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #111; --pf-color-ink-muted: #3f3f3f; --pf-color-border: #111;
    --pf-color-primary: #e11d48; --pf-color-primary-hover: #be123c; --pf-color-on-primary: #fff;
    --pf-color-accent: #e11d48; --pf-color-focus: #111;
    --pf-radius-md: 6px; --pf-radius-lg: 8px;
  }
  :root[data-look="urgency"] body { background: linear-gradient(#ffd400 0 6px, transparent 6px), #fff8db; }
  :root[data-look="urgency"] h1 { font-size: clamp(2.6rem, 7.5vw, 5rem); font-weight: 900; letter-spacing: -.035em; text-transform: uppercase; }
  :root[data-look="urgency"] .badge { background: #e11d48; color: #fff; border-color: #e11d48; text-transform: uppercase; letter-spacing: .08em; }
  :root[data-look="urgency"] .badge::before { content: "\25CF  "; }
  :root[data-look="urgency"] button, :root[data-look="urgency"] .button { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
  :root[data-look="urgency"] .card { border: 2px solid #111; box-shadow: 6px 6px 0 #ffd400; }

  /* ===== Gallery ===================================================== */

  /* whitecube: a contemporary gallery. White walls, wide margins, small captions */
  :root[data-look="whitecube"] {
    color-scheme: light;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #fff; --pf-color-surface: #fff; --pf-color-surface-raised: #fafafa;
    --pf-color-ink: #111; --pf-color-ink-muted: #8a8a8a; --pf-color-border: #ececec;
    --pf-color-primary: #111; --pf-color-primary-hover: #333; --pf-color-on-primary: #fff;
    --pf-color-accent: #111; --pf-color-focus: #111;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="whitecube"] h1 { font-weight: 300; letter-spacing: .02em; font-size: clamp(2.2rem, 5vw, 3.6rem); }
  :root[data-look="whitecube"] .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
  :root[data-look="whitecube"] figure img, :root[data-look="whitecube"] figure > :first-child { box-shadow: 0 30px 60px -30px rgb(0 0 0 / .35); }
  :root[data-look="whitecube"] figcaption { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #8a8a8a; }
  :root[data-look="whitecube"] .badge { border: 0; padding: 0; color: #8a8a8a; letter-spacing: .2em; text-transform: uppercase; }

  /* darkroom: photography. Near-black, work lit from above, red safelight accents */
  :root[data-look="darkroom"] {
    color-scheme: dark;
    --pf-font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --pf-color-canvas: #0a0a0a; --pf-color-surface: #121212; --pf-color-surface-raised: #1a1a1a;
    --pf-color-ink: #ededed; --pf-color-ink-muted: #8d8d8d; --pf-color-border: #262626;
    --pf-color-primary: #ff3b30; --pf-color-primary-hover: #ff6259; --pf-color-on-primary: #fff;
    --pf-color-accent: #ff3b30; --pf-color-focus: #ff3b30;
    --pf-radius-sm: 0; --pf-radius-md: 2px; --pf-radius-lg: 2px;
  }
  :root[data-look="darkroom"] body { background: radial-gradient(60rem 30rem at 50% -10rem, rgb(255 59 48 / .14), transparent 70%), #0a0a0a; }
  :root[data-look="darkroom"] h1 { font-weight: 200; letter-spacing: .12em; text-transform: uppercase; }
  :root[data-look="darkroom"] figure > :first-child { box-shadow: 0 0 0 1px #262626, 0 0 60px rgb(255 255 255 / .06); }
  :root[data-look="darkroom"] figcaption { color: #8d8d8d; font-size: .8rem; }
  :root[data-look="darkroom"] .card { background: #0f0f0f; }

  /* polaroid: instant photos pinned to cork, handwritten captions */
  :root[data-look="polaroid"] {
    color-scheme: light;
    --pf-font-sans: "Segoe Print", "Bradley Hand", "Marker Felt", "Comic Neue", cursive;
    --pf-color-canvas: #c8a26b; --pf-color-surface: #fdfcf7; --pf-color-surface-raised: #fff;
    --pf-color-ink: #2b2118; --pf-color-ink-muted: #5c4a38; --pf-color-border: #e7e1d3;
    --pf-color-primary: #2b2118; --pf-color-primary-hover: #4a3a2a; --pf-color-on-primary: #fdfcf7;
    --pf-color-accent: #c0392b; --pf-color-focus: #c0392b;
    --pf-radius-sm: 2px; --pf-radius-md: 2px; --pf-radius-lg: 2px;
  }
  :root[data-look="polaroid"] body { background: radial-gradient(#b48c55 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(#d9b67f 1px, transparent 1.5px) 3px 4px / 9px 9px, #c8a26b; }
  :root[data-look="polaroid"] h1 { color: #fdfcf7; text-shadow: 2px 2px 0 #2b2118; }
  :root[data-look="polaroid"] .card, :root[data-look="polaroid"] figure { background: #fdfcf7; padding: .8rem .8rem 2.6rem; border: 0; box-shadow: 0 10px 18px rgb(0 0 0 / .3); }
  :root[data-look="polaroid"] .grid > :nth-child(odd) { rotate: -1.6deg; }
  :root[data-look="polaroid"] .grid > :nth-child(even) { rotate: 1.3deg; }
  :root[data-look="polaroid"] .grid > :nth-child(3n) { rotate: -.6deg; }
  :root[data-look="polaroid"] figcaption { text-align: center; font-size: 1.05rem; }

  /* ===== Shop ======================================================== */

  /* storefront: a clean store. Product tiles, prices in bold, a green buy button */
  :root[data-look="storefront"] {
    color-scheme: light;
    --pf-font-sans: "Inter", system-ui, sans-serif;
    --pf-color-canvas: #f6f6f4; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #1a1a1a; --pf-color-ink-muted: #6b6b6b; --pf-color-border: #e6e6e2;
    --pf-color-primary: #008060; --pf-color-primary-hover: #006e52; --pf-color-on-primary: #fff;
    --pf-color-accent: #d72c0d; --pf-color-focus: #008060;
    --pf-radius-md: 10px; --pf-radius-lg: 14px;
  }
  :root[data-look="storefront"] h1 { font-weight: 700; letter-spacing: -.02em; }
  :root[data-look="storefront"] .card { border: 1px solid #e6e6e2; box-shadow: none; transition: box-shadow var(--pf-transition-fast); }
  :root[data-look="storefront"] .card:hover { box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
  :root[data-look="storefront"] [data-price]:not(button) { font-weight: 700; font-size: 1.1rem; }
  :root[data-look="storefront"] s { color: #6b6b6b; }

  /* boutique: luxury. Ivory and black, spaced capitals, a thin gold line */
  :root[data-look="boutique"] {
    color-scheme: light;
    --pf-font-sans: "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
    --pf-color-canvas: #f7f3ec; --pf-color-surface: #f7f3ec; --pf-color-surface-raised: #fff;
    --pf-color-ink: #0d0d0d; --pf-color-ink-muted: #6f675c; --pf-color-border: #b8a27a;
    --pf-color-primary: #0d0d0d; --pf-color-primary-hover: #2a2a2a; --pf-color-on-primary: #f7f3ec;
    --pf-color-accent: #b8a27a; --pf-color-focus: #b8a27a;
    --pf-radius-sm: 0; --pf-radius-md: 0; --pf-radius-lg: 0;
  }
  :root[data-look="boutique"] h1 { font-weight: 400; letter-spacing: .3em; text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.4rem); text-align: center; }
  :root[data-look="boutique"] main > header { text-align: center; align-items: center; border-block: 1px solid #b8a27a; padding-block: 2rem; }
  :root[data-look="boutique"] .card { border: 0; background: transparent; box-shadow: none; text-align: center; }
  :root[data-look="boutique"] button, :root[data-look="boutique"] .button { letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; font-family: "Helvetica Neue", Arial, sans-serif; }
  :root[data-look="boutique"] .badge { border: 0; color: #b8a27a; letter-spacing: .3em; text-transform: uppercase; }

  /* market: creator shop. Pink and yellow, chunky borders, sticker badges */
  :root[data-look="market"] {
    color-scheme: light;
    --pf-font-sans: "Mabry", "Inter", system-ui, sans-serif;
    --pf-color-canvas: #ff90e8; --pf-color-surface: #fff; --pf-color-surface-raised: #fff;
    --pf-color-ink: #000; --pf-color-ink-muted: #222; --pf-color-border: #000;
    --pf-color-primary: #ffc900; --pf-color-primary-hover: #ffd83d; --pf-color-on-primary: #000;
    --pf-color-accent: #23a094; --pf-color-focus: #000;
    --pf-radius-sm: 4px; --pf-radius-md: 6px; --pf-radius-lg: 8px;
  }
  :root[data-look="market"] h1 { font-weight: 800; letter-spacing: -.03em; }
  :root[data-look="market"] .card { border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
  :root[data-look="market"] button, :root[data-look="market"] .button { border: 2px solid #000; box-shadow: 3px 3px 0 #000; font-weight: 700; }
  :root[data-look="market"] .badge { background: #23a094; color: #fff; border: 2px solid #000; rotate: -3deg; }
  :root[data-look="market"] [data-price]:not(button) { display: inline-block; padding: .1em .5em; background: #ff90e8; border: 2px solid #000; clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%); font-weight: 800; }

  @media (prefers-reduced-motion: no-preference) {
    :root[data-look="neon"] h1 { animation: pf-look-flicker 6s infinite; }
    :root[data-look="terminal"] h1::after, :root[data-look="amber"] h1::after { animation: pf-look-blink 1.05s steps(1) infinite; }
    :root[data-look="synthwave"] body::before { animation: pf-look-grid 1.2s linear infinite; }
    :root[data-look="geocities"] [data-look-marquee] > * { animation: pf-look-marquee 14s linear infinite; }
    :root[data-look="geocities"] .badge { animation: pf-look-blink 1s steps(1) infinite; }
    :root[data-look="bbs"] h1::after, :root[data-look="minitel"] .badge { animation: pf-look-blink 1.2s steps(1) infinite; }
    :root[data-look="urgency"] main > header button { animation: pf-look-pulse 1.8s ease-in-out infinite; }
    :root[data-look="glass"] body { animation: pf-look-aurora 18s ease-in-out infinite alternate; background-size: 140% 140%; }
  }
}

/*
 * The board in a @profullstack/css look (board.look, 0.18.0).
 *
 * looks.css (loaded just before this file) re-points the --pf-* tokens under
 * :root[data-look="<look>"] and adds each look's decoration. This file maps
 * those tokens onto the board's own shadcn-named ones, so every component
 * follows the look without a look-specific line here. The doubled attribute
 * outranks the board's [data-theme] and prefers-color-scheme palettes: a look
 * decides light or dark itself, exactly as on the site it matches.
 */

/*
 * What the looks assume the base framework defines, in the framework's own
 * lowest layer: looks.css is @layer pf.looks, and an unlayered default here
 * would beat every look's own value (terminal's monospace, its corners).
 * Concrete stacks, not var(--font-*): the bridge points --font-sans at
 * --pf-font-sans, and a cycle would make both invalid (a serif page).
 */
@layer pf.tokens {
  :root {
    --pf-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --pf-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --pf-radius-sm: 0.375rem;
    --pf-radius-md: 0.5rem;
    --pf-radius-lg: 0.75rem;
    --pf-transition-fast: 120ms ease;
  }
}

:root[data-look][data-look] {
  --background: var(--pf-color-canvas);
  --foreground: var(--pf-color-ink);
  --card: var(--pf-color-surface);
  --card-foreground: var(--pf-color-ink);
  --popover: var(--pf-color-surface-raised);
  --popover-foreground: var(--pf-color-ink);
  --primary: var(--pf-color-primary);
  --primary-hot: var(--pf-color-primary-hover);
  --primary-foreground: var(--pf-color-on-primary);
  --secondary: var(--pf-color-surface-raised);
  --secondary-foreground: var(--pf-color-ink);
  --muted: var(--pf-color-surface-raised);
  --muted-foreground: var(--pf-color-ink-muted);
  --accent: color-mix(in oklab, var(--pf-color-primary) 16%, var(--pf-color-surface));
  --accent-foreground: var(--pf-color-ink);
  --border: var(--pf-color-border);
  --input: var(--pf-color-border);
  --ring: var(--pf-color-focus);
  --radius: var(--pf-radius-md);
  --font-sans: var(--pf-font-sans);
  --font-mono: var(--pf-font-mono);
  --row-hover: color-mix(in oklab, var(--pf-color-primary) 8%, transparent);
  --unread: var(--pf-color-primary);
  --sidebar: var(--pf-color-surface);
  --sidebar-foreground: var(--pf-color-ink);
  --sidebar-border: var(--pf-color-border);
  --sidebar-primary: var(--pf-color-primary);
  --sidebar-primary-foreground: var(--pf-color-on-primary);
  --sidebar-accent: var(--pf-color-surface-raised);
  --sidebar-accent-foreground: var(--pf-color-ink);
  --sidebar-ring: var(--pf-color-focus);
  --page-wash: none;
  --gradient-brand: linear-gradient(90deg, var(--pf-color-primary), var(--pf-color-accent));
  --glow-primary: 0 0 0 transparent;
  background-color: var(--pf-color-canvas);
  color: var(--pf-color-ink);
}

:root[data-look] body {
  background-color: var(--pf-color-canvas);
  color: var(--pf-color-ink);
  font-family: var(--pf-font-sans);
}

/* The look's decorations target the framework's .card; the board's own panels
   keep their structure, so only colour and corners carry over there. */
:root[data-look] .btn,
:root[data-look] .input,
:root[data-look] .select,
:root[data-look] .textarea {
  border-radius: var(--pf-radius-md);
}
