/* yorn website: one stylesheet for every page.
   Minimal and editorial: warm neutrals, one orange accent, Bricolage Grotesque for words and
   JetBrains Mono for anything you type. Light and dark follow the system.
   Shape rule: frames and panels 12px, buttons and inputs fully round, chips 6px. */
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f7f6f2; --surface: #efede8; --raise: #ffffff;
  --line: #e2dfd8; --line-2: #cfccc4;
  --ink: #1a1917; --ink-2: #57544e; --ink-3: #85827b;
  --accent: #c2410c; --accent-ink: #ffffff; --accent-soft: rgba(194, 65, 12, .09);
  --ok: #15803d; --bad: #b91c1c; --warn: #a16207;
  --code: #9a3412;
  --shadow: 0 1px 2px rgba(26, 25, 23, .06), 0 12px 32px -18px rgba(26, 25, 23, .25);
  --sans: "Bricolage Grotesque", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --text-w: 720px; --wide-w: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d; --surface: #161615; --raise: #1b1b19;
    --line: #242422; --line-2: #34332f;
    --ink: #eceae4; --ink-2: #a9a69e; --ink-3: #75736c;
    --accent: #f0803c; --accent-ink: #1a0f08; --accent-soft: rgba(240, 128, 60, .12);
    --ok: #6cc38a; --bad: #ef8a80; --warn: #e3b55a;
    --code: #f2b27e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 50px -24px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .88em; }
h1, h2, h3 { text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }

.skip { position: absolute; left: 12px; top: -40px; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 500 14px var(--sans); z-index: 30; }
.skip:focus { top: 12px; }

/* Layout: a reading column, and a wider one for pictures */
.col { width: 100%; max-width: calc(var(--text-w) + 48px); margin: 0 auto; padding: 0 24px; }
.wide { width: 100%; max-width: calc(var(--wide-w) + 48px); margin: 0 auto; padding: 0 24px; }

/* Navigation: the wordmark, a few text links, one action */
nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
nav.scrolled { border-bottom-color: var(--line); }
nav .bar { height: 60px; display: flex; align-items: center; gap: 24px; max-width: calc(var(--wide-w) + 48px); margin: 0 auto; padding: 0 24px; }
.brand { font: 700 19px/1 var(--sans); letter-spacing: -.03em; color: var(--ink); display: inline-flex; align-items: baseline; }
.brand .cur { color: var(--accent); margin-left: 1px; }
nav .links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14.5px; color: var(--ink-2); }
nav .links a { transition: color .15s; }
nav .links a:hover, nav .links a.on { color: var(--ink); }
.key { display: none; }

/* Buttons: one solid, one quiet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 18px; border-radius: 999px; font: 600 14.5px/1 var(--sans); cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn.quiet { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink-3); background: var(--surface); }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; font-weight: 500; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
nav .links .btn { height: 34px; padding: 0 16px; font-size: 13.5px; color: var(--bg); }

/* Type */
.display { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.04; letter-spacing: -.045em; font-weight: 700; }
.display em { font-style: normal; color: var(--accent); }
.lede { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 44ch; }
h2.title { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -.03em; font-weight: 650; }
.sub { margin-top: 10px; color: var(--ink-2); max-width: 60ch; }
.sub code, .muted code { color: var(--ink); }
.muted { color: var(--ink-3); font-size: 14px; }
.mono { font-family: var(--mono); }

/* Sections: space and a hairline, no boxes */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }

/* Copyable command line */
.cmd { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 14px 16px 14px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raise); font: 14px var(--mono); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cmd:hover { border-color: var(--ink-3); }
.cmd .p { color: var(--accent); user-select: none; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 14px; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd .copy { flex: none; font: 500 12.5px var(--sans); color: var(--ink-3); }
.cmd.done .copy { color: var(--ok); }

/* Segmented control (install method, filters) */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 0; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* Inputs */
.field { width: 100%; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font: 14px var(--sans); transition: border-color .15s; }
.field::placeholder { color: var(--ink-3); }
.field:focus { outline: none; border-color: var(--accent); }

/* A real screenshot in a quiet frame */
.shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #0c0c0c; box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; }
.caption { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

/* Rows separated by hairlines (features, commands, lists) */
.rows2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; }
.row-item { padding: 18px 0; border-top: 1px solid var(--line); }
.row-item h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.row-item p { margin-top: 4px; font-size: 15px; color: var(--ink-2); }
.row-item code { font-size: 13px; color: var(--ink); }

/* Disclosure lists (changelog, FAQ) */
.disclose details { border-top: 1px solid var(--line); }
.disclose details:last-child { border-bottom: 1px solid var(--line); }
.disclose summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; align-items: baseline; gap: 16px; font-weight: 600; }
.disclose summary::-webkit-details-marker { display: none; }
.disclose summary::after { content: "+"; margin-left: auto; color: var(--ink-3); font-weight: 400; font-family: var(--mono); }
.disclose details[open] summary::after { content: "-"; }
.disclose .body { padding: 0 0 22px; color: var(--ink-2); max-width: 64ch; }
.disclose code { font-size: 13px; color: var(--ink); }

/* Status lines, drawn like the CLI's tool calls (auth.js renders them) */
.status { margin-top: 20px; font: 13.5px/1.7 var(--mono); min-height: 1.7em; text-align: left; }
.status .h { color: var(--ink); }
.status .h::before { content: "\25CF  "; }
.status.ok .h::before { color: var(--ok); }
.status.err .h::before { color: var(--bad); }
.status.wait .h::before { color: var(--accent); }
.status .r { color: var(--ink-2); padding-left: 2ch; }
.status .r::before { content: "\2514 "; color: var(--ink-3); }

/* Small centred pages (sign in) */
.center { max-width: 440px; margin: 0 auto; padding: 96px 24px 0; text-align: center; }
.center h1 { font-size: clamp(30px, 5vw, 40px); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
.center .lede { margin: 12px auto 0; font-size: 17px; }

/* Long-form documents (privacy, terms) */
.doc { padding: 72px 0 0; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; }
.doc .updated { margin-top: 10px; font: 13px var(--mono); color: var(--ink-3); }
.doc > p:first-of-type { margin-top: 28px; }
.doc h2 { margin-top: 44px; font-size: 20px; letter-spacing: -.015em; font-weight: 650; }
.doc p, .doc li { margin-top: 10px; color: var(--ink-2); }
.doc ul { list-style: none; margin-top: 6px; }
.doc li { position: relative; padding-left: 18px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 1px; background: var(--ink-3); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--accent); }

/* Footer */
footer { margin-top: 120px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-3); }
footer .bar { max-width: calc(var(--wide-w) + 48px); margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
footer .brand { font-size: 16px; }
footer a:hover { color: var(--ink); }
footer .right { margin-left: auto; font: 12.5px var(--mono); }

.ai-notice { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); font: 500 13px var(--sans); padding: 9px 16px; border-radius: 999px; transition: opacity .2s, transform .2s var(--ease); z-index: 40; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Loading placeholders shaped like the rows they replace */
.sk { height: 56px; border-radius: 10px; margin-top: 8px; background: linear-gradient(90deg, var(--surface) 0, var(--raise) 50%, var(--surface) 100%) 0 0 / 640px 100%; }

@media (prefers-reduced-motion: no-preference) {
  .brand .cur { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .rise { animation: rise .5s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  .sk { animation: shimmer 1.2s linear infinite; }
  @keyframes shimmer { from { background-position: -320px 0; } to { background-position: 320px 0; } }
}

@media (max-width: 760px) {
  .col, .wide, nav .bar, footer .bar { padding-left: 20px; padding-right: 20px; }
  nav .bar { gap: 14px; }
  nav .links { gap: 16px; }
  nav .links .opt { display: none; }
  .section { padding: 64px 0; }
  .rows2 { grid-template-columns: minmax(0, 1fr); }
  .center { padding-top: 64px; }
  .doc { padding-top: 48px; }
  footer .right { margin-left: 0; width: 100%; }
}
