/* sandyflat.net
   One centered reading column. Photos float beside the text on wide screens
   and stack full-width on phones. Dark theme only. */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #13171c;        /* slate, slightly blue */
  --surface: #1b2027;
  --rule: #2b323c;
  --fg: #e6e3dc;        /* warm off-white */
  --muted: #9ba3ad;
  --accent: #f0ad4e;    /* amber phosphor */
  --accent-dim: #c48a35;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.125rem/1.65 var(--body); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: 46rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header and navigation */
header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1.1rem; }
.brand { font: 600 1.15rem/1 var(--mono); color: var(--fg); text-decoration: none; letter-spacing: .02em; }
.brand::before { content: "> "; color: var(--accent); }
.brand .cursor { display: inline-block; width: .55em; height: 1em; margin-left: .15em; background: var(--accent); vertical-align: -.12em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand .cursor { animation: none; } }
nav.main { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font: .95rem/1.4 var(--mono); }
nav.main a { color: var(--muted); text-decoration: none; padding-block: .3rem; }
nav.main a:hover, nav.main a[aria-current] { color: var(--accent); }

/* text */
main { padding-block: 2.25rem 3rem; }
.crumbs { font: .85rem/1.5 var(--mono); color: var(--muted); margin: 0 0 .75rem; }
.crumbs a { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; font-weight: 700; margin-bottom: .75rem; }
h2 { font-size: 1.4rem; margin: 2.75rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); clear: both; }
h1 + h2, .subnav + h2, h1 + .note + h2 { margin-top: 1.5rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
.lede { font-size: 1.25rem; }
.label { font: .78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.note { border-left: 2px solid var(--accent-dim); padding: .1rem 0 .1rem 1rem; color: var(--muted); font-size: 1rem; }
.warn { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: .8rem 1rem; font-size: 1rem; }
.clear { clear: both; }

/* photos */
figure { margin: 1.5rem 0; }
figure img { display: block; width: 100%; border-radius: 3px; background: var(--surface); }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
figure.side { float: right; width: 42%; margin: .35rem 0 1rem 1.5rem; }
figure.side.left { float: left; margin: .35rem 1.5rem 1rem 0; }
figure.side.narrow { width: 30%; }
figure.inline { display: inline-block; margin: .25rem 0 1rem; }
figure.inline img { width: auto; background: none; }
figure img[width="100"], figure img[width="85"] { width: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 .5rem; }
.pair figure { margin: 0; }
/* photo-and-text rows, alternating sides */
.step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem; align-items: center; margin: 1.75rem 0; clear: both; }
.step.flip .step-fig { order: 2; }
figure.step-fig { margin: 0; }
figure.step-fig img { width: auto; max-width: 100%; max-height: 28rem; margin-inline: auto; }
.step-text { min-width: 0; }
.step-text > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .step { grid-template-columns: 1fr; gap: .75rem; }
  .step.flip .step-fig { order: 0; }
  h1 { font-size: 1.75rem; }
  figure.side, figure.side.left, figure.side.narrow { float: none; width: 100%; margin: 1.25rem 0; }
  figure.side.narrow { max-width: 13rem; }
  .pair { grid-template-columns: 1fr; }
}

/* home page section list */
.sections { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.sections li { border-bottom: 1px solid var(--rule); margin: 0; }
.sections a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1.1rem .25rem; text-decoration: none; color: var(--fg); }
.sections a:hover { background: var(--surface); }
.sections .t { font-weight: 700; font-size: 1.2rem; }
.sections .d { grid-column: 1; color: var(--muted); font-size: 1rem; }
.sections .go { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--mono); color: var(--accent); }

/* machine index */
.machines { columns: 2 14rem; column-gap: 2rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.machines li { break-inside: avoid; padding: .45rem 0; margin: 0; border-bottom: 1px dotted var(--rule); }
.machines .maker { font: .8rem/1 var(--mono); color: var(--muted); display: block; margin-bottom: .15rem; letter-spacing: .04em; }

/* section sub-navigation */
.subnav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.subnav li { margin: 0; }
.subnav a { display: inline-block; font: .85rem/1 var(--mono); padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 3px; color: var(--fg); text-decoration: none; }
.subnav a:hover { border-color: var(--accent); color: var(--accent); }
.subnav a[aria-current] { border-color: var(--accent-dim); color: var(--accent); }

/* spec sheet and data tables */
.spec, .tablewrap { margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); overflow-x: auto; }
.spec table, .tablewrap table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td, .tablewrap th, .tablewrap td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec tr:last-child > *, .tablewrap tr:last-child > * { border-bottom: 0; }
.spec th { font: .78rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); white-space: nowrap; width: 1%; }
.tablewrap th { font: .78rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
td, th { font-variant-numeric: tabular-nums; }
.num { text-align: right !important; white-space: nowrap; }
table.files td:first-child { font-family: var(--mono); font-size: .88rem; white-space: nowrap; }
.gone { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule); }

/* downloads and code */
.downloads { list-style: none; padding: 0; }
.downloads li { padding: .45rem 0; margin: 0; border-bottom: 1px dotted var(--rule); }
.downloads .size { color: var(--muted); font: .82rem var(--mono); margin-left: .4rem; }
p.dl a { font-family: var(--mono); font-size: .9rem; }
p.dl a::before { content: "\2193  "; }
.code { margin: 1rem 0 1.5rem; }
.codehead { font: .8rem/1 var(--mono); color: var(--muted); margin: 0 0 .4rem; }
pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: .9rem 1rem; overflow-x: auto; font: .85rem/1.5 var(--mono); color: var(--fg); margin: 0 0 1.25rem; }

/* footer */
footer.site { border-top: 1px solid var(--rule); }
footer.site .wrap { padding-block: 1.25rem 2rem; font: .85rem/1.5 var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
