/* ============================================================================
   The public landing page (landing.html).

   Standalone on purpose: styles.css is the whole app, seven thousand lines a
   first-time visitor has no use for. What is shared is the identity — the
   same self-hosted faces, the same warm paper and ink, the same highlight a
   comment leaves on a document — so the page someone signs in from and the
   app they land in are recognisably one product. The token values are the
   app's; keep them in step with :root in styles.css.

   The product pictures are drawn in HTML rather than screenshotted: they stay
   sharp at every density, follow the theme, reflow on a phone, and never show
   anybody's real documents.
   ========================================================================= */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/instrument-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/instrument-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --font-ui: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* The document's own voice, as in the app: nothing here downloads. */
  --font-doc: 'Source Serif 4', 'Source Serif Pro', ui-serif, 'Iowan Old Style',
              Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;

  --paper: #FAF9F6;
  --paper-soft: #F4F2ED;
  --sunken: #F2F0EA;
  --card: #FFFFFF;
  --line: #E6E2DA;
  --line-soft: #F0EDE6;
  --line-strong: #E0DBD1;

  --text: #191817;
  --body: #33302B;
  --mid: #4A453D;
  --quiet: #5E5A52;
  --faint: #716D64;

  --accent: #4F46D6;
  --on-accent: #FFFFFF;
  --accent-tint: rgba(79, 70, 214, 0.10);
  --accent-wash: #F5F4FE;

  --hl: #FCEDBE;
  --hl-strong: #E8B93A;
  --glow: rgba(251, 229, 155, 0.45);

  /* The brand tile and the primary button: ink with a butter-yellow mark. */
  --ink: #191817;
  --ink-text: #FAF9F6;
  --ink-accent: #FBE59B;

  /* The selection toolbar, which inverts with the theme exactly as #sel-bar does. */
  --bar: #191817;
  --bar-text: #FAF9F6;
  --bar-soft: #CFC9BE;
  --bar-line: #46423B;
  --bar-accent: #FBE59B;

  --attn-bg: #FFF8E3;
  --attn-text: #7A5D0E;
  --attn-chip: #F2C64B;
  --attn-chip-text: #3D2F06;

  --ok: #377D4F;
  --ok-bg: #F0F5F1;
  --ok-border: #DBE8DE;
  --on-ok: #FFFFFF;
  --danger: #A34A45;

  --red-bg: #FBEAE7;   --red-text: #9B3B2E;   --red-border: #F3D3CD;
  --amber-bg: #FFF3D6; --amber-text: #7A5D0E;
  --green-bg: #E7F3EB; --green-text: #2F6B45;
  --blue-bg: #E8F0FB;  --blue-text: #2B5C9E;
  --grey-bg: #F0EDE6;  --grey-text: #5E5A52;

  --av-1: #4F46D6; --av-2: #3E7A9E; --av-3: #8B5A9E;
  --av-4: #996B37; --av-5: #398353; --av-6: #A34A45;
  --on-av: #FFFFFF;

  --e1: 0 1px 2px rgba(25, 24, 23, 0.06);
  --e2: 0 4px 12px rgba(25, 24, 23, 0.10);
  --e3: 0 12px 30px rgba(25, 24, 23, 0.16);
  --lift: 0 1px 2px rgba(25, 24, 23, 0.04), 0 24px 60px -24px rgba(25, 24, 23, 0.26), 0 60px 120px -48px rgba(25, 24, 23, 0.16);

  --wrap: 1180px;
  --gutter: 24px;

  color-scheme: light;
}

/* The dark set. Also applied to the Changes section in the light theme, which
   is deliberately the one dark band on an otherwise paper page. */
:root[data-theme="dark"],
.pillar-ink {
  --paper: #1A1917;
  --paper-soft: #201E1B;
  --sunken: #221F1D;
  --card: #2A2723;
  --line: #322E29;
  --line-soft: #2B2823;
  --line-strong: #3B362F;
  --text: #EFEBE3;
  --body: #CFC9BE;
  --mid: #D8D2C6;
  --quiet: #B3ABA0;
  --faint: #938D82;
  --accent: #9A93F5;
  --on-accent: #1A1917;
  --accent-tint: rgba(154, 147, 245, 0.16);
  --accent-wash: rgba(154, 147, 245, 0.12);
  --hl: rgba(242, 198, 75, 0.24);
  --hl-strong: #C79A2E;
  --glow: rgba(251, 229, 155, 0.07);
  --ink: #FBE59B;
  --ink-text: #2A2106;
  --ink-accent: #3D2F06;
  --bar: #FBE59B;
  --bar-text: #3D2F06;
  --bar-soft: #6A5B2E;
  --bar-line: rgba(61, 47, 6, 0.18);
  --bar-accent: #3D2F06;
  --attn-bg: rgba(242, 198, 75, 0.12);
  --attn-text: #E7C765;
  --ok: #5BA97A;
  --ok-bg: rgba(91, 169, 122, 0.12);
  --ok-border: rgba(91, 169, 122, 0.30);
  --on-ok: #0E2618;
  --danger: #D98C86;
  --red-bg: rgba(224, 108, 90, 0.16);   --red-text: #F0A093;   --red-border: rgba(224, 108, 90, 0.32);
  --amber-bg: rgba(226, 185, 59, 0.15); --amber-text: #E7C765;
  --green-bg: rgba(94, 189, 138, 0.15); --green-text: #7BCCA0;
  --blue-bg: rgba(107, 163, 232, 0.15); --blue-text: #8FBAEE;
  --grey-bg: rgba(152, 161, 172, 0.14); --grey-text: #B3ABA0;
  --av-1: #9A93F5; --av-2: #4E93BC; --av-3: #B078C6;
  --av-4: #C29455; --av-5: #5BA97A; --av-6: #D98C86;
  --on-av: #1A1917;
  --e1: 0 1px 2px rgba(0, 0, 0, 0.40);
  --e2: 0 4px 12px rgba(0, 0, 0, 0.50);
  --e3: 0 12px 30px rgba(0, 0, 0, 0.60);
  --lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 70px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1A1917;
    --paper-soft: #201E1B;
    --sunken: #221F1D;
    --card: #2A2723;
    --line: #322E29;
    --line-soft: #2B2823;
    --line-strong: #3B362F;
    --text: #EFEBE3;
    --body: #CFC9BE;
    --mid: #D8D2C6;
    --quiet: #B3ABA0;
    --faint: #938D82;
    --accent: #9A93F5;
    --on-accent: #1A1917;
    --accent-tint: rgba(154, 147, 245, 0.16);
    --accent-wash: rgba(154, 147, 245, 0.12);
    --hl: rgba(242, 198, 75, 0.24);
    --hl-strong: #C79A2E;
    --glow: rgba(251, 229, 155, 0.07);
    --ink: #FBE59B;
    --ink-text: #2A2106;
    --ink-accent: #3D2F06;
    --bar: #FBE59B;
    --bar-text: #3D2F06;
    --bar-soft: #6A5B2E;
    --bar-line: rgba(61, 47, 6, 0.18);
    --bar-accent: #3D2F06;
    --attn-bg: rgba(242, 198, 75, 0.12);
    --attn-text: #E7C765;
    --ok: #5BA97A;
    --ok-bg: rgba(91, 169, 122, 0.12);
    --ok-border: rgba(91, 169, 122, 0.30);
    --on-ok: #0E2618;
    --danger: #D98C86;
    --red-bg: rgba(224, 108, 90, 0.16);   --red-text: #F0A093;   --red-border: rgba(224, 108, 90, 0.32);
    --amber-bg: rgba(226, 185, 59, 0.15); --amber-text: #E7C765;
    --green-bg: rgba(94, 189, 138, 0.15); --green-text: #7BCCA0;
    --blue-bg: rgba(107, 163, 232, 0.15); --blue-text: #8FBAEE;
    --grey-bg: rgba(152, 161, 172, 0.14); --grey-text: #B3ABA0;
    --av-1: #9A93F5; --av-2: #4E93BC; --av-3: #B078C6;
    --av-4: #C29455; --av-5: #5BA97A; --av-6: #D98C86;
    --on-av: #1A1917;
    --e1: 0 1px 2px rgba(0, 0, 0, 0.40);
    --e2: 0 4px 12px rgba(0, 0, 0, 0.50);
    --e3: 0 12px 30px rgba(0, 0, 0, 0.60);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 70px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .pillar-ink { --paper: #121110; --paper-soft: #171614; }
}
:root[data-theme="dark"] .pillar-ink { --paper: #121110; --paper-soft: #171614; }

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* The overlapping cards reach past their column on purpose; never let that
     become a sideways scroll on a phone. `clip` keeps the nav sticky. */
  overflow-x: hidden;
  overflow-x: clip;
}

a { color: inherit; }
h1, h2, h3 { color: var(--text); }
code { font-family: var(--font-mono); }

.ic {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite { position: absolute; }

.wrap {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font: 600 15px/1 var(--font-ui);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn .ic { width: 16px; height: 16px; stroke-width: 2; transition: transform 0.2s ease; }
.btn:hover .ic { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-ink {
  background: var(--ink);
  color: var(--ink-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 8px 20px -10px rgba(25, 24, 23, 0.55);
}
.btn-ink:hover { filter: brightness(1.12); }

.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav[data-scrolled] { border-bottom-color: var(--line); }

.nav-in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ink-accent);
}
.brand-mark .ic { width: 19px; height: 19px; }
.brand-name { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }

.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a, .nav-signin {
  font-size: 14.5px;
  font-weight: 550;
  color: var(--quiet);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-signin:hover { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 100px);
  padding-bottom: clamp(64px, 8vw, 104px);
}
.hero::before {
  content: '';
  position: absolute;
  inset: -66px 0 auto;
  height: 760px;
  background:
    radial-gradient(55% 60% at 50% 0%, var(--glow), transparent 72%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
  pointer-events: none;
  z-index: -1;
}

.hero-copy { position: relative; max-width: 960px; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--e1);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--mid);
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hl-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-strong) 25%, transparent);
}

.hero h1 {
  margin: 24px auto 0;
  font-size: clamp(2.55rem, 1.15rem + 5.3vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 600;
  text-wrap: balance;
}
@media (min-width: 640px) { .nowrap { white-space: nowrap; } }

/* The headline carries the mark a comment leaves on a document. */
mark.hl {
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 0.6em;
  padding: 0 0.04em;
  margin: 0 -0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: hl-draw 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s both;
}
@keyframes hl-draw { from { background-size: 0% 0.6em; } }

.lede {
  max-width: 660px;
  margin: 24px auto 0;
  font-size: clamp(1.06rem, 0.95rem + 0.45vw, 1.27rem);
  line-height: 1.55;
  color: var(--mid);
  text-wrap: pretty;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 470px;
  margin: 34px auto 0;
}
.signup input {
  flex: 1 1 230px;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--e1);
  color: var(--text);
  font: 16px var(--font-ui);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.signup input::placeholder { color: var(--faint); }
.signup input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}
.signup-note {
  flex-basis: 100%;
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--faint);
}
.signup.is-error .signup-note { color: var(--danger); }
.signup-sent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-basis: 100%;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--ok-border);
  border-radius: 12px;
  background: var(--ok-bg);
  color: var(--text);
  font-size: 15px;
}
.signup-sent .ic { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.2; }
.signup-sent b { font-weight: 650; overflow-wrap: anywhere; }

/* Loads in a short sequence: copy, then the window, then what happens in it. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-big { from { opacity: 0; transform: translateY(32px) scale(0.985); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes ui-hl { from { background-color: transparent; border-bottom-color: transparent; } }

.hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.14s; }
.hero-copy > :nth-child(4) { animation-delay: 0.22s; }

.hero-stage { position: relative; margin-top: clamp(52px, 7vw, 84px); }

.audience {
  max-width: 760px;
  margin: clamp(52px, 7vw, 80px) auto 0;
  text-align: center;
  font-size: 15.5px;
  color: var(--quiet);
  text-wrap: balance;
}
.audience b { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- the app window */

.window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--lift);
}
.hero-window { animation: rise-big 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }

.win-bar {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-soft);
}
.win-dots { display: flex; gap: 7px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.win-url {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--card);
  font: 12px var(--font-mono);
  color: var(--faint);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.win-url .ic { width: 11px; height: 11px; }

.win-body {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 540px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.ui-rail {
  padding: 16px 12px;
  border-right: 1px solid var(--line-soft);
  background: var(--paper-soft);
}
.ui-rail-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.ui-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--ink-accent);
}
.ui-mark .ic { width: 14px; height: 14px; }
.ui-rail-label {
  margin: 16px 8px 6px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.ui-rail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--mid);
  white-space: nowrap;
}
.ui-rail-row .ic { width: 14px; height: 14px; color: var(--faint); }
.ui-rail-row.is-on { background: var(--card); box-shadow: var(--e1); color: var(--text); font-weight: 600; }
.ui-rail-row.is-doc { padding-left: 14px; }
.ui-attn { color: var(--attn-text); font-weight: 600; }
.ui-attn .ic { color: var(--attn-text); }
.ui-count {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--attn-chip);
  color: var(--attn-chip-text);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
}
.ui-count.soft { background: var(--line); color: var(--quiet); }

.ui-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 26px 0;
}
.ui-proj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ui-eyebrow {
  margin: 0;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.ui-proj-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}
.ui-branch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--sunken);
  font: 500 11.5px var(--font-mono);
  letter-spacing: 0;
  color: var(--quiet);
}
.ui-branch .ic { width: 12px; height: 12px; }

.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--mid);
  white-space: nowrap;
}
.ui-btn .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.ui-btn-primary { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.ui-btn-agree { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.ui-btn-agree.is-on { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }

.ui-tabs {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--quiet);
  white-space: nowrap;
}
.ui-tabs span { padding: 8px 0 10px; }
.ui-tabs .is-on { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px var(--text); }

.ui-doc-area {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 26px;
  padding: 24px 0 28px;
}

.ui-doc {
  max-width: 540px;
  font-family: var(--font-doc);
  color: var(--body);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.ui-doc-path {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font: 11.5px var(--font-mono);
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
}
.ui-doc-path span { opacity: 0.8; }
.ui-doc-path .ic { width: 13px; height: 13px; }
.ui-doc-h {
  margin: 0 0 8px;
  font: 650 19px/1.3 var(--font-ui);
  letter-spacing: -0.012em;
  color: var(--text);
}
.ui-doc-p { margin: 0 0 14px; font-size: 16px; line-height: 1.68; }
.ui-fade { opacity: 0.6; }

.ui-hl {
  padding: 1px 0;
  border-bottom: 2px solid var(--hl-strong);
  background: var(--hl);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ui-hl-anim { animation: ui-hl 0.7s ease-out 1.15s both; }

.ui-selbar {
  display: inline-flex;
  margin: -4px 0 18px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bar);
  box-shadow: var(--e3);
  font-family: var(--font-ui);
}
.hero .ui-selbar { animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) 1.7s both; }
.ui-sel-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  color: var(--bar-text);
  white-space: nowrap;
}
.ui-sel-item .ic { width: 13px; height: 13px; color: var(--bar-accent); }
.ui-sel-item.soft { font-weight: 550; color: var(--bar-soft); }
.ui-sel-item.soft .ic { color: var(--bar-soft); }
.ui-sel-item + .ui-sel-item { border-left: 1px solid var(--bar-line); border-radius: 0; }

.ui-thread {
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--e2);
  animation: slide 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.1s both;
}
.ui-quote {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 3px solid var(--hl-strong);
  font: italic 13px/1.5 var(--font-doc);
  color: var(--quiet);
}
.ui-comment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 13px;
}
.ui-comment p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--body); }
.ui-who { margin-bottom: 2px !important; }
.ui-who b { color: var(--text); font-weight: 650; }
.ui-who span { font-size: 11.5px; color: var(--faint); }
.ui-mention {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}
.ui-thread-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}
.ui-chip-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ok);
}
.ui-chip-ok .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.ui-decide { display: flex; gap: 6px; }

.av {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--on-av);
}
.av.sm { width: 20px; height: 20px; font-size: 8.5px; }
.av1 { background: var(--av-1); } .av2 { background: var(--av-2); } .av3 { background: var(--av-3); }
.av4 { background: var(--av-4); } .av5 { background: var(--av-5); } .av6 { background: var(--av-6); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}
.badge .ic { width: 11px; height: 11px; stroke-width: 2.2; }
.badge-red { background: var(--red-bg); color: var(--red-text); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); }
.badge-green { background: var(--green-bg); color: var(--green-text); }
.badge-grey { background: var(--grey-bg); color: var(--grey-text); }
.badge-quiet { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--quiet); }

/* Cards floating off the window's edges. */
.float {
  position: absolute;
  width: 278px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--e3), var(--e1);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
}
/* Both hang off the window's lower edge, over the faded end of the page and
   the empty foot of the rail, so they never cover anything being shown. */
.hero-stage:has(.float) { padding-bottom: 84px; }
.float-ask { left: calc(var(--gutter) + 22px); bottom: 0; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 2.9s both; }
.float-risk { right: calc(var(--gutter) + 40px); bottom: 24px; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 2.5s both; }
.float-q {
  width: fit-content;
  margin: 0 0 9px auto;
  padding: 6px 11px;
  border-radius: 12px 12px 4px 12px;
  background: var(--accent-wash);
  font-weight: 600;
  color: var(--text);
}
.float-a { display: flex; gap: 8px; margin: 0; color: var(--body); }
.float-a .ic { width: 14px; height: 14px; margin-top: 3px; color: var(--accent); }
.float-a b { color: var(--text); }
.float-src { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0 22px; }
.float-src code, .float-commit code {
  padding: 1px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--sunken);
  font-size: 11px;
  color: var(--quiet);
}
.float-commit { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--faint); }
.float-commit .ic { width: 14px; height: 14px; }
.float-commit b { color: var(--text); font-weight: 600; }
.float-title { margin: 5px 0 9px; font-size: 13px; font-weight: 650; color: var(--text); }
.float-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

/* ---------------------------------------------------------------- headings shared */

.h2 {
  margin: 0;
  font-size: clamp(2rem, 1.15rem + 3vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.037em;
  font-weight: 600;
  text-wrap: balance;
}
.h3 {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}
/* The second half of a heading speaks in the document's voice. */
.em {
  font-family: var(--font-doc);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--quiet);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font: 500 12.5px var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--quiet);
}
.kicker .ic {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--ink-accent);
}

.pillar-lede {
  max-width: 580px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--mid);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- why */

.why { padding-block: clamp(80px, 11vw, 140px); border-top: 1px solid var(--line-soft); }
.why .h2 { max-width: 900px; margin-inline: auto; text-align: center; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.why-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.why-card h3 { margin: 18px 0 8px; font-size: 18.5px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 650; }
.why-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--quiet); }
.why-ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--sunken);
  color: var(--text);
}
.why-ic .ic { width: 20px; height: 20px; }
.why-answer {
  max-width: 780px;
  margin: 56px auto 0;
  text-align: center;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--mid);
  text-wrap: balance;
}
.why-answer b {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 100% 0.42em;
}
.why-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ink-accent);
  vertical-align: -7px;
}
.why-mark .ic { width: 19px; height: 19px; }

/* ---------------------------------------------------------------- pillars */

.pillar { position: relative; padding-block: clamp(84px, 11vw, 150px); }
.pillar-alt { background: var(--paper-soft); border-block: 1px solid var(--line-soft); }
.pillar-ink { background: var(--paper); color: var(--text); }

.pillar-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.pillar-grid.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pillar-grid.flip .pillar-copy { order: 2; }

.pillar-head { max-width: 840px; margin: 0 auto; text-align: center; }
.pillar-head .pillar-lede { margin-inline: auto; }

.points { display: grid; gap: 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.points li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--quiet);
}
.points .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--text); }
.points b { font-weight: 650; color: var(--text); }

.pillar-visual { position: relative; }

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--lift);
  font-size: 13px;
  line-height: 1.5;
}

/* ---- 1. projects */

.proj { margin: 0; padding: 22px; }
.proj-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.proj-stats div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--paper);
}
.proj-stats span { font-size: 11.5px; font-weight: 550; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-stats b { font-size: 25px; line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.proj-stats small { font-size: 11px; color: var(--faint); }
.proj-stats .t-amber { color: var(--attn-text); font-weight: 600; }
.proj-stats .t-red { color: var(--red-text); font-weight: 600; }

.proj-lib { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; }
.proj-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--faint);
}
.proj-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.proj-row + .proj-row { border-top: 1px solid var(--line-soft); }
.proj-name { min-width: 0; }
.proj-name b, .proj-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.proj-name b { font-size: 13px; font-weight: 600; color: var(--text); }
.proj-name small { font: 11px var(--font-mono); color: var(--faint); }
.proj-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }

.fmt {
  padding: 3px 0;
  border-radius: 6px;
  font: 600 10px var(--font-mono);
  letter-spacing: 0.04em;
  text-align: center;
}
.fmt-docx { background: var(--blue-bg); color: var(--blue-text); }
.fmt-pdf { background: var(--red-bg); color: var(--red-text); }
.fmt-xlsx { background: var(--green-bg); color: var(--green-text); }
.fmt-html { background: var(--amber-bg); color: var(--amber-text); }
.fmt-md { background: var(--grey-bg); color: var(--grey-text); }

.add-docs {
  position: absolute;
  right: -22px;
  bottom: -46px;
  width: 312px;
  padding: 16px;
  box-shadow: var(--e3), var(--e1);
}
.add-title { margin: 4px 0 12px; font-size: 14px; font-weight: 650; color: var(--text); }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-grid span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.add-grid .ic { width: 16px; height: 16px; margin-bottom: 5px; color: var(--accent); }
.add-grid b { font-size: 12px; color: var(--text); }
.add-grid small { font: 9.5px var(--font-mono); letter-spacing: 0.02em; color: var(--faint); }

/* ---- 2. ask */

.ask { display: flex; flex-direction: column; min-height: 486px; }
.ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.ask-title { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); white-space: nowrap; }
.ask-title .ic { width: 16px; height: 16px; color: var(--accent); }
.ask-title span { font-weight: 500; color: var(--faint); }
.ask-private { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ask-private .ic { width: 12px; height: 12px; }

.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 6px; }
.ask-chips button {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font: 550 12.5px var(--font-ui);
  color: var(--mid);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.ask-chips button:hover { border-color: var(--line-strong); color: var(--text); }
.ask-chips button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--ink-text); }

.ask-panel { flex: 1; padding: 14px 18px 18px; }
.ask-panel:not([hidden]) { animation: fade 0.35s ease both; }
.ask-q {
  width: fit-content;
  max-width: 80%;
  margin: 0 0 16px auto;
  padding: 9px 13px;
  border-radius: 14px 14px 4px 14px;
  background: var(--accent-wash);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text);
}
.ask-a {
  position: relative;
  display: grid;
  gap: 11px;
  padding-left: 32px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--body);
}
.ask-a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFFFFF' d='M12 2.5c.7 5.4 2.7 7.6 8.5 8.5-5.8.9-7.8 3.1-8.5 8.5-.7-5.4-2.7-7.6-8.5-8.5 5.8-.9 7.8-3.1 8.5-8.5z'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--accent);
}
.ask-a p, .ask-a ul, .ask-a ol { margin: 0; }
.ask-a b { color: var(--text); font-weight: 650; }
.ask-a ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.ask-a ul li { padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--paper); }
.ask-a code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--accent-wash);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
}
.ask-branch {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--sunken);
  font: 500 11px/18px var(--font-mono);
  color: var(--quiet);
}
.ask-src { font-size: 11.5px; color: var(--faint); }
.ask-a .ask-files li { display: flex; align-items: center; gap: 8px; padding: 7px 11px; }
.ask-files code { padding: 0; background: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-files .add, .ask-files .del { font: 600 11.5px var(--font-mono); }
.ask-files .add { margin-left: auto; color: var(--green-text); }
.ask-files .del { color: var(--red-text); }
.ask-finding { padding: 10px 12px; border: 1px solid var(--red-border); border-radius: 10px; background: var(--red-bg); }
.ask-finding p { margin: 0; }
.ask-finding-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px !important; font-weight: 650; color: var(--red-text); }
.ask-finding-h .ic { width: 14px; height: 14px; }
.ask-finding code { background: transparent; padding: 0; color: var(--red-text); }
.ask-reading { display: grid; gap: 6px; padding-left: 18px; }

.ask-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 18px 18px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 13px;
  color: var(--faint);
}
.ask-send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--ink-text);
}
.ask-send .ic { width: 14px; height: 14px; stroke-width: 2.2; }

/* ---- 3. discuss */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 60px 0 0;
  padding: 0;
  list-style: none;
}
.step {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.step-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  height: 178px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--paper-soft);
  font-size: 12px;
  line-height: 1.5;
}
.step-n { margin: 20px 6px 4px; font: 500 12px var(--font-mono); color: var(--faint); }
.step-n::before { content: '0'; }
.step h3 { margin: 0 6px 6px; font-size: 19px; letter-spacing: -0.015em; font-weight: 650; }
.step > p:last-child { margin: 0 6px; font-size: 14.5px; line-height: 1.55; color: var(--quiet); }

.mini-doc { margin: 0; font: 14.5px/1.6 var(--font-doc); color: var(--body); }
.ui-selbar.mini { align-self: flex-start; max-width: 100%; margin: 0; padding: 3px; border-radius: 9px; }
.ui-selbar.mini .ui-sel-item { gap: 4px; padding: 4px 7px; font-size: 10.5px; }
.ui-selbar.mini .ui-sel-item .ic { width: 11px; height: 11px; }

.mini-input {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-tint);
  font-size: 12.5px;
  color: var(--body);
}
.caret {
  display: inline-block;
  width: 1.5px;
  height: 14px;
  margin-left: 1px;
  background: var(--text);
  vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.mini-menu {
  display: grid;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--e2);
}
.mini-menu > span {
  display: grid;
  grid-template-columns: 20px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
}
.mini-menu > .is-on { background: var(--accent-wash); }
.mini-menu b { font-size: 12px; color: var(--text); }
.mini-menu small { justify-self: end; font-size: 11px; color: var(--faint); }

.mini-decide { display: flex; gap: 8px; }
.mini-decide .ui-btn { padding: 7px 12px; font-size: 12.5px; }
.mini-decided {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--ok-border);
  border-radius: 10px;
  background: var(--ok-bg);
  font-size: 12px;
  color: var(--body);
}
.mini-decided .ic { width: 13px; height: 13px; margin-top: 3px; color: var(--ok); stroke-width: 2.4; }
.mini-decided b { color: var(--text); }

.mini-task {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--e1);
}
.mini-task-h { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 7px; font-size: 12.5px; font-weight: 650; line-height: 1.4; color: var(--text); }
.mini-task-h .ic { width: 14px; height: 14px; margin-top: 1px; color: var(--accent); }
.mini-task-q { margin: 0 0 10px; padding-left: 8px; border-left: 2px solid var(--hl-strong); font: italic 12.5px/1.45 var(--font-doc); color: var(--quiet); }
.mini-task-meta { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; color: var(--mid); }
.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--attn-bg);
  font-weight: 650;
  color: var(--attn-text);
}
.due .ic { width: 11px; height: 11px; }

.tickets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 36px;
  margin-top: 18px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.tickets h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 650; }
.tickets p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--quiet); }
.tickets-visual { display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 0; }
.ticket {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.ticket .fmt { padding: 2px 6px; }
.ticket .ic { width: 14px; height: 14px; color: var(--accent); }
.ticket-stack { display: grid; gap: 8px; min-width: 0; }
.ticket-stack .ticket { overflow: hidden; text-overflow: ellipsis; }
.ticket-stack .ticket:nth-child(2) { margin-left: 14px; }
.ticket-stack .ticket:nth-child(3) { margin-left: 28px; }
.tickets-arrow { width: 20px; height: 20px; color: var(--faint); }

/* ---- 4. changes */

.changes {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 60px;
}
.changes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.changes-title { margin: 0; font-weight: 650; color: var(--text); }
.changes-title span { font-weight: 500; color: var(--faint); }
.changes-filter {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--sunken);
}
.changes-filter button {
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: 550 12px var(--font-ui);
  color: var(--quiet);
  cursor: pointer;
}
.changes-filter button:hover { color: var(--text); }
.changes-filter button[aria-pressed="true"] { background: var(--card); box-shadow: var(--e1); color: var(--text); }

.commits { margin: 0; padding: 6px; list-style: none; }
.commit {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 10px;
}
.commit[hidden] { display: none; }
.commit:not([hidden]) { animation: fade 0.3s ease both; }
.commit.is-on { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-tint); }
.commit-main { min-width: 0; }
.commit-title { margin: 0; overflow: hidden; font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.commit-meta { display: flex; align-items: center; gap: 7px; margin: 3px 0 0; overflow: hidden; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.commit-meta code { font-size: 11.5px; color: var(--quiet); }
.commit-meta .ask-branch { margin: 0; }
.commit-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.changes-detail { padding: 18px; }
.changes-detail > div > :first-child { margin-top: 0; }
.detail-commit { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--faint); }
.detail-commit .ic { width: 14px; height: 14px; }
.detail-commit code { color: var(--text); }
.detail-title { margin: 6px 0 4px; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; color: var(--text); }
.detail-label {
  margin: 16px 0 8px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}
.finding {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper-soft);
}
.finding p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--body); }
.finding b { display: block; font-size: 12.5px; color: var(--text); }
.finding code { font-size: 11px; color: var(--quiet); overflow-wrap: anywhere; }
.finding-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.finding-ic .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.finding-ic.ok { background: var(--green-bg); color: var(--green-text); }
.finding-ic.bad { background: var(--red-bg); color: var(--red-text); }
.detail-ci { margin: 0; }
.gate { margin-top: 16px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.gate p { display: flex; gap: 8px; margin: 0 0 11px; font-size: 12.5px; line-height: 1.5; color: var(--body); }
.gate p .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--attn-text); }
.gate b { color: var(--text); }
.gate-actions { display: flex; gap: 8px; }

.changes-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.changes-points li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.changes-points .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--ink); }
.changes-points b { font-size: 15.5px; color: var(--text); }
.changes-points p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--quiet); }

/* ---------------------------------------------------------------- fits */

.fits { padding-block: clamp(68px, 8vw, 108px); border-bottom: 1px solid var(--line-soft); }
.fits-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 48px;
}
.fits-copy p { max-width: 500px; margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--quiet); }
.fits-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fits-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.fits-list .ic { width: 16px; height: 16px; color: var(--quiet); }

/* ---------------------------------------------------------------- how */

.how { padding-block: clamp(84px, 10vw, 132px); }
.how .h2 { max-width: 820px; margin-inline: auto; text-align: center; }
.how-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 60px 0 0;
  padding: 0;
  list-style: none;
}
.how-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 17%;
  right: 17%;
  border-top: 1px dashed var(--line-strong);
}
.how-steps li { position: relative; padding: 0 12px; text-align: center; }
.how-n {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--e1);
  font: 500 15px var(--font-mono);
  color: var(--text);
}
.how-steps h3 { margin: 0 0 6px; font-size: 18.5px; letter-spacing: -0.015em; font-weight: 650; }
.how-steps p { max-width: 310px; margin: 0 auto; font-size: 15px; line-height: 1.55; color: var(--quiet); }

/* ---------------------------------------------------------------- trust */

.trust { padding-block: clamp(76px, 9vw, 124px); border-block: 1px solid var(--line-soft); background: var(--paper-soft); }
.trust .h3 { text-align: center; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
}
.trust-grid > div { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.trust-grid .ic { width: 22px; height: 22px; color: var(--text); }
.trust-grid h3 { margin: 14px 0 6px; font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 650; }
.trust-grid p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--quiet); }

/* ---------------------------------------------------------------- cta */

.cta { position: relative; padding-block: clamp(92px, 12vw, 164px); text-align: center; }
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(48% 62% at 50% 55%, var(--glow), transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.cta-in { position: relative; }
.cta-mark {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  border-radius: 16px;
  background: var(--ink);
  box-shadow: var(--e3);
  color: var(--ink-accent);
}
.cta-mark .ic { width: 34px; height: 34px; }
.cta .h2 { max-width: 760px; margin-inline: auto; }
.cta .pillar-lede { margin-inline: auto; }

/* ---------------------------------------------------------------- footer */

.foot { padding-block: 36px 52px; border-top: 1px solid var(--line-soft); }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; }
.foot-tag { margin: 0; font-size: 14px; color: var(--faint); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.foot-links a { color: var(--quiet); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* ---------------------------------------------------------------- reveal */

/* Only once the page's script has run: without it, everything simply shows. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.why-grid > :nth-child(2), .steps > :nth-child(2), .how-steps > :nth-child(2),
.trust-grid > :nth-child(2), .changes-points > :nth-child(2) { transition-delay: 0.08s; }
.why-grid > :nth-child(3), .steps > :nth-child(3), .how-steps > :nth-child(3),
.trust-grid > :nth-child(3), .changes-points > :nth-child(3) { transition-delay: 0.16s; }
.steps > :nth-child(4), .trust-grid > :nth-child(4), .changes-points > :nth-child(4) { transition-delay: 0.24s; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  /* Below this the document column could not hold the selection toolbar. */
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .ui-rail { display: none; }
  .float-risk { right: var(--gutter); }
  .float-ask { left: var(--gutter); }
  .add-docs { position: relative; right: auto; bottom: auto; width: auto; max-width: 420px; margin: -28px 16px 0 auto; }
  .steps, .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .changes-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .float { display: none; }
  .hero-stage:has(.float) { padding-bottom: 0; }
  .pillar-grid, .pillar-grid.flip { grid-template-columns: minmax(0, 1fr); }
  .pillar-grid.flip .pillar-copy { order: 0; }
  .pillar-copy { max-width: 640px; }
  .changes, .fits-in, .tickets { grid-template-columns: minmax(0, 1fr); }
  .tickets-visual { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .ui-hide-sm { display: none !important; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav-links { display: none; }
  .nav-in { gap: 16px; }
  .nav-cta { gap: 14px; }
  .win-body { min-height: 0; }
  .ui-main { padding: 16px 16px 0; }
  .ui-proj-head .ui-btn { display: none; }
  .ui-doc-area { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: 18px; }
  .ui-doc { -webkit-mask-image: none; mask-image: none; }
  .ui-doc .ui-fade { display: none; }
  .ui-thread { margin-bottom: 18px; animation-delay: 1.9s; }
  .why-grid, .how-steps { grid-template-columns: minmax(0, 1fr); }
  .how-steps { gap: 36px; }
  .how-steps::before { display: none; }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tickets { padding: 22px; }
  .tickets-visual { flex-direction: column; align-items: flex-start; }
  .tickets-arrow { transform: rotate(90deg); }
  .ticket-stack .ticket:nth-child(n) { margin-left: 0; }
}

@media (max-width: 560px) {
  .steps, .trust-grid, .changes-points { grid-template-columns: minmax(0, 1fr); }
  .proj { padding: 14px; }
  .proj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-row .proj-meta { display: none; }
  .proj-row { grid-template-columns: 46px minmax(0, 1fr); }
  .add-docs { margin: -24px 8px 0; }
  .signup .btn { flex: 1 1 100%; }
  .ui-tabs { gap: 14px; }
  .win-bar { grid-template-columns: 52px minmax(0, 1fr) 12px; }
  .commit { grid-template-columns: 28px minmax(0, 1fr); }
  .commit-badges { grid-column: 2; justify-content: flex-start; }
  .commit-meta { flex-wrap: wrap; row-gap: 3px; }
  .changes-head { padding: 12px; }
  .ask-head { flex-wrap: wrap; }
  .ask-a { padding-left: 0; }
  .ask-a::before { display: none; }
  .ask-q { max-width: 92%; }
  .nav-signin { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
