/*
 * 10 Minutes Scramble public text site.
 *
 * Show-specific local style. Typography, contrast, focus and reflow follow
 * the guidance of the Digital Agency Design System (DADS); no DADS code,
 * token file or asset is copied. System fonts only: the CSP allows no font
 * source, and nothing here may reference another resource (no url()).
 * Text colours on every background keep a contrast ratio of at least 4.5:1
 * (most combinations exceed 7:1).
 */

:root {
  color-scheme: light;
  --ink: #1a1c24;
  --ink-muted: #474c5c;
  --navy: #1f2a44;
  --paper: #ffffff;
  --paper-warm: #fbf8f3;
  --line: #d4d7de;
  --link: #0a3fa8;
  --link-visited: #5b2a86;
  --link-hover: #062a73;
  --focus: #ffd43d;
  --blue-soft: #e3eefb;
  --coral-soft: #fde6dc;
  --mint-soft: #ddf3e8;
  --gray-soft: #eceef2;
  --blue-edge: #4f7fc4;
  --coral-edge: #d9774f;
  --mint-edge: #3e9a6c;
  --gray-edge: #7a8090;
  /* Persona identities: pastel tile, icon accent (the stroke colour fixed in
   * each pinned icon, at least 3:1 on its tile and on white) and a darker ink
   * for the name (at least 4.5:1 on the tile and on white). The accents are
   * too light for body text and are never used as text colour. */
  --kotoha-tile: #e5effb;
  --kotoha-accent: #426fad;
  --kotoha-ink: #3b659e;
  --shiori-tile: #fbe7e7;
  --shiori-accent: #b76b77;
  --shiori-ink: #93505f;
  --ayumu-tile: #e6f3e9;
  --ayumu-accent: #568a70;
  --ayumu-ink: #3b7057;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI",
    "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  line-break: strict;
  overflow-wrap: anywhere;
}

main,
.site-header,
.site-footer {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

main {
  padding-block: 1.5rem 3rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-block: 2rem 0.75rem;
}

h1 {
  font-size: 1.75rem;
  margin-top: 1rem;
}

h2 {
  font-size: 1.375rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--line);
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

p,
ul,
ol {
  margin-block: 0 1rem;
}

ul,
ol {
  padding-inline-start: 1.5rem;
}

li + li {
  margin-top: 0.375rem;
}

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

a:visited {
  color: var(--link-visited);
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  background: var(--focus);
  color: var(--ink);
  text-decoration: none;
}

/* Skip link: visible only while focused. */
.skip-link {
  margin: 0;
}

.skip-link a {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  padding: 0.5rem 1rem;
  background: var(--focus);
  color: var(--ink);
  z-index: 10;
}

.skip-link a:focus {
  top: 0.5rem;
}

/* Site header and footer */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
  border-bottom: 4px solid var(--navy);
}

.site-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.4;
}

.site-title a,
.site-title a:visited {
  color: var(--navy);
  text-decoration: none;
}

.site-subtitle {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.site-nav ul,
.site-footer ul,
.page-tabs ul,
.year-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li,
.site-footer li + li,
.page-tabs li + li,
.year-nav li + li {
  margin-top: 0;
}

.site-nav a,
.site-footer a {
  display: inline-block;
  padding-block: 0.25rem;
}

[aria-current="page"] {
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
  text-decoration-thickness: 3px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.75rem 0 0;
}

/* Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.breadcrumb li + li {
  margin-top: 0;
}

.breadcrumb li + li::before {
  content: "\203A";
  padding-inline: 0.5rem;
  color: var(--ink-muted);
}

/* Episode header */
.episode-meta {
  color: var(--ink-muted);
}

.episode-meta time {
  font-weight: 700;
  color: var(--ink);
}

.episode-show {
  display: block;
  font-size: 0.875rem;
}

.page-tabs {
  margin-block: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-tabs a {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  min-height: 2.75rem;
}

.page-tabs a[aria-current="page"],
.page-tabs a[aria-current="page"]:visited {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 4px solid var(--navy);
}

/* Home */
.hero {
  background: var(--paper-warm);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

/* The approved cover, shown as is (no crop, filter or frame). The width and
 * height attributes reserve its square box before it loads; here only the
 * displayed size is bounded. Side by side with the lead where there is room,
 * otherwise the lead wraps below it: no breakpoint, so 200 % zoom and narrow
 * screens reflow without horizontal scrolling. */
.hero-cover {
  display: block;
  flex: none;
  width: 10rem;
  max-width: 100%;
  height: auto;
}

.hero .lead {
  flex: 1 1 15rem;
  min-width: 0;
}

/* The header already shows the show title and subtitle: the Home heading
 * stays in the document outline for screen readers but is not drawn twice.
 * Not display: none, which would remove it from the accessibility tree. */
.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.lead {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.latest-date {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Link cards */
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.cards li + li {
  margin-top: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--paper);
}

.card a {
  font-weight: 700;
  font-size: 1.0625rem;
}

.card-primary {
  border: 2px solid var(--navy);
  background: var(--blue-soft);
}

.card-note,
.item-note {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

h2 .item-note {
  display: inline;
  margin-left: 0.75rem;
  font-weight: 400;
}

/* Date lists (Home briefs, year pages) and month lists */
.date-list,
.month-list,
.theme-list,
.channel-list {
  list-style: none;
  padding: 0;
}

.date-list li,
.theme-list li {
  border-bottom: 1px solid var(--line);
  padding-block: 0.5rem;
  margin: 0;
}

.month-list {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
}

.month-list li + li {
  margin-top: 0;
}

.month-list .item-note {
  display: inline;
  margin-left: 0.25rem;
}

.more summary {
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.more summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  background: var(--focus);
  color: var(--ink);
}

/* Tables of contents */
.toc {
  background: var(--paper-warm);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-block: 1rem 1.5rem;
}

.toc ol {
  margin: 0;
}

/* Badges: colour is never the only cue, every badge has its own words. */
.badge {
  display: inline-block;
  margin-inline: 0.5rem;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--gray-edge);
  background: var(--gray-soft);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  text-decoration: none;
}

.badge-deep-dive,
.status-answered {
  border-color: var(--mint-edge);
  background: var(--mint-soft);
}

.badge-headline,
.status-partial {
  border-color: var(--blue-edge);
  background: var(--blue-soft);
}

.badge-not-aired,
.status-unanswered {
  border-color: var(--coral-edge);
  background: var(--coral-soft);
}

.aired-note .badge,
.question-status .badge {
  margin-left: 0;
}

/* About */
/* The production disclosure follows the show introduction under the same
 * heading, set apart by a rule instead of a heading of its own. */
p:not(.disclosure) + .disclosure {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.disclosure {
  color: var(--ink-muted);
}

/* Profiles: icon tile, then name and text. One column at every width; the
 * tile keeps its size and the text reflows, so 200 % zoom and 320 CSS px
 * need no horizontal scrolling. */
.personas {
  list-style: none;
  padding: 0;
}

.persona {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gray-edge);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--paper);
}

.personas li + li {
  margin-top: 0.75rem;
}

.persona-tile {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--gray-soft);
}

.persona-icon {
  display: block;
  width: 2rem;
  height: 2rem;
}

.persona h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}

.persona p {
  margin: 0;
}

.persona-kotoha {
  border-left-color: var(--kotoha-accent);
}

.persona-kotoha .persona-tile {
  background: var(--kotoha-tile);
}

.persona-kotoha h3 {
  color: var(--kotoha-ink);
}

.persona-shiori {
  border-left-color: var(--shiori-accent);
}

.persona-shiori .persona-tile {
  background: var(--shiori-tile);
}

.persona-shiori h3 {
  color: var(--shiori-ink);
}

.persona-ayumu {
  border-left-color: var(--ayumu-accent);
}

.persona-ayumu .persona-tile {
  background: var(--ayumu-tile);
}

.persona-ayumu h3 {
  color: var(--ayumu-ink);
}

/* Production flow: groups stacked top to bottom with a chevron between
 * them, steps numbered 1-6 across the groups and side by side where they
 * fit. The chevron is drawn with borders (no text for screen readers to
 * announce); the list structure carries the order. */
.flow {
  list-style: none;
  padding: 0;
  counter-reset: flow-step;
}

.flow-group {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  background: var(--paper-warm);
}

.flow-group + .flow-group {
  margin-top: 2.25rem;
}

.flow-group + .flow-group::before {
  content: "";
  position: absolute;
  top: -1.75rem;
  left: 50%;
  width: 0.875rem;
  height: 0.875rem;
  margin-left: -0.4375rem;
  border-right: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
  transform: rotate(45deg);
}

.flow-group-name {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--navy);
}

.flow-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.flow-steps li + li {
  margin-top: 0;
}

.flow-step {
  counter-increment: flow-step;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  font-size: 0.9375rem;
}

.flow-step-title {
  display: block;
  color: var(--navy);
}

.flow-step-title::before {
  content: counter(flow-step) ". ";
}

.note-links {
  list-style: none;
  padding: 0;
}

/* Transcript: the persona's bar, then icon tile and name on their own
 * line, then the text. Colours are those of the About profiles, fixed per
 * persona; a speaker label of no persona keeps the neutral bar and no icon.
 * The name may wrap beside the tile, which never shrinks, so 320 CSS px and
 * 200 % zoom need no horizontal scrolling. */
.utterance {
  border-left: 4px solid var(--gray-edge);
  padding: 0.25rem 0 0.25rem 0.75rem;
  margin-bottom: 1rem;
}

.speaker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--navy);
}

.speaker-tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: var(--gray-soft);
}

.speaker-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.utterance .separator {
  display: none;
}

.speaker-kotoha {
  border-left-color: var(--kotoha-accent);
}

.speaker-kotoha .speaker-tile {
  background: var(--kotoha-tile);
}

.speaker-kotoha .speaker {
  color: var(--kotoha-ink);
}

.speaker-shiori {
  border-left-color: var(--shiori-accent);
}

.speaker-shiori .speaker-tile {
  background: var(--shiori-tile);
}

.speaker-shiori .speaker {
  color: var(--shiori-ink);
}

.speaker-ayumu {
  border-left-color: var(--ayumu-accent);
}

.speaker-ayumu .speaker-tile {
  background: var(--ayumu-tile);
}

.speaker-ayumu .speaker {
  color: var(--ayumu-ink);
}

/* Sources */
.story {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.25rem 1rem 0.25rem;
  margin-bottom: 1rem;
}

.story h3 {
  margin-top: 0.75rem;
}

.source-list li,
.source-numbers li {
  margin-bottom: 0.5rem;
}

.source-meta {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Research Brief */
.research-entry {
  border-top: 4px solid var(--navy);
  margin-top: 2.5rem;
}

.research-entry > h2 {
  border-bottom: 0;
}

.aired-note {
  background: var(--paper-warm);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.question {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.question h4 {
  margin-top: 0.75rem;
}

.label {
  color: var(--navy);
}

.gap {
  color: var(--ink-muted);
}

.findings li {
  margin-bottom: 0.5rem;
}

.basis,
.cite {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.cite a {
  padding-inline: 0.125rem;
}

.dispute {
  border-left: 4px solid var(--coral-edge);
  padding-left: 0.75rem;
}

.source-numbers li:target {
  background: var(--focus);
}

.to-top {
  font-size: 0.875rem;
  text-align: right;
}

@media (min-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }

  h1 {
    font-size: 2rem;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .page-tabs,
  .site-footer nav {
    display: none;
  }
}
