/* hetland.co: one sheet for the landing page and Afterthoughts. The world: a physics offprint.
   Near-white coated paper, black ink, one blue ink for figures and links, heat red only for "you" and for heat.
   STIX Two Text throughout (with real small caps); JetBrains Mono for code only. */
:root {
  color-scheme: light;
  --paper: #fbfbf8;
  --ink: #17181a;
  --ink-soft: #4b4f55;
  --ink-faint: #676c73;
  --rule: #cfd2d4;
  --wash: #f1f2ef;
  --box: #edf1f6;
  --blue: #1d4e89;
  --heat: #b8321f;
  --serif: "STIX Two Text", "STIX Two", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 38rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--serif); font-size: 1.125rem; line-height: 1.55; font-variant-numeric: lining-nums; font-kerning: normal; text-rendering: optimizeLegibility; }
::selection { background: #d8e3f0; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--blue) 45%, transparent); }
a:hover { text-decoration-color: var(--blue); }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); text-wrap: balance; }
p, li, caption { text-wrap: pretty; }

/* running head, as on a journal page */
.runhead { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; max-width: 66rem; margin: 0 auto; padding: 1.1rem 1.5rem .7rem; border-bottom: 2.5px solid var(--ink); font-variant-caps: all-small-caps; letter-spacing: .08em; font-size: 1.08rem; }
.runhead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; border-top: 1px solid var(--ink); }
.runhead a { color: var(--ink); text-decoration: none; }
.runhead a:hover { color: var(--blue); }
.runhead nav { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: flex-end; }
.runhead [aria-current] { font-weight: 600; }
main { padding: 0 1.5rem; }

/* section heads: centred small caps with a roman numeral */
h2 { font-size: 1.12rem; font-weight: 600; text-align: center; font-variant-caps: all-small-caps; letter-spacing: .09em; margin: 2.6rem 0 1rem; color: var(--blue); }
h2 .sec { margin-right: .35em; }

/* range input set as a hairline scale with an ink bead */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type=range]::-moz-range-track { height: 1px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--heat); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--heat); margin-top: -7.5px; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--heat); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--heat); }

/* references */
.refs ol { list-style: none; padding: 0; margin: 0; }
.refs li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0; margin-bottom: .55rem; line-height: 1.5; }
.refs .n { color: var(--ink-soft); font-variant-numeric: lining-nums tabular-nums; }

.colophon { max-width: 66rem; margin: 4.5rem auto 0; padding: .8rem 1.5rem 3rem; border-top: 1px solid var(--rule); font-size: .88rem; color: var(--ink-faint); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.colophon a { color: var(--ink-faint); }

/* ── Afterthoughts ─────────────────────────────────────────── */
.contents, .post { max-width: var(--measure); margin: 0 auto; }
.journal-title { text-align: center; margin: clamp(2.5rem, 7vh, 4.5rem) 0 2.4rem; }
.journal-title h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 700; line-height: 1.05; margin: 0 0 .5rem; }
.journal-title p { margin: 0; color: var(--ink-soft); }
.journal-title .sub { font-style: italic; font-size: 1.15rem; }
.journal-title .blurb { margin: 1rem auto 0; max-width: 30rem; font-size: 1rem; }

.toc { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--ink); }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 4rem 1fr; column-gap: .4rem; padding: 1.1rem 0 1.15rem; color: inherit; text-decoration: none; }
.toc .no { color: var(--ink-faint); font-variant-numeric: lining-nums tabular-nums; padding-top: .25rem; white-space: nowrap; }
.toc .t { display: block; font-size: 1.4rem; line-height: 1.2; font-weight: 600; color: var(--ink); }
.toc a:hover .t { color: var(--blue); }
.toc .m { display: block; font-size: .95rem; color: var(--ink-soft); margin-top: .3rem; }
.toc .s { display: block; font-size: 1rem; color: var(--ink-soft); margin-top: .35rem; line-height: 1.5; }
.kind { font-variant-caps: all-small-caps; letter-spacing: .08em; font-style: normal; color: var(--ink); }
.draft { color: var(--ink); font-style: italic; }
.key { margin: 2.2rem 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-soft); }
.key li { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; margin-bottom: .3rem; }

/* a post, set as an article */
.head { text-align: center; margin: clamp(2.5rem, 7vh, 4.5rem) 0 0; }
.head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.12; font-weight: 700; margin: 0 0 .9rem; }
.head .byline { font-variant-caps: all-small-caps; letter-spacing: .08em; margin: 0; }
.head .dates { font-style: italic; color: var(--ink-soft); font-size: .98rem; margin: .2rem 0 0; }
.post .abstract { margin: 2rem 2.2rem 2.4rem; font-size: 1.02rem; line-height: 1.55; }
.post .abstract .run-in { font-variant-caps: all-small-caps; letter-spacing: .07em; font-weight: 600; color: var(--blue); }
article { counter-reset: sec; font-size: 1.16rem; line-height: 1.62; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; -webkit-hyphenate-limit-before: 3; -webkit-hyphenate-limit-after: 3; }
article a, article strong, article code { hyphens: manual; -webkit-hyphens: manual; }
article h2 { counter-increment: sec; counter-reset: sub; }
article h2::before { content: counter(sec, upper-roman) ". "; }
article h3 { counter-increment: sub; font-size: 1.08rem; font-weight: 400; font-style: italic; margin: 1.8rem 0 .5rem; }
article h3::before { content: counter(sub, upper-alpha) ". "; font-style: normal; }
article ul, article ol { margin: 0 0 1em; padding-left: 1.4rem; }
article li { margin-bottom: .3em; }
article strong { font-weight: 600; }
article code { font-family: var(--mono); font-size: .8em; background: var(--wash); padding: .08em .3em; overflow-wrap: break-word; hyphens: none; }
article pre { background: none; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .9rem 0; overflow-x: auto; margin: 0 0 1.4em; font-size: .86rem; line-height: 1.6; hyphens: none; }
article pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
article pre .c { color: var(--ink-faint); font-style: italic; white-space: pre-wrap; }
article table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0 0 1.4em; font-size: .95rem; line-height: 1.45; }
article th, article td { text-align: left; vertical-align: top; padding: .4rem .8rem .4rem 0; }
article th { font-weight: 400; font-variant-caps: all-small-caps; letter-spacing: .06em; border-bottom: 1px solid var(--rule); }
article tr + tr td { border-top: 1px solid var(--rule); }
article blockquote { margin: 0 0 1.2em 1.6rem; font-style: italic; color: var(--ink-soft); }
article img { max-width: 100%; }
.end { margin-top: 2.6rem; border-top: 1px solid var(--rule); padding-top: 1rem; font-size: .98rem; color: var(--ink-soft); }
.end p { margin: 0 0 .5rem; }
.pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 1.6rem; font-size: 1rem; }
.pager a { max-width: 48%; }
.pager a:only-child { max-width: none; }
.pager .next { text-align: right; margin-left: auto; }

@media (max-width: 560px) {
  body { font-size: 1.08rem; }
  .runhead { padding: .9rem 1rem .6rem; font-size: .95rem; letter-spacing: .05em; }
  .runhead nav { gap: .85rem; }
  .abstract, .post .abstract { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  main { padding: 0 1rem; }
  .colophon { padding: .8rem 1rem 2.5rem; }
  .post .abstract { margin: 1.6rem 0 2rem; }
  article { font-size: 1.1rem; hyphens: manual; -webkit-hyphens: manual; }
  .toc a { grid-template-columns: 3.4rem 1fr; }
  .key li { grid-template-columns: 1fr; gap: 0; margin-bottom: .6rem; }
  .pager { flex-direction: column; gap: .8rem; }
  .pager a { max-width: none; }
  .pager .next { text-align: left; margin-left: 0; }
}
