/* ============================================================ Himel3
   One plate, drawn by site/tools/dither.py, and the page's own type. The
   paper and the ink swap places in the dark, so the section stays the
   negative of the page and the plate keeps its depth. */

.model-cover {
  padding-block: clamp(36px, 6vw, 88px) clamp(44px, 6vw, 88px);
}

.model-name {
  margin: 0;
  color: var(--text);
  font-family: "Syne", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 13.8vw, 208px);
  line-height: 0.8;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.model-name .three { color: var(--accent); }

.model-cover-body {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.54fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  margin-top: clamp(28px, 4vw, 52px);
}

.model-tagline {
  margin: 0;
  color: var(--text);
  font: var(--w-display) clamp(24px, 2.4vw, 36px) / 1.45 var(--display);
  letter-spacing: 0.01em;
}
:lang(en) .model-tagline,
:lang(es) .model-tagline {
  font-size: clamp(24px, 2.3vw, 35px);
}
:lang(ja) .model-tagline { letter-spacing: 0.02em; }

/* Keifont and Geist Serif each have one real weight; a thin stroke is the
   honest way to thicken them without a smeared synthetic bold. */
.model-intro,
.model-deep .model-copy,
.model-close p {
  -webkit-text-stroke: 0.012em currentColor;
}
:lang(ja) .model-tagline,
:lang(ja) .model-deep .model-big,
:lang(ja) .model-results h2,
:lang(ja) .model-close h2 {
  -webkit-text-stroke: 0.014em currentColor;
}

.model-intro {
  max-width: 27em;
  margin: 14px 0 0;
  color: var(--secondary);
  font: 500 16.5px / 1.85 var(--font);
  word-break: auto-phrase;
}

.model-action { margin: 22px 0 0; }
.model-action a {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--hairline) solid var(--accent);
  border-radius: 4px;
  color: var(--text);
  font: 500 15px / 1.4 var(--font);
  text-decoration: none;
}
.model-action a:hover { background: color-mix(in srgb, var(--accent) 10%, var(--base)); }
.model-action .arrow { transition: transform 0.18s ease; }
.model-action a:hover .arrow { transform: translateY(3px); }

.model-plate {
  width: 100%;
  max-width: 700px;
  margin: 0;
  justify-self: end;
}
.model-stage {
  position: relative;
  aspect-ratio: 900 / 507;
}
.model-still {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.6s ease;
}
.model-still img {
  display: block;
  width: 100%;
  height: auto;
}
.model-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.model-stage.is-live .model-still { opacity: 0; }
.model-stage.is-live .model-canvas { opacity: 1; }

.model-plate figcaption {
  margin-top: 8px;
  padding-top: 10px;
  border-top: var(--hairline) solid var(--border);
  color: var(--tertiary);
  font: 500 11px / 1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The section is the page's ink; in the dark it is the page's paper. */
.model-deep {
  padding: clamp(44px, 7vw, 104px) 0;
  background: var(--text);
  color: var(--base);
}
.model-deep .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 5vw, 72px);
}
.model-deep .model-big {
  max-width: 14em;
  margin: 0;
  color: var(--base);
  font: var(--w-display) clamp(38px, 5.5vw, 78px) / 1.22 var(--display);
  letter-spacing: 0.01em;
}
:lang(en) .model-deep .model-big,
:lang(es) .model-deep .model-big {
  max-width: 18em;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.model-deep .model-copy {
  max-width: 28em;
  margin: 0;
  color: var(--base);
  opacity: 0.78;
  font: 500 clamp(16.5px, 1.25vw, 18.5px) / 1.85 var(--font);
  word-break: auto-phrase;
}

.model-results {
  padding: clamp(48px, 7vw, 96px) 0;
  scroll-margin-top: 18px;
}
.model-results h2,
.model-results h3 {
  margin: 0;
  color: var(--text);
  font: var(--w-display) clamp(30px, 4.6vw, 54px) / 1.25 var(--display);
}
.model-results h3 {
  margin-top: clamp(36px, 6vw, 68px);
  font-size: clamp(23px, 2.75vw, 32px);
}
.model-results p {
  max-width: 66ch;
  margin: 18px 0 0;
  color: var(--secondary);
  font: 500 16px / 1.85 var(--font);
  word-break: auto-phrase;
}
.model-score {
  color: var(--text);
  font-synthesis: weight;
}
.model-results .model-table-hint {
  display: none;
  margin-top: 24px;
  color: var(--tertiary);
  font-size: 14px;
}
.model-results .model-table-note {
  margin-top: 12px;
  color: var(--tertiary);
  font-size: 14px;
}
.model-table {
  --highlight: color-mix(in srgb, var(--accent) 13%, var(--base));
  max-width: 100%;
  margin-top: 28px;
  overflow-x: auto;
}
.model-table table {
  width: 100%;
  min-width: 720px;
  border-spacing: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.model-table caption {
  padding-bottom: 10px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: var(--w-display);
  text-align: start;
}
.model-table th,
.model-table td {
  padding: 10px 12px;
  border-bottom: var(--hairline) solid var(--border);
  text-align: end;
  vertical-align: middle;
}
.model-table th:first-child {
  width: 30%;
  text-align: start;
}
.model-table thead th {
  border-top: var(--hairline) solid var(--border);
  color: var(--secondary);
}
.model-table tbody th { font-synthesis: weight; }
.model-table tbody td {
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}
.model-table-highlight > * { background: var(--highlight); }
.model-sample-size {
  display: block;
  color: var(--tertiary);
  font-size: 12px;
}
.model-method {
  margin-top: clamp(36px, 6vw, 68px);
  border-block: var(--hairline) solid var(--border);
}
.model-method summary {
  cursor: pointer;
  min-height: 44px;
  padding: 14px 0;
  font: var(--w-display) clamp(18px, 2.3vw, 24px) / 1.5 var(--display);
}
.model-method summary::marker { color: var(--accent); }
.model-method summary:hover { color: var(--link); }
.model-method p:first-of-type { margin-top: 0; }
.model-method p:last-of-type { margin-bottom: 20px; }
.model-figure {
  max-width: 880px;
  margin: clamp(28px, 4vw, 48px) 0 0;
}
.model-figure > a {
  display: block;
  text-align: end;
}
.model-figure-action {
  display: block;
  padding: 9px 0;
  font-size: 14px;
}
.model-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.model-figure figcaption {
  max-width: 66ch;
  color: var(--tertiary);
  font-size: 14px;
}

.model-close {
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: var(--hairline) solid var(--border);
}
.model-close h2 {
  max-width: 16em;
  margin: 0;
  color: var(--text);
  font: var(--w-display) clamp(30px, 4.6vw, 54px) / 1.3 var(--display);
  letter-spacing: 0.01em;
}
.model-close p {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--secondary);
  font: 500 16px / 1.85 var(--font);
  word-break: auto-phrase;
}
.model-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 0 24px;
  max-width: 640px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.model-downloads a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  border-top: var(--hairline) solid var(--border);
}

@media (max-width: 760px) {
  .model-results .model-table-hint { display: block; }
  .model-table { margin-top: 10px; }
  .model-table th:first-child {
    position: sticky;
    inset-inline-start: 0;
    width: 140px;
    background: var(--base);
    border-inline-end: var(--hairline) solid var(--border);
  }
  .model-table .model-table-highlight th { background: var(--highlight); }
}

@media (max-width: 700px) {
  .model-name { font-size: clamp(38px, 15.5vw, 110px); }
  .model-cover-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .model-plate {
    max-width: none;
    justify-self: stretch;
  }
  .model-deep .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .model-action .arrow,
  .model-still,
  .model-canvas { transition: none; }
}
