:root {
  --paper: #f1f4ee;
  --surface: #fbfcf8;
  --ink: #17231f;
  --muted: #68736d;
  --line: #d7ded8;
  --lake: #236875;
  --lake-soft: #d9e9e8;
  --signal: #d96a43;
  --shadow: 0 22px 70px rgba(31, 53, 47, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 4%, rgba(35, 104, 117, .12), transparent 32rem),
    linear-gradient(90deg, transparent 0 23px, rgba(23, 35, 31, .035) 24px, transparent 25px),
    var(--paper);
  background-size: auto, 48px 48px, auto;
  font-family: "Golos Text", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 20;
  background: rgba(35, 104, 117, .08);
}

.reading-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width .1s linear;
}

.masthead {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lake);
  border-radius: 50%;
  position: relative;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark i {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--lake);
}

.brand-mark::before { width: 25px; height: 25px; opacity: .55; }
.brand-mark::after { width: 11px; height: 11px; background: var(--lake); }
.brand-mark i { width: 5px; height: 5px; background: var(--paper); border: 0; z-index: 1; }

.brand b {
  display: block;
  font-family: "Literata", serif;
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.inside-max {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--lake);
  background: rgba(251, 252, 248, .64);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.reader-shell {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 0 14px max(44px, env(safe-area-inset-bottom));
}

.state-card,
.article {
  border: 1px solid rgba(23, 35, 31, .1);
  background: rgba(251, 252, 248, .92);
  box-shadow: var(--shadow);
}

.state-card {
  min-height: 48vh;
  padding: 40px 25px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 28px;
}

.state-card p { color: var(--muted); }

.state-card--message {
  text-align: left;
  place-content: center start;
}

.state-card--message h1 {
  max-width: 590px;
  margin: 14px 0 12px;
  font: 650 clamp(30px, 8vw, 52px)/1.04 "Literata", serif;
  letter-spacing: -.04em;
}

.state-card--message p { max-width: 520px; line-height: 1.6; }

.state-index {
  color: var(--signal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

.loader {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.loader i {
  width: 5px;
  height: 13px;
  border-radius: 5px;
  background: var(--lake);
  animation: sound 1s ease-in-out infinite;
}

.loader i:nth-child(2) { animation-delay: .14s; }
.loader i:nth-child(3) { animation-delay: .28s; }

@keyframes sound { 50% { height: 36px; background: var(--signal); } }

.article {
  overflow: hidden;
  border-radius: 30px;
  padding: clamp(26px, 7vw, 58px);
}

.article::before {
  content: "";
  display: block;
  width: 74px;
  height: 5px;
  margin-bottom: 30px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--signal) 0 34%, var(--lake) 34% 100%);
}

.article-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.article-kicker span { color: var(--lake); }

.article h1 {
  max-width: 690px;
  margin: 18px 0 20px;
  font: 650 clamp(34px, 8vw, 62px)/1.03 "Literata", serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.article-summary {
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 3px solid var(--signal);
  color: #41504a;
  font: 500 clamp(17px, 4.2vw, 21px)/1.55 "Literata", serif;
}

.article-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 30px 0 38px;
}

.article-facts div {
  min-width: 130px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--lake-soft);
}

.article-facts small,
.article-facts strong { display: block; }
.article-facts small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.article-facts strong { margin-top: 4px; font-size: 13px; }

.article-body {
  font-size: clamp(17px, 4.2vw, 20px);
  line-height: 1.72;
  letter-spacing: -.01em;
}

.article-body p { margin: 0 0 1.25em; }
.article-body p:first-child::first-letter {
  float: left;
  margin: .09em .11em 0 0;
  color: var(--lake);
  font: 650 3.45em/.77 "Literata", serif;
}

.article-footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.source-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--lake);
  font: 600 15px "Golos Text", sans-serif;
  cursor: pointer;
}

.source-button:focus-visible { outline: 3px solid rgba(217, 106, 67, .45); outline-offset: 3px; }
.source-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.article-footer p { margin: 16px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

[hidden] { display: none !important; }

@media (max-width: 480px) {
  .masthead { padding-inline: 17px; }
  .reader-shell { padding-inline: 8px; }
  .article { border-radius: 24px; }
  .article h1 { hyphens: auto; }
  .article-kicker { align-items: flex-start; flex-direction: column; gap: 7px; }
}

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