/* Kibu website. One stylesheet, in page order.
   Obsidian surfaces, a single lime accent, Manrope for headings and reading, and line icons in soft tiles. The
   pixel font appears only where Kibu itself speaks: the wordmark and bubbles. */

@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/Manrope.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('assets/fonts/PixelifySans.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0c0d;
  --surface: #111314;
  --surface-2: #16191a;
  --fg: #f4f5f0;
  --text: #c0c5bc;
  --muted: #979d93;
  --faint: #92998d;
  --lime: #d4ff3a;
  --lime-ink: #141709;
  --lime-soft: #d4ff3a12;
  --lime-line: #d4ff3a30;
  --line: #ffffff13;
  --line-2: #ffffff24;
  --display: var(--sans);
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --pixel: 'Pixelify Sans', var(--mono);
  --header: 68px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 20px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); font-synthesis: none; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--lime); color: var(--lime-ink); }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.shell { width: 100%; max-width: calc(1240px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 16px; border-radius: 8px; background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.skip:focus { top: 16px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
code, kbd { font-family: var(--mono); }
code { padding: 2px 6px; border-radius: 6px; background: #ffffff10; color: #e7eadf; font-size: .875em; overflow-wrap: anywhere; }
kbd { display: inline-block; padding: 4px 8px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 7px; background: #ffffff08; color: var(--fg); font-size: 12px; line-height: 1; }
.text-link { color: var(--lime); text-decoration: underline; text-decoration-color: #d4ff3a55; text-underline-offset: 3px; }
.text-link:hover { text-decoration-color: var(--lime); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.eyebrow:before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 10px #d4ff3a88; }
h1, h2 { font-family: var(--display); color: var(--fg); text-wrap: balance; }
h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 600; line-height: 1.15; letter-spacing: -.04em; }
h2 em { display: block; font-style: normal; color: #8f968b; }
h3 { color: var(--fg); font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }

.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 22px; overflow: hidden; border: 0; border-radius: 12px; background: var(--lime); color: var(--lime-ink); font-size: 16px; font-weight: 650; letter-spacing: -.01em; box-shadow: 0 3px 0 #7c9912, 0 18px 40px -18px #d4ff3a88; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; }
.button:hover { background: #e0ff6e; transform: translateY(-1px); box-shadow: 0 4px 0 #7c9912, 0 22px 44px -18px #d4ff3a99; }
.button:active { transform: translateY(3px); box-shadow: 0 0 0 #7c9912; }
.button .icon { width: 18px; height: 18px; stroke-width: 2; }
.button-small { min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 2px 0 #7c9912; }
.button-small:hover { box-shadow: 0 3px 0 #7c9912; }
.ghost { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--fg); font-size: 15px; font-weight: 500; }
.ghost .icon { width: 17px; height: 17px; color: var(--lime); transition: transform .25s var(--ease); }
.ghost:hover .icon { transform: translateY(3px); }
.ghost.out:hover .icon { transform: translate(2px, -2px); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header); border-bottom: 1px solid var(--line); background: #0b0c0dd9; -webkit-backdrop-filter: saturate(150%) blur(16px); backdrop-filter: saturate(150%) blur(16px); }
.site-header .shell { display: flex; align-items: center; gap: 28px; height: 100%; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font: 400 27.5px/1 var(--pixel); font-variant-ligatures: none; -webkit-font-smoothing: none; }
.wordmark img { display: block; width: 39px; height: 36px; }
.wordmark i { color: var(--lime); font-style: normal; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--fg); background: #ffffff0a; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.star { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-size: 14px; transition: border-color .2s, background .2s, color .2s; }
.star .icon { width: 16px; height: 16px; color: var(--lime); }
.star:hover { border-color: #d4ff3a66; background: var(--lime-soft); color: var(--fg); }
.star-count { padding-left: 9px; border-left: 1px solid var(--line-2); color: var(--fg); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- the opening screen */
/* Keep the requirements beside the demo, with natural height on short windows. */
.hero { position: relative; isolation: isolate; overflow: clip; }
.hero:before, .hero:after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.hero:before { inset: 0; background-image: radial-gradient(#ffffff16 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(ellipse 75% 85% at 72% 42%, #000 10%, transparent 72%); mask-image: radial-gradient(ellipse 75% 85% at 72% 42%, #000 10%, transparent 72%); }
.hero:after { top: 6%; right: -8%; width: min(900px, 70vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, #d4ff3a17, transparent); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-rows: auto auto; grid-template-areas: "copy demo" "facts demo"; align-content: center; align-items: center; gap: 32px clamp(32px, 4vw, 64px); min-height: calc(100svh - var(--header)); padding-block: clamp(40px, 5svh, 72px); }
.hero-copy { grid-area: copy; min-width: 0; align-self: end; animation: arrive .9s var(--ease) both; }
.hero-face { display: none; }
h1 { margin-top: 22px; font-size: clamp(42px, 4.5vw, 68px); font-weight: 600; line-height: 1.08; letter-spacing: -.05em; }
h1 em { font-style: normal; color: var(--lime); }
.intro { max-width: 46ch; margin-top: 24px; color: var(--text); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 26px; margin-top: 28px; }
.hero-facts { grid-area: facts; align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; padding-top: 24px; border-top: 1px solid var(--line-2); animation: arrive 1s .2s var(--ease) both; }
.hero-facts > div { min-width: 0; }
.hero-facts dt { color: var(--muted); font: 500 10px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.hero-facts dd { margin-top: 6px; color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.6; }
.hero-facts a { text-decoration: underline; text-decoration-color: #d4ff3a66; text-underline-offset: 4px; }
.hero-facts a:hover { color: var(--lime); }
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* the demo: a small desktop with a messy folder, Kibu, and its panel */
.demo-scene { grid-area: demo; position: relative; display: flex; flex-direction: column; min-width: 0; height: auto; border: 1px solid var(--line-2); border-radius: 24px; background: radial-gradient(ellipse at 66% 40%, #d4ff3a0b, transparent 62%), linear-gradient(180deg, #15181a, #101213); box-shadow: 0 50px 90px -60px #000, inset 0 1px 0 #ffffff12; perspective: 1000px; animation: arrive 1.1s .1s var(--ease) both; }
.scene-top { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px 0; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.scene-top span:last-child { color: var(--faint); }
.desktop-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 0; margin-top: 10px; background-image: radial-gradient(#ffffff0e .8px, transparent .8px); background-size: 18px 18px; }
.file-window { position: relative; margin: 22px 0 0 6%; width: 70%; max-width: 360px; overflow: hidden; border: 1px solid #ffffff24; border-radius: 12px; background: linear-gradient(125deg, #2a2c2d, #1b1d1f); box-shadow: 0 18px 46px #0006; transform: rotate(-4deg) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg)); transition: transform .5s var(--ease); }
.window-top { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 14px; border-bottom: 1px solid #ffffff12; color: #c9ccc6; font-size: 13px; }
.traffic { display: flex; gap: 6px; }
.traffic i { width: 9px; height: 9px; border-radius: 50%; background: #66686a; }
.traffic i:nth-child(1) { background: #c9796b; }
.traffic i:nth-child(2) { background: #c4ad72; }
.traffic i:nth-child(3) { background: #86a476; }
.window-menu { color: #8f9494; }
.file-list { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 206px; padding: 8px 10px; }
.file-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 5px 5px; border-radius: 7px; color: #cdd0ca; font-size: 13.5px; transition: background .3s, opacity .3s; }
.file-row .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-kind { display: none; }
.file-icon { display: grid; place-items: center; flex-shrink: 0; width: 21px; height: 23px; border: 1px solid #9baca652; border-radius: 4px; background: #a6bdb210; color: #a6bdb2; font: 7.5px var(--mono); }
.file-icon.img { border-color: #b2a9d052; background: #b2a9d010; color: #b2a9d0; }
.file-icon.sheet { border-color: #bdd09952; background: #bdd09910; color: #bdd099; }
.file-icon.folder { position: relative; height: 17px; border-color: #c6d6a066; background: #c6d6a025; color: var(--lime); }
.file-icon.folder:before { content: ""; position: absolute; left: -1px; top: -5px; width: 9px; height: 4px; border-radius: 2px 2px 0 0; background: #819062; }
.file-row.highlight { background: #d4ff3a1c; color: #ecf6d6; }
.file-row.scanning { background: #d4ff3a2b; color: #f1ffcb; }
.file-row.muted { opacity: 1; color: #a6aca2; }
.file-row.new { animation: row-in .35s both; }
@keyframes row-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.window-bottom { display: flex; justify-content: space-between; padding: 9px 14px; border-top: 1px solid #ffffff0f; color: #8e928e; font: 11px var(--mono); }
.pet { position: absolute; z-index: 2; top: 24%; right: 2%; width: min(38%, 236px); padding: 0; border: 0; background: none; filter: drop-shadow(0 18px 15px #0008); transform: rotate(8deg); transition: transform .35s var(--ease); }
.pet:hover { transform: rotate(0deg) translateY(-7px); }
.pet svg { display: block; width: 100%; height: auto; overflow: visible; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-5px); } }
.pet-bubble, .play-bubble { background: var(--lime); color: #20260f; font: 400 16.5px/22px var(--pixel); font-variant-ligatures: none; box-shadow: 3px 3px 0 #0006; }
.pet-bubble { position: absolute; right: 18%; top: 0; padding: 8px 12px; border-radius: 8px 8px 2px 8px; white-space: nowrap; transform: rotate(-8deg) translateY(-34px); }
.companion-panel { position: relative; z-index: 3; margin: 30px 20px 0; width: auto; padding: 14px 16px 13px; border: 1px solid #ffffff26; border-radius: 16px; background: #0d0e0ff5; box-shadow: 0 18px 38px #0007, inset 0 1px 0 #ffffff12; transition: border-color .35s, box-shadow .35s; }
.is-working .companion-panel { border-color: #d4ff3a66; box-shadow: 0 18px 38px #0007, 0 0 32px #d4ff3a10; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; color: var(--fg); font-size: 13px; font-weight: 600; }
.panel-logo { padding-right: 4px; color: var(--lime); }
.keyboard-hint { color: #8c908d; font: 11px var(--mono); letter-spacing: .04em; }
.request { margin: 10px 0; color: var(--fg); font-size: 17px; letter-spacing: -.02em; }
.demo-response { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; color: #a2a79e; font-size: 13.5px; line-height: 1.4; }
.demo-response > button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--lime); color: var(--lime-ink); font-size: 20px; box-shadow: 0 2px 0 #7c9912; transition: transform .2s; }
.demo-response > button:hover { transform: translateY(-2px); }
.demo-response > button:disabled { opacity: .65; }
.demo-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; }
.demo-bottom > span { color: var(--muted); font-size: 13px; }
.demo-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #0a0b0c99; }
.demo-tabs button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: #a9ada6; font-size: 14px; transition: background .15s, color .15s; }
.demo-tabs button:hover:not([aria-pressed=true]) { background: #ffffff12; color: #fff; }
.demo-tabs button[aria-pressed=true] { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
.demo-effects, .play-effects { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: inherit; pointer-events: none; }
.particle { position: absolute; display: block; width: 5px; height: 5px; border-radius: 1px; pointer-events: none; }
.particle.heart { width: auto; height: auto; font: 18px/1 var(--sans); }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(72px, 10vw, 128px); border-top: 1px solid var(--line); }
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 18px; }
.lede { max-width: 58ch; margin-top: 20px; color: var(--text); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; }
.lede strong, .facts strong { color: var(--fg); font-weight: 600; }
.icon-tile { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--lime-line); border-radius: 13px; background: var(--lime-soft); color: var(--lime); transition: transform .35s var(--ease), background .25s; }
.icon-tile .icon { width: 22px; height: 22px; }

/* what it does */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 5vw, 60px); }
.card { display: flex; flex-direction: column; min-width: 0; padding: 26px 26px 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: border-color .25s, transform .35s var(--ease); }
.card:hover { border-color: var(--lime-line); transform: translateY(-3px); }
.card:hover .icon-tile { background: #d4ff3a22; transform: rotate(-6deg) scale(1.05); }
.card h3 { margin-top: 20px; font-size: 20px; }
.card p { margin-top: 10px; color: var(--text); font-size: 15.5px; line-height: 1.65; }
.try { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 22px; }
.try > span:first-child { color: var(--faint); font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.try q { quotes: none; padding: 9px 14px; border-radius: 16px 16px 16px 5px; background: #ffffff10; color: #e4e7de; font-size: 14.5px; line-height: 1.45; }
.try .keys { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }

/* you stay in charge, questions: a heading that stays put beside its content */
.split-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.split-section > .section-head { position: sticky; top: calc(var(--header) + 36px); }
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; }
.principles h3 { margin-top: 18px; }
.principles p { margin-top: 8px; color: var(--text); font-size: 15.5px; line-height: 1.65; }
.principles > div:hover .icon-tile { background: #d4ff3a22; transform: translateY(-3px); }

/* the agent */
.agent-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: clamp(36px, 5vw, 56px); }
.facts { border-top: 1px solid var(--line); }
.facts li { position: relative; padding: 18px 0 18px 30px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15.5px; line-height: 1.65; }
.facts li > .icon { position: absolute; left: 0; top: 22px; width: 18px; height: 18px; color: var(--lime); stroke-width: 2; }
.facts strong { display: block; margin-bottom: 2px; font-size: 16px; }
.tour-card { overflow: hidden; border: 1px solid var(--line-2); border-radius: 22px; background: radial-gradient(70% 90px at 12% 0, #d4ff3a0c, transparent), #0e0f10; box-shadow: inset 0 1px 0 #ffffff14, 0 40px 70px -50px #000; }
.tour-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-bottom: 1px solid #ffffff10; }
.tour-bar img { display: block; }
.tour-bar strong { display: block; color: var(--fg); font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.tour-bar span { display: block; margin-top: 4px; color: var(--faint); font: 500 11px/1 var(--mono); }
.tour-dots { display: flex; gap: 4px; margin-left: auto; }
.tour-dots i { width: 6px; height: 6px; border-radius: 2px; background: #fff; opacity: .12; }
.tour-dots i.is-done { background: var(--lime); opacity: .45; }
.tour-dots i.is-now { background: var(--lime); opacity: 1; box-shadow: 0 0 6px #d4ff3a88; }
.tour-body { display: grid; gap: 6px; padding: 16px 14px; }
.tour-body > p { margin: 0 2px 8px; color: #c9cbc6; font-size: 14.5px; line-height: 1.6; }
.choice { display: flex; gap: 12px; padding: 12px; border-radius: 13px; background: #ffffff08; box-shadow: inset 0 0 0 1px #ffffff10; }
.choice.is-on { background: #d4ff3a15; box-shadow: inset 0 0 0 1px #d4ff3a59; }
.choice i { flex-shrink: 0; width: 15px; height: 15px; margin-top: 3px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #ffffff22; }
.choice.is-on i { background: var(--lime); box-shadow: 0 0 8px #d4ff3a88; }
.choice strong { display: block; color: var(--fg); font-size: 14.5px; font-weight: 600; }
.choice em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 13px; line-height: 1.5; }
.tour figcaption { margin-top: 14px; color: var(--faint); font-size: 13px; text-align: center; }

/* install */
.install { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.needs { display: grid; gap: 0; margin-top: 30px; border-top: 1px solid var(--line); }
.needs li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15.5px; line-height: 1.5; }
.needs .icon { position: relative; top: 3px; width: 17px; height: 17px; color: var(--lime); stroke-width: 2.2; }
.needs strong { color: var(--fg); font-weight: 600; }
.needs code { white-space: nowrap; }
.terminal { border: 1px solid var(--line-2); border-radius: 18px; background: #08090a; box-shadow: 0 40px 70px -50px #000, inset 0 1px 0 #ffffff10; }
.terminal-top { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); font: 13px var(--mono); }
.terminal pre { margin: 0; padding: 22px 20px 24px; color: #e9ecdf; font: 15px/1.8 var(--mono); white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.terminal pre:before { content: "$ "; color: var(--lime); }
.copy { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-left: auto; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: #ffffff08; color: var(--fg); font-size: 13px; font-weight: 550; transition: background .2s, border-color .2s, color .2s; }
.copy .icon { width: 15px; height: 15px; }
.copy:hover { border-color: #d4ff3a66; background: var(--lime-soft); color: var(--lime); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.steps li { counter-increment: step; color: var(--text); font-size: 15px; line-height: 1.6; }
.steps li:before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 14px; border: 1px solid var(--lime-line); border-radius: 9px; background: var(--lime-soft); color: var(--lime); font: 600 13px var(--mono); }
.steps strong { display: block; margin-bottom: 4px; color: var(--fg); font-size: 16px; font-weight: 600; }
.fine { margin-top: 28px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* permissions and privacy */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.panel { padding: 28px 28px 12px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.panel-title { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.panel .facts li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- the playground */
.playground { overflow: hidden; border: 1px solid var(--line-2); border-radius: 24px; background: #121514; }
.play-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px 26px; border-bottom: 1px solid var(--line); }
.play-heading h2 { margin-top: 12px; font-size: clamp(28px, 3vw, 40px); }
.motion-toggle { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 30px; background: none; color: var(--text); font-size: 13px; white-space: nowrap; }
.motion-toggle:hover { border-color: #d4ff3a66; color: var(--lime); }
.play-yard { position: relative; isolation: isolate; overflow: hidden; height: 420px; background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 50%), #d4ff3a0c, transparent 55%), radial-gradient(#ffffff15 .7px, transparent .7px); background-size: auto, 22px 22px; }
.yard-coordinate { position: absolute; right: 24px; bottom: 24px; color: #73816a; font: 11px var(--mono); letter-spacing: .12em; writing-mode: vertical-rl; }
.yard-orbit { position: absolute; z-index: -1; left: 50%; top: 50%; width: 490px; height: 490px; border: 1px solid #d4ff3a0e; border-radius: 50%; transform: translate(-50%, -50%); transition: border-color .6s; }
.orbit-two { width: 310px; height: 310px; }
.yard-orbit:before { content: ""; position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: #d4ff3a70; box-shadow: 0 0 13px #d4ff3a55; }
.orbit-one { animation: orbit 32s linear infinite; }
.orbit-two { animation: orbit 22s linear infinite reverse; }
@keyframes orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
.play-character { position: absolute; z-index: 3; top: 50%; left: 50%; width: 210px; height: 196px; transform: translate(calc(-50% + var(--pet-x, 0px)), calc(-50% + var(--pet-y, 0px))); transition: transform .65s cubic-bezier(.22, 1.2, .36, 1); }
.play-character.is-dragging { z-index: 6; transition: none; }
.play-pet { position: relative; z-index: 2; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transform: rotate(var(--drag-tilt, 0deg)); transition: transform .3s; }
.play-pet svg { display: block; width: 100%; height: auto; overflow: visible; pointer-events: none; filter: drop-shadow(0 14px 15px #0006); animation: play-breathe 4s ease-in-out infinite; }
@keyframes play-breathe { 50% { transform: translateY(-9px) rotate(2deg); } }
.is-dragging .play-pet { cursor: grabbing; transition: none; }
.is-dragging svg { animation: none; }
.play-pet:focus-visible { outline: 2px dashed var(--lime); outline-offset: 7px; border-radius: 55px; }
.pet-shadow { position: absolute; bottom: 11px; left: 25%; width: 50%; height: 12px; border-radius: 50%; background: #0008; filter: blur(6px); animation: shadow-breathe 4s ease-in-out infinite; transition: opacity .3s; }
@keyframes shadow-breathe { 50% { transform: scale(.8); opacity: .5; } }
.is-dragging .pet-shadow { opacity: 0; }
.play-bubble { position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; width: max-content; max-width: min(300px, 75vw); padding: 9px 14px; border-radius: 8px 8px 8px 2px; text-align: center; pointer-events: none; transform: translateX(calc(-50% + var(--bubble-shift, 0px))); }
.play-hint { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0 30px; color: #a9b49d; font-size: 14px; text-align: center; pointer-events: none; }
.play-hint span { color: #818c76; }
.play-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 24px 28px 18px; border-top: 1px solid var(--line); }
.play-controls button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: #191d19; color: var(--fg); font-size: 14.5px; transition: background .25s, transform .25s var(--ease), border-color .25s; }
.play-controls button .icon { width: 18px; height: 18px; color: var(--lime); }
.play-controls button:hover { border-color: #d4ff3a66; background: #d4ff3a12; transform: translateY(-3px); }
.play-controls button:active { transform: translateY(0) scale(.97); }
.play-controls button[aria-pressed=true] { border-color: #8fb4ff88; background: #8fb4ff12; }
.play-footnote { display: flex; justify-content: space-between; gap: 20px; min-height: 44px; padding: 0 34px 24px; color: #97a38c; font-size: 14px; }
.file-snack { position: absolute; display: grid; place-items: center; width: 45px; height: 53px; border: 1px solid var(--lime); border-radius: 7px; background: #242c1b; color: var(--lime); font: 12px var(--mono); box-shadow: 0 0 20px #d4ff3a22; }
.is-dancing .yard-orbit { border-color: #d4ff3a40; }
.is-dancing .orbit-one { animation: orbit 3s linear infinite; }
.is-dancing .orbit-two { animation: orbit 2s linear infinite reverse; }
.is-dancing .play-bubble { background: #e1ff77; }
.is-napping .play-bubble { background: #b4caff; }
.is-napping .play-pet svg { animation: nap-breathe 5s ease-in-out infinite; }
@keyframes nap-breathe { 50% { transform: scale(1.03, .98); } }
.is-napping .yard-orbit:before { background: #8fb4ff; }

/* ---------------------------------------------------------------- questions, closing, footer */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; color: var(--fg); font-size: 18px; font-weight: 550; letter-spacing: -.015em; list-style: none; cursor: pointer; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 20px; height: 20px; color: var(--lime); stroke-width: 2; transition: transform .3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq summary:hover { color: var(--lime); }
.faq details p { max-width: 62ch; margin: -6px 0 24px; color: var(--text); font-size: 16px; line-height: 1.7; }
.closing { position: relative; isolation: isolate; overflow: clip; border-top: 1px solid var(--line); padding-block: clamp(80px, 11vw, 140px); text-align: center; }
.closing:before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -55%; width: min(1100px, 120vw); aspect-ratio: 1.4; border-radius: 50%; background: radial-gradient(closest-side, #d4ff3a1c, transparent); transform: translateX(-50%); }
.closing img { width: 128px; height: auto; filter: drop-shadow(0 20px 18px #0008); animation: breathe 5s ease-in-out infinite; }
.closing h2 { margin-top: 28px; font-size: clamp(34px, 5vw, 64px); }
.closing .hero-actions { justify-content: center; }
.closing-note { margin-top: 22px; color: var(--muted); font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .shell { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-block: 28px 32px; color: var(--muted); font-size: 14px; }
.site-footer .wordmark { font-size: 22px; }
.site-footer nav { display: flex; gap: 22px; margin-left: auto; }
.site-footer nav a:hover { color: var(--fg); }

/* ---------------------------------------------------------------- asking for a star */
/* The ask appears where someone has just decided they like Kibu: the header,
   under the first buttons, after the install steps, and at the very end. */
.star { border-color: #d4ff3a59; background: var(--lime-soft); color: var(--fg); font-weight: 600; }
.star:hover { border-color: var(--lime); background: #d4ff3a22; }
.star .icon, .button-star .icon, .star-nudge .icon, .star-band .icon-tile .icon, .footer-star .icon { fill: currentColor; }
.star:hover .icon, .button-star:hover .icon, .star-nudge a:hover .icon, .footer-star:hover .icon { animation: star-pop .5s var(--ease); }
@keyframes star-pop { 40% { transform: scale(1.35) rotate(-14deg); } }
.star-nudge { margin-top: 18px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.star-nudge a { display: inline-flex; align-items: center; gap: 7px; margin-left: 2px; border-bottom: 1px solid #d4ff3a66; color: var(--fg); font-weight: 600; white-space: nowrap; transition: color .2s; }
.star-nudge a:hover { color: var(--lime); }
.star-nudge .icon { width: 15px; height: 15px; color: var(--lime); }
.star-nudge .star-count { padding-left: 7px; border-left: 1px solid var(--line-2); color: var(--lime); }
.button-star { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 52px; padding: 0 20px; border: 1px solid #d4ff3a80; border-radius: 12px; background: #d4ff3a14; color: var(--fg); font-size: 16px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 0 0 4px #d4ff3a0d, 0 18px 40px -22px #d4ff3a80; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.button-star:hover { border-color: var(--lime); background: #d4ff3a26; transform: translateY(-1px); }
.button-star .icon { width: 18px; height: 18px; color: var(--lime); }
.button-star .star-count { padding-left: 11px; border-left: 1px solid #d4ff3a4d; }
.star-band { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 26px 28px; border: 1px solid var(--lime-line); border-radius: 20px; background: radial-gradient(120% 160% at 0% 0%, #d4ff3a17, transparent 62%), var(--surface); }
.star-band h3 { font-size: 20px; }
.star-band p { max-width: 60ch; margin-top: 6px; color: var(--text); font-size: 15.5px; line-height: 1.6; }
.footer-star { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); font-weight: 600; }
.footer-star .icon { width: 15px; height: 15px; color: var(--lime); }
/* The header hides its count on small screens; the larger buttons keep theirs. */
.button-star .star-count, .star-nudge .star-count { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
/* On a short window the line under the buttons gives way so the opening screen stays compact. */
@media (min-width: 901px) and (max-height: 720px) {
  .star-nudge { display: none; }
}
@media (max-width: 760px) {
  .star-band { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 20px; }
  .star-band .button-star { width: 100%; }
}
@media (max-width: 420px) {
  .closing .button-star { width: 100%; }
}

/* ---------------------------------------------------------------- motion preferences */
.motion-paused *, .motion-paused *:before, .motion-paused *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-enabled) { scroll-behavior: auto; }
  html:not(.motion-enabled) *, html:not(.motion-enabled) *:before, html:not(.motion-enabled) *:after { animation: none !important; transition: none !important; }
}

/* Content remains at readable sizes on short windows and scrolls naturally. */
@media (min-width: 901px) and (max-height: 760px) {
  .hero-grid { padding-block: 32px; }
}

/* ---------------------------------------------------------------- medium screens */
@media (max-width: 1180px) {
  .site-nav a { padding-inline: 9px; }
  .star [data-star-label] { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

/* ---------------------------------------------------------------- phones and small tablets */
/* A single column keeps every control in normal flow on mobile. */
@media (max-width: 900px) {
  :root { --header: 60px; }
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero:before { -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 10%, transparent 75%); }
  .hero:after { top: -6%; right: -40%; width: 120vw; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "copy" "facts" "demo"; min-height: 0; gap: 28px; padding-block: 44px 48px; }
  .hero-copy { width: 100%; max-width: 620px; margin-inline: auto; text-align: left; }
  .hero-face { display: none; }
  h1 { font-size: clamp(40px, 8vw, 64px); margin-top: 20px; }
  .intro { font-size: 17px; }
  .hero-actions { justify-content: flex-start; }
  .hero-facts { width: 100%; max-width: 620px; margin-inline: auto; gap: 20px 24px; padding-top: 24px; }
  .demo-scene { width: 100%; height: auto; max-width: 620px; margin: 16px auto 0; }
  .scene-top span:last-child { display: none; }
  .desktop-stage { display: flex; flex-direction: column; margin-top: 12px; }
  .file-window { position: relative; top: auto; left: auto; width: calc(100% - 32px); max-width: none; margin: 6px 16px 0; transform: none; }
  .file-list { min-height: 228px; }
  .pet { top: -58px; right: 14px; width: 84px; transform: none; }
  .pet:hover { transform: translateY(-4px); }
  .pet-bubble { display: none; }
  .companion-panel { position: relative; left: auto; bottom: auto; width: auto; margin: 14px 12px 0; }
  .demo-bottom { padding: 14px 12px 14px; }
  .demo-bottom > span { display: none; }
  .demo-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .demo-tabs button { min-height: 44px; }
  .split-section, .install, .agent-grid { grid-template-columns: minmax(0, 1fr); }
  .split-section > .section-head { position: static; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .tour { max-width: 560px; }
  .play-heading { padding: 24px 22px 22px; }
  .play-yard { height: 380px; }
  .play-character { width: 170px; height: 159px; }
  .yard-coordinate { display: none; }
  .play-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 20px 16px; }
  .play-controls button { justify-content: center; padding-inline: 10px; }
  .play-footnote { flex-direction: column; gap: 4px; padding: 0 22px 22px; text-align: center; }
  .motion-toggle span { display: none; }
  .pet-bubble, .play-bubble { font-size: 16.5px; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px 20px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .principles > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .principles .icon-tile { grid-row: span 2; }
  .principles h3 { margin-top: 2px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; }
  .steps li:before { grid-row: span 2; margin: 0; }
  .terminal pre { padding: 18px 16px 20px; font-size: 12.5px; }
  .panel { padding: 22px 20px 8px; }
  .faq summary { padding: 18px 0; font-size: 16.5px; }
  .closing img { width: 104px; }
  .site-footer nav { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .star { padding-inline: 10px; }
  .star-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; border: 0; }
  .site-header .shell { gap: 12px; }
  .header-actions { gap: 8px; }
  .hero-actions { flex-direction: row; gap: 12px; width: 100%; }
  .hero-actions .button { padding-inline: 16px; font-size: 14px; }
  .hero-actions .ghost { font-size: 14px; }
  .hero .eyebrow { font-size: 10px; letter-spacing: .1em; }
  .hero .intro { font-size: 16px; }
  .hero-facts { gap: 18px 16px; }
  .hero-facts dd { font-size: 12px; }
  .play-controls button { font-size: 13.5px; gap: 7px; }
  .play-yard { height: 345px; }
  .play-character { width: 150px; height: 140px; }
  .play-hint span { display: none; }
}
@media (max-width: 900px) and (max-height: 620px) {
  .hero-face { display: none; }
  .hero-copy { min-height: 0; }
}

/* ---------------------------------------------------------------- $KIBU */
/* The token section reuses the site's own panel / terminal / button parts.
   Only the shapes that do not exist yet are declared here. */
.token-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.token-panels .panel { padding-bottom: 28px; }
/* Columns stretch so the two bottom rows (note | buy) share one baseline. */
.token-ca { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; margin-top: clamp(36px, 5vw, 56px); align-items: stretch; }
.terminal pre.ca-pre { font: 600 14px/1.6 var(--mono); letter-spacing: .01em; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal pre.ca-pre:before { content: none; }
.token-ca-status { min-height: 22px; margin-top: 12px; color: var(--lime); font-size: 14px; line-height: 1.5; }
.token-note { margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.token-ca-left { display: flex; flex-direction: column; }
.token-ca-left .token-note { margin-top: auto; }
.token-side { display: flex; flex-direction: column; gap: 20px; }
.token-buy-slot { display: grid; gap: 12px; margin-top: auto; }
.token-buy-note { text-align: center; }
.token-facts { margin-top: 0; border-top: 1px solid var(--line); }
.token-buy { width: 100%; }
/* Gated states read as "not yet", never as a broken control: no ring on Copy,
   a hairline on the buy button, both muted. */
.copy[aria-disabled="true"] { border-color: transparent; background: none; color: var(--muted); font-weight: 500; cursor: default; }
.copy[aria-disabled="true"]:hover { border-color: transparent; background: none; color: var(--muted); }
.copy[aria-disabled="true"] .tok-lock { width: 14px; height: 14px; opacity: .8; }
.token-buy[aria-disabled="true"] { border: 1px solid var(--line-2); background: none; color: var(--muted); box-shadow: none; cursor: default; }
.token-buy[aria-disabled="true"]:hover { transform: none; border-color: var(--line-2); }
@media (max-width: 940px) {
  .token-panels, .token-ca { grid-template-columns: minmax(0, 1fr); }
}
