/* Field notes — article + list styles. Base, buttons, nav, logo and footer come from
 * shared.css (generated from index.html by notes-src/build.py); tokens from ../tokens.css. */

/* Nav: always visible on inner pages (the homepage hides it until scroll) */
.nav { transform: none; background: color-mix(in oklab, var(--color-ink) 82%, transparent); }
.nav__links a[aria-current="page"] { color: var(--color-accent); }
main { padding-top: 7.5rem; }

/* Dark button variant for use on the flood (same layered hover, inverted colours) */
.btn--ink { --layer-fill: var(--color-accent); --layer-1: var(--color-ink); --layer-2: var(--color-ink); --ring: 2px; background: var(--color-ink); color: var(--color-paper); }

/* ---------- Article ---------- */
.post__head { display: grid; gap: var(--space-24); justify-items: start; padding-block: var(--space-64) var(--space-48); max-width: calc(52rem + 2 * var(--gutter)); }
.post__back { display: inline-flex; align-items: center; gap: var(--space-8); font-weight: var(--weight-bold); color: var(--color-muted); transition: color var(--dur-short) var(--ease-out); }
.post__back:hover { color: var(--color-paper); }
.post__back .ico { width: 1.1rem; height: 1.1rem; stroke-width: 2.5; transition: transform var(--dur-short) var(--ease-out); }
.post__back:hover .ico { transform: translateX(-3px); }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); font-size: var(--text-small); color: var(--color-muted); }
.post__tag { padding: 0.15rem 0.7rem; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-on-accent); font-weight: var(--weight-bold); font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.08em; }
.post h1 { font-size: clamp(2.5rem, 1.4rem + 4vw, 4.75rem); line-height: 0.98; }
.post__lead { font-size: var(--text-lead); line-height: 1.45; color: var(--color-paper-60); max-width: 40ch; }

.post__body { max-width: calc(52rem + 2 * var(--gutter)); padding-bottom: var(--space-96); }
.prose { max-width: 68ch; font-size: 1.1875rem; line-height: 1.72; color: color-mix(in oklab, var(--color-paper) 88%, var(--color-ink)); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.1; color: var(--color-paper); scroll-margin-top: 7rem; }
.prose h3 { margin-top: 1.8em; font-size: 1.375rem; line-height: 1.2; color: var(--color-paper); }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose strong { color: var(--color-paper); font-weight: var(--weight-bold); }
.prose em { font-weight: inherit; }
.prose a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.18em; }
.prose ul, .prose ol { display: grid; gap: 0.6em; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.4em; }
.prose ul li::before { content: ""; position: absolute; left: 0.2em; top: 0.68em; width: 0.45em; height: 0.45em; border-radius: var(--radius-pill); background: var(--color-accent); }
.prose ol { counter-reset: n; }
.prose ol li { position: relative; padding-left: 2.2em; counter-increment: n; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 0.12em; width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--color-ink-3); color: var(--color-accent); font-size: 0.8em; font-weight: var(--weight-bold); }
.prose blockquote { margin: 1.6em 0; padding: var(--space-24) var(--space-32); border-left: 4px solid var(--color-accent); border-radius: 0 var(--radius-button) var(--radius-button) 0; background: var(--color-ink-2); font-size: 1.375rem; font-weight: var(--weight-bold); line-height: 1.4; color: var(--color-paper); }

/* ---------- CTA band ---------- */
.on-flood { background: linear-gradient(225deg, var(--color-navy), var(--color-navy-deep)); color: var(--color-on-navy); }
.cta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-32);
  padding: clamp(2rem, 1rem + 3vw, 3.5rem); border-radius: var(--radius-card);
}
.cta h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); }
.cta p { margin-top: var(--space-8); font-weight: var(--weight-bold); color: var(--color-on-navy-60); max-width: 44ch; }

/* ---------- Lists of notes ---------- */
.list__head { display: grid; gap: var(--space-16); padding-block: var(--space-64); }
.list__head h1 { font-size: var(--text-h2); }
.list__head p { color: var(--color-muted); font-size: var(--text-lead); max-width: 46ch; }
.more { padding-block: var(--section-pad) 0; }
.more h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); margin-bottom: var(--space-48); }
.notes-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-16); margin-bottom: var(--space-64); }
.note {
  display: flex; flex-direction: column; gap: var(--space-16); min-height: 22rem;
  padding: var(--space-32) var(--space-24) var(--space-24);
  background: var(--color-ink-2); border-radius: var(--radius-card);
  transition: background-color var(--dur-short) var(--ease-out);
}
.note:hover { background: var(--color-ink-3); }
.note h3 { font-size: 1.625rem; line-height: 1.08; }
.note p { color: var(--color-muted); }
.note .note__meta { font-size: var(--text-caption); font-weight: var(--weight-bold); }
.note__meta span { color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.08em; }
.note .btn--outline { margin-top: auto; align-self: flex-start; height: 3rem; font-size: var(--text-small); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .notes-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav { padding-block: calc(var(--space-16) + env(safe-area-inset-top)) var(--space-16); }
  .menu-open .nav { background: var(--color-ink); }
  .foot__top { flex-direction: column; align-items: center; }
  .foot__cols { align-self: stretch; border-top: 1px solid var(--color-line); padding-top: var(--space-32); }
  .foot__base { flex-direction: column; align-items: center; text-align: center; }
}
@media (hover: none) {
  .btn:not(.btn--outline):not(:disabled) {
    transform: translate(var(--lift), calc(var(--lift) * -1));
    box-shadow:
      calc(var(--lift) * -1) var(--lift) 0 calc(var(--ring) * -1) var(--layer-fill),
      calc(var(--lift) * -1) var(--lift) 0 0 var(--layer-1),
      calc(var(--lift) * -2) calc(var(--lift) * 2) 0 calc(var(--ring) * -1) var(--layer-fill),
      calc(var(--lift) * -2) calc(var(--lift) * 2) 0 0 var(--layer-2);
  }
}
@media (max-width: 640px) {
  main { padding-top: 6rem; }
  .notes-list { grid-template-columns: minmax(0, 1fr); }
  .note { min-height: 0; }
  .prose { font-size: 1.0625rem; }
  .prose blockquote { padding: var(--space-16) var(--space-20); font-size: 1.1875rem; }
}
@media (max-width: 380px) {
  .nav .brand { gap: var(--space-8); }
  .nav .brand__mark { width: 2.125rem; height: 2.125rem; }
  .nav .brand .lockup { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; }
}
