/* RiverType public entry · AI-native classical publishing and reader */

html {
  background: #f8f5ed;
}

body.rivertype-page {
  --bg: #f8f5ed;
  --fg: #202b28;
  --muted: #66736d;
  --line: #ded7ca;
  --panel: #f1ece1;
  --accent: #8f101c;
  --accent-deep: #6f0a14;
  --gold: #b4975d;
  --ink-deep: #141a18;
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(255, 255, 255, 0.72), transparent 66%),
    radial-gradient(780px 500px at 100% 4%, rgba(143, 16, 28, 0.045), transparent 62%),
    var(--bg);
  color: var(--fg);
}

body.rivertype-page ::selection {
  background: rgba(143, 16, 28, 0.18);
}

.rivertype-header {
  position: relative;
  z-index: 10;
}

.rivertype-brand {
  gap: 11px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.rivertype-brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
}

.rt-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.rt-brand-copy strong {
  font-weight: 500;
}

.rt-brand-copy small {
  color: var(--muted);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.rivertype-nav {
  align-items: center;
  gap: clamp(13px, 1.8vw, 24px);
}

.rivertype-nav a {
  color: var(--muted);
  font-size: 12.5px;
  text-underline-offset: 4px;
}

.rivertype-nav a:hover {
  color: var(--fg);
}

.rivertype-nav .nav-play {
  margin-block: 0;
  padding: 8px 15px;
  background: var(--accent);
  color: #fff8f2;
  font-size: 11.5px;
}

.rivertype-nav .nav-play:hover {
  background: var(--accent-deep);
  color: #fff8f2;
  text-decoration: none;
}

.rt-back {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  color: var(--fg) !important;
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(36px, 5.5vw, 82px);
  padding-block: clamp(72px, 10vw, 128px) clamp(58px, 8vw, 98px);
}

.rt-hero-copy h1 {
  margin: 17px 0 23px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(48px, 6.5vw, 92px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.04em;
}

.rt-hero-copy h1 em {
  color: var(--accent);
  font-weight: 400;
}

.rt-lede {
  max-width: 560px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.55;
}

.rt-intro {
  max-width: 590px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.rt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.rt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 45px;
  padding: 11px 19px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f2;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.rt-button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.rt-button span {
  color: #f2d7c9;
}

.rt-text-link {
  color: var(--fg);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rt-text-link span {
  color: var(--accent);
}

.rt-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 570px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.rt-status strong {
  color: var(--fg);
  font-weight: 650;
}

.rt-status-dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(143, 16, 28, 0.1);
}

.rt-hero-art {
  margin: 0;
}

.rt-browser {
  padding: 9px;
  border-radius: 15px;
  background: #191c1a;
  box-shadow: 0 28px 68px rgba(35, 28, 20, 0.18);
}

.rt-browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 5px 8px;
}

.rt-browser-bar > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b5751;
}

.rt-browser-bar em {
  margin-left: auto;
  color: #928b80;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8.5px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.rt-browser img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.rt-hero-art figcaption {
  margin-top: 11px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.rt-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 25px;
  border-block: 1px solid var(--line);
}

.rt-proof > div {
  padding-inline: 24px;
  border-right: 1px solid var(--line);
}

.rt-proof > div:first-child {
  padding-left: 0;
}

.rt-proof > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.rt-proof strong {
  display: block;
  color: var(--accent);
  font-family: Georgia, "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.rt-proof span {
  display: block;
  margin-top: 4px;
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.rt-proof p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.rt-section {
  padding-block: clamp(70px, 8.5vw, 116px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.rt-section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: end;
  margin-bottom: 36px;
}

.rt-section-head h2 {
  margin-top: 11px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(34px, 4.7vw, 60px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.rt-section-lede {
  max-width: 570px;
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.88;
}

.rt-provenance-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(34px, 5vw, 68px);
  align-items: start;
}

.rt-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rt-facts li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.rt-facts span {
  color: var(--accent);
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.rt-facts strong {
  font-size: 13.5px;
  font-weight: 650;
}

.rt-facts p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.rt-button-quiet {
  margin-top: 24px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
}

.rt-button-quiet:hover {
  background: var(--panel);
  border-color: var(--line);
  color: var(--fg);
}

.rt-button-quiet span {
  color: var(--accent);
}

.rt-shot {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fbf8f1;
}

.rt-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.rt-shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.rt-shot-paper img {
  border: 1px solid rgba(180, 151, 93, 0.2);
}

.rt-shot-dark {
  background: #191c1a;
  border-color: #191c1a;
  padding: 10px;
}

.rt-shot-dark figcaption {
  color: #928b80;
}

.rt-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(36px, 5.5vw, 78px);
  align-items: center;
}

.rt-reading-copy h3 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(25px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.2;
}

.rt-reading-copy > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.rt-feature-list {
  display: grid;
  gap: 0;
  margin: 24px 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.rt-feature-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rt-feature-list strong {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.rt-feature-list span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.rt-night-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 32px;
  align-items: center;
  margin-top: 28px;
  padding: 16px;
  background: #191c1a;
}

.rt-night-strip img {
  width: 100%;
  height: auto;
  display: block;
}

.rt-night-strip .eyebrow {
  color: var(--gold);
}

.rt-night-strip p:not(.eyebrow) {
  margin-top: 9px;
  color: rgba(248, 245, 237, 0.68);
  font-size: 12px;
  line-height: 1.8;
}

.rt-format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.rt-format-grid article {
  min-height: 210px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #fbf8f1;
}

.rt-format-grid article > span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rt-format-grid h3 {
  margin: 12px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.rt-format-grid p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.rt-format-grid code {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--panel);
  font-size: 0.92em;
}

.rt-centered-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.rt-centered-action span {
  color: var(--muted);
  font-size: 10.5px;
}

.rt-protocol {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  gap: clamp(34px, 5vw, 64px);
  align-items: center;
  margin-block: clamp(62px, 8vw, 100px);
  padding: clamp(30px, 5vw, 56px);
  border-top: 0;
  background: var(--ink-deep);
  color: #f8f5ed;
}

.rt-protocol .eyebrow {
  color: var(--gold);
}

.rt-protocol h2 {
  margin: 12px 0 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(31px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.rt-protocol-copy > p {
  max-width: 560px;
  color: rgba(248, 245, 237, 0.68);
  font-size: 12.5px;
  line-height: 1.85;
}

.rt-protocol-list {
  display: grid;
  gap: 0;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(248, 245, 237, 0.14);
}

.rt-protocol-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(248, 245, 237, 0.14);
}

.rt-protocol-list strong {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.rt-protocol-list span {
  color: rgba(248, 245, 237, 0.72);
  font-size: 11.5px;
  line-height: 1.65;
}

.rt-button-light {
  background: #f8f5ed;
  color: #202b28;
}

.rt-button-light:hover {
  background: #fff;
  color: #202b28;
}

.rt-button-light span {
  color: var(--accent);
}

.rt-text-link-light {
  color: #f8f5ed;
}

.rt-text-link-light span {
  color: var(--gold);
}

.rt-code {
  max-width: 100%;
  margin: 0;
  padding: 21px;
  border: 1px solid rgba(248, 245, 237, 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: #d8cfc1;
  font: 11px/1.95 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow: auto;
}

.rt-code code {
  font: inherit;
}

.rt-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rt-status-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: #fbf8f1;
}

.rt-status-label {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rt-shipped {
  border-top: 3px solid var(--accent);
}

.rt-shipped .rt-status-label {
  border-color: var(--accent);
  color: var(--accent);
}

.rt-status-card h3 {
  margin: 14px 0 12px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 26px;
  font-weight: 500;
}

.rt-status-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rt-status-card li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.rt-status-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.rt-status-card .rt-text-link {
  display: inline-block;
  margin-top: 16px;
}

.rt-brandbanner {
  padding-block: 18px 64px;
}

.rt-brandbanner img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.rivertype-page .site-footer {
  padding-block: 46px;
}

.rivertype-page .footer-grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.5fr) auto;
}

.rivertype-page .footer-grid nav {
  gap: 14px 20px;
}

.rivertype-page .footer-grid nav a {
  color: var(--muted);
  font-size: 12px;
}

.rivertype-page .footer-grid p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.8;
}

@media (max-width: 1000px) {
  .rt-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .rt-hero-art {
    width: min(100%, 760px);
  }

  .rt-section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rt-section-lede {
    justify-self: start;
  }

  .rt-provenance-grid,
  .rt-reading-grid,
  .rt-protocol {
    grid-template-columns: 1fr;
  }

  .rt-format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rivertype-header {
    gap: 14px;
  }

  .rivertype-brand {
    font-size: 17px;
  }

  .rivertype-brand img {
    width: 32px;
    height: 32px;
  }

  .rt-brand-copy small {
    font-size: 8.5px;
  }

  .rivertype-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
  }

  .rivertype-nav a {
    font-size: 10.5px;
  }

  .rivertype-nav .nav-play {
    padding: 7px 11px;
    font-size: 10.5px;
  }

  .rt-hide-small,
  .rt-back {
    display: none;
  }

  .rt-hero {
    padding-block: 56px 64px;
  }

  .rt-hero-copy h1 {
    font-size: clamp(44px, 13.8vw, 70px);
  }

  .rt-lede {
    font-size: 19px;
  }

  .rt-proof {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .rt-proof > div {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
  }

  .rt-proof > div:nth-child(2) {
    border-right: 0;
  }

  .rt-proof > div:nth-child(3) {
    padding-left: 0;
    border-bottom: 0;
  }

  .rt-proof > div:nth-child(4) {
    padding-right: 0;
    border-bottom: 0;
  }

  .rt-night-strip {
    grid-template-columns: 1fr;
  }

  .rt-format-grid,
  .rt-status-grid {
    grid-template-columns: 1fr;
  }

  .rt-protocol {
    margin-inline: 0;
    padding: 28px 22px;
  }

  .rt-code {
    font-size: 10px;
  }

  .rt-format-grid article {
    min-height: 0;
  }

  .rivertype-page .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 440px) {
  .rivertype-nav a {
    font-size: 10px;
  }

  .rt-hero-copy h1 {
    font-size: 43px;
  }

  .rt-feature-list li {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .rt-actions {
    gap: 12px;
  }
}
