/* Field Notes — extends core.css. Only what's genuinely new lives here;
   everything else (tokens, deck, panel, pane, num, headings, lede, dots,
   advance, theme, grain) is the shared design system in core.css. */

/* index: article cards in a 3-col grid; the newest one is featured */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; text-decoration: none; color: inherit; transition: border-color 0.2s; }
.card:hover { border-color: var(--accent); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.25; color: var(--ink); margin-bottom: 0.45rem; transition: color 0.2s; }
.card:hover h3 { color: var(--accent); }
.card .dek { color: var(--dim); font-size: 0.85rem; line-height: 1.55; }
.card .meta { display: flex; align-items: center; gap: 0.6rem; font-size: 0.7rem; letter-spacing: 0.03em; color: var(--dimmer); margin-bottom: 0.65rem; }
.chip { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.12rem 0.55rem; }
.card.featured { grid-column: span 2; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.card.featured h3 { font-size: clamp(1.45rem, 3vw, 1.8rem); }
.card.featured .dek { font-size: 0.92rem; }
.card.featured .chip { border-color: var(--accent); color: var(--ink); }

/* index panels grow when their cards need more room than one screen */
body.index .panel { height: auto; min-height: 100dvh; }

/* article: full-screen pages of two columns — the only new layout.
   The fixed-viewport reader is JS-only; .js is set by an inline script. */
.js body.article { overflow: hidden; }
.js #source { display: none; }
.page { position: relative; height: 100dvh; scroll-snap-align: start; box-sizing: border-box; padding: 5.5rem 2rem; }
.flow {
  height: 100%;
  max-width: 52rem;              /* same reading width as the landing .block.wide */
  margin-inline: auto;
  column-count: 2;
  column-gap: 3rem;
  column-fill: auto;
  column-rule: 1px solid var(--line);
  overflow: hidden;
  color: var(--dim);
  line-height: 1.5;
  text-align: justify;
  hyphens: auto;
}
.flow > * + * { margin-top: 0.9rem; }
.flow h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--ink); margin: 1.5rem 0 0.55rem; break-after: avoid-column; break-inside: avoid; }
.flow h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); margin-top: 1.2rem; break-after: avoid-column; }
.flow strong, .flow b { color: var(--ink); font-weight: 500; }
.flow em { font-style: italic; }
.flow a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.flow ul, .flow ol { padding-left: 1.2rem; }
.flow blockquote { border-left: 2px solid var(--accent); padding-left: 1rem; font-family: var(--serif); font-style: italic; }

/* no-JS fallback: the body reads as one clean centered column (these rules
   only show without JS — .js #source hides the element entirely) */
.article-body { max-width: 42rem; margin-inline: auto; padding: 3.5rem 1.75rem; color: var(--dim); line-height: 1.6; hyphens: auto; }
.article-body > * + * { margin-top: 0.9rem; }
.article-body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; color: var(--ink); margin: 2rem 0 0.55rem; }
.article-body h3 { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--ink); margin-top: 1.2rem; }
.article-body strong, .article-body b { color: var(--ink); font-weight: 500; }
.article-body em { font-style: italic; }
.article-body a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.article-body ul, .article-body ol { padding-left: 1.2rem; }
.article-body blockquote { border-left: 2px solid var(--accent); padding-left: 1rem; font-family: var(--serif); font-style: italic; }

/* without JS the article deck flows naturally and JS-only chrome disappears */
html:not(.js) body.article .deck { height: auto; overflow: visible; scroll-snap-type: none; }
html:not(.js) body.article .panel { height: auto; min-height: 0; padding-block: 4rem; }
html:not(.js) .dots, html:not(.js) .advance, html:not(.js) .theme { display: none; }

/* more field notes (closing panel of the article reader) */
.more-notes { margin-top: 2.5rem; }
.more-notes ul { list-style: none; padding: 0; }
.more-notes li + li { margin-top: 0.45rem; }
.more-notes a { color: var(--dim); font-size: 0.9rem; text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.more-notes a:hover { color: var(--ink); border-color: var(--accent); }

/* the advance arrow floats fixed here (it pages the whole deck, not one panel) */
.advance { position: fixed; }

/* back-to-index link (no landing equivalent) */
.back { position: fixed; top: 1.5rem; left: 1.5rem; z-index: 7; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--dim); text-decoration: none; transition: color 0.2s; }
.back:hover { color: var(--ink); }
.back .arrow { color: var(--accent); }

@media (max-width: 720px) {
  .flow { column-count: 1; }
  .cards { grid-template-columns: 1fr; }
  .card.featured { grid-column: auto; }
  /* small screens: the index flows as one page instead of clipping tall panels */
  body.index .deck { height: auto; overflow: visible; scroll-snap-type: none; }
  body.index .hero main { padding-block: 3.5rem; }
  body.index .dots, body.index .advance { display: none; }
}
