/* stomra.com/guides: one stylesheet for the guide index and every guide page.
   The guides are static pages in public/guides/ (served as they are, no build step):
   each links this file and nothing else from the site. Colours follow src/lander.css. */
:root {
  --paper: #ffffff;
  --paper-2: #f5f6f6;
  --paper-3: #eceee9;
  --ink: #1b2016;
  --muted: #5a6155;
  --faint: #8a9085;
  --rule: #e5e7e1;
  --rule-strong: #c8ccc1;
  --accent: #8c6516;
  --blue: #2f5d8a;
  --green: #3f7a4a;
  --red: #a4442f;
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --gutter: clamp(16px, 5vw, 88px);
  --measure: 46rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 3px; }
img, svg { max-width: 100%; height: auto; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }
kbd { border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--paper); }

/* The bar at the top: the oak and the name, then Guides, then the way back. */
.gtop {
  display: flex; align-items: center; gap: 20px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.94);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}
.gtop .brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; font-size: 19px; }
.gtop .brand img { width: 30px; height: auto; }
.gtop .crumb { color: var(--muted); font-size: 15px; text-decoration: none; }
.gtop .crumb::before { content: "/"; margin-right: 12px; color: var(--rule-strong); }
.gtop nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
.gtop nav a { color: var(--muted); text-decoration: none; }
.gtop nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .gtop nav a:not(.signin) { display: none; } }

/* A guide page. */
.guide { padding: 0 var(--gutter) 96px; }
.guide > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.guide > .wide, .guide > figure.wide { max-width: 72rem; }
.ghead { padding: 64px 0 28px; border-bottom: 1px solid var(--rule); margin-bottom: 36px; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.guide h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 18px; }
.lead { font-size: 20px; color: var(--muted); margin: 0; line-height: 1.5; }
.guide h2 { font-size: 28px; letter-spacing: -0.025em; line-height: 1.15; font-weight: 600; margin: 56px auto 14px; }
.guide h3 { font-size: 20px; letter-spacing: -0.015em; font-weight: 600; margin: 32px auto 8px; }
.guide p, .guide li { color: #2b3126; }
.guide ul, .guide ol { padding-left: 1.3em; }
.guide li + li { margin-top: 6px; }
.toc { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 22px; font-size: 15px; }
.toc b { display: block; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.toc ol { margin: 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--blue); }

figure { margin: 32px auto; }
figure .frame { border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-2); padding: 20px; overflow-x: auto; }
figure svg { display: block; margin: 0 auto; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

.note, .tip { border-left: 3px solid var(--accent); background: #faf6ec; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 24px auto; }
.tip { border-left-color: var(--blue); background: #eef3f8; }
.note > :first-child, .tip > :first-child { margin-top: 0; }
.note > :last-child, .tip > :last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px auto; }
.card { border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; background: var(--paper); }
.card h3, .card h4 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 18px 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; display: grid; place-items: center; }

table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 20px auto; }
.tablewrap { overflow-x: auto; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; background: var(--paper-2); }

.gnext { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 15px; }

/* The index. */
.gindex { padding: 0 var(--gutter) 96px; max-width: 76rem; margin: 0 auto; }
.gindex .ghead { border-bottom: none; }
.gindex h1 { font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.04em; line-height: 1; font-weight: 600; margin: 0 0 18px; }
.gindex .lead { max-width: 44rem; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.jump a { border: 1px solid var(--rule-strong); border-radius: 999px; padding: 5px 14px; font-size: 14px; color: var(--ink); text-decoration: none; }
.jump a:hover { background: var(--paper-2); }
.gsection { margin-top: 56px; scroll-margin-top: 80px; }
.gsection > h2 { font-size: 30px; letter-spacing: -0.03em; margin: 0 0 4px; }
.gsection > p { color: var(--muted); margin: 0 0 20px; max-width: 44rem; }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.glist a { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--rule); border-radius: 12px; padding: 0 0 18px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--paper); transition: border-color 0.15s, transform 0.15s; }
.glist a:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.glist img { display: block; width: 100%; aspect-ratio: 600 / 380; object-fit: cover; object-position: top; border-bottom: 1px solid var(--rule); background: var(--paper-2); margin-bottom: 10px; }
.glist b, .glist span, .glist em { padding: 0 18px; }
.glist b { font-size: 18px; letter-spacing: -0.015em; line-height: 1.25; }
.glist span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.glist em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: auto; padding-top: 6px; }

.gfoot { border-top: 1px solid var(--rule); padding: 22px var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); }
.gfoot a { color: var(--muted); text-decoration: none; }
.gfoot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .glist a { transition: none; } }
.gsub { font-size: 14px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 28px 0 12px; }
