/* Kanji Morphology × Valency — findings site
   Ink/paper academic design system (adapted from heatmap-academic pattern) */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Noto+Sans+JP:wght@300;400;500;600;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Ink / paper ground */
  --ink: #0e0c0a;
  --ink-elevated: #161310;
  --ink-soft: #1e1a16;
  --ink-border: #2e2820;

  /* Text — warm paper */
  --text: #ebe4d6;
  --text-muted: #a89e8c;
  --text-faint: #6e6558;

  /* Accent palette — cinnabar seal, indigo, celadon, gold leaf */
  --cinnabar: #c44536;
  --cinnabar-soft: #e06a55;
  --indigo: #4a5f8c;
  --indigo-bright: #6b82b5;
  --celadon: #6a9a7a;
  --gold: #c4a35a;
  --gold-bright: #d4b96a;
  --seal: #a33b2b;
  --ink-blue: #3d5a80;

  /* Composed gradients — quiet ink wash, not heatmap */
  --grad-ink: linear-gradient(
    125deg,
    var(--cinnabar) 0%,
    var(--gold) 35%,
    var(--celadon) 65%,
    var(--indigo-bright) 100%
  );
  --grad-ink-soft: linear-gradient(
    135deg,
    rgba(196, 69, 54, 0.45) 0%,
    rgba(196, 163, 90, 0.35) 35%,
    rgba(106, 154, 122, 0.35) 65%,
    rgba(74, 95, 140, 0.45) 100%
  );
  --grad-bleed: radial-gradient(
    ellipse 80% 60% at 18% 35%,
    rgba(196, 69, 54, 0.22) 0%,
    transparent 55%
  ),
  radial-gradient(
    ellipse 70% 50% at 78% 55%,
    rgba(74, 95, 140, 0.28) 0%,
    transparent 50%
  ),
  radial-gradient(
    ellipse 50% 40% at 50% 15%,
    rgba(196, 163, 90, 0.15) 0%,
    transparent 45%
  ),
  radial-gradient(
    ellipse 40% 35% at 40% 85%,
    rgba(106, 154, 122, 0.12) 0%,
    transparent 40%
  );

  --scrim: linear-gradient(
    180deg,
    rgba(14, 12, 10, 0.55) 0%,
    rgba(14, 12, 10, 0.82) 55%,
    rgba(14, 12, 10, 0.95) 100%
  );
  --scrim-side: linear-gradient(
    90deg,
    rgba(14, 12, 10, 0.92) 0%,
    rgba(14, 12, 10, 0.7) 45%,
    rgba(14, 12, 10, 0.35) 100%
  );

  --font-serif: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Helvetica Neue', system-ui, sans-serif;
  --font-jp: 'Noto Sans JP', 'Source Sans 3', 'Hiragino Sans', 'Yu Gothic', sans-serif;

  --measure: 38rem;
  --measure-wide: 52rem;
  --page: 68rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.65;
  font-feature-settings: 'kern', 'liga', 'onum';
  -webkit-font-smoothing: antialiased;
}

/* —— Japanese text —— */
:lang(ja),
.ja,
ruby {
  font-family: var(--font-jp);
  font-feature-settings: 'palt';
  line-height: 1.8;
}

ruby {
  ruby-align: center;
}

rt {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--gold);
  font-family: var(--font-jp);
}

.rb {
  font-weight: 500;
}

.ex-block {
  font-family: var(--font-jp);
  font-size: 1.05rem;
  line-height: 2;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-left: 3px solid var(--indigo-bright);
  border-radius: var(--radius);
  color: var(--text);
}

.ex-block .gloss {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

.ex-block .label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-bright);
  margin-bottom: 0.4rem;
}

/* —— Layout —— */
.wrap {
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
}

.measure { max-width: var(--measure); }
.measure-wide { max-width: var(--measure-wide); }

/* —— Skip link —— */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-elevated);
  color: var(--text);
  padding: 0.5rem 1rem;
  z-index: 100;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* —— Header / Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(196, 69, 54, 0.4) 15%,
    rgba(196, 163, 90, 0.35) 40%,
    rgba(106, 154, 122, 0.3) 65%,
    rgba(74, 95, 140, 0.4) 85%,
    transparent 100%
  ) 1;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 2px;
  background: var(--grad-ink);
  box-shadow: 0 0 10px rgba(196, 69, 54, 0.3);
  flex-shrink: 0;
}

.brand span { opacity: 0.92; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--gold);
  outline: none;
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--cinnabar);
}

/* —— Ink rule —— */
.ink-rule {
  height: 2px;
  border: 0;
  margin: 2.5rem 0;
  background: var(--grad-ink);
  opacity: 0.65;
  border-radius: 1px;
}

.ink-rule--thin {
  height: 1px;
  opacity: 0.4;
  margin: 1.75rem 0;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-bleed);
  z-index: -2;
  opacity: 0.9;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 70% 30%, rgba(196, 69, 54, 0.08), transparent 50%),
    linear-gradient(180deg, transparent 40%, var(--ink) 100%);
  z-index: -1;
}

.hero-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--text);
  max-width: 18ch;
}

.hero-lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
  font-style: italic;
}

.hero-meta {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* —— Buttons / links —— */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--primary {
  background: var(--grad-ink);
  color: #0e0c0a;
  border: none;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--ink-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--gold);
  color: var(--text);
  outline: none;
}

/* —— Main content —— */
main {
  padding-bottom: 4rem;
}

.page-header {
  padding: 3rem 0 1.5rem;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.page-header .deck {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 38rem;
  margin: 0;
  line-height: 1.5;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 2.5rem 0 0.85rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2rem 0 0.6rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

.prose li { margin-bottom: 0.4rem; }

.prose a {
  color: var(--indigo-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.prose a:hover { color: var(--gold-bright); }

.prose blockquote {
  margin: 1.75rem 0;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 3px solid transparent;
  border-image: linear-gradient(
    180deg,
    var(--cinnabar),
    var(--gold),
    var(--indigo-bright)
  ) 1;
  font-style: italic;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.55;
}

.prose blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.prose table {
  width: 100%;
  max-width: var(--measure-wide);
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--ink-border);
  vertical-align: top;
}

.prose th {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom-color: rgba(196, 163, 90, 0.35);
}

.prose td:lang(ja),
.prose td .ja {
  font-family: var(--font-jp);
}

.table-wrap {
  overflow-x: auto;
  max-width: var(--measure-wide);
  margin: 1.25rem 0 1.5rem;
}

.table-wrap table {
  margin: 0;
  min-width: 28rem;
}

/* —— Callouts —— */
.flag {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  color: var(--text-muted);
  max-width: var(--measure-wide);
}

.flag strong {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.flag--spec {
  border-left-color: var(--cinnabar);
}

.flag--spec strong { color: var(--cinnabar-soft); }

.flag--ok {
  border-left-color: var(--celadon);
}

.flag--ok strong { color: var(--celadon); }

.flag--reject {
  border-left-color: var(--seal);
  background: rgba(163, 59, 43, 0.08);
}

.flag--reject strong { color: var(--cinnabar-soft); }

/* —— Cards / grid —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.card {
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-ink);
  opacity: 0.7;
}

.card:hover { border-color: rgba(196, 163, 90, 0.4); }

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.35rem 0 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.card .meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--indigo-bright);
  margin: 0;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.card a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* —— Def pair / glossary —— */
.def-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
  max-width: var(--measure-wide);
}

@media (max-width: 680px) {
  .def-pair { grid-template-columns: 1fr; }
}

.def-card {
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.def-card--ok::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--celadon), var(--indigo-bright));
}

.def-card--reject::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cinnabar), var(--seal));
}

.def-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.def-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.def-card li { margin-bottom: 0.45rem; }

.glossary {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure-wide);
}

.glossary > li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--ink-border);
}

.glossary > li:first-child { border-top: 1px solid var(--ink-border); }

.glossary dt,
.glossary .term {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem;
}

.glossary dd,
.glossary .def {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius);
  margin-left: 0.4rem;
  vertical-align: middle;
}

.tag--real {
  background: rgba(106, 154, 122, 0.15);
  color: var(--celadon);
  border: 1px solid rgba(106, 154, 122, 0.35);
}

.tag--spec {
  background: rgba(196, 69, 54, 0.15);
  color: var(--cinnabar-soft);
  border: 1px solid rgba(196, 69, 54, 0.35);
}

.tag--open {
  background: rgba(196, 163, 90, 0.12);
  color: var(--gold);
  border: 1px solid rgba(196, 163, 90, 0.3);
}

.tag--reject {
  background: rgba(163, 59, 43, 0.18);
  color: var(--cinnabar-soft);
  border: 1px solid rgba(163, 59, 43, 0.4);
}

.tag--project {
  background: rgba(74, 95, 140, 0.18);
  color: var(--indigo-bright);
  border: 1px solid rgba(74, 95, 140, 0.4);
}

/* —— Sources list —— */
.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure-wide);
}

.source-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--ink-border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}

.source-list li:first-child { border-top: 1px solid var(--ink-border); }

.source-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 2px;
  background: var(--grad-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.source-list h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.source-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.source-list a {
  color: var(--indigo-bright);
}

/* —— Model diagram —— */
.model-box {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 1.25rem 1.35rem;
  margin: 1.5rem 0;
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  max-width: var(--measure-wide);
  color: var(--text-muted);
}

.model-box strong { color: var(--text); }

.model-box .arrow {
  color: var(--gold);
  margin: 0 0.25rem;
}

/* —— Earn table —— */
.earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: var(--measure-wide);
}

.earn-card {
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.earn-card .earn {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.earn-card .earn--high { color: var(--celadon); }
.earn-card .earn--low { color: var(--cinnabar-soft); }

.earn-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.earn-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* —— Badge —— */
.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  margin-bottom: 0.45rem;
}

.badge--live {
  background: rgba(106, 154, 122, 0.12);
  color: var(--celadon);
  border: 1px solid rgba(106, 154, 122, 0.3);
}

.badge--bridge {
  background: rgba(74, 95, 140, 0.15);
  color: var(--indigo-bright);
  border: 1px solid rgba(74, 95, 140, 0.35);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

/* —— Code / pre —— */
.prose code,
code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--ink-soft);
  padding: 0.1em 0.35em;
  border-radius: 2px;
  color: var(--gold-bright);
}

.prose pre {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 1rem 1.15rem;
  background: var(--ink-elevated);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  overflow-x: auto;
  color: var(--text-muted);
  margin: 1.25rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--ink-border);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--gold); }

.footer-mark {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--grad-ink);
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* —— Utility —— */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo-bright);
  margin: 0 0 1rem;
}

.prose-wide {
  max-width: var(--measure-wide);
}

@media (max-width: 540px) {
  html { font-size: 17px; }
  .wrap { width: min(100% - 1.5rem, var(--page)); }
  .hero { padding: 3rem 0 2.5rem; }
  .nav { gap: 0.15rem 0.7rem; font-size: 0.68rem; }
  .hero h1 { max-width: none; }
}
