:root {
  --ink: #171713;
  --muted: #716f67;
  --paper: #f7f4ed;
  --paper-deep: #eee9de;
  --accent: #ff5d35;
  --accent-soft: #dde5d8;
  --lime: #d9f277;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, rgba(217, 242, 119, .65), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(255, 142, 100, .35), transparent 27%),
    #e8e4dc;
  font-family: "Manrope", system-ui, sans-serif;
}

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(420px, 560px);
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 7vw, 112px);
  padding: 40px 6vw;
  overflow: hidden;
}

.intro { width: 100%; max-width: 520px; min-height: 710px; }
.language-picker {
  display: inline-flex;
  gap: 3px;
  margin: 0 0 22px;
  padding: 3px;
  border: 1px solid rgba(23, 23, 19, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}
.language-picker button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1 "Manrope", sans-serif;
  cursor: pointer;
}
.language-picker button[aria-pressed="true"] { background: var(--ink); color: white; }
.language-picker button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kicker, .summary-label {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
}
.intro h1 {
  margin: 0 0 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 5.5vw, 78px);
  line-height: .98;
  letter-spacing: -.045em;
}
.lead { max-width: 470px; color: #56544d; font-size: 18px; line-height: 1.65; }

.picker-title {
  margin: 28px 0 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.article-picker { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.article-picker button {
  border: 1px solid rgba(23, 23, 19, .18);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .35);
  color: var(--ink);
  font: 600 13px/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.article-picker button:hover { transform: translateY(-2px); }
.article-picker button[aria-selected="true"] { background: var(--ink); color: white; }
.source-meta { min-height: 18px; margin: 18px 0 0; color: #77746b; font-size: 11px; }
.source-meta a { color: inherit; text-underline-offset: 3px; }
.contact { margin: 20px 0 0; font-size: 13px; }
.contact a { color: var(--ink); text-underline-offset: 4px; }

.phone-wrap { position: relative; justify-self: center; }
.phone {
  width: 390px;
  height: 820px;
  padding: 10px;
  border-radius: 56px;
  background: linear-gradient(145deg, #4b4b48 0%, #111 35%, #3a3937 100%);
  box-shadow: 0 40px 90px rgba(34, 31, 22, .25), inset 0 0 0 2px rgba(255,255,255,.18);
}
.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 47px;
  background: var(--paper);
}
.dynamic-island { position: absolute; top: 11px; left: 50%; z-index: 10; width: 104px; height: 30px; transform: translateX(-50%); border-radius: 20px; background: #050505; }
.statusbar { height: 50px; padding: 17px 28px 0; font-size: 11px; font-weight: 700; }

.reader-app { height: calc(100% - 50px); display: flex; flex-direction: column; padding: 0 18px 25px; }
.article-header { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 7px 4px 12px; flex: 0 0 auto; }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font: 700 12px/1 "Manrope"; box-shadow: inset 0 0 0 3px rgba(255,255,255,.15); }
.article-meta { min-width: 0; }
.kicker { margin: 0 0 4px; color: var(--accent); font-size: 8px; }
.article-meta h2 { margin: 0; font: 700 19px/1.12 "Playfair Display", Georgia, serif; letter-spacing: -.025em; }
.subtitle { margin: 5px 0 4px; color: #5b5951; font-size: 10px; line-height: 1.35; }
.context-stack { flex: 0 0 auto; display: grid; gap: 5px; min-height: 112px; margin: 0 0 9px; }
.summary {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 3.5px;
  align-items: start;
  border-radius: 13px;
  padding: 9px 11px;
  transition: background .2s ease;
}
.summary-total { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.summary-recent { background: var(--accent-soft); color: #304238; }
.summary-label { padding-top: 2px; color: var(--ink); font-size: 7px; }
.summary-recent .summary-label { color: #61745f; }
.summary-copy { min-width: 0; display: grid; overflow: hidden; font-size: 13px; }
.summary-total:not(.is-empty) .summary-copy { height: 7.92em; }
.summary-recent:not(.is-empty) .summary-copy { height: 5.28em; }
.summary p { margin: 0; white-space: pre-line; font-size: 13px; line-height: 1.32; font-weight: 500; }
.summary-copy p { grid-area: 1 / 1; transition: transform .34s cubic-bezier(.4, 0, .2, 1); }
.summary-copy p.is-entering { transform: translateY(110%); }
.summary-copy p.is-entering.is-active { transform: translateY(0); }
.summary-copy p.is-leaving { transform: translateY(-110%); }
.summary.is-empty { background: var(--paper-deep); color: #aaa69d; }
.summary.is-empty .summary-label { color: #aaa69d; }
.summary.is-empty p { font-size: 10px; font-weight: 500; }
.summary-total.is-empty { background: transparent; }

.reading-shell { position: relative; min-height: 0; flex: 1 1 auto; border-top: 1px solid #d7d2c8; }
.article-body {
  height: 100%;
  overflow-y: scroll;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9e9a91 transparent;
  padding: 13px 9px 54px 8px;
  outline: none;
}
.article-body::-webkit-scrollbar { width: 4px; }
.article-body::-webkit-scrollbar-track { background: transparent; }
.article-body::-webkit-scrollbar-thumb { background: #9e9a91; border-radius: 4px; }
.text-chunk { margin: 0 0 17px; font: 400 16px/1.58 Georgia, serif; color: #25241f; }
.text-chunk[data-heading]::before { content: attr(data-heading); display: block; margin: 23px 0 9px; font: 700 18px/1.18 "Playfair Display", Georgia, serif; }
.text-chunk:first-child[data-heading]::before { margin-top: 2px; }
.article-figure { margin: 3px 0 22px; }
.article-figure img { display: block; width: 100%; max-height: 250px; object-fit: cover; border-radius: 12px; background: var(--paper-deep); }
.article-figure.is-contain img { object-fit: contain; }
.article-figure figcaption { margin-top: 7px; color: #716f67; font: 500 9px/1.4 "Manrope", sans-serif; }
.article-figure figcaption a { color: inherit; text-underline-offset: 2px; }
.home-indicator { position: absolute; left: 50%; bottom: 7px; width: 120px; height: 4px; transform: translateX(-50%); border-radius: 5px; background: #1b1b1b; }
.scroll-hint { position: absolute; right: -120px; bottom: 85px; display: grid; justify-items: center; gap: 8px; color: #67645c; font-size: 11px; transform: rotate(2deg); }
.scroll-hint b { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(23,23,19,.25); border-radius: 50%; font-size: 17px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(7px); } }

@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; padding: 38px 20px 64px; overflow: visible; }
  .intro { min-height: 0; text-align: center; margin: 0 auto; }
  .lead { margin-inline: auto; }
  .article-picker { justify-content: center; }
  .phone { width: min(390px, calc(100vw - 28px)); }
  .scroll-hint { display: none; }
}

@media (max-height: 860px) and (min-width: 981px) {
  .phone { transform: scale(.85); }
  .phone-wrap { margin: -62px; }
}

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