/* rembo.dev: one static page. Layout idea: a ruled sheet (two vertical rails,
   hairlines between sections, bordered cells instead of floating cards). */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  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";
  src: url("fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --wash: #f6f7f2;
  --ink: #16180f;
  --muted: #666a5d;
  --faint: #9a9d92;
  --line: #e4e6dd;
  --line-strong: #d2d5c8;
  --olive: #55661c;
  --olive-tint: #edf1dc;
  --dark: #12140d;
  --lime: #c6dc7c;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 450 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
code, pre, kbd { font-family: var(--mono); }
/* Inline code only: command blocks live in <pre> and must keep their line breaks. */
:not(pre) > code {
  font-size: 0.86em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--wash);
  white-space: nowrap;
}
.cells :not(pre) > code { padding: 0; border: 0; background: none; color: var(--ink); }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- sheet ---------- */
.band { border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.sheet { max-width: 1160px; margin: 0 auto; border-inline: 1px solid var(--line); }
.pad { padding: 96px var(--gutter); }
.dark {
  --paper: var(--dark);
  --wash: #1a1d13;
  --ink: #f1f3e8;
  --muted: #a4a898;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --olive: var(--lime);
  --olive-tint: rgba(198, 220, 124, 0.13);
}

/* ---------- type ---------- */
.pill {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1;
  color: var(--olive);
  background: var(--olive-tint);
  padding: 5px 9px;
  border-radius: 7px;
  text-decoration: none;
}
.h2 {
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 550;
  margin-top: 16px;
  max-width: 780px;
  text-wrap: balance;
}
.h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.012em; font-weight: 550; text-wrap: balance; }
.tone { color: var(--muted); }
.lead { color: var(--muted); max-width: 620px; margin-top: 18px; font-size: 17px; text-wrap: balance; }
.text { color: var(--muted); }
.text + .text { margin-top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font: 550 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--wash); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #2c3020; border-color: #2c3020; }
.dark .btn.primary:hover { background: #fff; border-color: #fff; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; }
.brand svg { display: block; }
.nav-links { display: flex; gap: 26px; margin-right: auto; }
.nav-links a { font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 8px; }

/* ---------- hero ---------- */
.hero { border-top: 0; }
.hero-text { padding: 84px var(--gutter) 60px; text-align: center; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.036em;
  font-weight: 600;
  max-width: 880px;
  margin: 22px auto 0;
  text-wrap: balance;
}
.hero-sub { font-size: 19px; line-height: 1.42; color: var(--muted); max-width: 590px; margin: 24px auto 0; text-wrap: balance; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.dots {
  background-color: var(--wash);
  background-image: radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
  background-size: 18px 18px;
}
.stage-wrap { border-top: 1px solid var(--line); padding: 56px var(--gutter) 28px; }
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(22, 24, 15, 0.04), 0 28px 56px -30px rgba(50, 60, 15, 0.28);
  text-align: left;
}
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane-h {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.pane-h b { font-weight: 600; color: var(--ink); }
.pane-b { flex: 1; display: flex; flex-direction: column; gap: 11px; padding: 18px 16px 14px; font: 13px/1.55 var(--mono); min-height: 248px; }
.pane-b p { padding-left: 18px; text-indent: -18px; overflow-wrap: anywhere; }
.you::before { content: "›"; display: inline-block; width: 18px; text-indent: 0; color: var(--olive); font-weight: 700; }
.claude::before { content: "●"; display: inline-block; width: 18px; text-indent: 0; font-size: 10px; color: var(--faint); vertical-align: 1px; }
.claude { color: #3d4133; }
.claude mark { background: var(--olive-tint); color: inherit; padding: 1px 3px; border-radius: 4px; }
.toast {
  align-self: flex-start;
  margin-left: 18px;
  font-size: 12px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--wash);
}
.mode { margin-top: auto; padding-top: 11px; border-top: 1px dashed var(--line-strong); font-size: 12px; color: var(--muted); }
.mode .ok { color: var(--olive); font-weight: 700; }

.pane.hub { background: var(--dark); color: #a4a898; border-inline: 1px solid var(--dark); }
.pane.hub .pane-h { border-color: rgba(255, 255, 255, 0.11); color: #a4a898; }
.pane.hub .pane-h b { color: #f1f3e8; }
.pane.hub .pane-b { font-size: 12px; gap: 6px; }
.pane.hub .pane-b p { padding: 0; text-indent: 0; display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.pane.hub .fresh { color: var(--lime); }
.pane.hub .note { margin-top: auto; padding-top: 11px; border-top: 1px dashed rgba(255, 255, 255, 0.2); font-family: var(--sans); font-size: 12.5px; line-height: 1.4; }
.nb { white-space: nowrap; }
.stage-cap { text-align: center; color: var(--muted); font-size: 14px; max-width: 640px; margin: 22px auto 0; text-wrap: balance; }

/* One orchestrated moment: the fact travels left to right, once, on load. */
@media (prefers-reduced-motion: no-preference) {
  .seq { animation: reveal 0.5s both; animation-delay: calc(var(--i) * 0.75s + 0.5s); }
  @keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
}

/* ---------- cells ---------- */
.cells { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.cells > * { background: var(--paper); padding: 32px var(--gutter) 36px; min-width: 0; }
.cells.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cells.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells .h3 { font-size: 18px; }
.cells .text { margin-top: 8px; font-size: 15.5px; }
.facts > * { padding: 26px var(--gutter) 28px; }
.facts b { display: block; font-weight: 600; font-size: 16px; }
.facts span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 3px; }

/* ---------- how it works rows ---------- */
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-top: 1px solid var(--line); }
.row-t { padding: 56px var(--gutter); }
.row-t .text { margin-top: 14px; }
.row-m { border-left: 1px solid var(--line); padding: 44px var(--gutter); display: flex; align-items: center; justify-content: center; min-width: 0; }

.card { width: 100%; max-width: 560px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 16px 32px -24px rgba(50, 60, 15, 0.3); }
.card-h { padding: 9px 14px; border-bottom: 1px solid var(--line); font: 12px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.card pre { padding: 14px; font-size: 12.5px; line-height: 1.6; overflow-x: auto; color: #3d4133; }
.card pre .k { color: var(--olive); }
.card pre .dim { color: var(--faint); }

.ladder { width: 100%; max-width: 560px; display: grid; gap: 10px; }
.ladder .card:nth-child(2) { margin-left: 28px; width: calc(100% - 28px); }
.ladder .card:nth-child(3) { margin-left: 56px; width: calc(100% - 56px); }
.ladder pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ladder .hit { background: var(--olive-tint); border-radius: 4px; box-shadow: 0 0 0 3px var(--olive-tint); }

.net { width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.node { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.node b { display: block; font-weight: 600; font-size: 14px; }
.node span { color: var(--muted); }
.node code { font-size: 12px; }
.wire { height: 34px; border-left: 1px dashed var(--faint); justify-self: center; }
.node.hubnode { grid-column: 1 / -1; background: var(--dark); border-color: var(--dark); color: #f1f3e8; text-align: center; }
.node.hubnode span { color: #a4a898; }

/* ---------- why (a note from the author, set as prose) ---------- */
.why { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.why-head { padding: 96px var(--gutter); }
.why-body { border-left: 1px solid var(--line); padding: 96px var(--gutter); }
.why-body p { font-size: 18px; line-height: 1.6; max-width: 620px; }
.why-body p + p { margin-top: 18px; }
.why-body .sig { margin-top: 30px; font-size: 15px; color: var(--muted); }

/* ---------- security ---------- */
.sec { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border-top: 1px solid var(--line); }
.sec-list > li { padding: 30px var(--gutter); border-top: 1px solid var(--line); }
.sec-list > li:first-child { border-top: 0; }
.sec-list .text { margin-top: 8px; max-width: 560px; }
.sec-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.sec-side > div { padding: 30px var(--gutter); flex: 1; }
.sec-side > div + div { border-top: 1px solid var(--line); }
.sec-side h3 { font-size: 15px; font-weight: 600; }
.sec-side ul { margin-top: 12px; display: grid; gap: 7px; font-size: 15px; color: var(--muted); }
.sec-side li { padding-left: 22px; position: relative; }
.sec-side li::before { position: absolute; left: 0; font-family: var(--mono); font-size: 13px; top: 2px; }
.sees li::before { content: "●"; font-size: 8px; top: 7px; left: 3px; color: var(--faint); }
.never li::before { content: "✕"; color: var(--lime); }
.limits-head { padding: 44px var(--gutter) 26px; border-top: 1px solid var(--line); }
.limits-head .text { margin-top: 8px; max-width: 620px; }
.limits-head a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- install ---------- */
.steps { border-top: 1px solid var(--line); counter-reset: step; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-top: 1px solid var(--line); counter-increment: step; }
.step:first-child { border-top: 0; }
.step-t { padding: 40px var(--gutter); }
.step-t .h3::before { content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 11px; border-radius: 8px; background: var(--olive-tint); color: var(--olive); font-size: 14px; font-weight: 650; vertical-align: 2px; letter-spacing: 0; }
.step-t .text { margin-top: 12px; }
.step-c { border-left: 1px solid var(--line); padding: 40px var(--gutter); min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.code { position: relative; background: var(--dark); color: #e6e9da; border-radius: 12px; }
.code pre { padding: 16px 18px; font-size: 13px; line-height: 1.7; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #5a5e4f transparent; }
.copy + pre { padding-right: 76px; }
.code .c { color: #8d917f; }
.code .ok { color: var(--lime); }
.copy { position: absolute; top: 9px; right: 9px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: #e6e9da; font: 550 12.5px/1 var(--sans); cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.14); }
.code-note { font-size: 14px; color: var(--muted); }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.faq-head { padding: 96px var(--gutter); }
.faq-list { border-left: 1px solid var(--line); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:first-child { border-top: 0; }
.faq-list summary { cursor: pointer; list-style: none; padding: 22px var(--gutter); padding-right: 64px; font-weight: 550; font-size: 17px; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: var(--gutter); top: 18px; font: 400 22px/1.2 var(--mono); color: var(--faint); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list summary:hover { background: var(--wash); }
.faq-a { padding: 0 var(--gutter) 26px; color: var(--muted); max-width: 680px; }
.faq-a p + p { margin-top: 10px; }
.faq-a a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- closing + footer ---------- */
.close { text-align: center; padding: 104px var(--gutter); }
.close .h2 { margin: 0 auto; font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -0.03em; line-height: 1.04; }
.close .lead { margin-inline: auto; }
.close .hero-cta { margin-top: 30px; }
.close .mail { margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.close .mail a { color: var(--ink); text-underline-offset: 3px; }

.foot { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 32px; padding: 64px var(--gutter) 56px; }
.foot .brand { color: var(--ink); }
.foot-tag { color: var(--muted); font-size: 14.5px; margin-top: 12px; max-width: 300px; }
.foot h2 { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.foot ul { margin-top: 12px; display: grid; gap: 9px; font-size: 14.5px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal { border-top: 1px solid var(--line); padding: 22px var(--gutter) 28px; display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 940px) {
  :root { --gutter: 22px; }
  .pad, .faq-head { padding: 64px var(--gutter); }
  .nav-links { display: none; }
  .nav-in { justify-content: space-between; }
  .hero-text { padding: 56px var(--gutter) 44px; }
  .hero-sub { font-size: 17.5px; }
  .stage-wrap { padding: 28px var(--gutter) 22px; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .pane-b { min-height: 0; }
  .pane.hub { border-inline: 0; }
  .cells.c4, .cells.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row, .step, .sec, .faq, .why { grid-template-columns: minmax(0, 1fr); }
  .why-head { padding: 64px var(--gutter) 0; }
  .why-body { border-left: 0; padding: 28px var(--gutter) 64px; }
  .why-body p { font-size: 17px; }
  .row-t, .step-t { padding: 40px var(--gutter) 28px; }
  .row-m, .step-c { border-left: 0; border-top: 1px solid var(--line); padding: 28px var(--gutter) 36px; }
  .sec-side, .faq-list { border-left: 0; border-top: 1px solid var(--line); }
  .copy + pre { padding: 46px 18px 16px; } /* long commands scroll sideways: keep the button clear of them */
  .faq-head { padding-bottom: 40px; }
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot > div:first-child { grid-column: 1 / -1; }
  .close { padding: 72px var(--gutter); }
}
@media (max-width: 600px) {
  .cells.c4, .cells.c3, .cells.c2 { grid-template-columns: minmax(0, 1fr); }
  .ladder .card:nth-child(2) { margin-left: 12px; width: calc(100% - 12px); }
  .ladder .card:nth-child(3) { margin-left: 24px; width: calc(100% - 24px); }
  .net { gap: 0 8px; }
  .node { padding: 10px; font-size: 12px; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-cta .btn:first-child { display: none; }
}

.s0 { --i: 0; } .s1 { --i: 1; } .s2 { --i: 2; } .s3 { --i: 3; } .s4 { --i: 4; }
