@font-face {
  font-family: "Kosame Mincho";
  src: url("/hearabouts/fonts/mincho.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Kosame Pixel";
  src: url("/hearabouts/fonts/pixel.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f7f9;
  --paper-deep: #e9eef2;
  --ink: #111820;
  --ink-soft: #3d4853;
  --mute: #5f6c79;
  --rule: rgba(42, 59, 74, 0.18);
  --rule-strong: rgba(42, 59, 74, 0.32);
  --rain: #426c91;
  --rain-bright: #7da2c2;
  --washi: rgba(255, 255, 255, 0.46);
  --sans: "Inter Tight", "Helvetica Neue", "Hiragino Sans", system-ui, sans-serif;
  --mincho: "Kosame Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --mono: "Kosame Pixel", "SFMono-Regular", Consolas, monospace;
  --page: min(1120px, calc(100vw - 40px));
  --reading: 74ch;
  --ease: cubic-bezier(.2, .72, .15, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(110% 58% at 8% -8%, rgba(255,255,255,.96), rgba(255,255,255,0) 66%),
    linear-gradient(180deg, var(--paper) 0%, #f2f5f7 48%, var(--paper-deep) 100%);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(66,108,145,.05) calc(100% - 1px)),
    radial-gradient(circle at 18% 24%, rgba(66,108,145,.08) 0 1px, transparent 1.4px);
  background-size: 96px 100%, 156px 173px;
}

a {
  color: inherit;
  text-decoration-color: rgba(66, 108, 145, .5);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

a:hover { color: var(--rain); }

a:focus-visible {
  outline: 2px solid var(--rain);
  outline-offset: 4px;
  border-radius: 1px;
}

::selection {
  background: var(--rain);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font: 12px/1 var(--mono);
  transform: translateY(-180%);
  transition: transform .2s ease;
}

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

.read-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 90;
  width: 100%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--rain), var(--rain-bright));
  transform: scaleX(0);
  transform-origin: left center;
}

@supports (animation-timeline: scroll()) {
  .read-progress {
    animation: reading-progress linear both;
    animation-timeline: scroll(root block);
  }

  @keyframes reading-progress { to { transform: scaleX(1); } }
}

.masthead {
  width: var(--page);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.masthead a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .015em;
}

.mast-index {
  color: var(--mute);
  font: 11px/1 var(--mono);
  letter-spacing: .12em;
}

.page-main {
  width: var(--page);
  margin: 0 auto;
}

.page-hero {
  position: relative;
  padding: clamp(70px, 11vw, 152px) 0 clamp(62px, 9vw, 116px);
  border-bottom: 1px solid var(--rule-strong);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: clamp(70px, 11vw, 148px);
  height: 1px;
  background: var(--rain);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  color: var(--rain);
  font: 11px/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  width: 54px;
  height: 1px;
  background: currentColor;
  opacity: .52;
}

.page-title {
  max-width: 980px;
  margin: 0;
  font-family: var(--mincho);
  font-size: clamp(39px, 7.1vw, 96px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.page-title.preserve-space { white-space: pre-wrap; }

.hero-note {
  max-width: 720px;
  margin: clamp(32px, 5vw, 56px) 0 0;
  color: var(--ink-soft);
  font-family: var(--mincho);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.9;
}

.hero-note p { margin: 0; }
.hero-note p + p { margin-top: 3px; }

.document-stack {
  padding: clamp(68px, 10vw, 132px) 0 clamp(90px, 12vw, 164px);
}

.license-document {
  display: grid;
  grid-template-columns: minmax(120px, 210px) minmax(0, var(--reading));
  gap: clamp(28px, 7vw, 96px);
  align-items: start;
}

.license-document + .license-document {
  margin-top: clamp(104px, 15vw, 196px);
  padding-top: clamp(70px, 10vw, 112px);
  border-top: 1px solid var(--rule-strong);
}

.language-mark {
  position: sticky;
  top: 28px;
  padding-top: 5px;
  color: var(--mute);
  font: 11px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.language-mark span {
  display: block;
  width: 52px;
  margin-top: 14px;
  border-top: 1px solid var(--rain);
}

.license-copy {
  min-width: 0;
  font-family: var(--mincho);
  font-size: clamp(15.5px, 1.45vw, 17px);
  line-height: 1.92;
  overflow-wrap: anywhere;
}

.license-copy[lang="en"] {
  font-family: var(--sans);
  line-height: 1.82;
}

.license-copy h2 {
  scroll-margin-top: 32px;
  margin: 0 0 24px;
  font-size: clamp(27px, 3.5vw, 43px);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -.025em;
}

.license-copy h3 {
  margin: clamp(48px, 7vw, 74px) 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.01em;
}

.license-copy p { margin: 0 0 18px; }

.license-copy ul,
.license-copy ol {
  margin: 0 0 24px;
  padding-left: 1.55em;
}

.license-copy li { padding-left: .35em; }
.license-copy li + li { margin-top: 10px; }

.source-gap { height: 16px; }

.license-copy :target {
  animation: target-wash 1.8s var(--ease) both;
}

@keyframes target-wash {
  0%, 35% { color: var(--rain); text-shadow: 0 0 22px rgba(66,108,145,.22); }
  100% { color: var(--ink); text-shadow: none; }
}

.commission-body {
  padding: clamp(72px, 10vw, 132px) 0 clamp(92px, 13vw, 168px);
}

.commission-intro {
  max-width: 760px;
  margin: 0 0 clamp(74px, 11vw, 136px);
  font-family: var(--mincho);
  font-size: clamp(23px, 3.3vw, 39px);
  line-height: 1.62;
  letter-spacing: -.02em;
}

.commission-intro p { margin: 0; }

.tier-list {
  counter-reset: tier;
  border-top: 1px solid var(--rule-strong);
}

.tier {
  counter-increment: tier;
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 210px) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 96px);
  padding: clamp(48px, 7vw, 82px) 0;
  border-bottom: 1px solid var(--rule-strong);
}

.tier::before {
  content: "0" counter(tier);
  color: var(--rain);
  font: clamp(32px, 4.7vw, 62px)/1 var(--mono);
  letter-spacing: -.08em;
}

.tier-copy { max-width: 770px; }

.tier h2 {
  margin: 0 0 26px;
  font-family: var(--mincho);
  font-size: clamp(27px, 3.7vw, 47px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.025em;
  white-space: pre-wrap;
}

.tier p {
  margin: 0;
  font-family: var(--mincho);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.9;
}

.tier p + p { margin-top: 14px; }
.tier .deliverable { color: var(--rain); font-family: var(--sans); font-weight: 500; }

.commission-section {
  display: grid;
  grid-template-columns: minmax(120px, 210px) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 96px);
  margin-top: clamp(92px, 13vw, 160px);
}

.section-index {
  margin: 0;
  color: var(--mute);
  font: 11px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.terms,
.english-copy {
  max-width: 790px;
  min-width: 0;
}

.terms p,
.english-copy p {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
}

.terms p + p,
.english-copy p + p { margin-top: 16px; }

.listen-line {
  margin-top: clamp(54px, 7vw, 82px) !important;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mincho);
}

.listen-line a { white-space: normal; }

.english-copy { font-family: var(--sans); }

.english-copy .en-intro {
  margin-bottom: clamp(42px, 6vw, 66px);
  font-family: var(--mincho);
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.55;
  letter-spacing: -.018em;
}

.english-tier {
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  white-space: pre-wrap;
}

.english-tier:last-of-type { border-bottom: 1px solid var(--rule); }

.contact-cta {
  display: flex;
  min-height: 88px;
  margin-top: clamp(74px, 10vw, 120px);
  padding: 22px clamp(20px, 4vw, 38px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mincho);
  font-size: clamp(18px, 2.2vw, 25px);
  text-decoration: none;
  transition: color .35s var(--ease), background .35s var(--ease);
}

.contact-cta::after {
  content: "→";
  color: var(--rain);
  font-family: var(--mono);
  transition: transform .35s var(--ease), color .35s var(--ease);
}

.contact-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.contact-cta:hover::after {
  color: var(--paper);
  transform: translateX(7px);
}

.article-hero {
  padding-bottom: clamp(74px, 10vw, 132px);
}

.article-title {
  max-width: 980px;
  font-size: clamp(45px, 7.4vw, 104px);
  line-height: 1.02;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(120px, 210px) minmax(0, var(--reading));
  gap: clamp(28px, 7vw, 96px);
  align-items: start;
  padding: clamp(68px, 10vw, 132px) 0 clamp(96px, 14vw, 176px);
}

.article-rail {
  position: sticky;
  top: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding-top: 7px;
  color: var(--mute);
  font: 10px/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.article-rail-line {
  min-width: 20px;
  border-top: 1px solid var(--rule-strong);
}

.article-copy {
  min-width: 0;
  max-width: var(--reading);
  font-size: clamp(16px, 1.48vw, 18px);
  line-height: 1.86;
  overflow-wrap: anywhere;
}

.article-copy p { margin: 0 0 24px; }

.article-preamble {
  padding-bottom: clamp(62px, 9vw, 112px);
}

.article-preamble > p:first-child {
  margin-bottom: 30px;
  font-family: var(--mincho);
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.62;
  letter-spacing: -.018em;
}

.article-section {
  counter-increment: article-section;
  padding: clamp(58px, 8vw, 92px) 0;
  border-top: 1px solid var(--rule-strong);
}

.article-copy { counter-reset: article-section; }

.article-section:last-child {
  padding-bottom: 0;
}

.article-section h2 {
  display: grid;
  grid-template-columns: minmax(44px, auto) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: baseline;
  scroll-margin-top: 30px;
  margin: 0 0 clamp(36px, 5vw, 54px);
  font-family: var(--mincho);
  font-size: clamp(29px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.article-section h2::before {
  content: counter(article-section, decimal-leading-zero);
  color: var(--rain);
  font: 12px/1 var(--mono);
  letter-spacing: .08em;
}

.article-copy .example {
  position: relative;
  margin: clamp(38px, 6vw, 62px) 0;
  padding: clamp(20px, 3.6vw, 34px);
  border: 1px solid var(--rule-strong);
  background:
    linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.2)),
    rgba(233, 238, 242, .54);
}

.example-player {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: clamp(12px, 2.4vw, 22px);
  align-items: center;
}

.example-number {
  color: var(--rain);
  font: 12px/1 var(--mono);
  letter-spacing: .06em;
}

.article-copy audio {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 54px;
  accent-color: var(--rain);
}

.article-copy .example:focus-within {
  border-color: var(--rain);
  box-shadow: 0 0 0 2px rgba(66, 108, 145, .2);
}

.article-copy audio:focus-visible {
  outline: 2px solid var(--rain);
  outline-offset: 4px;
}

.article-copy figcaption {
  margin: 18px 0 0 54px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.page-footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.page-footer {
  width: var(--page);
  margin: 0 auto;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--rule);
  color: var(--mute);
  font: 11px/1.4 var(--mono);
  letter-spacing: .06em;
}

.page-footer a { text-decoration: none; }

@media (max-width: 760px) {
  :root { --page: min(100% - 36px, 1120px); }

  .masthead { min-height: 66px; }
  .page-hero { padding-top: 62px; }

  .license-document,
  .tier,
  .commission-section,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .language-mark {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .language-mark span { margin: 0; }
  .tier::before { font-size: 28px; }
  .tier h2 { margin-bottom: 20px; }
  .commission-section { gap: 30px; }
  .article-rail {
    position: static;
    max-width: 280px;
    padding: 0 0 28px;
  }
}

@media (max-width: 420px) {
  :root { --page: min(100% - 32px, 1120px); }
  .page-title { font-size: clamp(34px, 11vw, 48px); }
  .hero-note { font-size: 14px; }
  .commission-intro { font-size: 22px; }
  .contact-cta { min-height: 78px; }
  .article-title { font-size: clamp(38px, 12.2vw, 53px); }
  .article-section h2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .article-copy .example { margin-inline: -8px; padding: 18px 14px; }
  .example-player { grid-template-columns: minmax(0, 1fr); }
  .article-copy figcaption { margin-left: 0; }
  .page-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .page-footer-links { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .read-progress { display: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
