/* Article and kitchen pages: the Dede & Nene palette, a single reading column of about 66 characters,
   transliteration after Armenian in running text and above it in display sizes. */
/* Aliases onto the site.css tokens, which load first and handle light and dark */
:root {
  --paper: var(--vellum);
  --surface: var(--leaf);
  --line: var(--rule);
  --pomegranate: var(--red);
  --season: var(--apricot);
  --season-soft: color-mix(in srgb, var(--apricot) 14%, var(--vellum));
  --f-mono: var(--f-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17.5px/1.7 var(--f-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lapis); outline-offset: 3px; }
.hy { font-family: var(--f-hy); }
.wrap { max-width: 1120px; margin: 0 auto; }

.chapters a[aria-current] { color: var(--ink); }

/* Transliteration */
ruby { ruby-position: over; }
rt { font-family: var(--f-mono); font-weight: 400; font-style: normal; letter-spacing: 0; color: var(--muted); text-transform: none; }
p rt, li rt, td rt, figcaption rt, blockquote rt, h2 rt, h3 rt { display: inline; font-size: .74em; margin-left: .3em; }
.hero-hy rt { font-size: .26em; }

/* Article */
.article { max-width: 720px; margin: 0 auto; padding-block: 48px 64px; }
.kicker { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--lapis); display: flex; gap: 10px; flex-wrap: wrap; }
.kicker a { text-decoration: none; }
.article h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 6vw, 58px); line-height: 1.08; margin: 16px 0 0; text-wrap: balance; letter-spacing: -.01em; }
.dek { font-size: 20px; color: var(--muted); margin: 18px 0 0; max-width: 60ch; text-wrap: pretty; }
.byline { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.hero-hy { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 32px 0 8px; padding: 28px 32px; border-radius: 6px; background: var(--season-soft); }
.hero-hy .big { font-family: var(--f-hy); font-size: clamp(64px, 12vw, 112px); line-height: 1.1; color: var(--season); }
.hero-hy p { font-size: 15px; color: var(--muted); max-width: 30ch; margin: 0; }

.body { margin-top: 32px; }
.body > * + * { margin-top: 1.1em; }
/* Paragraphs keep the 1.1em gap from `.body > * + *`; only the bottom margin is reset */
.body p { margin-bottom: 0; text-wrap: pretty; }
.body > p:first-child { margin-top: 0; }
.body h2 { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 2em 0 0; text-wrap: balance; }
.body h3 { font-family: var(--f-body); font-weight: 600; font-size: 18px; line-height: 1.4; margin: 1.6em 0 0; }
.body ul, .body ol { padding-left: 1.2em; margin-bottom: 0; }
.body li + li { margin-top: .5em; }
.body blockquote { margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--pomegranate); }
.body blockquote .zh { font-family: var(--f-hy); font-size: 26px; line-height: 1.5; display: block; }
.body blockquote .py { font-family: var(--f-mono); font-size: 13px; color: var(--lapis); display: block; margin-top: 6px; }
.body blockquote .en { font-family: var(--f-display); font-style: italic; font-size: 21px; display: block; margin-top: 8px; }

.terms { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table-wrap { overflow-x: auto; }
.terms th, .terms td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.terms th { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.terms td:first-child { font-family: var(--f-hy); font-size: 20px; white-space: nowrap; }
.terms td .py { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--lapis); }

.taboo { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.body .taboo { margin-top: 0; }
.taboo .glyph { font-family: var(--f-hy); font-size: 40px; line-height: 1.1; color: var(--pomegranate); text-align: center; }
.taboo .glyph small { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
.taboo h3 { margin: 0; }
.taboo p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.ask { margin-top: 2.4em; padding: 24px 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.ask h2 { margin: 0; font-size: 24px; }
.ask p { color: var(--muted); font-size: 15.5px; margin-top: 6px; }
.ask ol { margin-top: 12px; }

.related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { font-family: var(--f-mono); font-weight: 400; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related a { font-family: var(--f-display); font-size: 21px; text-decoration: none; }
.related a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sources { margin-top: 32px; font-size: 14px; color: var(--muted); }
.sources p { margin: 4px 0 0; }

/* Article index */
.list { max-width: 820px; margin: 0 auto; padding-block: 48px 64px; }
.list h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 5.6vw, 54px); margin: 12px 0 0; }
.list > p { color: var(--muted); margin: 12px 0 0; max-width: 56ch; }
.cards { list-style: none; padding: 0; margin: 32px 0 0; }
.cards li { padding-block: 24px; border-top: 1px solid var(--line); }
.cards a { text-decoration: none; display: grid; gap: 6px; }
.cards h2 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0; }
.cards a:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.cards p { margin: 0; color: var(--muted); font-size: 16px; }


@media (max-width: 640px) {
  body { font-size: 17px; }
  /* Three-column tables stack on phones: term on the left, the other two cells stacked on the right */
  .terms.stack thead { display: none; }
  .terms.stack, .terms.stack tbody { display: block; }
  .terms.stack tr { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 2px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .terms.stack td { border: 0; padding: 0; }
  .terms.stack td:first-child { grid-row: span 2; white-space: normal; }
  .terms.stack td:nth-child(2) { font-weight: 600; color: var(--ink); }
  .hero-hy { flex-direction: column; align-items: flex-start; padding: 22px; }
  .taboo { grid-template-columns: 48px minmax(0, 1fr); }
  .taboo .glyph { font-size: 32px; }
}
