@charset "UTF-8";

/*
 * Mobile V3
 * A standalone mobile-first rendering system. This file is the only stylesheet
 * loaded at 680px and below; desktop CSS and data behaviour remain untouched.
 */

:root {
  --m-navy-950: #071426;
  --m-navy-900: #0a1b30;
  --m-navy-800: #112943;
  --m-paper: #f7f0e2;
  --m-paper-light: #fffaf1;
  --m-paper-soft: #fdfaf5;
  --m-paper-deep: #e9ddc6;
  --m-ink: #10243f;
  --m-ink-body: #29323a;
  --m-ink-soft: #6d6c66;
  --m-gold: #bd9652;
  --m-gold-bright: #dfc47e;
  --m-line: #d9c49d;
  --m-line-soft: #eadcc2;
  --m-red: #a51f1d;
  --m-red-dark: #851916;
  --m-red-soft: #f4dfda;
  --m-green: #55725b;
  --m-green-soft: #e5efe5;
  --m-focus: #f3cf79;
  --m-shell: clamp(5px, 1.4vw, 10px);
  --m-content: clamp(14px, 4.1vw, 20px);
  --m-radius-paper: 8px;
  --m-radius-card: 7px;
  --m-font-sans:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC",
    sans-serif;
  --m-font-serif:
    "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun",
    serif;
  --m-font-number: Georgia, "Times New Roman", serif;
  color-scheme: light;
  font-family: var(--m-font-sans);
  font-synthesis: weight style;
  text-rendering: optimizeLegibility;
}

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

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--m-navy-950);
}

body.exam-archive-app {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--m-ink);
  background: var(--m-navy-950);
  font-family: var(--m-font-sans);
}

body.is-dialog-open {
  overflow: hidden;
}

body.is-completion-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a,
summary,
label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
summary,
label {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.is-hidden {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: -120px;
  left: max(12px, env(safe-area-inset-left));
  min-height: 44px;
  padding: 11px 16px;
  color: var(--m-navy-950);
  background: var(--m-gold-bright);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: max(12px, env(safe-area-inset-top));
}

:focus-visible {
  outline: 3px solid var(--m-focus);
  outline-offset: 3px;
}

.page-grain {
  position: fixed;
  z-index: 500;
  inset: 0;
  opacity: 0.09;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgb(255 255 255 / 13%) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 80% 35%, rgb(255 255 255 / 8%) 0 0.6px, transparent 0.8px);
  background-position: 0 0, 7px 11px;
  background-size: 13px 13px, 17px 17px;
  mix-blend-mode: soft-light;
}

/* Hero */

.archive-hero {
  position: relative;
  overflow: hidden;
  color: var(--m-paper);
  border-bottom: 1px solid rgb(221 193 127 / 28%);
  background:
    radial-gradient(circle at 86% 62%, rgb(35 61 91 / 75%) 0, transparent 34%),
    linear-gradient(118deg, #061323 0%, #0a1d34 52%, #071426 100%);
}

.archive-hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(221 193 127 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(221 193 127 / 7%) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
  content: "";
}

.masthead {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  width: calc(100% - max(32px, env(safe-area-inset-left) + env(safe-area-inset-right)));
  min-height: 74px;
  margin-inline: auto;
  border-bottom: 1px solid rgb(221 193 127 / 28%);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  color: var(--m-gold-bright);
  gap: 10px;
  text-decoration: none;
}

.brand__emblem {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--m-gold);
  border-radius: 50%;
  background: var(--m-paper);
  box-shadow: 0 0 0 3px rgb(189 150 82 / 8%);
}

.brand__emblem img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: scale(2.16) translateY(-12%);
}

.brand__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.brand__copy strong {
  overflow: hidden;
  font-family: var(--m-font-serif);
  font-size: clamp(13px, 3.7vw, 16px);
  line-height: 1.25;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__copy small {
  overflow: hidden;
  color: rgb(221 193 127 / 82%);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(6px, 1.75vw, 7.5px);
  line-height: 1.25;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-code {
  display: none;
}

.archive-hero__inner {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(142px, 1.1fr);
  grid-template-areas:
    "eyebrow eyebrow"
    "title title"
    "meta portrait";
  width: calc(100% - max(32px, env(safe-area-inset-left) + env(safe-area-inset-right)));
  margin-inline: auto;
  padding: clamp(26px, 7vw, 38px) 0 52px;
  column-gap: clamp(8px, 2.6vw, 14px);
  row-gap: 13px;
}

.archive-hero__copy {
  display: contents;
}

.hero-eyebrow {
  grid-area: eyebrow;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  color: var(--m-gold-bright);
  font-family: var(--m-font-serif);
  font-size: clamp(12px, 3.3vw, 14px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.09em;
}

.hero-eyebrow::before {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: var(--m-gold-bright);
  content: "";
  transform: rotate(45deg);
}

.hero-eyebrow::after {
  width: clamp(42px, 15vw, 68px);
  height: 1px;
  margin-left: 11px;
  background: linear-gradient(90deg, var(--m-gold), transparent);
  content: "";
}

.archive-hero h1 {
  grid-area: title;
  margin: 0;
  color: #fff9ec;
  font-family: var(--m-font-serif);
  font-size: clamp(44px, 12.8vw, 60px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgb(0 0 0 / 16%);
}

.hero-mobile-copy {
  grid-area: meta;
  align-self: stretch;
  display: grid;
  align-content: start;
  min-width: 0;
  padding-top: 2px;
  gap: 24px;
}

.hero-year-lockup {
  display: flex;
  align-items: baseline;
  width: fit-content;
  max-width: 100%;
  min-height: 50px;
  padding: 9px 4px 8px;
  border-top: 1px solid var(--m-gold);
  border-bottom: 1px solid var(--m-gold);
  color: var(--m-gold-bright);
  gap: 7px;
}

.hero-year-lockup span {
  font-family: var(--m-font-number);
  font-size: clamp(25px, 7.3vw, 31px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero-year-lockup b {
  font-family: var(--m-font-serif);
  font-size: clamp(14px, 4vw, 18px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero-lead {
  max-width: 16.5em;
  margin: 0;
  color: rgb(247 240 226 / 86%);
  font-size: clamp(11px, 3vw, 12.5px);
  line-height: 1.72;
  text-wrap: pretty;
}

.hero-portrait {
  position: relative;
  grid-area: portrait;
  align-self: end;
  justify-self: end;
  width: min(100%, 206px);
  aspect-ratio: 1;
}

.hero-portrait__crop {
  position: absolute;
  z-index: 2;
  inset: 9%;
  overflow: hidden;
  border: 1px solid rgb(221 193 127 / 58%);
  border-radius: 50%;
  background: #fbefea;
  box-shadow:
    0 0 0 4px var(--m-navy-900),
    0 0 0 5px rgb(221 193 127 / 56%),
    0 18px 36px rgb(0 0 0 / 24%);
}

.hero-portrait__crop img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: scale(1.72) translateY(-11%);
}

.hero-portrait__orbit {
  position: absolute;
  inset: 3%;
  border: 1px solid rgb(221 193 127 / 36%);
  border-radius: 50%;
}

.orbit-two {
  inset: 0;
  border-style: dashed;
  opacity: 0.5;
}

.archive-seal {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  display: grid;
  width: clamp(66px, 18vw, 77px);
  height: clamp(66px, 18vw, 77px);
  padding: 11px 5px;
  place-items: center;
  border: 1px solid var(--m-gold);
  border-radius: 50%;
  color: #84601f;
  background: #e9d39b;
  box-shadow:
    0 0 0 3px rgb(7 20 38 / 72%),
    inset 0 0 0 3px rgb(255 255 255 / 30%);
  text-align: center;
}

.archive-seal span,
.archive-seal small {
  font-family: var(--m-font-serif);
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.09em;
}

.archive-seal strong {
  font-family: var(--m-font-number);
  font-size: 16px;
  line-height: 1;
}

.hero-year-watermark {
  display: none;
}

.academy-mark {
  position: absolute;
  z-index: 1;
  right: -64px;
  bottom: 55px;
  width: 220px;
  height: 150px;
  opacity: 0.045;
}

.academy-mark__roof {
  display: block;
  width: 0;
  height: 0;
  margin-inline: auto;
  border-right: 110px solid transparent;
  border-bottom: 42px solid var(--m-paper);
  border-left: 110px solid transparent;
}

.academy-mark__body {
  display: flex;
  justify-content: space-between;
  height: 104px;
  padding: 11px 25px 0;
  border-top: 8px solid var(--m-paper);
  border-bottom: 10px solid var(--m-paper);
}

.academy-mark__body i {
  display: block;
  width: 14px;
  height: 72px;
  background: var(--m-paper);
}

.retention-note {
  position: absolute;
  z-index: 6;
  right: max(16px, env(safe-area-inset-right));
  bottom: 12px;
  margin: 0;
  color: rgb(221 193 127 / 72%);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

/* Archive paper and year selector */

.archive-stage {
  position: relative;
  padding:
    0 max(var(--m-shell), env(safe-area-inset-right))
    calc(54px + env(safe-area-inset-bottom))
    max(var(--m-shell), env(safe-area-inset-left));
  background: linear-gradient(to bottom, var(--m-navy-950) 0 92px, #0c1d31 92px 100%);
}

.workspace {
  width: min(100%, 620px);
  margin: -28px auto 0;
}

#question-workspace,
#report-section {
  scroll-margin-top: 16px;
}

.year-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  width: calc(100% - 14px);
  margin-inline: 7px;
  padding: 0 14px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 8px;
  scrollbar-width: none;
  border-bottom: 1px solid var(--m-line);
}

.year-tabs::-webkit-scrollbar {
  display: none;
}

.year-tab {
  flex: 0 0 clamp(88px, 25vw, 108px);
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 15px 8px 11px;
  border: 1px solid var(--m-line);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  color: #817a6e;
  background: #eee4d0;
  font-family: var(--m-font-number);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: color 160ms ease, background 160ms ease;
}

.year-tab + .year-tab {
  margin-left: -1px;
}

.year-tab[aria-selected="true"] {
  min-height: 58px;
  padding-top: 17px;
  color: #9a6419;
  background: var(--m-paper-light);
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 -2px var(--m-gold);
}

.archive-paper {
  position: relative;
  z-index: 3;
  overflow: visible;
  border: 1px solid var(--m-line);
  border-radius: 0 0 var(--m-radius-paper) var(--m-radius-paper);
  background:
    linear-gradient(rgb(150 121 71 / 3%) 1px, transparent 1px),
    var(--m-paper);
  background-size: 100% 28px;
  box-shadow: 0 24px 52px rgb(0 0 0 / 25%);
}

.archive-paper::before,
.archive-paper::after,
.archive-paper__edge {
  position: absolute;
  z-index: -1;
  height: 7px;
  border: 1px solid var(--m-line);
  background: var(--m-paper-deep);
  content: "";
}

.archive-paper::before {
  top: -7px;
  right: 7px;
  left: 7px;
}

.archive-paper::after {
  top: -12px;
  right: 15px;
  left: 15px;
  opacity: 0.78;
}

.archive-paper__edge {
  right: 14px;
  left: 14px;
}

.edge-one {
  top: -3px;
}

.edge-two {
  display: none;
}

.year-sheet {
  padding: 30px var(--m-content) 34px;
}

.year-sheet__header {
  display: grid;
  gap: 20px;
}

.year-heading__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: clamp(8px, 2.8vw, 12px);
}

.year-heading__title {
  min-width: 0;
}

.year-score-seal {
  position: relative;
  display: grid;
  width: clamp(70px, 20vw, 82px);
  height: clamp(70px, 20vw, 82px);
  place-items: center;
  border: 3px double var(--m-red);
  border-radius: 50%;
  color: var(--m-red);
  filter: drop-shadow(0 1px 0 rgb(73 0 0 / 7%));
  mix-blend-mode: multiply;
  transform: rotate(-4deg);
}

.year-score-seal::before,
.year-score-seal::after {
  position: absolute;
  left: 50%;
  width: clamp(27px, 8vw, 34px);
  height: 1px;
  background: currentcolor;
  content: "";
  opacity: 0.68;
  transform: translateX(-50%);
}

.year-score-seal::before {
  top: clamp(11px, 3.4vw, 14px);
}

.year-score-seal::after {
  bottom: clamp(10px, 3.2vw, 13px);
}

.year-score-seal span {
  font-family: var(--m-font-serif);
  font-size: clamp(26px, 7.5vw, 31px);
  font-weight: 900;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  -webkit-text-stroke: 0.45px currentcolor;
  paint-order: stroke fill;
  transform: translateX(-1px);
}

.archive-label {
  margin: 0 0 8px;
  color: #9b6c27;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.09em;
}

.year-heading h2,
.reports__header h2 {
  margin: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(27px, 7.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.year-heading > p:last-child,
.reports__header > div > p:last-child {
  margin: 10px 0 0;
  color: var(--m-ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.year-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--m-line);
  border-bottom: 1px solid var(--m-line);
  background: rgb(255 250 240 / 48%);
  gap: 12px;
}

.year-summary__progress {
  min-width: 0;
}

.year-summary__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.year-summary__progress-head > span {
  color: #8b7654;
  font-size: 10px;
}

.year-summary__progress-head strong {
  color: var(--m-ink);
  font-family: var(--m-font-number);
  font-size: clamp(20px, 6vw, 25px);
  line-height: 1;
}

.year-summary__progress-head small {
  color: var(--m-ink-soft);
  font-size: 10px;
  font-weight: 400;
}

.record-progress {
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  background: var(--m-line-soft);
}

.record-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--m-gold);
  transition: width 220ms ease;
}

.year-summary dl {
  display: flex;
  margin: 0;
}

.year-summary dl > div {
  min-width: clamp(48px, 14vw, 58px);
  padding: 2px 7px;
  border-left: 1px solid var(--m-line);
}

.year-summary dt {
  display: flex;
  align-items: center;
  color: var(--m-ink-soft);
  font-size: 9px;
  gap: 4px;
}

.year-summary dt i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentcolor;
}

.summary-state.is-correct dt,
.summary-state.is-correct dd {
  color: var(--m-green);
}

.summary-state.is-wrong dt,
.summary-state.is-wrong dd {
  color: var(--m-red);
}

.year-summary dd {
  margin: 5px 0 0;
  font-family: var(--m-font-number);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.archive-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--m-red);
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  text-decoration: none;
}

.archive-link svg {
  width: 16px;
  height: 16px;
}

/* Question recording */

.question-groups {
  display: grid;
  margin-top: 31px;
  gap: 28px;
}

.question-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--m-line);
}

.question-group__title strong {
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(19px, 5.3vw, 22px);
  line-height: 1.2;
}

.question-group__title span {
  color: #9b6c27;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1.7vw, 8px);
}

.question-button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(58px, 16vw, 68px);
  padding: 8px 3px 7px;
  place-content: center;
  border: 1px solid var(--m-line);
  border-radius: 3px;
  color: var(--m-ink);
  background:
    linear-gradient(135deg, transparent 5px, var(--m-paper-light) 0) top left,
    var(--m-paper-light);
  box-shadow:
    3px 3px 0 #eee2ca,
    inset 0 0 0 3px rgb(255 255 255 / 36%);
  gap: 5px;
  transition: border-color 160ms ease, background 160ms ease;
}

.question-button__number {
  font-family: var(--m-font-number);
  font-size: clamp(16px, 4.8vw, 19px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.question-button__state {
  overflow: hidden;
  color: #8c8375;
  font-size: clamp(7px, 2vw, 8.5px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-button__icon {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid currentcolor;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
}

.question-button__icon svg {
  width: 10px;
  height: 10px;
}

.question-button.is-correct {
  border-color: #9db5a0;
  color: #3f6148;
  background: var(--m-green-soft);
  box-shadow: 3px 3px 0 #d2dfd1;
}

.question-button.is-correct .question-button__state {
  color: #4b6d52;
}

.question-button.is-wrong {
  border-color: #cf8179;
  color: var(--m-red);
  background: #fae8e3;
  box-shadow: 3px 3px 0 #efd0ca;
}

.question-button.is-wrong .question-button__state {
  color: #9f302b;
}

.year-tab:active,
.question-button:active,
.report-item summary:active,
.result-option:active,
.cause-option:active,
.archive-button:active,
.primary-button:active {
  filter: brightness(0.97);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 32px;
  color: #777267;
  font-size: 10px;
  gap: 14px;
}

.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend__mark {
  width: 12px;
  height: 12px;
  border: 1px solid var(--m-line);
  background: var(--m-paper-light);
}

.legend__mark.is-correct {
  border-color: #8ba58f;
  background: var(--m-green-soft);
}

.legend__mark.is-wrong {
  border-color: #c97770;
  background: #fae8e3;
}

/* Reports */

.reports {
  margin-top: 36px;
  padding: 38px 0 42px;
  border-top: 4px double var(--m-line);
}

.reports__header {
  display: grid;
  padding-inline: var(--m-content);
  gap: 12px;
}

.reports__header h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
}

.reports__count-badge {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  margin-left: 0;
  padding: 4px 8px 3px;
  border: 0;
  border-radius: 999px;
  color: var(--m-red);
  background: var(--m-red-soft);
  font-family: var(--m-font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  gap: 2px;
}

.reports__count-badge #report-count {
  font-family: var(--m-font-number);
  font-size: 13px;
}

.reports__count-badge small {
  font-size: 10px;
}

#toggle-reports {
  display: none !important;
}

.empty-state {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 154px;
  margin: 26px var(--m-content) 0;
  padding: 21px 14px;
  border: 1px solid var(--m-line);
  background: rgb(255 250 241 / 44%);
  gap: 14px;
}

.empty-state__seal {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 2px solid #dab1a9;
  border-radius: 50%;
  color: #c98b80;
  font-family: var(--m-font-serif);
  font-size: 23px;
}

.empty-state .archive-label {
  font-size: 7px;
}

.empty-state h3 {
  margin: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(18px, 5vw, 21px);
  line-height: 1.35;
}

.empty-state p:last-child {
  margin: 8px 0 0;
  color: var(--m-ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.report-list {
  display: grid;
  width: 100%;
  max-width: 460px;
  margin: 24px auto 0;
  gap: 13px;
}

.report-item {
  container-name: report-card;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid #c9a568;
  border-radius: 13px;
  background:
    radial-gradient(circle at 22% 5%, rgb(255 255 255 / 76%), transparent 40%),
    #fdfbf6;
  box-shadow:
    0 12px 25px rgb(6 22 38 / 12%),
    inset 0 0 0 2px #f2e4ca;
}

.report-item details,
.report-item summary {
  margin: 0;
}

.report-item summary {
  display: grid;
  grid-template-columns: clamp(48px, 13.2cqi, 53px) minmax(0, 1fr) auto;
  grid-template-areas:
    "index identity cause"
    ". topic toggle";
  grid-template-rows: auto minmax(56px, auto);
  min-height: 154px;
  padding: 13px clamp(10px, 3.5cqi, 14px) 11px;
  background: transparent;
  column-gap: clamp(9px, 3cqi, 13px);
  row-gap: 0;
  list-style: none;
}

.report-item summary::-webkit-details-marker {
  display: none;
}

.report-item summary::marker {
  content: "";
}

.report-item__index {
  grid-area: index;
  display: grid;
  width: clamp(48px, 13.2cqi, 53px);
  height: clamp(50px, 13.7cqi, 55px);
  min-height: 0;
  margin: 0;
  place-items: center;
  border-radius: 6px;
  color: #fffaf1;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 7%), transparent 55%),
    var(--m-red);
  box-shadow:
    0 4px 10px rgb(114 22 20 / 14%),
    inset 0 0 0 1px rgb(116 15 14 / 18%);
  font-family: var(--m-font-number);
  font-size: clamp(27px, 7.7cqi, 30px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-item__identity {
  grid-area: identity;
  display: grid;
  align-content: start;
  min-width: 0;
  margin-top: clamp(18px, 5.3cqi, 22px);
  padding: 0;
  gap: 5px;
}

.report-item__eyebrow {
  display: block;
  overflow: hidden;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(12px, 3.8cqi, 15px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-item__identity strong {
  overflow: hidden;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(25px, 7.6cqi, 29px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-item__topic {
  grid-area: topic;
  align-self: center;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
}

.report-item__topic strong {
  display: none;
}

.report-item__topic span {
  display: block;
  overflow: hidden;
  color: var(--m-ink-body);
  font-family: var(--m-font-serif);
  font-size: clamp(13px, 3.8cqi, 15px);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-item__number,
.report-item__type {
  display: none;
}

.report-item .cause-tag {
  grid-area: cause;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(94px, 28cqi, 116px);
  min-height: 42px;
  margin-top: clamp(26px, 7.8cqi, 31px);
  padding: 7px 9px 6px;
  border: 1px solid #ae2927;
  border-radius: 5px;
  color: var(--m-red);
  background: rgb(255 253 247 / 72%);
  font-family: var(--m-font-serif);
  font-size: clamp(13px, 4.2cqi, 17px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.report-toggle {
  grid-area: toggle;
  align-self: end;
  justify-self: center;
  display: grid;
  justify-items: center;
  min-width: 44px;
  padding: 0;
  color: #b38b4e;
  gap: 4px;
}

.report-toggle__copy {
  display: block;
  grid-row: 2;
  font-family: var(--m-font-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.report-toggle__open {
  display: none;
}

.report-toggle__icon {
  display: grid;
  grid-row: 1;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #dfc7a4;
  border-radius: 50%;
  background: rgb(255 253 247 / 66%);
}

.report-toggle__icon .report-chevron {
  width: 21px;
  height: 21px;
  color: #bd9456;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.report-item details[open] .report-toggle__closed {
  display: none;
}

.report-item details[open] .report-toggle__open {
  display: inline;
}

.report-item details[open] .report-chevron {
  transform: rotate(180deg);
}

.report-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 clamp(10px, 3.5cqi, 14px) 20px;
  background: transparent;
  gap: 8px;
  animation: report-reveal 180ms ease-out both;
}

.report-block,
.report-utilities .report-block {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 13px 15px 12px;
  border: 1px solid #d9b77f;
  border-radius: 6px;
  background: #fdfaf6;
}

.report-block--analysis {
  min-height: 112px;
}

.report-block--trigger {
  min-height: 173px;
}

.report-utilities {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 8px;
}

.report-utilities .report-block--methods {
  min-height: 127px;
}

.report-utilities .report-block--source {
  min-height: 117px;
}

.report-block__label {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: 11px;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(16px, 4.6cqi, 18px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  gap: 18px;
}

.report-block__label b {
  flex: 0 0 auto;
  color: var(--m-red);
  font-family: var(--m-font-number);
  font-size: 15px;
  font-weight: 500;
}

.report-block__label::after {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid #b28133;
  border-bottom: 2px solid #b28133;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.report-block h3 {
  display: none;
}

.report-block p {
  margin: 0;
  color: var(--m-ink-body);
  font-family: var(--m-font-serif);
  font-size: clamp(14px, 4cqi, 15.5px);
  font-weight: 500;
  line-height: 1.78;
  letter-spacing: -0.02em;
  white-space: pre-line;
  text-wrap: pretty;
}

.report-block--trigger > p {
  display: none;
}

.report-timeline {
  position: relative;
  display: grid;
  margin: 0 0 0 5px;
  padding: 0;
  gap: 32px;
  list-style: none;
}

.report-timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 1px;
  background: #c49446;
  content: "";
}

.report-timeline li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  min-height: 39px;
  gap: 11px;
}

.report-timeline li b {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid #c39143;
  border-radius: 50%;
  color: var(--m-red);
  background: #fffdf8;
  font-family: var(--m-font-number);
  font-size: 15px;
  font-weight: 500;
}

.report-timeline li span {
  color: var(--m-ink-body);
  font-family: var(--m-font-serif);
  font-size: clamp(14px, 4cqi, 15.5px);
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}

.method-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 101px));
  margin: 0;
  padding: 0;
  gap: 7px 11px;
  list-style: none;
}

.method-list li {
  display: grid;
  min-width: 0;
  min-height: 31px;
  padding: 4px 7px;
  place-items: center;
  border: 1px solid #e0c99f;
  border-radius: 5px;
  color: var(--m-ink-body);
  background: #fbf4e8;
  font-family: var(--m-font-serif);
  font-size: clamp(13px, 3.8cqi, 14.5px);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.report-source-line {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  align-items: start;
  margin: 0;
  gap: 10px;
}

.report-source-line svg {
  width: 21px;
  height: 21px;
  margin-top: 2px;
  color: #b17722;
  stroke-width: 1.7;
}

.report-source-line > span {
  display: grid;
  min-width: 0;
}

.report-source-line strong,
.report-source-line small {
  display: none;
}

.report-source-mobile {
  display: grid;
  min-width: 0;
  color: var(--m-ink-body);
  font-family: var(--m-font-serif);
  font-size: clamp(14px, 4.3cqi, 16.5px);
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: -0.015em;
  gap: 1px;
  overflow-wrap: anywhere;
}

.report-source-mobile > span:first-child {
  font-weight: 700;
}

.report-source {
  display: none;
}

@keyframes report-reveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@container report-card (max-width: 345px) {
  .report-item summary {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding-inline: 10px;
    column-gap: 8px;
  }

  .report-item .cause-tag {
    min-width: 92px;
    padding-inline: 7px;
  }

  .report-item__identity strong {
    font-size: 25px;
  }

  .report-toggle__copy {
    font-size: 12px;
  }
}

/* Record bottom sheet */

.record-dialog {
  width: 100%;
  max-width: none;
  max-height: min(92dvh, 760px);
  margin: auto 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--m-gold);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 12px 12px 0 0;
  color: var(--m-ink);
  background:
    linear-gradient(rgb(150 121 71 / 3%) 1px, transparent 1px),
    var(--m-paper);
  background-size: 100% 28px;
  box-shadow: 0 -22px 58px rgb(1 8 16 / 36%);
}

.record-dialog::backdrop {
  background: rgb(4 12 23 / 62%);
  backdrop-filter: blur(5px);
}

.record-dialog form {
  display: grid;
  max-height: min(92dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.completion-dialog {
  width: calc(100% - 12px);
  max-width: 520px;
  max-height: calc(100dvh - 8px);
  margin: auto auto 4px;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--m-ink);
  background: transparent;
}

.completion-dialog::backdrop {
  background: rgb(2 11 23 / 78%);
  backdrop-filter: blur(4px) saturate(0.7);
}

.completion-sheet {
  position: relative;
  display: grid;
  min-height: min(62dvh, 520px);
  max-height: calc(100dvh - 8px);
  padding: 26px 22px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid #c7a867;
  border-radius: 12px 12px 4px 4px;
  background:
    radial-gradient(circle at 16% 9%, rgb(145 55 47 / 4%), transparent 30%),
    linear-gradient(rgb(145 110 58 / 4%) 1px, transparent 1px),
    var(--m-paper-light);
  background-size: auto, 100% 28px, auto;
  box-shadow: 0 -22px 58px rgb(1 8 16 / 42%);
  isolation: isolate;
  text-align: center;
}

.completion-sheet::before {
  position: absolute;
  z-index: -1;
  inset: 7px;
  border: 1px solid rgb(189 150 82 / 38%);
  border-radius: 7px 7px 2px 2px;
  content: "";
  pointer-events: none;
}

.completion-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: #59616a;
  background: transparent;
}

.completion-close svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.5;
}

.completion-year-row {
  display: grid;
  grid-template-columns: minmax(18px, 1fr) auto minmax(18px, 1fr);
  align-items: center;
  margin: 11px 35px 14px;
  color: #9b6c27;
  font-family: var(--m-font-serif);
  font-size: clamp(15px, 4.4vw, 18px);
  font-weight: 700;
  letter-spacing: 0.06em;
  gap: 12px;
}

.completion-year-row::before,
.completion-year-row::after {
  height: 1px;
  background: var(--m-gold);
  content: "";
}

.completion-year-label {
  white-space: nowrap;
}

.completion-sheet h2 {
  margin: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(39px, 12vw, 48px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.12;
}

.completion-score-seal {
  position: relative;
  display: grid;
  width: clamp(168px, 47vw, 192px);
  height: clamp(168px, 47vw, 192px);
  margin: clamp(18px, 4.8vh, 28px) auto clamp(18px, 4vh, 24px);
  place-items: center;
  border: 5px double var(--m-red);
  border-radius: 50%;
  color: var(--m-red);
  filter: drop-shadow(0 2px 0 rgb(73 0 0 / 8%));
  mix-blend-mode: multiply;
  transform: rotate(-4deg);
}

.completion-score-seal::before,
.completion-score-seal::after {
  position: absolute;
  left: 50%;
  width: clamp(66px, 20vw, 82px);
  height: 2px;
  background: currentcolor;
  content: "";
  opacity: 0.66;
  transform: translateX(-50%);
}

.completion-score-seal::before {
  top: clamp(31px, 9vw, 38px);
}

.completion-score-seal::after {
  bottom: clamp(29px, 8.5vw, 36px);
}

.completion-score-seal span {
  font-family: var(--m-font-number);
  font-size: clamp(64px, 19vw, 79px);
  font-weight: 900;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
  -webkit-text-stroke: 0.7px currentcolor;
  paint-order: stroke fill;
  transform: translateX(-2px);
}

.completion-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 20px;
  color: #334258;
  font-family: var(--m-font-serif);
  font-size: clamp(14px, 4vw, 17px);
  white-space: nowrap;
  gap: 5px;
}

.completion-summary::before,
.completion-summary::after {
  width: clamp(22px, 8vw, 42px);
  height: 1px;
  margin-inline: clamp(2px, 1.5vw, 8px);
  background: rgb(189 150 82 / 72%);
  content: "";
}

.completion-summary strong {
  color: var(--m-red);
  font-family: var(--m-font-number);
  font-size: clamp(19px, 5.5vw, 23px);
  font-variant-numeric: tabular-nums;
}

.completion-summary i {
  width: 3px;
  height: 3px;
  margin-inline: 4px;
  border-radius: 50%;
  background: #93703c;
}

.completion-action {
  width: 100%;
  min-height: 54px;
  padding: 13px 18px;
  border: 1px solid #163b5f;
  border-radius: 4px;
  color: var(--m-paper-light);
  background: var(--m-navy-950);
  box-shadow: 0 8px 22px rgb(4 20 38 / 16%);
  font-family: var(--m-font-serif);
  font-size: clamp(16px, 4.6vw, 19px);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.completion-dialog.is-celebrating .completion-sheet {
  animation: completion-sheet-in 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.completion-dialog.is-celebrating .completion-score-seal {
  animation: completion-stamp-in 680ms 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.completion-dialog.is-celebrating .completion-summary,
.completion-dialog.is-celebrating .completion-action {
  animation: completion-copy-in 420ms 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes completion-sheet-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(42px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes completion-stamp-in {
  0% {
    opacity: 0;
    filter: blur(1.5px) drop-shadow(0 2px 0 rgb(73 0 0 / 8%));
    transform: rotate(-11deg) scale(1.28);
  }
  68% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 7px 5px rgb(73 0 0 / 14%));
    transform: rotate(-4deg) scale(0.985);
  }
  100% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 2px 0 rgb(73 0 0 / 8%));
    transform: rotate(-4deg) scale(1);
  }
}

@keyframes completion-copy-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .completion-dialog.is-celebrating .completion-sheet,
  .completion-dialog.is-celebrating .completion-score-seal,
  .completion-dialog.is-celebrating .completion-summary,
  .completion-dialog.is-celebrating .completion-action {
    animation: none;
  }
}

.dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  padding: 21px 16px 19px;
  color: var(--m-paper-light);
  background: #0d2946;
  gap: 12px;
}

.dialog-kicker {
  margin: 0 0 8px;
  color: var(--m-gold-bright);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dialog-header h2 {
  margin: 0;
  font-family: var(--m-font-serif);
  font-size: clamp(24px, 7vw, 29px);
  line-height: 1.2;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(221 193 127 / 54%);
  border-radius: 50%;
  color: var(--m-gold-bright);
  background: transparent;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--m-line);
  color: var(--m-ink-soft);
  font-size: 11px;
  gap: 8px 14px;
}

.question-meta strong {
  color: var(--m-ink);
}

.answer-fieldset,
.cause-fieldset {
  min-width: 0;
  margin: 0 16px;
  padding: 23px 0 0;
  border: 0;
}

.answer-fieldset legend,
.cause-fieldset legend {
  padding: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.cause-fieldset > p {
  margin: 7px 0 0;
  color: var(--m-ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.result-options {
  display: grid;
  margin-top: 14px;
  gap: 10px;
}

.result-option {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--m-line);
  border-radius: 4px;
  background: rgb(255 250 241 / 58%);
  gap: 12px;
}

.result-option input,
.cause-option input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.result-option__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid currentcolor;
  border-radius: 50%;
  font-family: var(--m-font-serif);
  font-size: 20px;
}

.result-option__icon svg {
  width: 22px;
  height: 22px;
}

.result-option__icon.is-correct {
  color: var(--m-green);
}

.result-option__icon.is-wrong {
  color: var(--m-red);
}

.result-option strong,
.result-option small {
  display: block;
}

.result-option strong {
  font-size: 15px;
}

.result-option small {
  margin-top: 5px;
  color: var(--m-ink-soft);
  font-size: 10px;
}

.result-option:has(input:checked) {
  border-color: var(--m-gold);
  background: var(--m-paper-light);
  box-shadow: inset 3px 0 var(--m-gold);
}

.cause-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  gap: 9px;
}

.cause-option {
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 9px 8px;
  place-items: center;
  border: 1px solid var(--m-line);
  border-radius: 4px;
  color: var(--m-ink-body);
  background: rgb(255 250 241 / 58%);
  font-size: 13px;
  text-align: center;
}

.cause-option:has(input:checked) {
  border-color: var(--m-red);
  color: var(--m-red);
  background: var(--m-red-soft);
  font-weight: 700;
}

.form-error {
  min-height: 21px;
  margin: 12px 16px 0;
  color: var(--m-red);
  font-size: 12px;
  line-height: 1.5;
}

.dialog-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 17px 16px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--m-line);
  background: rgb(247 240 226 / 96%);
  gap: 10px;
}

.dialog-actions > span {
  display: none;
}

.dialog-actions .danger-link {
  grid-column: 1 / -1;
  justify-self: start;
}

.archive-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--m-gold);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.archive-button {
  color: var(--m-ink);
  background: transparent;
}

.primary-button {
  color: var(--m-paper-light);
  background: var(--m-navy-950);
}

.danger-link {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  color: var(--m-red);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 1200;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  padding: 12px 15px;
  color: var(--m-paper-light);
  background: #0d2946;
  box-shadow: 0 12px 28px rgb(0 0 0 / 25%);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */

.site-footer {
  display: grid;
  width: calc(100% - max(36px, env(safe-area-inset-left) + env(safe-area-inset-right)));
  margin-inline: auto;
  padding: 34px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(221 193 127 / 22%);
  color: rgb(247 240 226 / 76%);
  gap: 20px;
}

.site-footer__identity {
  display: grid;
  gap: 6px;
}

.site-footer strong {
  color: var(--m-gold-bright);
  font-family: var(--m-font-serif);
  font-size: 14px;
  letter-spacing: 0.035em;
}

.site-footer span,
.site-footer p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.site-footer span {
  color: rgb(221 193 127 / 72%);
}

.site-filing-links {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid rgb(221 193 127 / 14%);
}

.site-filing-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  color: rgb(247 240 226 / 68%);
  font-size: 10px;
  line-height: 1.4;
  text-decoration: none;
}

.site-police-filing img {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.78;
}

@media (max-width: 359px) {
  .archive-hero__inner {
    grid-template-columns: minmax(0, 0.92fr) minmax(136px, 1.08fr);
    column-gap: 6px;
  }

  .archive-hero h1 {
    font-size: 43px;
  }

  .hero-mobile-copy {
    gap: 19px;
  }

  .hero-portrait {
    width: min(100%, 178px);
  }

  .year-summary {
    padding-inline: 9px;
    gap: 8px;
  }

  .year-summary dl > div {
    min-width: 46px;
    padding-inline: 6px;
  }

  .question-grid {
    gap: 4px;
  }

  .question-button {
    padding-inline: 2px;
    box-shadow: 2px 2px 0 #eee2ca;
  }

  .report-item summary {
    min-height: 151px;
  }
}

@media (min-width: 520px) {
  .archive-hero__inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(200px, 1.05fr);
  }

  .archive-hero h1 {
    font-size: 58px;
  }

  .hero-portrait {
    width: 214px;
  }

  .question-button {
    min-height: 70px;
  }

  .reports__header,
  .year-sheet {
    --m-content: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ================================================================
   Wrong-question review card v4
   One coherent component layer based on the approved 390px reference.
   ================================================================ */

.report-list {
  width: 100%;
  max-width: 460px;
  margin: 22px auto 0;
  gap: clamp(10px, 3.1cqi, 13px);
}

.report-item {
  --card-red: #ad2024;
  --card-gold: #c28e38;
  --card-line: #ddbd7c;
  container-name: wrong-card;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: clamp(11px, 3.3cqi, 14px);
  background: #fffdf8;
  box-shadow:
    0 8px 20px rgb(8 25 42 / 9%),
    inset 0 0 0 2px #f5e8cf;
}

.report-item summary {
  display: grid;
  grid-template-columns: clamp(58px, 16.5cqi, 68px) minmax(0, 1fr) clamp(39px, 11cqi, 45px);
  grid-template-areas: none;
  grid-template-rows: auto;
  min-height: clamp(102px, 28.5cqi, 118px);
  padding: 0;
  column-gap: 0;
  row-gap: 0;
  list-style: none;
  background: #fffdf8;
}

.report-item summary::-webkit-details-marker {
  display: none;
}

.report-item summary::marker {
  content: "";
}

.report-item__index {
  display: grid;
  grid-area: auto;
  align-content: center;
  justify-items: center;
  width: auto;
  height: auto;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: #fff8ed;
  background:
    radial-gradient(circle at 26% 18%, rgb(255 255 255 / 10%), transparent 40%),
    linear-gradient(155deg, #bd282b, #991418);
  box-shadow: none;
  font-family: var(--m-font-serif);
}

.report-item__index b {
  font-size: clamp(27px, 8.7cqi, 36px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-item__index small {
  margin-top: clamp(11px, 3.2cqi, 14px);
  font-family: var(--m-font-sans);
  font-size: clamp(9px, 2.8cqi, 11px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.report-summary-main {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: clamp(10px, 3.3cqi, 14px) clamp(9px, 3.2cqi, 13px);
  gap: clamp(4px, 1.3cqi, 6px);
}

.report-summary-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(7px, 2.3cqi, 10px);
}

.report-summary-title > strong {
  overflow: hidden;
  min-width: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: clamp(15px, 4.8cqi, 19px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-item .cause-tag {
  grid-area: auto;
  align-self: auto;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: clamp(3px, 1cqi, 4px) clamp(6px, 1.8cqi, 8px);
  border: 1px solid #d26a6b;
  border-radius: 5px;
  color: var(--card-red);
  background: #fff8f4;
  font-family: var(--m-font-sans);
  font-size: clamp(10px, 3cqi, 12px);
  font-weight: 700;
  line-height: 1.2;
}

.report-summary-meta {
  display: block;
  overflow: hidden;
  color: #766b5f;
  font-family: var(--m-font-sans);
  font-size: clamp(10px, 3.1cqi, 12px);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-item__prompt-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  color: #4f6170;
  font-family: var(--m-font-sans);
  font-size: clamp(10px, 3cqi, 12px);
  line-height: 1.4;
  gap: 7px;
}

.report-item__prompt-preview b {
  color: var(--card-gold);
  white-space: nowrap;
}

.report-item__prompt-preview span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.report-toggle {
  grid-area: auto;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  min-width: 0;
  padding: 0;
  place-items: center;
  border-left: 1px solid #ead7b5;
  color: var(--card-gold);
}

.report-toggle__copy {
  display: none;
}

.report-toggle__icon {
  display: grid;
  grid-row: auto;
  width: clamp(28px, 8.4cqi, 34px);
  height: clamp(28px, 8.4cqi, 34px);
  place-items: center;
  border: 1px solid #d9b66f;
  border-radius: 50%;
  background: #fffdf8;
}

.report-toggle__icon .report-chevron {
  width: clamp(15px, 4.7cqi, 18px);
  height: clamp(15px, 4.7cqi, 18px);
  color: var(--card-gold);
  stroke-width: 2;
}

.report-item details[open] .report-chevron {
  transform: rotate(180deg);
}

.report-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 clamp(14px, 4.4cqi, 18px) clamp(18px, 5.2cqi, 22px);
  border-top: 1px solid #ead7b5;
  background: #fffaf1;
  gap: 0;
  animation: report-reveal 160ms ease-out both;
}

.report-review__section {
  min-width: 0;
  padding: clamp(15px, 4.6cqi, 19px) clamp(1px, 0.5cqi, 2px);
  border: 0;
  border-bottom: 1px dashed #d9ba80;
  border-radius: 0;
  background: transparent;
}

.report-review__section h3 {
  display: flex;
  align-items: center;
  margin: 0 0 clamp(11px, 3.3cqi, 14px);
  color: var(--card-gold);
  font-family: var(--m-font-sans);
  font-size: clamp(13px, 4cqi, 16px);
  font-weight: 700;
  line-height: 1.35;
  gap: 8px;
}

.report-review__section h3 b {
  color: var(--card-red);
  font-family: var(--m-font-number);
  font-size: 12px;
}

.report-review .method-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: clamp(6px, 2cqi, 8px);
}

.report-review .method-list li {
  min-height: 34px;
  padding: 7px clamp(10px, 3.2cqi, 13px);
  border: 1px solid #dec28f;
  border-radius: 6px;
  color: #475a68;
  background: #fffaf0;
  font-family: var(--m-font-sans);
  font-size: clamp(11px, 3.4cqi, 13px);
  line-height: 1.35;
}

.report-review__prompt blockquote {
  margin: 0;
  padding: clamp(12px, 3.8cqi, 15px) clamp(13px, 4.1cqi, 17px);
  border: 0;
  border-left: 4px solid var(--card-red);
  color: #5b4140;
  background: #faece8;
  font-family: var(--m-font-sans);
  font-size: clamp(12px, 3.7cqi, 14px);
  line-height: 1.75;
}

.report-review .report-timeline {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: clamp(12px, 3.8cqi, 16px);
}

.report-review .report-timeline li {
  display: grid;
  grid-template-columns: clamp(28px, 8.5cqi, 34px) minmax(0, 1fr);
  align-items: start;
  position: relative;
  min-height: 32px;
  padding: 0;
  color: #44596a;
  font-family: var(--m-font-sans);
  font-size: clamp(12px, 3.7cqi, 14px);
  line-height: 1.7;
  gap: clamp(10px, 3.1cqi, 13px);
}

.report-review .report-timeline li:not(:last-child)::after {
  position: absolute;
  top: clamp(29px, 8.7cqi, 35px);
  bottom: calc(-1 * clamp(14px, 4.1cqi, 17px));
  left: clamp(13px, 4cqi, 16px);
  width: 1px;
  background: #d7a753;
  content: "";
}

.report-review .report-timeline b {
  display: grid;
  width: clamp(28px, 8.5cqi, 34px);
  height: clamp(28px, 8.5cqi, 34px);
  place-items: center;
  border: 1px solid #d7a753;
  border-radius: 50%;
  color: var(--card-red);
  background: #fffaf1;
  font-family: var(--m-font-number);
  font-size: clamp(11px, 3.5cqi, 14px);
  font-weight: 600;
}

.redo-standard {
  display: grid;
  grid-template-columns: clamp(30px, 9cqi, 36px) minmax(0, 1fr);
  align-items: center;
  padding: clamp(12px, 3.8cqi, 15px);
  border: 1px solid #b8cec1;
  border-radius: 8px;
  color: #355c4d;
  background: #eef4ed;
  gap: clamp(10px, 3.1cqi, 13px);
}

.redo-standard > span {
  display: grid;
  width: clamp(30px, 9cqi, 36px);
  height: clamp(30px, 9cqi, 36px);
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #537965;
  font-size: clamp(14px, 4.4cqi, 18px);
  font-weight: 700;
}

.redo-standard p {
  margin: 0;
  font-family: var(--m-font-sans);
  font-size: clamp(11.5px, 3.6cqi, 14px);
  line-height: 1.7;
}

.report-source-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(14px, 4.3cqi, 17px) 2px 0;
  color: #7b6f61;
  font-family: var(--m-font-sans);
  font-size: clamp(10px, 3cqi, 12px);
  line-height: 1.55;
  gap: 3px 10px;
}

.report-source-line > span:first-child {
  grid-column: 1 / -1;
  color: #9a742d;
  font-weight: 700;
}

.report-source-line > span:nth-child(2) {
  overflow-wrap: anywhere;
}

.report-source-action {
  align-self: end;
  color: #9a6b18;
  font-weight: 700;
  white-space: nowrap;
}

.score-fieldset {
  min-width: 0;
  margin: 21px 16px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.score-fieldset legend {
  padding: 0;
  color: var(--m-ink);
  font-family: var(--m-font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.score-fieldset > p {
  margin: 7px 0 0;
  color: var(--m-ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.score-input {
  display: grid;
  grid-template-columns: 52px auto;
  align-items: center;
  width: fit-content;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--m-line);
  border-radius: 4px;
  background: rgb(255 250 241 / 58%);
  gap: 9px;
}

.score-input input {
  width: 52px;
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--m-line);
  border-radius: 0;
  color: var(--m-ink);
  background: transparent;
  font-family: var(--m-font-number);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.score-input input:focus {
  outline: 2px solid rgb(154 100 25 / 26%);
  outline-offset: -3px;
  border-right-color: var(--m-gold);
}

.score-input span {
  color: var(--m-ink-body);
  font-size: 12px;
  white-space: nowrap;
}

@container wrong-card (max-width: 330px) {
  .report-item summary {
    grid-template-columns: 56px minmax(0, 1fr) 38px;
  }

  .report-summary-main {
    padding-inline: 8px;
  }

  .report-item .cause-tag {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
