:root {
  --ink: #252321;
  --ink-soft: #5d5750;
  --paper: #f5f0e8;
  --paper-deep: #e6ddd0;
  --line: #d5cabb;
  --accent: #c8573b;
  --accent-deep: #8e3428;
  --teal: #2f7772;
  --white: #fffdf9;
  --shadow: 0 18px 55px rgb(60 38 21 / 9%);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shell: 1160px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}



* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 17%, rgb(200 87 59 / 8%), transparent 19rem),
    var(--paper);
}

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

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--accent-deep);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-header {
  border-bottom: 1px solid rgb(85 62 39 / 11%);
  background: rgb(245 240 232 / 88%);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px 13px 13px 3px;
  color: var(--white);
  background: var(--accent);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.brand-name,
.brand-caption {
  display: block;
  line-height: 1.15;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0.03em;
}

.brand-caption {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 22px;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  text-decoration: none;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 90px);
  min-height: 560px;
  padding-block: 78px 94px;
}

.eyebrow,
.section-kicker,
.formula-label {
  margin: 0;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow span {
  margin-right: 7px;
  color: var(--accent);
}

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

h1,
h2,
h3,
h4 {
  margin-top: 0;
  text-wrap: balance;
}

h1,
h2,
h3 {
  font-family: Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 11ch;
  margin-bottom: 25px;
  font-size: clamp(3.2rem, 6.2vw, 5.9rem);
  line-height: 1.08;
}

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

.hero-lede {
  max-width: 35rem;
  margin: 0 0 27px;
  color: var(--ink-soft);
  font-size: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link span {
  font-size: 19px;
  transition: transform 160ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.hero-art {
  position: relative;
  margin: 0;
}

.hero-art::before {
  position: absolute;
  inset: 10% -5% -10% 7%;
  z-index: -1;
  border-radius: 48% 44% 40% 50%;
  background: rgb(200 87 59 / 16%);
  content: "";
  transform: rotate(-4deg);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 38% 8% 8% 38%;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.hero-art figcaption {
  margin-top: 13px;
  color: var(--ink-soft);
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-size: 13px;
  font-style: italic;
  text-align: right;
}

.workspace,
.preview-section,
.results-section,
.about-section {
  padding-block: 74px;
  scroll-margin-top: 32px;
}

.workspace {
  padding-top: 48px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(110px, 0.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: baseline;
  margin-bottom: 32px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.13;
}

.section-heading p:not(.section-kicker) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.7fr);
  gap: 24px;
  align-items: stretch;
}

.panel {
  border: 1px solid rgb(85 62 39 / 12%);
  border-radius: var(--radius-lg);
  background: rgb(255 253 249 / 80%);
  box-shadow: 0 12px 32px rgb(60 38 21 / 5%);
}

.editor-panel {
  padding: clamp(22px, 4vw, 38px);
}

.panel-heading,
.label-row,
.ratio-card-topline,
.secondary-heading,
.preview-topline,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h3,
.formula-card h3,
.note-card h3,
.secondary-heading h3 {
  margin-bottom: 4px;
}

.panel-heading h3 {
  font-size: 23px;
}

.muted,
.field-hint {
  color: var(--ink-soft);
  font-size: 12px;
}

.muted {
  margin: 0;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--accent-deep);
  background: rgb(200 87 59 / 9%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.local-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgb(47 119 114 / 25%);
  border-radius: 999px;
  color: #215f5b;
  background: rgb(47 119 114 / 8%);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.local-badge span {
  color: var(--teal);
}

.preset-group {
  margin-top: 30px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.label-row {
  align-items: baseline;
  margin-bottom: 11px;
}

.label-row h4 {
  margin: 0;
  font-size: 13px;
}

.preset-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preset-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.preset-button:hover,
.preset-button.is-selected {
  border-color: var(--accent);
  box-shadow: 0 5px 15px rgb(200 87 59 / 12%);
  transform: translateY(-1px);
}

.preset-swatches {
  display: flex;
  gap: 3px;
}

.preset-swatch {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgb(37 35 33 / 12%);
}

.preset-copy {
  display: block;
  min-width: 0;
}

.preset-copy strong,
.preset-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-copy strong {
  font-size: 12px;
}

.preset-copy small {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 10px;
}

.color-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 12px;
  margin-top: 27px;
}

.color-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.color-field legend {
  margin-bottom: 7px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
}

.color-control {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}

.color-picker {
  width: 48px;
  height: 46px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}

.hex-input {
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.hex-input:hover,
.color-picker:hover {
  border-color: var(--accent);
}

.color-field.is-invalid .hex-input {
  border-color: var(--accent-deep);
  background: rgb(200 87 59 / 7%);
}

.field-hint,
.field-error {
  min-height: 20px;
  margin: 5px 0 0;
  line-height: 1.45;
}

.field-error {
  color: var(--accent-deep);
  font-size: 12px;
}

.editor-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.editor-actions {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  box-shadow: 0 7px 18px rgb(60 38 21 / 12%);
  transform: translateY(-1px);
}

.button-primary {
  color: var(--white);
  background: var(--accent-deep);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--white);
}

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

.formula-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.formula-label {
  color: #e4937d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.formula-card h3 {
  margin-top: 23px;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.15;
}

.formula-card h3 span {
  color: #f0b69d;
}

.formula-card > p:not(.formula-label):not(.formula-note) {
  margin: 20px 0 0;
  color: #d7cec4;
  font-size: 13px;
}

.formula {
  display: grid;
  gap: 8px;
  width: min(100%, 230px);
  margin-top: 26px;
  color: #f8ede2;
  font-family: Georgia, serif;
  font-size: 14px;
  text-align: center;
}

.formula-line {
  height: 1px;
  background: #9b8170;
}

.formula-note {
  margin: 24px 0 0;
  padding-top: 15px;
  border-top: 1px solid rgb(255 255 255 / 17%);
  color: #b6a99d;
  font-size: 11px;
  line-height: 1.65;
}

.preview-section {
  padding-top: 90px;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 5vw, 62px);
  border-radius: var(--radius-lg);
  color: var(--palette-foreground);
  background: var(--palette-background);
  box-shadow: var(--shadow);
}

.preview-frame::after {
  position: absolute;
  top: -100px;
  right: -50px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: var(--palette-surface);
  content: "";
  opacity: 0.55;
}

.preview-topline {
  position: relative;
  z-index: 1;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--palette-foreground) 20%, transparent);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.preview-brand {
  font-weight: 800;
}

.preview-brand span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  place-items: center;
  border-radius: 50%;
  color: var(--palette-background);
  background: var(--palette-foreground);
  font-size: 12px;
}

.preview-meta {
  color: color-mix(in srgb, var(--palette-foreground) 65%, transparent);
  font-size: 10px;
}

.preview-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: clamp(30px, 8vw, 100px);
  align-items: center;
  padding-top: clamp(45px, 7vw, 86px);
  padding-bottom: 20px;
}

.preview-overline {
  margin: 0 0 15px;
  color: var(--palette-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.preview-intro h3 {
  max-width: 10ch;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  line-height: 1.08;
}

.preview-intro h3 span {
  color: var(--palette-accent);
}

.preview-intro > p:not(.preview-overline) {
  max-width: 35rem;
  margin: 0 0 25px;
  color: color-mix(in srgb, var(--palette-foreground) 78%, transparent);
  font-size: 14px;
}

.preview-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 48px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  color: var(--palette-background);
  background: var(--palette-accent);
  font-size: 13px;
  font-weight: 800;
}

.preview-button span {
  font-size: 18px;
}

.preview-card {
  min-width: 0;
  padding: clamp(19px, 3vw, 30px);
  border-radius: 20px 20px 20px 4px;
  color: var(--palette-foreground);
  background: var(--palette-surface);
  box-shadow: 0 18px 30px rgb(37 35 33 / 9%);
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: color-mix(in srgb, var(--palette-foreground) 70%, transparent);
  font-size: 11px;
  font-weight: 700;
}

.preview-card-mark {
  color: var(--palette-accent);
  font-size: 17px;
}

.preview-card-title {
  margin: 21px 0 25px;
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.25;
}

.mini-chart {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  gap: 8px;
  align-items: center;
  font-size: 10px;
}

.chart-row strong {
  font-size: 11px;
  text-align: right;
}

.chart-track {
  overflow: hidden;
  height: 9px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--palette-foreground) 13%, transparent);
}

.chart-bar {
  display: block;
  width: var(--bar-size);
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color);
}

.chart-caption {
  margin: 21px 0 0;
  color: color-mix(in srgb, var(--palette-foreground) 68%, transparent);
  font-size: 10px;
  line-height: 1.55;
}

.results-section {
  padding-top: 86px;
}

.compact-heading {
  margin-bottom: 22px;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
}

.ratio-card,
.secondary-card {
  padding: clamp(21px, 3vw, 31px);
}

.ratio-card-topline {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.ratio-label {
  overflow-wrap: anywhere;
  color: var(--accent-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
}

.ratio-value,
.secondary-ratio {
  margin-top: 21px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: clamp(3.6rem, 8vw, 6.9rem);
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.ratio-value small,
.secondary-ratio small {
  margin-left: 7px;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.33em;
  font-weight: 500;
  letter-spacing: 0;
}

.ratio-summary,
.secondary-card p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.criteria-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.criterion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
}

.criterion > span:first-child {
  color: var(--ink-soft);
}

.criterion-result {
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
}

.is-pass {
  color: #246c58;
}

.is-fail {
  color: var(--accent-deep);
}

.secondary-results {
  display: grid;
  gap: 14px;
}

.secondary-heading {
  justify-content: flex-start;
}

.secondary-heading h3 {
  font-size: 17px;
}

.sample-dot {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(37 35 33 / 18%);
}

.secondary-ratio {
  margin-top: 17px;
  font-size: clamp(2.6rem, 5vw, 4.3rem);
}

.secondary-status-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.result-actions {
  margin-top: 20px;
}

.action-status {
  min-height: 24px;
  margin: 11px 0 0;
  color: #246c58;
  font-size: 12px;
}

.action-status[data-status="error"] {
  color: var(--accent-deep);
}

.about-section {
  padding-top: 95px;
}

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

.note-card {
  min-width: 0;
  padding: 23px;
  border-top: 2px solid var(--accent);
  background: rgb(255 253 249 / 55%);
}

.note-number {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 22px;
}

.note-card h3 {
  font-size: 21px;
}

.note-card p,
.disclaimer-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 62px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.disclaimer-grid h3 {
  margin-bottom: 9px;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid rgb(85 62 39 / 13%);
}

.footer-inner {
  min-height: 100px;
  color: var(--ink-soft);
  font-size: 11px;
}

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 30;
  padding: 15px;
  border: 1px solid var(--accent-deep);
  border-radius: 12px;
  color: var(--white);
  background: var(--accent-deep);
}

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

@media (max-width: 880px) {
  .hero {
    gap: 40px;
    padding-top: 60px;
  }

  .editor-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .formula-card {
    min-height: 0;
  }

  .preview-content {
    gap: 35px;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-height: 105px;
    padding-block: 15px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 4px 16px;
    font-size: 12px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 37px;
    min-height: 0;
    padding-block: 58px 70px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3.1rem, 14vw, 5rem);
  }

  .hero-lede {
    font-size: 15px;
  }

  .hero-art img {
    border-radius: 30% 7% 7% 30%;
  }

  .hero-art {
    overflow: hidden;
  }

  .workspace,
  .preview-section,
  .results-section,
  .about-section {
    padding-block: 57px;
  }

  .section-heading {
    display: block;
    margin-bottom: 25px;
  }

  .section-kicker {
    margin-bottom: 10px;
  }

  .section-heading h2 {
    font-size: 2.5rem;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .preset-list {
    grid-template-columns: 1fr;
  }

  .preset-button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 58px;
  }

  .color-fields {
    grid-template-columns: 1fr;
  }

  .preview-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .preview-content {
    grid-template-columns: 1fr;
    padding-top: 49px;
  }

  .preview-intro h3 {
    max-width: 13ch;
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

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

  .disclaimer-grid {
    gap: 27px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding-block: 24px;
  }
}

@media (max-width: 380px) {
  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .hero {
    padding-top: 45px;
  }

  h1 {
    font-size: 3rem;
  }

  .editor-panel,
  .formula-card,
  .ratio-card,
  .secondary-card {
    padding: 18px;
  }

  .criteria-list {
    grid-template-columns: 1fr;
  }

  .ratio-card-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .button {
    width: 100%;
  }

  .result-actions .button {
    width: 100%;
  }
}

@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,
  body {
    background: #fff;
  }

  .site-header,
  .hero,
  .workspace,
  .about-section,
  .site-footer,
  .result-actions,
  .action-status {
    display: none !important;
  }

  .preview-section,
  .results-section {
    display: block;
    padding: 0;
  }

  .preview-section {
    page-break-after: always;
  }

  .shell {
    width: 100%;
  }

  .preview-frame,
  .panel {
    box-shadow: none;
  }
}

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

@media (max-width: 640px) {
  .hero { gap: 18px; padding-block: 22px 26px; }
  .hero h1 { font-size: clamp(1.65rem, 7.5vw, 2.4rem); line-height: 1.15; }
  .hero-lede { margin: 12px 0; font-size: .94rem; line-height: 1.5; }
  .hero-steps { grid-template-columns: 1fr; gap: 4px; margin: 10px 0 14px; }
  .hero-steps li { font-size: .88rem; }
  .hero-cta { min-height: 44px; }
  .hero-art { display: none; }
  .workspace > .section-heading { gap: 9px; margin-bottom: 14px; }
  .workspace > .section-heading .section-kicker { display: none; }
  .workspace > .section-heading h2 { font-size: clamp(1.4rem, 6vw, 1.85rem); line-height: 1.15; }
  .workspace > .section-heading p:not(.section-kicker) { margin-block: 0; font-size: .92rem; line-height: 1.5; }
}

/* stage A desktop compression */
@media (min-width: 681px) {
  .hero { min-height: 0; gap: clamp(24px, 3vw, 40px); padding-block: 16px 20px; }
  .hero h1 { max-width: none; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.1; }
  .hero-lede { margin: 8px 0; font-size: 1rem; line-height: 1.5; }
  .hero-art { max-width: 560px; margin-inline: auto; }
  .hero-art img { max-height: 240px; object-fit: cover; }
  .hero-steps { gap: 12px; margin: 6px 0; font-size: .9rem; }
}
