:root {
  color-scheme: light;
  --ink: #20233b;
  --ink-soft: #565875;
  --ink-muted: #777890;
  --paper: #f7f2e9;
  --paper-deep: #eee5d6;
  --paper-bright: #fffdf9;
  --navy: #1e2340;
  --navy-2: #2f3865;
  --violet: #5b4fa1;
  --violet-dark: #403678;
  --violet-light: #eae6ff;
  --brass: #ad7a32;
  --brass-light: #f5e4c4;
  --line: #d9d0c2;
  --danger: #a64545;
  --shadow: 0 18px 50px rgba(32, 35, 59, 0.12);
  --radius: 18px;
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}



* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.72), transparent 26rem),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  color: var(--paper-bright);
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: min(100%, 1440px);
  margin-inline: auto;
  overflow: clip;
}

.site-header {
  padding: 1.25rem clamp(1rem, 4vw, 4.5rem) 3.75rem;
  color: var(--paper-bright);
  background:
    linear-gradient(116deg, rgba(25, 30, 57, 0.99) 0%, rgba(39, 45, 82, 0.98) 63%, rgba(51, 53, 94, 0.94) 100%);
  border-bottom: 5px solid var(--brass);
}

.topline,
.hero,
main,
.site-footer {
  width: min(100%, 1180px);
  margin-inline: auto;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--paper-bright);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--brass-light);
  border: 3px solid var(--brass);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(245, 228, 196, 0.1);
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-subtitle {
  margin-top: 0.08rem;
  color: #c9cbe0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.save-control {
  display: grid;
  justify-items: end;
  gap: 0.14rem;
}

.switch-label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.6rem;
  color: var(--paper-bright);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.switch-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 2.6rem;
  height: 1.45rem;
  flex: 0 0 auto;
  background: #747995;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  transition: background 160ms ease;
}

.switch::after {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 0.85rem;
  height: 0.85rem;
  content: "";
  background: var(--paper-bright);
  border-radius: 50%;
  transition: transform 160ms ease;
}

.switch-label input:checked + .switch {
  background: var(--brass);
}

.switch-label input:checked + .switch::after {
  transform: translateX(1.1rem);
}

.switch-label input:focus-visible + .switch {
  outline: 3px solid var(--brass-light);
  outline-offset: 3px;
}

.save-status {
  color: #c9cbe0;
  font-size: 0.72rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  padding-top: clamp(3rem, 7vw, 5.5rem);
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--brass);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.site-header .eyebrow {
  color: #ebc47c;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  max-width: 11em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

h1 em {
  color: #e9c177;
  font-style: normal;
}

.hero-lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: #d5d7e5;
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}

.text-link {
  color: #f5dfb3;
  font-size: 0.95rem;
  font-weight: 700;
  text-underline-offset: 0.25em;
}

.hero-art-wrap {
  position: relative;
  min-width: 0;
  padding: 0.65rem 0 0.65rem 0.65rem;
}

.hero-art-wrap::before,
.hero-art-wrap::after {
  position: absolute;
  z-index: 0;
  display: block;
  content: "";
  border: 1px solid rgba(225, 197, 140, 0.46);
  border-radius: 4px;
}

.hero-art-wrap::before {
  inset: 1rem 0.5rem 0.25rem 1.2rem;
  transform: rotate(2.5deg);
}

.hero-art-wrap::after {
  inset: 0.25rem 1.15rem 1rem 0;
  transform: rotate(-1.4deg);
}

.hero-art-label {
  position: absolute;
  z-index: 2;
  top: -0.4rem;
  left: 1.5rem;
  padding: 0.35rem 0.65rem;
  color: var(--navy);
  background: var(--brass-light);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border: 9px solid #f0e4d0;
  border-radius: 3px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
}

main {
  padding: 3.75rem 1.25rem 4rem;
}

.live-region {
  min-height: 0;
  margin-inline: auto;
  color: var(--violet-dark);
  font-size: 0.9rem;
}

.live-error:not(:empty),
.live-region:not(:empty) {
  min-height: 1.8rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--violet-light);
  border-left: 4px solid var(--violet);
  border-radius: 4px;
}

.live-error:not(:empty) {
  color: #7a2f36;
  background: #f9e8e2;
  border-left-color: var(--danger);
}

.section {
  padding: clamp(2.3rem, 5vw, 4.3rem) 0;
  border-bottom: 1px solid var(--line);
}

.section:first-of-type {
  padding-top: 1.5rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-note {
  max-width: 31rem;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-height: 6.3rem;
  padding: 1rem 1.15rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-top: 3px solid var(--violet);
  border-radius: 8px;
  box-shadow: 0 4px 0 rgba(64, 54, 120, 0.06);
}

.stat-card-warm {
  border-top-color: var(--brass);
}

.stat-label {
  align-self: start;
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.stat-card strong {
  color: var(--violet-dark);
  font-family: Georgia, serif;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
}

.stat-unit {
  padding-bottom: 0.08rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.review-area {
  min-height: 17rem;
}

.review-empty,
.review-card {
  position: relative;
  overflow: hidden;
  min-height: 17rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.review-empty {
  display: grid;
  place-items: center;
  color: #d9dbea;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(91, 79, 161, 0.35), transparent 55%),
    var(--navy);
}

.review-empty h3 {
  color: var(--paper-bright);
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.review-empty p {
  max-width: 34rem;
  margin: 0.7rem auto 0;
}

.review-card::before,
.review-card::after {
  position: absolute;
  z-index: 0;
  width: 8rem;
  height: 8rem;
  content: "";
  border: 1px solid rgba(218, 189, 126, 0.2);
  border-radius: 50%;
}

.review-card::before {
  top: -3rem;
  right: 5%;
}

.review-card::after {
  right: -4rem;
  bottom: -3rem;
}

.review-card-content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0 auto;
  color: var(--paper-bright);
}

.review-kicker {
  margin: 0 0 1rem;
  color: #e9c177;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.review-front {
  margin: 0;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  line-height: 1.45;
  white-space: pre-wrap;
}

.answer-panel {
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(245, 228, 196, 0.3);
}

.answer-panel[hidden] {
  display: none;
}

.answer-label {
  margin: 0 0 0.45rem;
  color: #c8c9df;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.review-back {
  margin: 0;
  color: #fff8e8;
  font-size: 1.1rem;
  white-space: pre-wrap;
}

.show-answer-button {
  margin-top: 1.7rem;
}

.rating-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.8rem;
}

.rating-actions[hidden] {
  display: none;
}

.rating-button {
  min-height: 3.2rem;
  padding: 0.65rem 0.45rem;
  color: var(--paper-bright);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

.rating-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rating-button[data-rating="again"] {
  border-color: #da8b85;
}

.rating-button[data-rating="easy"] {
  color: var(--navy);
  background: var(--brass-light);
  border-color: var(--brass-light);
}

.rating-hint {
  display: block;
  margin-top: 0.18rem;
  color: #bdc0d4;
  font-size: 0.7rem;
}

.rating-button[data-rating="easy"] .rating-hint {
  color: #635024;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--navy);
  background: var(--brass-light);
  border-color: var(--brass-light);
  box-shadow: 0 4px 0 rgba(105, 72, 24, 0.25);
}

.button-primary:hover:not(:disabled) {
  background: #fff0ce;
}

.button-secondary {
  color: var(--violet-dark);
  background: var(--paper-bright);
  border-color: var(--line);
}

.button-secondary:hover:not(:disabled) {
  background: var(--violet-light);
  border-color: #b9afe6;
}

.button-danger {
  color: var(--danger);
  background: #fff8f6;
  border-color: #dcaeaa;
}

.button-danger:hover:not(:disabled) {
  background: #f9e8e2;
}

.button-small {
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}

.card-form {
  padding: clamp(1.15rem, 3vw, 2rem);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 0 rgba(91, 79, 161, 0.05);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-weight: 800;
}

.label-hint,
.field-help {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.field textarea {
  display: block;
  width: 100%;
  min-height: 8.6rem;
  resize: vertical;
  padding: 0.8rem;
  color: var(--ink);
  background: #fcfaf5;
  border: 1px solid #c8bfaf;
  border-radius: 7px;
  font-size: 1rem;
  line-height: 1.7;
}

.field textarea::placeholder {
  color: #9997a6;
}

.field textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(91, 79, 161, 0.15);
  outline: none;
}

.field-help {
  margin: 0.45rem 0 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.form-mode {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.section-heading-list {
  align-items: center;
}

.list-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.filter-tabs {
  display: inline-flex;
  padding: 0.2rem;
  background: var(--paper-deep);
  border-radius: 8px;
}

.filter-tab {
  min-height: 38px;
  padding: 0.4rem 0.8rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-tab.is-active {
  color: var(--violet-dark);
  background: var(--paper-bright);
  box-shadow: 0 2px 5px rgba(32, 35, 59, 0.08);
}

.card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.list-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  color: var(--ink-muted);
  background: rgba(255, 253, 249, 0.62);
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
}

.catalog-card {
  position: relative;
  min-width: 0;
  padding: 1.1rem 1.15rem 1rem;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-left: 4px solid var(--violet);
  border-radius: 8px;
}

.catalog-card.is-weak {
  border-left-color: var(--brass);
}

.catalog-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
}

.catalog-number {
  color: var(--brass);
  font-family: Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.catalog-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.icon-button {
  min-width: 44px;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 0.78rem;
}

.icon-button:hover {
  color: var(--violet-dark);
  background: var(--violet-light);
  border-color: #c8c0ee;
}

.icon-button.delete:hover {
  color: var(--danger);
  background: #fff0ec;
  border-color: #e2b9b3;
}

.catalog-front {
  margin: 0.65rem 0 0.5rem;
  color: var(--ink);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: pre-wrap;
}

.catalog-answer {
  margin: 0.8rem 0 0;
  padding-top: 0.75rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.catalog-answer summary {
  color: var(--violet-dark);
  cursor: pointer;
  font-weight: 700;
}

.catalog-answer p {
  margin: 0.65rem 0 0;
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.8rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
}

.catalog-meta .weak-label {
  color: #896121;
  font-weight: 700;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.data-card,
.sample-row,
.danger-zone {
  padding: 1.25rem;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.data-card h3,
.sample-row h3,
.danger-zone h3 {
  font-size: 1rem;
}

.data-card p,
.sample-row p,
.danger-zone p {
  margin: 0.45rem 0 1rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

code {
  padding: 0.1rem 0.3rem;
  color: var(--violet-dark);
  background: var(--violet-light);
  border-radius: 3px;
  font-size: 0.85em;
}

.file-button {
  width: fit-content;
}

.import-preview {
  margin-top: 1rem;
  padding: 0.9rem;
  background: #f2edff;
  border: 1px solid #cdc4ef;
  border-radius: 7px;
}

.import-preview h4 {
  margin: 0;
  color: var(--violet-dark);
  font-size: 0.9rem;
}

.import-preview p {
  margin: 0.35rem 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.preview-list {
  display: grid;
  gap: 0.4rem;
  max-height: 13rem;
  margin: 0 0 0.85rem;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.preview-list li {
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.67);
  border-radius: 4px;
  font-size: 0.78rem;
}

.preview-list strong {
  display: block;
  color: var(--violet-dark);
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.sample-row,
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}

.sample-row p,
.danger-zone p {
  margin-bottom: 0;
}

.danger-zone {
  border-color: #e0bbb3;
  background: #fff8f6;
}

.site-footer {
  padding: 2.4rem 1.25rem 3.5rem;
  color: var(--ink-soft);
}

.footer-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-notes p {
  margin: 0;
  font-size: 0.78rem;
}

.footer-notes strong {
  color: var(--ink);
}

.note-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.3rem 0.08rem 0;
  background: var(--brass);
  border-radius: 50%;
}

.browser-note {
  margin: 1.4rem 0 0;
  color: var(--ink-muted);
  font-size: 0.76rem;
}

.footer-caption {
  margin: 1.7rem 0 0;
  color: var(--violet);
  font-family: Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

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

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .hero-copy {
    max-width: 40rem;
  }

  .hero-art {
    max-height: 300px;
  }

  .section-heading,
  .section-heading-list {
    align-items: start;
    flex-direction: column;
  }

  .section-note {
    max-width: 38rem;
    text-align: left;
  }

  .list-actions {
    justify-content: flex-start;
  }

  .footer-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 1rem;
    padding-bottom: 2.7rem;
  }

  .topline {
    align-items: start;
  }

  .save-control {
    justify-items: end;
  }

  .brand-subtitle {
    display: none;
  }

  .switch-label {
    gap: 0.4rem;
    font-size: 0.76rem;
  }

  .save-status {
    max-width: 10rem;
    font-size: 0.66rem;
    text-align: right;
  }

  .hero {
    padding-top: 3.3rem;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.7rem);
  }

  .hero-lede {
    font-size: 0.96rem;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-actions {
    align-items: stretch;
  }

  .text-link {
    display: block;
    padding: 0.5rem;
    text-align: center;
  }

  main {
    padding: 2.8rem 1rem 3rem;
  }

  .stats-grid {
    gap: 0.55rem;
  }

  .stat-card {
    min-height: 5.7rem;
    padding: 0.75rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-card strong {
    font-size: 1.9rem;
  }

  .stat-unit {
    font-size: 0.7rem;
  }

  .review-card,
  .review-empty {
    min-height: 20rem;
    padding: 1.35rem;
  }

  .rating-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .data-grid,
  .card-list {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .form-actions .button {
    width: 100%;
  }

  .form-mode {
    width: 100%;
    margin-left: 0;
  }

  .section-heading-list .list-actions,
  .list-actions,
  .list-actions .button-small {
    width: 100%;
  }

  .list-actions {
    align-items: stretch;
  }

  .filter-tabs {
    width: 100%;
  }

  .filter-tab {
    width: 50%;
  }

  .button-row,
  .button-row .button {
    width: 100%;
  }

  .sample-row,
  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .sample-row .button,
  .danger-zone .button {
    width: 100%;
  }

  .site-footer {
    padding-inline: 1rem;
  }
}

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

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

@media print {
  :root {
    color-scheme: light;
  }

  body,
  .app-shell {
    background: #fff;
  }

  .site-header,
  .section-today,
  .section-editor,
  .section-data,
  .site-footer,
  .section-heading-list .list-actions,
  .catalog-card-actions,
  .catalog-answer summary {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .section-list {
    display: block;
    border: 0;
  }

  .section-heading-list {
    display: block;
    margin-bottom: 1rem;
  }

  .section-heading-list .eyebrow {
    color: #555;
  }

  .card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .catalog-answer[open] p {
    display: block;
  }

  .catalog-answer {
    display: block;
  }

  .catalog-answer p {
    display: block !important;
  }
}

.hero h1 { word-break: auto-phrase; }
.hero-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; padding-left: 1.25rem; }
.hero-steps li { padding-left: 2px; line-height: 1.45; }

@media (max-width: 640px) {
  .hero { gap: 14px; padding-block: 20px 24px; }
  .hero h1 { font-size: clamp(1.65rem, 7.5vw, 2.4rem); line-height: 1.15; }
  .hero-lede { margin: 10px 0; font-size: .94rem; line-height: 1.5; }
  .hero-steps { grid-template-columns: 1fr; gap: 4px; margin: 8px 0 12px; }
  .hero-steps li { font-size: .88rem; }
  .hero-actions { margin-top: 8px; }
  .hero-art-wrap { display: none; }
  .section-editor > .section-heading { gap: 8px; margin-bottom: 12px; }
  .section-editor > .section-heading .eyebrow { display: none; }
  .section-editor > .section-heading h2 { font-size: clamp(1.4rem, 6vw, 1.85rem); line-height: 1.15; }
  .section-editor > .section-heading .section-note { margin-block: 0; font-size: .92rem; line-height: 1.5; }
}

/* stage A desktop compression */
@media (min-width: 841px) {
  .hero { gap: 36px; padding-top: 28px; padding-bottom: 24px; }
  .hero h1 { max-width: none; font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.1; }
  .hero-lede { margin: 12px 0; font-size: 1rem; line-height: 1.5; }
  .hero-art { max-height: 300px; }
  .hero-steps { gap: 7px; margin: 10px 0; font-size: .9rem; }
  .section-editor > .section-heading { margin-bottom: .75rem; }
}
