/* Ignore Previous site styles. Built from mockup V3A. Fonts are served from this site (SIL OFL 1.1, see fonts/OFL.txt). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap; src: url(/assets/fonts/bricolage-grotesque-latin.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/figtree-latin.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin.woff2) format("woff2"); }

:root {
  --bg: #f1f3f7;
  --surface: #ffffff;
  --ink: #14161c;
  --mute: #4f5563;
  --accent: #ffcf1f;
  --accent-ink: #14161c;
  --line: #14161c;
  --shade: #d3d8e2;
  --term: #14161c;
  --term-fg: #f1f2f5;
  --well: #e6e9f0;
  --hl: #fff0b3;
  --warn: #14161c;
  --tape-dark: #14161c;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161c; --surface: #1d2028; --ink: #f1f2f5; --mute: #a9afbd; --line: #4b5263;
    --shade: #0a0b0e; --term: #0b0c10; --term-fg: #f1f2f5; --well: #14161c; --hl: #4a3d10; --warn: #ffcf1f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161c; --surface: #1d2028; --ink: #f1f2f5; --mute: #a9afbd; --line: #4b5263;
  --shade: #0a0b0e; --term: #0b0c10; --term-fg: #f1f2f5; --well: #14161c; --hl: #4a3d10; --warn: #ffcf1f; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.6;
  padding-block: 20px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 58rem; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
/* A flex item with auto side margins shrinks to its content, so a nested wrap needs an explicit width.
   Without it the guide's column changed width with the app picked. */
.inner-wrap { width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }

.mast { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.mast .tag { font-family: var(--body); font-weight: 500; font-size: .9rem; color: var(--mute); }
.logo { display: inline-flex; align-items: center; gap: .6rem; }
.logo svg { width: 2.2rem; height: 2.2rem; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@media (prefers-reduced-motion: no-preference) { .logo:hover svg { animation: wiggle .5s ease-in-out; } }

.r-fill { fill: var(--surface); stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; }
.r-ink { fill: var(--ink); }
.r-acc { fill: var(--accent); stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; }
.r-acc.no-stroke { stroke: none; }
.r-line { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; fill: none; }
.logo .r-fill, .logo .r-acc, .logo .r-line { stroke-width: 3; }
.gear-teeth { fill: none; stroke: var(--ink); stroke-width: 9; stroke-dasharray: 7.1 7.1; }
.gear-body { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: center; }
@media (min-width: 40rem) { .hero { grid-template-columns: auto minmax(0, 1fr); gap: 2rem; } }
.bot { position: relative; width: 5.6rem; height: 6.2rem; }
.bot svg.head { width: 100%; height: 100%; }
.bot .gear { position: absolute; right: -1.5rem; bottom: -.2rem; width: 2.2rem; height: 2.2rem; }
.hero-text { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.hero h1 mark { background: var(--accent); color: var(--accent-ink); padding: 0 .1em; border-radius: .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero p { font-size: 1.15rem; color: var(--mute); max-width: 36rem; }

.h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.sect { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }

.card { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--shade); padding: 1.3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }
@media (min-width: 50rem) { .card.split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; } .card.compact { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: end; } }
.col { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.card h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.handle { font-family: var(--mono); font-size: .78rem; color: var(--mute); display: block; margin-top: .25rem; }
.card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.card li { padding-left: 1.2rem; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5rem; height: .5rem; background: var(--ink); border-radius: 2px; }
.fine { color: var(--mute); font-size: .95rem; }
.push { margin-top: auto; }

.cmd { display: flex; align-items: center; gap: .6rem; background: var(--term); color: var(--term-fg); border-radius: 8px; padding: .45rem .45rem .45rem .9rem; font-family: var(--mono); font-size: .86rem; min-width: 0; }
.cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmd code::before { content: "> "; color: var(--term-fg); opacity: .55; }
.cmd button { font-family: var(--body); font-weight: 700; font-size: .85rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: .45rem .8rem; cursor: pointer; flex: none; }
.cmd button:hover { filter: brightness(.94); }
.cmds { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }

/* in the works: light hazard-tape strip */
.works { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); max-width: 34rem; }
.works .tape { height: 10px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--tape-dark) 10px 20px); border-bottom: 2px solid var(--line); }
.works .inner { padding: 1rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.works h3 { font-size: 1.3rem; font-weight: 800; }

footer { border-top: 2px solid var(--line); padding-top: 1.2rem; display: grid; gap: .7rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); font-size: .95rem; }
footer .addr { user-select: all; font-weight: 600; }
footer .nod { color: var(--mute); }
footer .fonts { color: var(--mute); grid-column: 1 / -1; font-size: .85rem; }

/* hero newcomer panel */
.newbie { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.25rem; flex-wrap: wrap; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--shade); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); max-width: 38rem; margin-top: .4rem; }
.newbie .nb-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 14rem; }
.newbie .nb-text b { font-family: var(--display); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.newbie .nb-text span { color: var(--mute); font-size: .98rem; }
.newbie .nb-btn { background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; padding: .6rem 1.1rem; border-radius: 99px; border: 2px solid #14161c; white-space: nowrap; }
.newbie:hover .nb-btn { text-decoration: underline; text-underline-offset: 4px; }
.newbie:focus-visible { outline-offset: 4px; }
.card.one { grid-template-columns: minmax(0, 1fr); }
.col p { max-width: 42rem; }
.col.top .tops { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem 2.5rem; }
@media (min-width: 50rem) { .col.top .tops { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.col.top .tops > div { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.cap { color: var(--mute); font-size: .88rem; }

.code { background: var(--well); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; align-self: start; }
.code .tab { font-family: var(--mono); font-size: .78rem; padding: .45rem .9rem; border-bottom: 2px solid var(--line); color: var(--mute); background: var(--surface); }
.code .tab b { color: var(--ink); font-weight: 700; }
.code pre { margin: 0; padding: .6rem 0; font-family: var(--mono); font-size: .74rem; line-height: 1.7; overflow-x: auto; }
.code .ln { display: grid; grid-template-columns: 2.4rem max-content; white-space: pre; min-width: 100%; width: max-content; }
.code .ln > i { font-style: normal; color: var(--mute); text-align: right; padding-right: .8rem; user-select: none; }
.code .ln.hot { background: var(--hl); }
.code .ln.hot > i { color: var(--ink); font-weight: 700; }
.code .ln.hot > span { font-weight: 700; }
.callwrap { padding: .2rem .8rem .9rem 3.2rem; }
.callout { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--shade); padding: .8rem .95rem; font-family: var(--body); font-size: .9rem; line-height: 1.5; display: flex; flex-direction: column; gap: .35rem; max-width: 26rem; }
.callout::before { content: ""; position: absolute; top: -9px; left: 1.4rem; width: 14px; height: 14px; background: var(--surface); border-left: 2px solid var(--line); border-top: 2px solid var(--line); transform: rotate(45deg); }
.callout .meta { font-family: var(--mono); font-size: .76rem; display: flex; flex-wrap: wrap; gap: .1rem .8rem; }
.callout .meta b { font-weight: 700; }
.callout .meta em { font-style: normal; color: var(--mute); }
.callout .why { color: var(--ink); }
.callout .cap { margin: 0; }


/* V3: wrapped config lines, tabs, terminal view, promise line */
.code pre { overflow-x: visible; }
.code .ln { grid-template-columns: 2.4rem minmax(0, 1fr); white-space: pre-wrap; overflow-wrap: anywhere; width: auto; min-width: 0; }
.code pre.flush { padding-top: 0; }
.show { display: flex; flex-direction: column; gap: .9rem; min-width: 0; align-self: start; }
.tabs { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.tablist { display: none; gap: .5rem; flex-wrap: wrap; }
.js .tablist { display: flex; }
.tablist button { font-family: var(--display); font-weight: 700; font-size: .95rem; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 99px; padding: .4rem .95rem; cursor: pointer; }
.tablist button:hover { background: var(--well); }
.tablist button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: 2px 2px 0 var(--shade); }
.panels { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.panels [hidden] { display: none; }
.plabel { font-family: var(--display); font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.js .plabel { display: none; }

.term { background: var(--term); color: var(--term-fg); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; font-family: var(--mono); font-size: .76rem; line-height: 1.6; min-width: 0; }
.term .tbar { padding: .4rem .9rem; border-bottom: 1px solid #3a3f4d; color: #a9afbd; font-size: .72rem; }
.term .tbody { padding: .75rem .9rem .9rem; display: flex; flex-direction: column; gap: .8rem; }
.tcmd { display: flex; align-items: center; gap: .6rem; }
.tcmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.tcmd code::before { content: "$ "; opacity: .55; }
.tcmd button { font-family: var(--body); font-weight: 700; font-size: .8rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: .35rem .7rem; cursor: pointer; flex: none; }
.tcmd button:hover { filter: brightness(.94); }
.fnd { display: flex; flex-direction: column; }
.fnd .h { overflow-wrap: anywhere; }
.fnd .sev { font-weight: 700; }
.fnd .sev.high { color: #ffcf1f; }
.fnd .id { font-weight: 700; margin-left: .5rem; }
.fnd .loc { display: block; color: #a9afbd; }
.fnd .r { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); }
.fnd .r > b { font-weight: 500; opacity: .55; }
.tfoot { color: #a9afbd; }
.plug { border-top: 1px dashed #3a3f4d; padding-top: .7rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.plug .dim { color: #a9afbd; }
.plug code { font-weight: 700; }
.plug code::before { content: "> "; opacity: .55; }
.plug .ph { font-family: var(--body); font-size: .72rem; border: 1px solid #a9afbd; color: #a9afbd; border-radius: 99px; padding: 0 .5rem; }
.term.slim { font-size: .72rem; }
.term.slim .tbar { display: none; }
.term.slim .tbody { padding: .6rem .8rem .7rem; gap: .55rem; }

.promise { font-size: .92rem; }
.promise .pi { white-space: nowrap; }
@media (min-width: 50rem) { .card.split.wa { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.show.wide { max-width: 46rem; }
@media (max-width: 30rem) { .promise .pi { display: block; white-space: normal; } .promise .dot { display: none; } .newbie .nb-btn { white-space: normal; text-align: center; } }
.show .code { align-self: stretch; }
.promises { display: flex; flex-direction: column; gap: .2rem; }

/* Read by screen readers, not shown. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
