/* Entry stylesheet. The build inlines these imports into one file. */
/* ./tokens.css */
/*
  Design tokens. Colour pairings are checked by tests/unit/contrast.test.js;
  see docs/design-research.md for measured ratios and font decisions.
*/

/* Barlow Condensed (static SemiBold and Bold): headings, display type */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-ext-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed/barlow-condensed-latin-ext-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Sans (variable weight): review text, comments, navigation, buttons, metadata */
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans/dm-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans/dm-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans/dm-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans/dm-sans-latin-ext-wght-italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Blacks: warm, never blue */
  --color-bg: #0d0a0b;
  --color-surface: #1a1012;
  --color-surface-raised: #24161a;

  /* Reds, darkest to brightest. Off-white text passes AA on all of them;
     muted text and links only on oxblood and darker (and muted on velvet). */
  --color-oxblood: #2a0b10;
  --color-wine: #4a1119;
  --color-velvet: #8e1b24;
  --color-crimson: #b72a33;
  --color-red: #e0454b; /* non-text accent: glows, borders, rules */

  /* Text */
  --color-text: #f6eee8;
  --color-text-muted: #c9b8b6;
  --color-text-subtle: #9e8a89;
  --color-link: #ff8c8c;

  /* Popcorn butter: focus rings and scores only */
  --color-butter: #f4c56a;

  /* Lines and controls */
  --color-line: #3a2629;
  --color-line-strong: #5a3a3e;
  --color-control-border: #8a6a6c;
  --color-focus: #f4c56a;

  /* Status */
  --color-success: #8fbf94;
  --color-warning: #f4c56a;
  --color-danger: #ff9e8f;
  --color-danger-bg: #3a1216;

  /* Gradients: the red-and-black identity */
  --gradient-page: radial-gradient(120% 55% at 50% -12%, rgb(142 27 36 / 0.42), rgb(42 11 16 / 0.18) 45%, transparent 70%);
  --gradient-velvet: linear-gradient(165deg, #8e1b24 0%, #4a1119 42%, #1c0a0d 78%, #0d0a0b 100%);
  --gradient-wine: linear-gradient(180deg, #4a1119 0%, #2a0b10 100%);
  --gradient-button: linear-gradient(180deg, #b72a33 0%, #8e1b24 100%);
  --gradient-button-hover: linear-gradient(180deg, #c8323b 0%, #9c1f29 100%);
  /* Soft vertical folds laid over velvet, like a cinema curtain */
  --curtain-folds:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0) 0, rgb(0 0 0 / 0.24) 1.9rem, rgb(0 0 0 / 0) 3.9rem),
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0) 0, rgb(255 255 255 / 0.035) 3.1rem, rgb(255 255 255 / 0) 6.7rem);
  --glow-red: 0 0 2.5rem rgb(224 69 75 / 0.28);

  /* Image scrim, used only where it keeps overlaid headlines legible */
  --scrim: linear-gradient(to top, rgb(13 10 11 / 0.96) 0%, rgb(42 11 16 / 0.78) 40%, rgb(42 11 16 / 0) 75%);

  /* Type families: two only (owner choice, 28 September 2026).
     Barlow Condensed for headings; DM Sans for everything else. */
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Type scale */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-reading: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.55rem + 2.2vw, 3.125rem);
  --text-3xl: clamp(2.375rem, 1.6rem + 3.6vw, 4.5rem);

  --weight-reading: 400;
  --weight-ui: 500;
  --weight-display: 700;
  --weight-display-semi: 600;
  --leading-reading: 1.65;
  --leading-tight: 1.04;
  --leading-snug: 1.15;
  --tracking-label: 0.04em;

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  --space-2xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  /* Widths */
  --measure: 66ch;
  --width-reading: 42rem;
  --width-wide: 64rem;
  --width-page: 78rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);

  /* Borders and radii */
  --border-hair: 1px solid var(--color-line);
  --border-control: 1px solid var(--color-control-border);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Motion */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
  }
}


/* ./base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-lg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gradient-page) no-repeat, var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  letter-spacing: 0.005em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-text);
}

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

::selection {
  background: var(--color-velvet);
  color: var(--color-text);
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
  outline-color: var(--color-butter);
}

/* Ticket-stub labels: short uppercase text on a red gradient. Never used for paragraphs. */
.label {
  display: inline-block;
  justify-self: start;
  align-self: start;
  width: fit-content;
  padding: 0.2rem 0.55rem 0.18rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-button);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-ui);
  line-height: 1.3;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text);
}

.muted {
  color: var(--color-text-muted);
}

.placeholder-text {
  text-decoration: underline dashed var(--color-text-subtle);
  text-underline-offset: 0.25em;
}


/* ./layout.css */
.page-width {
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reading-width {
  width: 100%;
  max-width: calc(var(--width-reading) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-xl);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-line-strong);
}

.section-head h2 {
  font-size: var(--text-xl);
}

.section-head__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}

.section-head__link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.page-intro {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-lg);
}

.page-intro h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

.page-intro__lede {
  margin-top: var(--space-sm);
  max-width: 38rem;
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.stack > * + * {
  margin-top: var(--space-sm);
}


/* ./components/navigation.css */
/* Site header */
.site-header {
  position: relative;
  background: linear-gradient(180deg, rgb(13 10 11 / 0.9), rgb(13 10 11 / 0.55));
}

/* A thin red glow along the bottom edge, like light under a cinema door */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-red) 30%, var(--color-red) 70%, transparent);
  opacity: 0.7;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-lg);
  padding-block: var(--space-sm);
}

/* Logo: owner-supplied marquee artwork (design/talkingtv-logo.png, resized by `npm run brand`) */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text);
  text-decoration: none;
}

.wordmark__logo {
  width: auto;
  height: 3.5rem;
}

.wordmark__tag {
  max-width: 9rem;
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--color-text-muted);
}

.wordmark:hover .wordmark__logo {
  filter: brightness(1.12);
}

@media (max-width: 30rem) {
  .wordmark__logo {
    height: 2.5rem;
  }

  .wordmark__tag {
    display: none;
  }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--color-text);
}

.site-nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-red);
}

.site-nav .site-nav__subscribe {
  padding-inline: var(--space-sm);
  border: 0;
  border-radius: 999px;
  background: var(--gradient-button);
  color: var(--color-text);
}

.site-nav .site-nav__subscribe:hover {
  background: var(--gradient-button-hover);
}

@media (max-width: 30rem) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav ul {
    gap: var(--space-3xs) var(--space-sm);
  }
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: var(--space-2xs);
  color: var(--color-text-subtle);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-text);
}

/* Site footer: the red fades back into the dark, like house lights going down */
.site-footer {
  margin-top: var(--space-2xl);
  padding-block: var(--space-xl) var(--space-lg);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-oxblood) 100%);
  border-top: 1px solid var(--color-line);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48rem) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.site-footer__brand {
  display: grid;
  gap: var(--space-2xs);
}

.site-footer__logo {
  width: auto;
  height: 2.25rem;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-text);
}

.site-footer__small {
  grid-column: 1 / -1;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

/* Development banner: only rendered in demo mode */
.dev-banner {
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-butter);
  font-size: var(--text-xs);
  color: var(--color-text);
}

.dev-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-md);
  padding-block: var(--space-2xs);
}

.dev-banner__text {
  flex: 1 1 20rem;
}

.dev-banner__text strong {
  color: var(--color-butter);
  font-weight: 600;
}

.dev-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-sm);
}

.dev-banner label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
}

.dev-banner button {
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: var(--border-control);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.dev-banner button:hover {
  border-color: var(--color-text);
}


/* ./components/forms.css */
/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--color-velvet);
  border-radius: 999px;
  background: var(--gradient-button);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  line-height: 1.2;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
  transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.button:hover {
  background: var(--gradient-button-hover);
  border-color: var(--color-red);
  box-shadow: var(--glow-red), inset 0 1px 0 rgb(255 255 255 / 0.18);
  color: var(--color-text);
}

.button--secondary {
  background: transparent;
  border-color: var(--color-control-border);
  box-shadow: none;
}

.button--secondary:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-text);
}

.button--quiet {
  min-height: 2.5rem;
  padding-inline: var(--space-xs);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--color-text-muted);
}

.button--quiet:hover {
  background: var(--color-surface-raised);
  border-color: transparent;
  color: var(--color-text);
}

.button--danger {
  background: transparent;
  box-shadow: none;
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.button--danger:hover {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
  color: var(--color-text);
}

.button--small {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: var(--text-xs);
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Fields */
.field {
  display: grid;
  gap: var(--space-3xs);
}

.field + .field {
  margin-top: var(--space-sm);
}

.field label,
.field-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.field-optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg);
  border: var(--border-control);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.4;
}

.textarea {
  min-height: 8rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--color-text-muted);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-text-muted);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.field-error {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-danger);
}

.field-error:empty {
  display: none;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  font-size: var(--text-sm);
}

.checkbox input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  accent-color: var(--color-crimson);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

/* Honeypot: hidden from people, visible to naive bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Form status messages */
.form-status {
  font-size: var(--text-sm);
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.form-status[data-tone="success"] {
  color: var(--color-success);
}

.form-status[data-tone="error"] {
  color: var(--color-danger);
}

.form-status[data-tone="info"] {
  color: var(--color-text-muted);
}

.notice {
  padding: var(--space-xs) var(--space-sm);
  border-left: 3px solid var(--color-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.notice--danger {
  border-left-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.notice p + p {
  margin-top: var(--space-2xs);
}

/* Segmented filter built from native radio inputs */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: var(--border-control);
  border-radius: 999px;
  background: var(--color-surface);
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}


.segmented input:checked + span {
  background: var(--gradient-button);
  color: var(--color-text);
  font-weight: 600;
}

.segmented input:hover:not(:checked) + span {
  color: var(--color-text);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Loading indicator text; animation is optional and short */
.loading {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ./components/review-card.css */
/* Image frames and the placeholder used when no permitted image exists */
.frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--frame-ratio, 3 / 2);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame--wide {
  --frame-ratio: 16 / 9;
}

/* Placeholder: a dim red screen with a soft glow, clearly waiting for an image */
.frame--empty {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(0.75rem, 4%, 1.5rem);
  background:
    radial-gradient(90% 70% at 50% 0%, rgb(224 69 75 / 0.22), transparent 70%),
    linear-gradient(180deg, var(--color-wine) 0%, var(--color-oxblood) 55%, var(--color-surface) 100%);
  border: 1px solid var(--color-line);
}

.frame__placeholder-title {
  font-size: clamp(1rem, 0.6rem + 3cqi, 2.2rem);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.05;
  color: var(--color-text-muted);
  overflow-wrap: break-word;
}

.frame__placeholder-note {
  margin-top: var(--space-3xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Story: a title link whose hit area covers the whole item */
.story {
  position: relative;
  display: grid;
  gap: var(--space-xs);
  align-content: start;
}

.story__title {
  font-size: var(--text-lg);
  line-height: 1.12;
}

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

.story__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.story:hover .story__title a {
  text-decoration: underline;
  text-decoration-color: var(--color-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.story:hover .frame {
  box-shadow: var(--glow-red);
}

.story__title a:focus-visible {
  outline: none;
}

.story__title a:focus-visible::after {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.story__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-xs);
}

.story__excerpt {
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.story__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.story__meta > * + *::before {
  content: "·";
  margin-inline: 0.45em;
  color: var(--color-text-subtle);
}

.story__work {
  font-weight: var(--weight-ui);
}

.story--lead .story__title {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}

.story--lead .story__excerpt {
  font-size: var(--text-lg);
  max-width: 36rem;
}

/* Horizontal row used in the archive */
.story--row {
  grid-template-columns: minmax(6.5rem, 30%) 1fr;
  gap: var(--space-sm) var(--space-md);
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-line);
}

.story--row .frame {
  grid-row: span 4;
}

@media (max-width: 30rem) {
  .story--row {
    grid-template-columns: 1fr;
  }

  .story--row .frame {
    grid-row: auto;
  }
}

.spoiler-flag {
  font-size: var(--text-xs);
  font-weight: var(--weight-ui);
  color: var(--color-text-muted);
}

.spoiler-flag[data-level="full"] {
  color: var(--color-link);
}


/* ./components/newsletter.css */
/* Newsletter: a velvet-red band, the loudest red on the page after the curtain */
.newsletter {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--space-md) var(--space-xl);
  margin-block: var(--space-xl) 0;
  padding: var(--space-lg) clamp(var(--space-sm), 4vw, var(--space-xl));
  border-radius: var(--radius-lg);
  background: var(--curtain-folds), var(--gradient-velvet);
  box-shadow: 0 1.5rem 4rem rgb(142 27 36 / 0.25);
}

@media (min-width: 56rem) {
  .newsletter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.newsletter__intro {
  display: grid;
  gap: var(--space-2xs);
}

.newsletter__intro h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}

.newsletter__intro p:not(.label) {
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-text);
}

.newsletter .label {
  background: var(--color-bg);
}

/* The form sits on a dark panel so muted text, links and borders keep their contrast */
.newsletter-form {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: rgb(13 10 11 / 0.82);
}

.newsletter-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.newsletter-form__row .input {
  flex: 1 1 14rem;
  width: auto;
}

.newsletter-form .notice {
  background: var(--color-surface);
}


/* ./components/comments.css */
.comments h2 {
  font-size: var(--text-xl);
}

.comments__intro {
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.comment-list {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}

.comment {
  padding-block: var(--space-md);
  border-top: var(--border-hair);
}

.comment:last-child {
  border-bottom: var(--border-hair);
}

.comment__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3xs) var(--space-xs);
  font-size: var(--text-sm);
}

.comment__name {
  font-weight: 600;
  color: var(--color-text);
}

.comment__date {
  color: var(--color-text-muted);
}

.comment__body {
  margin-top: var(--space-2xs);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.comment__body p + p {
  margin-top: 0.75em;
}

.comment-form {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-surface);
  border: var(--border-hair);
}

.comment-form h3 {
  font-size: var(--text-lg);
}

.comment-form .field + .field {
  margin-top: 0;
}

.comment-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
}

.char-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.char-count[data-over="true"] {
  color: var(--color-danger);
  font-weight: 600;
}


/* ./components/article.css */
/* Long-form reading text, used by published reviews and the editor preview */
.prose {
  font-family: var(--font-sans);
  font-size: var(--text-reading);
  font-weight: var(--weight-reading);
  line-height: var(--leading-reading);
  color: var(--color-text);
  hanging-punctuation: first;
  overflow-wrap: break-word;
}

.prose > * {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: var(--text-xl);
  line-height: 1.2;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--text-lg);
  line-height: 1.25;
}

.prose h4 {
  margin-top: 1.6em;
  font-size: var(--text-lg);
  font-weight: var(--weight-display-semi);
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.6em;
}

.prose strong {
  font-weight: 700;
}

.prose a {
  color: var(--color-link);
}

.prose a:hover {
  color: var(--color-text);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose li::marker {
  color: var(--color-red);
}

/* Pull quotes: big, condensed and loud, with a red bar */
.prose blockquote {
  margin-block: 1.6em;
  padding-left: 0.9em;
  border-left: 4px solid var(--color-red);
  font-family: var(--font-display);
  font-size: 1.45em;
  font-weight: var(--weight-display-semi);
  line-height: 1.2;
  color: var(--color-text);
}

.prose hr {
  width: 4rem;
  margin: 2.5em 0;
  border: 0;
  border-top: 2px solid var(--color-red);
}

.prose code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.85em;
}

.prose pre {
  overflow-x: auto;
  padding: var(--space-sm);
  background: var(--color-surface);
}

/* Inline figures may extend beyond the reading column on wide screens */
.article-figure {
  max-width: none !important;
  margin-block: 2em;
}

.article-figure img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  background: var(--color-surface);
}

.article-figure--portrait img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  margin-inline: auto;
}

.article-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 0.75em;
  margin-top: var(--space-2xs);
  max-width: var(--measure);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.article-figure__credit {
  color: var(--color-text-subtle);
}

.article-figure--missing {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border: var(--border-hair);
}

.article-figure__missing {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (min-width: 64rem) {
  .review-body--wide-figures .article-figure:not(.article-figure--portrait) {
    width: min(var(--width-wide), 100vw - 2 * var(--gutter));
    margin-left: calc((min(var(--width-wide), 100vw - 2 * var(--gutter)) - 100%) / -2);
  }
}


/* ./pages/home.css */
/* Featured review: the signature. A velvet curtain panel with the cover as a lit screen. */
.home-feature {
  padding-top: var(--space-md);
  padding-bottom: var(--space-lg);
}

.feature {
  position: relative;
  display: grid;
  gap: var(--space-md) var(--space-xl);
  align-items: center;
  padding: clamp(var(--space-sm), 3vw, var(--space-xl));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 45% at 50% 0%, rgb(255 190 170 / 0.12), transparent 70%),
    var(--curtain-folds),
    var(--gradient-velvet);
  box-shadow: 0 2rem 5rem rgb(142 27 36 / 0.3);
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.feature .frame {
  --frame-ratio: 16 / 9;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 0 3.5rem rgb(224 69 75 / 0.35);
}

.feature__body {
  display: grid;
  gap: var(--space-sm);
}

.feature__title {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

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

.feature__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}

.feature:hover .feature__title a {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.12em;
}

.feature__title a:focus-visible {
  outline: none;
}

.feature__title a:focus-visible::after {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

/* All text on the curtain uses full-strength off-white: muted greys drop too close to 4.5:1 on velvet */
.feature__excerpt {
  max-width: 36rem;
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-text);
}

.feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.feature__meta span + span::before {
  content: "·";
  margin-inline: 0.5em;
}

.feature .label {
  background: var(--color-bg);
}

/* Latest: one lead story beside a column of shorter entries */
.latest {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 56rem) {
  .latest {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-xl);
  }
}

.latest__list {
  display: grid;
  align-content: start;
}

.latest__list .story {
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-line);
}

.latest__list .story:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 55.99rem) {
  .latest__list .story:first-child {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-line);
  }
}

/* Browse by type: two dim red screens that light up on hover */
.browse {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 40rem) {
  .browse {
    grid-template-columns: 1fr 1fr;
  }
}

.browse__item {
  position: relative;
  display: grid;
  gap: var(--space-2xs);
  min-height: 11rem;
  align-content: end;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 90% at 0% 100%, rgb(224 69 75 / 0.25), transparent 70%),
    var(--gradient-wine);
  color: var(--color-text);
  text-decoration: none;
  transition: box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.browse__item:hover {
  border-color: var(--color-red);
  box-shadow: var(--glow-red);
  color: var(--color-text);
}

.browse__title {
  font-size: var(--text-3xl);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.browse__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Author introduction */
.author-intro {
  display: grid;
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  max-width: 52rem;
}

@media (min-width: 40rem) {
  .author-intro {
    grid-template-columns: 10rem 1fr;
  }
}

.author-intro__portrait {
  --frame-ratio: 4 / 5;
  max-width: 10rem;
}

.author-intro__text {
  display: grid;
  gap: var(--space-xs);
}

.author-intro__text h2 {
  font-size: var(--text-xl);
}

.author-intro__text p:not(.label) {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-text-muted);
}


/* ./pages/review.css */
/* The review opens under a red glow, then the reading column stays dark and calm */
.review {
  position: relative;
}

.review::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 38rem;
  z-index: -1;
  background: radial-gradient(90% 70% at 50% 0%, rgb(142 27 36 / 0.45), rgb(74 17 25 / 0.2) 45%, transparent 75%);
  pointer-events: none;
}

.review-header {
  display: grid;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.review-title {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

.review-standfirst {
  max-width: 40rem;
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.review-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin-top: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: rgb(26 16 18 / 0.85);
  border: 1px solid var(--color-line);
  font-size: var(--text-sm);
}

.review-facts div {
  display: grid;
  gap: 0.1rem;
}

.review-facts dt {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.review-facts dd {
  font-weight: var(--weight-ui);
  color: var(--color-text);
}

.review-facts [data-level="full"] {
  color: var(--color-link);
}

.review-cover {
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.review-cover .frame {
  box-shadow: 0 0 4rem rgb(224 69 75 / 0.22);
}

.review-cover figcaption {
  margin-top: var(--space-2xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.review-body {
  padding-top: var(--space-lg);
}

.review-body > * + * {
  margin-top: var(--space-lg);
}

.spoiler-notice {
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-red);
  border-radius: var(--radius-md);
  background: var(--color-oxblood);
}

.spoiler-notice__title {
  font-weight: 700;
  color: var(--color-text);
}

.spoiler-notice p:not(.spoiler-notice__title) {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.fixture-note {
  font-size: var(--text-xs);
}

/* Verdict: a velvet card */
.verdict {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--curtain-folds), var(--gradient-velvet);
}

.verdict .label {
  background: var(--color-bg);
}

.verdict__text {
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: var(--weight-display-semi);
  line-height: 1.15;
}

.verdict__score {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--color-text);
}

/* Score dots in popcorn butter */
.score-marks {
  display: inline-flex;
  gap: 5px;
}

.score-marks i {
  width: 0.95rem;
  height: 0.95rem;
  border: 1.5px solid var(--color-butter);
  border-radius: 50%;
}

.score-marks i[data-fill="full"] {
  background: var(--color-butter);
}

.score-marks i[data-fill="half"] {
  background: linear-gradient(90deg, var(--color-butter) 50%, transparent 50%);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-xs);
}

.tag-list li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  color: var(--color-text-muted);
}

/* Like */
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  padding-block: var(--space-lg);
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: var(--border-control);
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
}

.like-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.like-button:hover {
  border-color: var(--color-text);
}

.like-button[aria-pressed="true"] {
  border-color: var(--color-velvet);
  background: var(--gradient-button);
  box-shadow: var(--glow-red);
}

.like-button[aria-pressed="true"] svg {
  fill: var(--color-text);
  stroke: var(--color-text);
}

.like-button[aria-busy="true"] {
  cursor: progress;
}

.like-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.review-after > section {
  padding-block: var(--space-xl) 0;
}

.related-list {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48rem) {
  .related-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.review-missing {
  padding-block: var(--space-2xl);
}

.review-missing h1 {
  font-size: var(--text-2xl);
}

.review-missing p {
  margin-top: var(--space-sm);
}


/* ./pages/archive.css */
.archive-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-sm);
  border-top: 1px solid var(--color-line-strong);
  border-bottom: var(--border-hair);
}

.archive-search {
  display: flex;
  flex: 1 1 18rem;
  max-width: 28rem;
  gap: var(--space-2xs);
}

.archive-search .input {
  flex: 1;
  min-width: 0;
}

.archive-summary {
  margin-top: var(--space-md);
}

.archive-results {
  max-width: var(--width-wide);
}

.archive-results .story--row .story__title {
  font-size: var(--text-xl);
}

.archive-results[aria-busy="true"] .story {
  opacity: 0.6;
}

.archive-empty {
  padding-block: var(--space-xl);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
}

.archive-empty p + p {
  margin-top: var(--space-2xs);
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

.archive-more {
  padding-top: var(--space-lg);
}


/* ./pages/prose.css */
/* About, Privacy, Community and 404 */
/* Information pages: DM Sans at interface size rather than review reading size */
.static-prose {
  padding-bottom: var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
}

.static-prose h2 {
  scroll-margin-top: var(--space-lg);
}

.owner-flag {
  margin-bottom: var(--space-lg);
}

.about-layout {
  display: grid;
  gap: 0 var(--space-xl);
}

@media (min-width: 56rem) {
  .about-layout {
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 42rem);
    align-items: start;
  }

  .about-layout__portrait {
    position: sticky;
    top: var(--space-lg);
    padding-top: var(--space-xl);
  }
}

.about-portrait {
  --frame-ratio: 4 / 5;
  max-width: 18rem;
  margin-top: var(--space-lg);
}

.not-found {
  display: grid;
  gap: var(--space-sm);
  padding-block: var(--space-2xl);
}

.not-found h1 {
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

.not-found__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: var(--space-sm) 0 0;
  padding: 0;
  list-style: none;
}


/* ./pages/admin.css */
/* Owner area: a quieter, denser working interface on the same tokens */
.admin-header {
  border-bottom: var(--border-hair);
  background: var(--color-surface);
}

.admin-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-lg);
  padding-block: var(--space-xs);
}

.admin-header .wordmark__logo {
  height: 2.5rem;
}

.admin-header .wordmark__tag {
  display: block;
}

.admin-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  padding-block: var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.admin-nav a:hover {
  color: var(--color-text);
}

.admin-nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-red);
}

.count-badge {
  min-width: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--gradient-button);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
}

.admin-main {
  padding-block: var(--space-lg) var(--space-2xl);
}

.admin-main h1 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
}

.admin-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.admin-summary {
  margin-top: var(--space-2xs);
  color: var(--color-text-muted);
}

.admin-filter {
  margin-block: var(--space-md) var(--space-sm);
}

/* Sign in */
.admin-login {
  max-width: 28rem;
  display: grid;
  gap: var(--space-md);
  padding-top: var(--space-lg);
}

.admin-login__form {
  display: grid;
  gap: var(--space-sm);
}

.admin-login__form .field + .field {
  margin-top: 0;
}

.admin-login__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.admin-login .input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--color-line-strong);
}

.admin-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.admin-table th,
.admin-table td {
  padding: var(--space-xs) var(--space-xs) var(--space-xs) 0;
  border-bottom: var(--border-hair);
  text-align: left;
  vertical-align: top;
}

.admin-table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.admin-table tbody th {
  font-weight: 400;
  width: 42%;
}

.admin-table__title {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

.admin-table__title:hover {
  text-decoration: underline;
}

.admin-table__work {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-text-muted);
}

.admin-table__actions {
  white-space: nowrap;
}

.admin-table__actions > * + * {
  margin-left: var(--space-3xs);
}

.status-pill {
  display: inline-block;
  margin: 0 var(--space-3xs) var(--space-3xs) 0;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.status-pill--published {
  border-color: var(--color-success);
  color: var(--color-success);
}

.status-pill--featured,
.status-pill--pending {
  border-color: var(--color-butter);
  color: var(--color-butter);
}

.status-pill--rejected {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* Editor */
.editor-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-xs) var(--gutter);
  background: var(--color-bg);
  border-bottom: var(--border-hair);
}

.editor-bar__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-sm);
  font-size: var(--text-sm);
}

.save-state {
  color: var(--color-text-muted);
}

.save-state[data-tone="error"] {
  color: var(--color-danger);
  font-weight: 600;
}

.save-state[data-tone="success"] {
  color: var(--color-success);
}

.save-state[data-tone="warning"] {
  color: var(--color-warning);
}

.editor-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.editor-layout {
  display: grid;
  gap: var(--space-lg);
  padding-top: var(--space-md);
}

@media (min-width: 70rem) {
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-items: start;
  }

  .editor-side {
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 5.5rem);
    overflow-y: auto;
    padding-right: var(--space-2xs);
  }
}

.editor-main {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
}

.title-input {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-display);
  line-height: 1.15;
}

.editor-panel {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border: var(--border-hair);
}

.editor-panel + .editor-panel {
  margin-top: var(--space-sm);
}

.editor-panel h2 {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
}

.editor-panel .field + .field {
  margin-top: 0;
}

.editor-panel .input,
.editor-panel .textarea,
.editor-panel .select {
  background: var(--color-bg);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-size: var(--text-sm);
}

.radio-row input {
  accent-color: var(--color-crimson);
}

.slug-field {
  display: flex;
  align-items: stretch;
}

.slug-field__prefix {
  display: flex;
  align-items: center;
  padding-inline: var(--space-2xs);
  border: var(--border-control);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.slug-field .input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  min-width: 0;
}

/* Writing area */
.write-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  border-bottom: var(--border-hair);
}

.write-tabs [role="tablist"] {
  display: flex;
}

.write-tabs [role="tab"] {
  padding: var(--space-2xs) var(--space-sm);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.write-tabs [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--color-red);
  color: var(--color-text);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: var(--space-3xs);
  background: var(--color-surface);
  border: var(--border-control);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.toolbar button {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.55rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.toolbar button:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-line-strong);
}

.toolbar__sep {
  width: 1px;
  margin: 0.3rem 0.2rem;
  background: var(--color-line-strong);
}

.body-input {
  min-height: 60vh;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.65;
  tab-size: 2;
}

.preview-frame {
  margin-inline: auto;
  padding-block: var(--space-md) var(--space-xl);
  border: var(--border-hair);
  background: var(--color-bg);
  transition: max-width var(--duration-base) var(--ease-out);
}

/* Fluid type is viewport-based, so pin the phone-size values inside the mobile preview */
.preview-frame[data-width="mobile"] {
  max-width: 390px;
  --text-reading: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.125rem;
  --gutter: 1rem;
}

.preview-frame .review-header,
.preview-frame .review-body {
  max-width: 100%;
}

.preview-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Cover and inline image panels */
.cover-preview {
  display: grid;
  gap: var(--space-2xs);
}

.cover-preview .frame {
  --frame-ratio: 16 / 9;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.range-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3rem;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--text-xs);
}

.range-row input {
  accent-color: var(--color-crimson);
}

.inline-images {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.inline-images li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-2xs);
  align-items: center;
  padding: var(--space-2xs);
  border: var(--border-hair);
  font-size: var(--text-xs);
}

.inline-images .frame {
  --frame-ratio: 1;
}

.inline-images__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.danger-zone {
  border-color: var(--color-danger);
}

/* Dialog */
.dialog {
  width: min(44rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line-strong);
  color: var(--color-text);
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.7);
}

.dialog__inner {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-md);
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.dialog__header h2 {
  font-size: var(--text-xl);
}

.dialog .field + .field {
  margin-top: 0;
}

.dialog form {
  display: grid;
  gap: var(--space-sm);
}

/* Media library */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}

.media-card {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
  padding: var(--space-xs);
  background: var(--color-surface);
  border: var(--border-hair);
}

.media-card form {
  display: grid;
  gap: var(--space-xs);
}

.media-card .field + .field {
  margin-top: 0;
}

.media-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: var(--space-xs);
  max-height: 22rem;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.picker-grid label {
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-3xs);
  border: 2px solid transparent;
  font-size: var(--text-xs);
  cursor: pointer;
}

.picker-grid input {
  position: absolute;
  opacity: 0;
}

.picker-grid input:checked + .frame {
  outline: 2px solid var(--color-butter);
  outline-offset: 2px;
}

.picker-grid input:focus-visible + .frame {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.picker-grid .frame {
  --frame-ratio: 1;
}

/* Moderation */
.moderation-list {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}

.moderation-item {
  display: grid;
  gap: var(--space-2xs);
  padding-block: var(--space-md);
  border-top: var(--border-hair);
}

.moderation-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.moderation-item__name {
  font-weight: 600;
  color: var(--color-text);
}

.moderation-item__body {
  max-width: var(--measure);
  font-family: var(--font-sans);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--space-2xs) 0;
  background: var(--color-surface-raised);
  border-bottom: 1px solid var(--color-red);
  font-size: var(--text-sm);
}

.preview-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-md);
}

.picker-preview {
  width: auto;
  max-height: 12rem;
  border: var(--border-hair);
}


