@font-face { font-family: "General Sans"; src: url("/fonts/gs-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("/fonts/gs-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("/fonts/gs-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
/* Learn · Some Good Co. Layout: the SGC bar on top of an SGC dark canvas; a contents rail that sticks to the top beside one reading column on wide screens; on narrow screens a contents bar that sticks once it reaches the top and opens as a dropdown. */
:root {
  --bg: #14171a;        /* SGC primary dark canvas */
  --surface: #1b1f23;   /* lifted panels, a step above the canvas */
  --line: #272a30;      /* SGC dark gray: borders, dividers */
  --muted: #888680;     /* SGC mid gray: secondary text */
  --body: #dfddd6;      /* SGC light gray: running text */
  --fg: #ffffff;        /* headings */
  --accent: #f15a29;    /* the one accent: new or automatic */
  --accent-soft: rgba(241, 90, 41, 0.12);
  --shadow: rgba(0, 0, 0, 0.5);
  --font: "General Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --copy: 1.25rem;      /* SGC copy floor */
  --small: 1rem;        /* SGC small floor */
  --eyebrow: 0.875rem;
  --foot: 0.75rem;      /* SGC footer chrome only */
  --chrome: #8b9298;    /* SGC bar and footer text */
  --chrome-line: rgba(255, 255, 255, 0.08);
  --bar-bg: rgba(20, 23, 26, 0.92);
  --bar-h: 3.6rem;      /* SGC bar height; the contents rail sticks under it */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toc-caret { transition: none; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 var(--copy)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { color: var(--fg); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 4.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.375rem; line-height: 1.3; }
p { margin: 0; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration: none; }
a:focus-visible, input:focus-visible, label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
strong { color: var(--fg); font-weight: 500; }

.eyebrow { font-size: var(--eyebrow); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.menu, .file {
  font-family: var(--mono); font-size: 0.85em; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.05em 0.4em; white-space: nowrap;
}
.file { color: var(--body); }

/* ── page frame ─────────────────────────────────────────────── */
.wrap { max-width: 76rem; margin-inline: auto; }
.hero { padding-block: 5rem 4rem; border-bottom: 1px solid var(--line); display: grid; gap: 1.5rem; }
.hero .lead { max-width: 40ch; font-size: 1.5rem; line-height: 1.45; color: var(--body); }
.meta { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 1rem 0 0; }
.meta div { display: grid; gap: 0.25rem; }
.meta dt { font-size: var(--eyebrow); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 0; font-size: var(--small); color: var(--fg); }

.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; }
/* Paints the phone's top safe-area strip so nothing scrolls into view above the sticky contents. */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--bar-h)); align-self: start; padding-block: 2.5rem; }
@media (min-width: 861px) { .toc { max-height: calc(100vh - var(--bar-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; } }
.toc-toggle { display: none; }
.toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.toc a {
  display: grid; grid-template-columns: 1.75rem 1fr; align-items: baseline;
  padding: 0.35rem 0.5rem; border-radius: 4px; color: var(--muted); text-decoration: none;
  font-size: var(--small); line-height: 1.35;
}
.toc a span { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.toc a:hover { color: var(--fg); background: var(--surface); }
.toc a[aria-current="true"] { color: var(--fg); background: var(--surface); }
.toc a[aria-current="true"] span { color: var(--accent); }

main { min-width: 0; }
section { padding-block: 4.5rem; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--bar-h) + 1rem); }
section:last-child { border-bottom: 0; }
.col { max-width: 42rem; display: grid; gap: 1.5rem; }
.head { display: grid; gap: 0.75rem; margin-bottom: 0.5rem; }

/* steps inside a section are a real sequence, so they're numbered */
ol.do { margin: 0; padding: 0; list-style: none; counter-reset: do; display: grid; gap: 1rem; }
ol.do > li { counter-increment: do; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.75rem; }
ol.do > li::before {
  content: counter(do); font-family: var(--mono); font-size: 0.85rem; color: var(--accent);
  border: 1px solid var(--line); border-radius: 50%; width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center; margin-top: 0.1rem;
}
ul.plain { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
ul.plain li::marker { color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem 1.5rem; display: grid; gap: 0.6rem; }
.panel p, .panel li { font-size: 1.125rem; }
.panel .eyebrow { color: var(--accent); }
.panel.quiet .eyebrow { color: var(--muted); }

.settings { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.5rem 1.25rem; margin: 0; font-size: 1.125rem; }
.settings dt { color: var(--muted); }
.settings dd { margin: 0; color: var(--fg); }

/* diagrams */
figure { margin: 0; display: grid; gap: 0.75rem; }
figcaption { font-size: var(--small); color: var(--muted); }
.diagram { width: 100%; max-width: 34rem; height: auto; display: block; }
.diagram .n { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.diagram .n.new { stroke: var(--accent); }
.diagram .n.yours { fill: var(--bg); stroke: var(--muted); stroke-dasharray: 4 3; }
.diagram .dot { fill: var(--accent); }
.diagram .t { fill: var(--fg); font: 500 15px var(--font); }
.diagram .s { fill: var(--muted); font: 400 12px var(--font); }
.diagram .w { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.diagram .head-fill { fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: var(--small); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.swatch { width: 1.5rem; height: 0.9rem; border-radius: 3px; border: 1.5px solid var(--line); background: var(--surface); }
.swatch.new { border-color: var(--accent); }
.swatch.yours { border-color: var(--muted); border-style: dashed; background: var(--bg); }

.rename { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.rename .file, .rename .menu { font-size: 1rem; padding: 0.35rem 0.6rem; }
.rename .file.out { border-color: var(--accent); color: var(--fg); }
.rename svg { width: 1.25rem; height: 1.25rem; flex: none; color: var(--muted); }

/* tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1.0625rem; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--line); }
th { font-size: var(--eyebrow); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
td:first-child { color: var(--fg); white-space: nowrap; }
td.new { color: var(--fg); }
.tag-new { display: inline-block; margin-left: 0.4rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }


/* checklist */
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.check label {
  display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.9rem; align-items: start;
  padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 1.125rem;
}
.check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--accent); }
.check input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.check small { display: block; font-size: var(--small); color: var(--muted); margin-top: 0.2rem; text-decoration: none; }


@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* Contents becomes a full-width bar that sticks once it reaches the top; the list drops down from it. */
  .toc {
    z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line);
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
    margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
    padding-block: 0;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .toc > .eyebrow { display: none; }
  .toc-toggle {
    display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.85rem 0;
    background: none; border: 0; color: var(--fg); font: inherit; font-size: var(--small); text-align: left; cursor: pointer;
  }
  .toc-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .toc-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toc-caret { width: 1.1rem; height: 1.1rem; flex: none; color: var(--muted); transition: transform 0.15s; }
  .toc.open .toc-caret { transform: rotate(180deg); }
  .toc ol {
    display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    padding-block: 0.5rem 1rem;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px var(--shadow); max-height: 70vh; overflow-y: auto;
  }
  .toc.open ol { display: grid; }
  section { scroll-margin-top: 4rem; }
  .toc { top: env(safe-area-inset-top, 0px); }
  .hero { padding-block: 3rem 2.5rem; }
  section { padding-block: 3rem; }
}
@media (max-width: 480px) {
  body { font-size: 1.125rem; }
  .settings { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .settings dd { margin-bottom: 0.6rem; }
  .menu { white-space: normal; }
}

/* ── Learn additions ───────────────────────────────────────── */
.shot { margin: 0; display: grid; gap: 0.6rem; }
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fafafa; }
.shot.narrow img { max-width: 16rem; }
.shot figcaption { font-size: var(--small); color: var(--muted); }
.kbd { font-family: var(--mono); font-size: 0.85em; color: var(--fg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0.02em 0.35em; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.tips li { padding-left: 1.4rem; position: relative; font-size: 1.125rem; }
.tips li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }
.qa { display: grid; gap: 1rem; }
.qa h3 { font-size: 1.25rem; }
.hub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.hub-card { display: grid; gap: 0.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--body); text-decoration: none; }
.hub-card:hover { border-color: var(--accent); }
.hub-card h2 { font-size: 1.75rem; }
.hub-card .more { color: var(--accent); font-size: var(--small); }
.toc .toc-group { padding: 1rem 0.5rem 0.3rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.toc .toc-group:first-child { padding-top: 0.25rem; }
/* Long names (web addresses) may break rather than push the page sideways on phones. */
.hero > *, .hub-card > * { min-width: 0; }
h1, h2, .meta dd { overflow-wrap: anywhere; }

.shot.half img { max-width: 20rem; }

/* ── Some Good Co chrome: the bar and footer from somegood.co (src/styles/site.css there) ── */
/* Both run edge to edge, past the body's side gutter, like the bar on somegood.co. */
.sgc-bar, .sgc-foot {
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter-r));
  padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right, 0px));
}
.sgc-bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--bar-h);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--chrome-line);
}
/* The wordmark is the brand mark, so it never takes the link underline or tint. */
.sgc-bar__logo { display: flex; align-items: center; text-decoration: none; }
.sgc-bar__logo:hover { opacity: 0.85; }
.sgc-bar__logo img { height: 1.25rem; width: auto; display: block; transition: opacity 0.15s ease; }
.sgc-bar__label {
  font-family: var(--mono); font-size: var(--eyebrow); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--chrome); text-decoration: none;
}
.sgc-bar__label:hover { color: var(--fg); }
.sgc-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 1.5rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--chrome-line);
  font-family: var(--mono); font-size: var(--foot); letter-spacing: 0.08em; color: var(--chrome);
}
.sgc-foot__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.sgc-foot a { color: var(--chrome); text-decoration: none; border-bottom: 1px solid var(--chrome-line); padding-bottom: 2px; }
.sgc-foot a:hover { color: var(--accent); border-color: var(--accent); }
/* Phones: the bar scrolls away with the page, so only the contents bar sticks at the top. */
@media (max-width: 860px) { .sgc-bar { position: relative; } }
