/* Blog: the landing page's paper system (BRAND.md v3), set for reading.
   Tokens and the header, buttons and footer are copied from index.html and
   areas/area.css, not changed; if the landing page changes a token, change it
   here too. Fraunces for headings, Nunito for the rest. Light only. */
:root {
  --ink: #22334F;
  --ink-2: #5F6C86;
  --rule: rgba(34, 51, 79, 0.16);
  --paper: #FAF3E1;
  --card: #FFFDF6;
  --line: #E8DCBE;
  --stack: #EFDFB8;
  --peach: #F8D9AC;
  --amber: #EDA23F;
  --amber-deep: #C9821B;
  --amber-text: #845414;
  --wash: #FDEFD8;
  --radius: 12px;
  color-scheme: light;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces.woff2") format("woff2-variations"), url("../assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.65;
  background: var(--paper); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.045; mix-blend-mode: multiply;
}
::selection { background: var(--wash); color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber-text); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } }
.skip-link {
  position: absolute; left: 16px; top: 8px; z-index: 100;
  background: var(--amber); color: var(--ink); font-weight: 800;
  padding: 10px 16px; text-decoration: none; transform: translateY(-160%); border-radius: var(--radius);
}
.skip-link:focus { transform: translateY(0); }

.btn {
  display: inline-flex; align-items: center; min-height: 44px; border: 0; cursor: pointer;
  text-decoration: none; background: var(--amber); color: #2B1B04; font-weight: 700;
  padding: 13px 24px; border-radius: var(--radius); font-size: 1rem;
  box-shadow: 0 3px 0 var(--amber-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn:hover { background: #F2B054; transform: translateY(-1px); box-shadow: 0 4px 0 var(--amber-deep); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--amber-deep); }
.paper-cut {
  border: 16px solid transparent;
  border-image: url("../assets/paper/card-frame.webp") 76 fill / 16px stretch;
  filter: drop-shadow(0 6px 12px rgba(34, 51, 79, 0.14));
}

header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.12rem; min-height: 44px; letter-spacing: -0.01em; }
.brand .disc {
  width: 24px; height: 24px; flex: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cpath%20d%3D%27M16.00%200.40L18.74%205.76L23.80%202.49L23.50%208.50L29.51%208.20L26.24%2013.26L31.60%2016.00L26.24%2018.74L29.51%2023.80L23.50%2023.50L23.80%2029.51L18.74%2026.24L16.00%2031.60L13.26%2026.24L8.20%2029.51L8.50%2023.50L2.49%2023.80L5.76%2018.74L0.40%2016.00L5.76%2013.26L2.49%208.20L8.50%208.50L8.20%202.49L13.26%205.76Z%27%20fill%3D%27%23EDA23F%27%2F%3E%3Ccircle%20cx%3D%2716%27%20cy%3D%2716%27%20r%3D%2711.4%27%20fill%3D%27%23F8D9AC%27%2F%3E%3Ccircle%20cx%3D%2716%27%20cy%3D%2716%27%20r%3D%279.2%27%20fill%3D%27%23F3B064%27%2F%3E%3Ccircle%20cx%3D%2716%27%20cy%3D%2716%27%20r%3D%276.6%27%20fill%3D%27%23EDA23F%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}
.brand strong { font-weight: 850; }
.nav .btn { padding: 9px 16px; font-size: 0.92rem; box-shadow: 0 2px 0 var(--amber-deep); white-space: nowrap; }

h1, h2 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-optical-sizing: auto; text-wrap: balance; }
h1 { font-weight: 650; font-size: clamp(2.1rem, 1.2rem + 3vw, 3.3rem); line-height: 1.06; letter-spacing: -0.015em; max-width: 22ch; }
h2 { font-weight: 600; font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); line-height: 1.2; letter-spacing: -0.005em; }
h3 { font-weight: 800; font-size: 1.12rem; line-height: 1.35; }

/* the article: one reading column, tables allowed a little wider */
.post { padding-block: 48px 72px; min-width: 0; }
@media (max-width: 720px) { .post { padding-top: 20px; } }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.rail { display: none; }
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: minmax(0, 68ch) minmax(220px, 280px); justify-content: space-between; gap: 64px; }
  .rail { display: block; padding-top: 48px; }
  .rail-in { position: sticky; top: 96px; border-left: 1px solid var(--rule); padding-left: 24px; }
  .rail h2 { font-size: 1.05rem; }
  .rail ol { list-style: none; margin: 10px 0 22px; font-size: 0.93rem; }
  .rail li a { display: block; padding: 6px 0; color: var(--ink-2); font-weight: 650; text-decoration: none; line-height: 1.35; }
  .rail li a:hover { color: var(--ink); text-decoration: underline; }
}
.prose h2 { scroll-margin-top: 88px; }
.post > * { max-width: 68ch; }
.post > h1 { max-width: 22ch; }
.crumb { font-size: 0.95rem; margin-bottom: 14px; }
.crumb a { color: var(--ink-2); font-weight: 700; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.crumb a::before { content: "\2190\00a0"; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.checked { margin-top: 16px; color: var(--ink-2); font-size: 0.95rem; }
.lede { margin-top: 18px; color: var(--ink-2); font-size: 1.16rem; max-width: 56ch; }

.prose { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 48px; }
.prose-sources { margin-top: 48px; border-top: 0; padding-top: 0; }
.prose-sources > h2:first-child { margin-top: 0; }
.lede, .prose p { text-wrap: pretty; }
.prose h3 { margin-top: 30px; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--amber-deep); }
.prose b { font-weight: 800; }
.nw { white-space: nowrap; }
.prose a, .more a, .list .t { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: var(--amber); }
.prose a:hover, .more a:hover { color: var(--amber-text); text-decoration-color: var(--amber-text); }
.prose .sources-h { font-size: 1.3rem; }
.prose .sources { font-size: 0.9rem; color: var(--ink-2); }
.prose .sources a { font-weight: 600; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 0 var(--stack); font-size: 0.97rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; font-weight: 800; background: color-mix(in srgb, var(--peach) 35%, var(--card)); }
.prose td { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .prose th, .prose td { padding: 9px 10px; } .prose table { font-size: 0.92rem; } .prose td:first-child { min-width: 7.5em; } }

/* contents on a phone: folded, above the article */
.toc-m { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.toc-m summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; font-weight: 800; cursor: pointer; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary::after { content: "Show"; margin-left: auto; color: var(--amber-text); font-weight: 700; font-size: 0.92rem; text-decoration: underline; text-underline-offset: 3px; }
.toc-m[open] summary::after { content: "Hide"; }
.toc-m ol { list-style: none; padding: 0 16px 10px; }
.toc-m li a { display: flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 650; text-decoration: none; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .toc-m { display: none; } }

.next { margin-top: 56px; padding: 10px 8px; }
.next h2 { font-size: 1.45rem; }
.next p { margin: 10px 0 18px; color: var(--ink-2); max-width: 58ch; }

.more { margin-top: 48px; }
.more h2 { font-size: 1.3rem; }
.more ul { list-style: none; margin-top: 10px; }
.more li { border-top: 1px solid var(--rule); }
.more a { display: block; padding: 12px 0; }

/* the index: a plain list, one row a guide */
.list { list-style: none; margin-top: 36px; }
.list li { border-top: 1px solid var(--rule); }
.list li:last-child { border-bottom: 1px solid var(--rule); }
.list a { display: block; padding: 22px 0; text-decoration: none; color: var(--ink); }
.list .t { display: block; font-size: 1.2rem; line-height: 1.35; }
.list .d { display: block; margin-top: 6px; color: var(--ink-2); }
.list .c { display: block; margin-top: 6px; color: var(--ink-2); font-size: 0.88rem; font-weight: 700; }
.list a:hover .t { color: var(--amber-text); text-decoration-color: var(--amber-text); }

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; background: var(--paper); }
.foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: 0.9rem; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 650; display: inline-block; padding: 12px 2px; }
.foot a:hover { color: var(--amber-text); }
.foot .legal { width: 100%; margin-top: 10px; font-size: 0.82rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
