/* fishbone Progress: the Pages site's one stylesheet, shared by index.html,
   guide.html and 404.html. Ink and paper with a sea-glass accent beside the logo's tile;
   the bar of story-point segments is the one recurring motif. */

:root {
  --ground: #fbfcfc;
  --ground-2: #eef3f2;
  --ink: #0e1a20;
  --ink-2: #44565c;
  --rule: #d3dedb;
  --accent: #2f6f62;
  --accent-soft: #cfe5df;
  --on-accent: #ffffff;
  --hatch: #8a9a9e;
  --warn: #8a5a00;
  --code-ground: #0e1a20;
  --code-ink: #e8f1ef;
  --code-dim: #8fd3c1;
  --code-mute: #9fb3b8;
  --shot-shadow: 0 18px 40px -18px rgba(14, 26, 32, 0.35), 0 2px 6px rgba(14, 26, 32, 0.08);
  --display: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 16px;
  --measure: 66ch;
  --head-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0e1a20;
    --ground-2: #13232a;
    --ink: #f3f7f6;
    --ink-2: #a7babe;
    --rule: #23373f;
    --accent: #8fd3c1;
    --accent-soft: #1d3a37;
    --on-accent: #0e1a20;
    --hatch: #5d7379;
    --warn: #f0c060;
    --code-ground: #081014;
    --code-ink: #e8f1ef;
    --code-dim: #8fd3c1;
    --code-mute: #93a8ad;
    --shot-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px #23373f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0e1a20;
  --ground-2: #13232a;
  --ink: #f3f7f6;
  --ink-2: #a7babe;
  --rule: #23373f;
  --accent: #8fd3c1;
  --accent-soft: #1d3a37;
  --on-accent: #0e1a20;
  --hatch: #5d7379;
  --warn: #f0c060;
  --code-ground: #081014;
  --code-ink: #e8f1ef;
  --code-dim: #8fd3c1;
  --code-mute: #93a8ad;
  --shot-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px #23373f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--hatch) var(--ground); scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: var(--ground-2); padding: 0.08em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
strong { font-weight: 650; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 40px; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: var(--ground); }

/* Header: brand, the site's four links and the theme toggle. On a phone the links
   fold behind a Menu button once site.js runs; without it they wrap under the brand. */
.site-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; margin-right: auto; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand:hover { color: var(--ink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a { display: block; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.site-nav a:hover { background: var(--ground-2); color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-button {
  appearance: none; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-weight: 500;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.icon-button:hover { background: var(--ground-2); }
.icon-button svg { width: 20px; height: 20px; flex: none; }
.toggle .moon { display: none; }
:root[data-theme="dark"] .toggle .sun { display: none; }
:root[data-theme="dark"] .toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toggle .sun { display: none; }
  :root:not([data-theme="light"]) .toggle .moon { display: block; }
}
.menu-button { display: none; }
.site-nav { order: 3; width: 100%; }
@media (max-width: 759px) {
  .js .menu-button { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-head.open .site-nav { display: block; }
  .site-nav ul { border-top: 1px solid var(--rule); padding-top: 8px; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 12px 10px; font-size: 1.05rem; }
}
@media (min-width: 760px) {
  .site-nav { order: 0; width: auto; }
}

/* Hero */
.hero { padding-top: 24px; padding-bottom: 8px; display: grid; gap: 8px; }
.hero-mark { width: clamp(130px, 36vw, 180px); height: auto; }
.hero h1 {
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  font-weight: 800;
  font-size: clamp(2.6rem, 9.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
  max-width: 12ch;
}
.hero h1 .then { display: block; color: var(--ink-2); font-weight: 600; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); line-height: 1.5; max-width: 40ch; color: var(--ink); margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  background: var(--ink); color: var(--ground); padding: 12px 18px; border-radius: 10px;
}
.button:hover { color: var(--ground); background: var(--accent); }
:root[data-theme="dark"] .button:hover { color: var(--on-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button:hover { color: var(--on-accent); } }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.button.ghost:hover { background: var(--ground-2); color: var(--ink); }
.meta { color: var(--ink-2); font-size: 0.95rem; }
@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr auto; align-items: end; column-gap: 48px; padding-top: 56px; }
  .hero-mark { grid-column: 2; grid-row: 1 / span 2; width: clamp(200px, 20vw, 270px); align-self: center; margin: 0; }
  .hero-copy { grid-column: 1; grid-row: 1; }
}

/* The bar: one segment per ticket, as wide as its points, as the panel draws it. */
.bar { display: flex; gap: 4px; height: 22px; }
.seg { flex: var(--pts) 1 0; min-width: 0; border-radius: 5px; position: relative; overflow: hidden; background: var(--ground-2); box-shadow: inset 0 0 0 1px var(--rule); }
.seg::before { content: ""; position: absolute; inset: 0; transform-origin: left center; }
.seg.done::before { background: var(--accent); }
.seg.working::before { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); border-radius: 5px; }
.seg.working::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 55%, transparent), transparent);
  animation: sweep 2.6s cubic-bezier(0.45, 0, 0.25, 1) 1.6s infinite;
}
.seg.quiet::before { background: repeating-linear-gradient(-45deg, var(--hatch) 0 3px, transparent 3px 8px); }
.seg.blocked::before { background: var(--ink); }
.seg.blocked { box-shadow: none; }

@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sweep { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .seg::before { animation: fill 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i) * 90ms + 200ms); }
}
@media (prefers-reduced-motion: reduce) {
  .seg.working::after { animation: none; display: none; }
}

/* Sections */
/* On the section itself: .wrap's padding shorthand would otherwise reset it. */
section.wrap { padding-top: clamp(72px, 12vw, 136px); }
h2 {
  font-family: var(--display);
  font-variation-settings: "opsz" 72;
  font-weight: 750;
  font-size: clamp(2rem, 5.6vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 18ch;
  text-wrap: balance;
}
h3 {
  font-family: var(--display);
  font-variation-settings: "opsz" 36;
  font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
.prose p, .prose ul, .prose ol { max-width: var(--measure); margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.section-intro { max-width: var(--measure); color: var(--ink-2); margin: 0 0 8px; }

.problem { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .problem { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); align-items: start; column-gap: 72px; }
  .problem .shot { margin-top: 8px; }
}

.shot { margin: 0; min-width: 0; }
.shot img { width: 100%; max-width: 500px; border-radius: 14px; box-shadow: var(--shot-shadow); }
.shot figcaption { color: var(--ink-2); font-size: 0.9rem; margin-top: 14px; max-width: 46ch; }
.shot + .shot { margin-top: 28px; }
/* Each screenshot comes in both themes; the page's theme picks one. */
.for-dark { display: none; }
:root[data-theme="dark"] .for-dark { display: block; }
:root[data-theme="dark"] .for-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .for-dark { display: block; }
  :root:not([data-theme="light"]) .for-light { display: none; }
}

.feature { display: grid; gap: 28px; padding-top: 56px; margin-top: 56px; border-top: 1px solid var(--rule); }
.feature:first-of-type { border-top: 0; margin-top: 8px; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); column-gap: 72px; align-items: start; }
  .feature.flip .shots { order: -1; }
}

/* Install */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 28px; max-width: 760px; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: 12px; counter-increment: step; }
.steps > li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.2; color: var(--accent); }
.steps p { margin: 0 0 10px; }
pre {
  margin: 0 0 1em; background: var(--code-ground); color: var(--code-ink); border-radius: 12px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.84rem; line-height: 1.6;
  -webkit-overflow-scrolling: touch; max-width: 100%; tab-size: 2;
}
pre code { font-size: inherit; }
pre .prompt { color: var(--code-dim); user-select: none; }
pre::-webkit-scrollbar { height: 8px; }
pre::-webkit-scrollbar-thumb { background: #33474e; border-radius: 4px; }
.small { color: var(--ink-2); font-size: 0.95rem; max-width: var(--measure); margin-top: 28px; }

/* Footer */
.site-foot { margin-top: clamp(96px, 14vw, 160px); border-top: 1px solid var(--rule); padding: 36px 0 56px; color: var(--ink-2); font-size: 0.95rem; }
.site-foot .wrap { display: grid; gap: 18px 32px; }
.site-foot .brand { color: var(--ink); margin: 0; }
.site-foot p { margin: 0; max-width: 64ch; }
.site-foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 18px; flex-wrap: wrap; }
@media (min-width: 860px) {
  .site-foot .wrap { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
}

/* ---- The guide ---- */
.page-head { padding-top: 32px; padding-bottom: 8px; }
.page-head h1 {
  font-family: var(--display); font-variation-settings: "opsz" 96; font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; margin: 0 0 16px; text-wrap: balance;
}
.page-head p { max-width: 52ch; font-size: clamp(1.05rem, 2.2vw, 1.2rem); margin: 0; }
.page-head .bar { margin-top: 28px; max-width: 520px; height: 12px; }

.guide { display: grid; gap: 32px; margin-top: 40px; }
.toc-phone { border: 1px solid var(--rule); border-radius: 12px; }
.toc-phone summary { cursor: pointer; padding: 12px 16px; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toc-phone summary::-webkit-details-marker { display: none; }
.toc-phone summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.toc-phone[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc-phone[open] summary { border-bottom: 1px solid var(--rule); }
details.toc-phone ol { padding: 8px 16px 12px; }
.toc-wide { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.here { color: var(--ink); font-weight: 650; }
@media (min-width: 1000px) {
  .guide { grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px; align-items: start; }
  .toc-phone { display: none; }
  .toc-wide { display: block; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-right: 8px; }
  .toc-wide p { font-family: var(--display); font-weight: 700; margin: 0 0 6px; }
  .toc-wide a { padding: 5px 0 5px 14px; border-left: 2px solid var(--rule); }
  .toc-wide a.here { border-left-color: var(--accent); }
}
.doc { min-width: 0; max-width: 760px; }
.doc > section { padding-top: 56px; }
.doc > section:first-child { padding-top: 0; }
.doc h2 { font-size: clamp(1.8rem, 4.6vw, 2.5rem); max-width: none; margin-bottom: 16px; }
.doc h3 { font-size: clamp(1.2rem, 2.8vw, 1.4rem); margin: 32px 0 10px; }
.doc h2 code { background: none; padding: 0; white-space: nowrap; font-size: 0.9em; }
.doc h4 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; letter-spacing: -0.01em; }
.doc :is(h2, h3, h4) a { text-decoration: none; }
.doc :is(h2, h3, h4) a::after { content: "#"; margin-left: 0.35em; color: var(--accent); opacity: 0; font-weight: 600; }
.doc :is(h2, h3, h4) a:hover::after, .doc :is(h2, h3, h4) a:focus-visible::after { opacity: 1; }
@media (hover: none) { .doc :is(h2, h3, h4) a::after { opacity: 0.45; } }
.doc :is(h2, h3, h4) a:hover { color: var(--ink); }
.doc p, .doc ul, .doc ol, .doc dl { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc li::marker { color: var(--accent); }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 650; border-bottom-width: 2px; }
td code { white-space: nowrap; }

/* 404 */
.lost { padding-top: clamp(48px, 10vw, 120px); max-width: 720px; }
.lost h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 9vw, 4.8rem); line-height: 1; letter-spacing: -0.035em; margin: 0 0 18px; text-wrap: balance; }
.lost p { font-size: 1.15rem; max-width: 46ch; }
.lost .bar { margin: 32px 0 28px; max-width: 420px; }
