/* Adapted from OpenDesign skills/article-magazine at 53231d40b778d88eba23f35547bf99485d3ae9fc. Apache-2.0. */

:root {
  --ink: #1a1a1a;
  --paper: #fafaf7;
  --line: #e7e5e0;
  --mute: #6b6760;
  --accent: #b8553a;
  --twitter: #1d9bf0;
}
body {
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.serif {
  font-family: "Instrument Serif", Georgia, serif;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 48px 0;
  color: var(--mute);
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--line);
}
.article p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #262421;
  margin: 1.1em 0;
  max-width: 65ch;
}
.article h2 {
  font-family: "Instrument Serif", serif;
  font-size: 1.875rem;
  font-weight: 700;
  margin: 2.4em 0 0.8em;
  letter-spacing: -0.01em;
}
.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 20px;
  margin: 1.6em 0;
  font-style: italic;
  color: var(--mute);
  font-family: "Instrument Serif", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(
      circle at 12% 18%,
      rgba(106, 92, 56, 0.05),
      transparent 45%
    ),
    radial-gradient(circle at 88% 72%, rgba(106, 92, 56, 0.04), transparent 50%);
}

/* Modified by Skilly, 2026: offline fonts, honest content, fluid grids, keyboard and print support. */
@font-face {
  font-family: DM Sans;
  src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Instrument Serif;
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
* {
  box-sizing: border-box;
  min-width: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
button,
input,
select {
  font: inherit;
}
button,
a,
summary {
  touch-action: manipulation;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a34c31;
  outline-offset: 4px;
}
img,
svg {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 12px;
  background: #fff;
  z-index: 100;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}
.topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sitefoot {
  padding: 30px max(20px, 4vw);
  font-size: 11px;
  color: #625d53;
  line-height: 1.8;
}
.empty {
  border: 1px dashed #b2ac9f;
  padding: 24px;
  color: #615d54;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.controls button,
.controls input,
.controls select {
  border: 1px solid #918b7c;
  background: #fffaf1;
  color: #24251f;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 5px;
  max-width: 100%;
}
.controls button[aria-pressed="true"],
.controls button[aria-selected="true"] {
  background: #23251f;
  color: #fffaf1;
}
table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid #cfc7b7;
  text-align: left;
  overflow-wrap: anywhere;
}
th {
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dt {
  font-size: 11px;
  text-transform: uppercase;
  color: #605b51;
}
dd {
  margin: 4px 0 20px;
}
details {
  margin: 16px 0;
}
summary {
  cursor: pointer;
  padding: 10px 0;
}
section[id] {
  scroll-margin-top: 20px;
}
@media (max-width: 600px) {
  .topline {
    font-size: 10px;
  }
  th,
  td {
    padding: 8px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .controls,
  .skip {
    display: none !important;
  }
  [hidden] {
    display: block !important;
  }
  body {
    background: white !important;
  }
  .sitefoot {
    break-inside: avoid;
  }
  h1,
  h2,
  h3 {
    break-after: avoid;
  }
  article,
  .card,
  .phone,
  .theme {
    break-inside: avoid;
  }
  a {
    text-decoration: none;
  }
  .panel {
    display: block !important;
    break-before: page;
  }
}
:root {
  --paper: #f8f4eb;
  --ink: #282e29;
  --accent: #984a32;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--paper);
}
.journal {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 48px 60px;
}
.journal > .topline {
  border-bottom: 1px solid #c8c2b6;
  padding-bottom: 22px;
}
.essay-hero {
  padding: 68px 0 42px;
  margin-left: 235px;
  max-width: 820px;
}
.edition {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.essay-hero h1 {
  font:
    400 clamp(54px, 6.8vw, 92px)/0.99 "Instrument Serif",
    Georgia,
    serif;
  letter-spacing: -0.025em;
  margin: 26px 0;
}
.dek {
  font:
    20px/1.6 "DM Sans",
    sans-serif;
  max-width: 36em;
  color: #5e6259;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  margin-top: 30px;
}
.byline span:last-child {
  color: #706e63;
}
.author-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #ada899;
  color: var(--accent);
  font-size: 22px;
}
.reading-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 720px);
  gap: 50px;
  border-top: 1px solid #c8c2b6;
  padding-top: 34px;
}
.contents {
  align-self: start;
  position: sticky;
  top: 28px;
}
.contents > p {
  font-size: 10px;
  letter-spacing: 0.15em;
}
.contents nav {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}
.contents nav a {
  font-size: 12px;
  text-decoration: none;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  line-height: 1.5;
}
.contents nav span {
  color: var(--accent);
  font-size: 10px;
}
.reading-note {
  font:
    italic 27px/1.2 "Instrument Serif",
    serif;
  color: #777967;
  border-top: 1px solid #d5cebf;
  margin-top: 40px;
  padding-top: 24px;
}
.print {
  border: 1px solid #a7a294;
  background: transparent;
  font-size: 11px;
  padding: 10px 16px;
  margin-top: 28px;
  color: var(--ink);
}
.article p {
  font-size: 17px;
  line-height: 1.9;
  max-width: none;
}
.article h2,
.article h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
}
.article h2 {
  font-size: 40px;
}
.article h3 {
  font-size: 29px;
}
.article h2:first-child {
  margin-top: 0;
}
.article blockquote {
  font:
    32px/1.3 "Instrument Serif",
    serif;
  padding: 12px 0 12px 26px;
  margin: 40px 0;
  color: #4e5e47;
  border-color: #798461;
}
.article ul {
  padding-left: 18px;
  line-height: 1.9;
}
.article li {
  padding-left: 6px;
  margin: 10px 0;
}
.article li::marker {
  color: var(--accent);
}
.article code {
  background: #e9e2d5;
  padding: 3px 6px;
  font-size: 13px;
}
.code {
  margin: 30px 0;
  background: #24302e;
  color: #edf1e6;
  padding: 22px;
  border-radius: 4px;
}
.code figcaption {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #afbfac;
}
.code pre {
  margin: 20px 0 4px;
  line-height: 1.7;
  font-size: 13px;
}
.code code {
  background: none;
  color: inherit;
  padding: 0;
}
.table-frame {
  margin: 36px 0;
  border: 1px solid #c5c1b3;
}
.article table {
  font-size: 13px;
}
.article th {
  background: #ece9df;
}
.article .endnote {
  font-size: 12px;
  color: #5c6056;
}
.ornament {
  margin: 54px 0;
}
.sitefoot {
  max-width: 1240px;
  margin: auto;
}
@media (max-width: 850px) {
  .journal {
    padding: 24px;
  }
  .essay-hero {
    margin-left: 0;
    padding-top: 38px;
  }
  .reading-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .contents {
    position: static;
    border-bottom: 1px solid #c8c2b6;
    padding-bottom: 26px;
  }
  .contents nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .reading-note {
    display: none;
  }
  .article h2 {
    font-size: 35px;
  }
  .article blockquote {
    font-size: 29px;
  }
  .print {
    margin-top: 20px;
  }
}
@media print {
  .journal {
    max-width: none;
    padding: 0;
  }
  .essay-hero {
    margin: 0;
    padding: 20px 0;
  }
  .essay-hero h1 {
    font-size: 48px;
  }
  .reading-layout {
    display: block;
  }
  .contents {
    display: none;
  }
  .article h2 {
    font-size: 26px;
  }
  .code {
    background: #eee;
    color: #111;
  }
  .article p {
    font-size: 12pt;
  }
  .table-frame {
    break-inside: avoid;
  }
}
