:root {
  color-scheme: dark;
  --ink: #f6e5ca;
  --muted: #e0c9aa;
  --jade: #f3cc8d;
  --line: #826041;
  --marker: "Marker Felt", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --sign-edge: polygon(1% 10%,18% 5%,51% 6%,76% 3%,99% 8%,98% 42%,100% 51%,98% 60%,99% 93%,73% 94%,49% 97%,23% 94%,2% 96%,0 69%,2% 54%,0 45%);
  --sign-edge-alt: polygon(2% 5%,28% 8%,58% 4%,83% 7%,99% 3%,98% 37%,100% 43%,98% 53%,99% 90%,82% 96%,53% 93%,27% 97%,1% 91%,2% 70%,0 62%,2% 53%);
  font: 16px/1.7 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: #21160f;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; position: relative; isolation: isolate; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg,#150d0873,#1c110b28 30%,#150d088c),url('./mine-cave.png') 55% center/cover no-repeat #21160f;
}
a { color: var(--jade); text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid #fff0ba; outline-offset: 5px; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 5; padding: 12px; background: #24180f; }
.skip:focus { top: 12px; }
.draft { padding: 9px 18px; text-align: center; background: #24180f; color: #fff1d8; font-size: 12px; }
.site-header,main,footer { width: min(100% - 48px,1120px); margin-inline: auto; }
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 24px; margin-top: 20px; position: relative;
  background: linear-gradient(110deg,#25190ff5,#382519e8);
  border-block: 5px solid #65442b; box-shadow: 0 6px 14px #0d080872;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); font: 700 clamp(22px,3vw,29px)/1.15 var(--marker); }
.brand img { border-radius: 12px; box-shadow: 0 3px 8px #0008; }
.brand small { display: block; color: var(--muted); font: 12px/1.5 system-ui,sans-serif; padding-top: 6px; }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav a,.button,.text-link,footer a {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 23px; color: #20160f; text-decoration: none; border: 0;
  background: none; font: 700 17px/1.4 var(--marker); text-shadow: .2px 0 currentColor;
}
nav a::before,.button::before,.text-link::before,footer a::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 24% -6%,#fff0ce57,transparent 62%),url('./timber-grain.svg') center/100% 100% no-repeat,linear-gradient(105deg,#be9a70,#d8b381 27%,#cca575 69%,#be9a70);
  clip-path: var(--sign-edge); filter: drop-shadow(0 3px 2px #0006);
}
nav a:nth-child(even)::before,.text-link::before,footer a:nth-of-type(even)::before { clip-path: var(--sign-edge-alt); }
nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
nav a[aria-current]::before,.button::before { background-color: #e5c698; filter: brightness(1.1); }
nav a:hover,.button:hover,.text-link:hover,footer a:hover { text-decoration: underline; }
main { margin-block: 32px; }
.home-page { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); align-items: start; gap: 0; }
.page-copy { min-width: 0; padding: 32px 34px 36px; background: #24180ff2; border: 2px solid #7a5738; box-shadow: 0 10px 22px #100a087d; }
.home-page .page-copy { background: linear-gradient(110deg,#24180ff5,#24180ff0); }
.hero-miner { width: 100%; max-width: none; height: auto; margin-left: 0; margin-top: 20px; align-self: start; pointer-events: none; filter: drop-shadow(0 14px 12px #10080699); mask-image: linear-gradient(#000 86%,transparent 100%); }
.kicker { color: #efcca1; font: 700 12px/1.5 system-ui,sans-serif; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 18px; }
h1 { position: relative; isolation: isolate; margin: 0 0 24px; padding: 21px 26px 25px; color: #20160f; font: 700 clamp(29px,3.4vw,41px)/1.22 var(--marker); text-wrap: balance; }
h1::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('./timber-grain.svg') center/100% 100%,linear-gradient(110deg,#c6a074,#e2c297 37%,#c29a6e); clip-path: var(--sign-edge-alt); }
h2 { font: 700 24px/1.3 var(--marker); color: #f5d3a0; margin: 0 0 12px; }
p { margin: 0 0 19px; }
.lead { font-size: 21px; line-height: 1.5; }
.actions { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin: 27px 0 35px; }
.actions a { min-height: 56px; padding-inline: 25px; }
section { margin-top: 32px; }
section p:last-child { margin-bottom: 0; }
.note { padding-left: 20px; border-left: 4px solid #be9157; }
.date { padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.document-page { max-width: 850px; }
.document-page .page-copy { padding: 35px 42px 42px; }
footer { background: #24180ff2; border-top: 4px solid #65442b; padding: 16px 24px; margin-bottom: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; color: var(--muted); font-size: 13px; }
footer span { margin-right: auto; }
footer a { min-height: 44px; font-size: 15px; padding: 8px 18px; }
@media(min-width:1100px) { .hero-miner { position: sticky; top: 22px; } }
@media(max-width:760px) {
  .site-header,main,footer { width: calc(100% - 28px); }
  .site-header { margin-top: 14px; flex-direction: column; align-items: flex-start; padding: 18px; gap: 17px; }
  nav { width: 100%; }
  nav a { flex: 1; padding-inline: 12px; min-height: 48px; }
  .home-page { grid-template-columns: minmax(0,1fr); gap: 0; }
  .home-page .page-copy { grid-column: 1; grid-row: 1; }
  .hero-miner { width: min(75%,340px); margin: 22px auto -4px; grid-row: 2; }
  .page-copy,.document-page .page-copy { padding: 25px 22px 29px; }
  main { margin-block: 22px; }
  h1 { font-size: clamp(29px,5.7vw,37px); padding: 18px 20px 22px; }
  .lead { font-size: 19px; }
  footer { padding: 16px 18px; }
  footer span { width: 100%; }
}
@media(max-width:370px) {
  .site-header,main,footer { width: calc(100% - 20px); }
  .brand { font-size: 21px; gap: 9px; }
  .brand img { width: 48px; height: 48px; }
  .page-copy,.document-page .page-copy { padding-inline: 17px; }
  .actions { flex-direction: column; }
}
@media(prefers-reduced-motion:no-preference) { a { transition: filter .12s ease; } }
