:root {
  --paper: #f2ecdf;
  --paper-light: #f8f4eb;
  --paper-deep: #e4d9c8;
  --ink: #24251f;
  --ink-soft: #55554d;
  --rule: rgba(36, 37, 31, 0.22);
  --rule-light: rgba(36, 37, 31, 0.12);
  --red: #b54232;
  --red-dark: #803126;
  --red-soft: #f2d9cf;
  --shadow: 0 14px 40px rgba(44, 35, 24, 0.12);
  --serif: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", "Yu Mincho", "游明朝", "Noto Serif JP", serif;
  --sans: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "Yu Gothic", "游ゴシック", "Noto Sans JP", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(181, 66, 50, 0.1), transparent 24rem),
    linear-gradient(180deg, #d7cabb 0, #e8dfd1 20rem, var(--paper) 44rem);
  color: var(--ink);
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  content: "";
  background-image: repeating-linear-gradient(0deg, rgba(56, 47, 35, 0.035) 0, rgba(56, 47, 35, 0.035) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: multiply;
}

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

button,
select,
input[type="range"] {
  cursor: pointer;
}

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

a {
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
figure,
ol,
ul {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

.page-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 70px);
  background: rgba(242, 236, 223, 0.82);
  box-shadow: 0 0 70px rgba(68, 52, 36, 0.14);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  transform: rotate(-8deg);
}

.wordmark-kicker,
.wordmark-title {
  display: block;
}

.wordmark-kicker,
.section-number,
.eyebrow,
.panel-label,
.intro-meta,
.press-visual-caption,
.card-index,
.card-tag,
.guide-index,
.site-footer,
.label-hint,
.field-meta,
.control-note {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark-kicker {
  color: var(--red-dark);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.wordmark-title {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: right;
}

.red-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(181, 66, 50, 0.13);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 5vw, 84px);
  align-items: stretch;
  padding: clamp(42px, 8vw, 104px) 0 clamp(48px, 7vw, 92px);
}

.intro-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.section-number {
  color: var(--red-dark);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.3;
}

.intro-copy h1 {
  max-width: 10ch;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 8vw, 7.2rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.98;
  text-wrap: balance;
}

em {
  color: var(--red);
  font-style: normal;
}

.intro-lede {
  max-width: 34rem;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 1.4vw, 1.12rem);
  line-height: 2;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 34px;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.intro-meta span::before {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.press-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(36, 37, 31, 0.6);
  background-color: #8b7962;
  background-image:
    linear-gradient(115deg, rgba(25, 26, 22, 0.25), rgba(181, 66, 50, 0.12) 48%, rgba(238, 228, 210, 0.12)),
    url("/assets/letterpress-still-life.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.press-visual::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(31, 29, 24, 0.74), transparent 55%), repeating-linear-gradient(90deg, rgba(255, 247, 231, 0.07) 0, rgba(255, 247, 231, 0.07) 1px, transparent 1px, transparent 7px);
  content: "";
  mix-blend-mode: multiply;
}

.press-visual::after {
  position: absolute;
  top: 14%;
  right: 8%;
  width: 37%;
  height: 56%;
  border: 1px solid rgba(244, 236, 223, 0.5);
  content: "";
  transform: rotate(3deg);
}

.press-visual-caption {
  position: absolute;
  bottom: 22px;
  left: 24px;
  z-index: 1;
  display: grid;
  gap: 5px;
  color: #f4ecdf;
  font-size: 0.64rem;
  font-weight: 800;
}

.press-visual-caption span:last-child {
  color: #e5c2b8;
  font-family: var(--serif);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: none;
}

.press-visual-plate {
  position: absolute;
  top: 14%;
  left: 10%;
  z-index: 1;
  color: rgba(246, 239, 224, 0.82);
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 10rem);
  font-weight: 700;
  line-height: 1;
  opacity: 0.65;
  transform: rotate(-10deg);
  mix-blend-mode: screen;
}

.tool-section,
.guide-section,
.notes-grid {
  border-top: 1px solid var(--rule);
}

.tool-section {
  padding: clamp(36px, 5vw, 70px) 0 clamp(64px, 8vw, 116px);
}

.section-heading,
.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2,
.results-heading h2,
.guide-intro h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.section-heading > p {
  max-width: 31rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.8;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: start;
  margin-top: 42px;
}

.control-panel {
  position: sticky;
  top: 18px;
  min-width: 0;
  border: 1px solid var(--rule);
  background: rgba(248, 244, 235, 0.68);
  box-shadow: 8px 8px 0 rgba(181, 66, 50, 0.08);
}

.panel-label {
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--red-dark);
  font-size: 0.62rem;
  font-weight: 800;
}

#controls-form {
  padding: 22px 20px 8px;
}

.control-group {
  min-width: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--rule-light);
}

.control-group + .control-group {
  padding-top: 22px;
}

.control-group legend {
  width: 100%;
  margin-bottom: 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
}

.control-group label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.label-hint,
.field-hint,
.control-note {
  color: var(--ink-soft);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

input[type="text"],
textarea,
select {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(36, 37, 31, 0.42);
  border-radius: 0;
  background: rgba(255, 252, 245, 0.8);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

input[type="text"],
select {
  padding: 9px 11px;
}

textarea {
  min-height: 168px;
  padding: 11px;
  resize: vertical;
}

input[type="text"]:hover,
input[type="text"]:focus,
textarea:hover,
textarea:focus,
select:hover,
select:focus {
  border-color: var(--red);
  background: #fffdf8;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-soft);
}

.field-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 700;
}

.field-error {
  min-height: 1.2em;
  margin-top: 6px;
  color: var(--red-dark);
  font-size: 0.76rem;
  line-height: 1.5;
}

.range-control + .range-control {
  margin-top: 15px;
}

.range-control label {
  margin: 0 0 3px;
}

output {
  min-width: 4.8em;
  color: var(--red-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  text-align: right;
}

input[type="range"] {
  display: block;
  width: 100%;
  min-height: 34px;
  accent-color: var(--red);
}

.control-note {
  margin-top: 10px;
  line-height: 1.6;
}

.control-actions {
  display: grid;
  gap: 9px;
  padding: 22px 0 4px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 9px 13px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button-primary {
  border-color: var(--red-dark);
  background: var(--red);
  color: #fff8ed;
}

.button-primary:hover {
  background: var(--red-dark);
}

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

.button-quiet:hover {
  background: var(--paper-deep);
}

.action-status {
  min-height: 1.4em;
  margin: 10px 0 4px;
  color: var(--red-dark);
  font-size: 0.75rem;
  line-height: 1.5;
}

.font-guide {
  border-top: 1px solid var(--rule-light);
  padding: 17px 20px 20px;
}

.font-guide summary,
.info-note summary,
.css-details summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.font-guide > p {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.7;
}

.font-support-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  list-style: none;
}

.font-support-list li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.45;
}

.font-support-list li::before {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ink-soft);
  content: "";
}

.font-support-list li.is-available::before {
  background: #557549;
}

.font-support-list li.is-missing::before {
  background: var(--red);
}

.font-support-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.75rem;
}

.font-support-list span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.results-panel {
  min-width: 0;
}

.results-heading {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.results-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.validation-summary {
  max-width: 24rem;
  color: var(--red-dark);
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: right;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
}

.comparison-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: rgba(255, 252, 245, 0.78);
  box-shadow: 5px 5px 0 rgba(36, 37, 31, 0.06);
}

.card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--rule);
}

.card-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--red-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.61rem;
  font-weight: 800;
}

.card-head h3 {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.2;
}

.card-head p {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.4;
}

.card-tag {
  align-self: start;
  color: var(--red-dark);
  font-size: 0.59rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}

.card-preview {
  --heading-font: var(--serif);
  --body-font: var(--sans);
  --heading-weight: 600;
  --body-weight: 400;
  --line-height: 1.8;
  --letter-spacing: 0.02em;
  --wrap-width: 32ch;
  display: flex;
  min-width: 0;
  min-height: 320px;
  flex: 1;
  flex-direction: column;
  padding: clamp(19px, 2.2vw, 30px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 55%),
    linear-gradient(180deg, rgba(238, 230, 214, 0.74), rgba(255, 252, 245, 0.4));
}

.preview-kicker {
  color: var(--red-dark);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.preview-heading {
  max-width: var(--wrap-width);
  margin-top: 17px;
  color: var(--ink);
  font-family: var(--heading-font);
  font-size: clamp(1.55rem, 2.7vw, 2.45rem);
  font-weight: var(--heading-weight);
  letter-spacing: var(--letter-spacing);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.preview-body {
  max-width: var(--wrap-width);
  margin-top: 20px;
  color: var(--ink-soft);
  font-family: var(--body-font);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: var(--body-weight);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.card-meta {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 26px;
}

.card-meta-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid var(--rule-light);
  padding-top: 8px;
}

.card-meta-item > span {
  color: var(--red-dark);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.font-stack-code {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.67rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.css-details {
  border-top: 1px solid var(--rule);
  padding: 15px;
}

.css-details summary {
  color: var(--red-dark);
  font-size: 0.72rem;
}

.css-code {
  display: block;
  max-height: 220px;
  overflow: auto;
  margin-top: 11px;
  border: 1px solid var(--rule-light);
  padding: 11px;
  background: rgba(228, 217, 200, 0.35);
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.copy-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.copy-card-button {
  min-height: 40px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 10px;
  font-size: 0.71rem;
  font-weight: 800;
}

.copy-card-button:hover {
  background: var(--paper-deep);
}

.copy-status {
  color: var(--red-dark);
  font-size: 0.69rem;
}

.invalid-state {
  display: grid;
  min-height: 320px;
  place-content: center;
  justify-items: center;
  border: 1px dashed var(--red);
  background: rgba(242, 217, 207, 0.35);
  padding: 28px;
  text-align: center;
}

.invalid-state-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 50%;
  color: var(--red-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
}

.invalid-state h3 {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.4;
}

.invalid-state p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.result-footnote {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.7;
}

.guide-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(30px, 7vw, 110px);
  padding: clamp(48px, 7vw, 100px) 0;
}

.guide-intro h2 {
  margin-top: 17px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.guide-list {
  display: grid;
  gap: 0;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 25px;
}

.guide-list li + li {
  padding-top: 25px;
  border-top: 1px solid var(--rule);
}

.guide-index {
  color: var(--red-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 800;
}

.guide-list h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.25;
}

.guide-list p {
  max-width: 38rem;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.85;
}

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

.info-note {
  min-width: 0;
  padding: 25px 22px 31px;
}

.info-note + .info-note {
  border-left: 1px solid var(--rule);
}

.info-note summary {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.info-note p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .tool-layout {
    grid-template-columns: minmax(235px, 0.42fr) minmax(0, 1fr);
    gap: 25px;
  }

  .comparison-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-preview {
    min-height: 290px;
  }
}

@media (max-width: 780px) {
  .intro-grid,
  .guide-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro-grid {
    padding-top: 50px;
  }

  .intro-copy h1 {
    max-width: none;
    font-size: clamp(3.2rem, 15vw, 5.8rem);
  }

  .press-visual {
    min-height: 270px;
  }

  .tool-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-panel {
    position: static;
  }

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

  .validation-summary {
    max-width: none;
    text-align: left;
  }

  .guide-section {
    gap: 38px;
  }

  .notes-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .info-note + .info-note {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 0 15px;
  }

  .site-header {
    min-height: 78px;
  }

  .header-note {
    font-size: 0.58rem;
  }

  .wordmark-title {
    font-size: 1rem;
  }

  .wordmark-mark {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .intro-grid {
    gap: 30px;
    padding: 36px 0 53px;
  }

  .intro-copy h1 {
    margin-top: 15px;
    font-size: clamp(3rem, 15.5vw, 4.7rem);
  }

  .intro-lede {
    margin-top: 22px;
    font-size: 0.92rem;
  }

  .press-visual {
    min-height: 205px;
  }

  .press-visual-plate {
    font-size: 6rem;
  }

  .press-visual-caption {
    bottom: 15px;
    left: 15px;
  }

  #controls-form {
    padding-right: 15px;
    padding-left: 15px;
  }

  .font-guide {
    padding-right: 15px;
    padding-left: 15px;
  }

  .card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .card-tag {
    grid-column: 2;
    text-align: left;
  }

  .card-preview {
    min-height: 270px;
    padding: 20px 17px;
  }

  .preview-heading {
    font-size: 1.75rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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

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

@media print {
  :root {
    --paper: #fff;
    --paper-light: #fff;
    --paper-deep: #fff;
  }

  body,
  .page-shell {
    background: #fff;
    box-shadow: none;
  }

  body::before,
  .site-header,
  .intro-grid,
  .control-panel,
  .guide-section,
  .notes-grid,
  .site-footer,
  .result-footnote,
  .css-details,
  .results-heading .section-number {
    display: none !important;
  }

  .tool-section {
    border-top: 0;
    padding: 0;
  }

  .results-heading {
    display: block;
    border-bottom: 1px solid #222;
  }

  .results-heading h2 {
    margin: 0 0 16px;
  }

  .comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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