/* ==========================================================================
   Sections, top to bottom: hero, browser demo, capabilities, principles,
   engine, test run, footer
   ========================================================================== */

/* Background canvases shared by several sections */
.bgwave {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  pointer-events: none;
  z-index: 0;
}
#capabilities, #principles, #get { overflow: hidden; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  height: clamp(620px, 90vh, 880px);
  overflow: hidden;
  background: var(--bg);
}
.ribbons {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  animation: ribbonIn 1.8s var(--ease) both;
}
.ribbons g { will-change: transform; } /* moved every frame by js/effects.js */
.ribbons path { transform-box: fill-box; transform-origin: center; }
.r1 { animation: fl1 14s ease-in-out infinite; }
.r2 { animation: fl2 17s ease-in-out infinite; }
.r3 { animation: fl3 12s ease-in-out infinite; }
.r4 { animation: fl1 19s ease-in-out infinite reverse; }

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: clamp(120px, 18vh, 168px);
  display: grid;
  gap: var(--md);
  justify-items: start;
  opacity: calc(1 - var(--hp, 0) * 1.25); /* --hp: hero scroll progress, set in JS */
}
h1 {
  font-size: clamp(2.75rem, 7.2vw, 7rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  max-width: 13ch;
}
.sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.3;
  color: var(--mute);
  max-width: 34ch;
}

/* ==========================================================================
   Browser demo ("specimen")
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--md);
  align-items: end;
  margin-bottom: var(--xl2);
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm) var(--xl2);
  padding: var(--md) 0;
  border-top: 1px solid var(--rule);
}
.ctl { display: flex; align-items: center; gap: var(--sm); flex-wrap: wrap; }
.ctl > span {
  font: 500 .75rem var(--mono);
  letter-spacing: 0;
  color: var(--mute);
  min-width: 64px;
}
.opts { display: flex; gap: var(--xs); flex-wrap: wrap; }
.opts button {
  font: inherit;
  font-size: .875rem;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-spring);
}
.opts button:hover { border-color: var(--ink); }
.opts button:active { transform: scale(.95); transition-duration: .1s; }
.opts button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; gap: var(--xs); }
.chips button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  padding: 0;
  cursor: pointer;
  border-radius: 0;
  outline: 2px solid transparent;
  outline-offset: 0;
  transition: transform .35s var(--ease-spring), outline-color .25s, outline-offset .35s var(--ease-spring);
}
.chips button:hover { transform: translateY(-3px); }
.chips button:active { transform: scale(.9); transition-duration: .1s; }
.chips button[aria-pressed="true"] { outline-color: var(--ink); outline-offset: 3px; }

/* Stage the window sits on */
.stage {
  position: relative;
  overflow: hidden;
  background: #fafafa;
  padding: clamp(20px, 6vw, 88px);
  perspective: 1400px;
  margin-top: var(--xs);
}
.swirl {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  filter: blur(2.5px);
}

/* The opentab window. A copy of the real app chrome (app/ui/ui.css, themes.css,
   sidebar.html, pages/newtab.html) at demo scale. Theme values match themes.css. */
.win {
  --bg: #181818; --panel: #202020; --fg: #f2f2f2; --muted: #8f8f8f;
  --line: rgba(255, 255, 255, .09); --hover: rgba(255, 255, 255, .07); --input: #222; --tab: #262626;
  --accent: var(--fg);
  --r: 9px;
  --tab-h: 36px; --tool-h: 40px; --side-w: 188px;

  position: relative;
  height: 400px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 12.5px/1.3 var(--sans);
  letter-spacing: -.01em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
  /* --rx/--ry: pointer tilt, --sr/--ss: scroll rise. All set in js/effects.js */
  transform: rotateX(calc(var(--rx, 0deg) + var(--sr, 0deg))) rotateY(var(--ry, 0deg)) scale(var(--ss, 1));
  will-change: transform;
}
.win[data-theme="chalk"]    { --bg: #ffffff; --panel: #ffffff; --fg: #181818; --muted: #6e6e6e; --line: rgba(24,24,24,.12); --hover: rgba(24,24,24,.06); --input: #f3f3f3; --tab: #eeeeee; }
.win[data-theme="graphite"] { --bg: #232323; --panel: #2b2b2b; --fg: #ededed; --muted: #929292; --line: rgba(255,255,255,.09); --hover: rgba(255,255,255,.07); --input: #2d2d2d; --tab: #333333; }
.win[data-theme="mono"]     { --bg: #000000; --panel: #121212; --fg: #f2f2f2; --muted: #808080; --line: rgba(255,255,255,.09); --hover: rgba(255,255,255,.07); --input: #141414; --tab: #1a1a1a; }
.win[data-theme="smoke"]    { --bg: #e9e9e9; --panel: #f6f6f6; --fg: #1c1c1c; --muted: #6a6a6a; --line: rgba(0,0,0,.1); --hover: rgba(0,0,0,.06); --input: #f6f6f6; --tab: #f8f8f8; }

/* Smooth color crossfade when the theme changes */
.win, .win * {
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
}
.win svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- chrome: tab strip + toolbar ---------- */
.o-chrome { flex: none; background: var(--bg); display: flex; flex-direction: column; }
.o-head { display: none; }
.o-strip { height: var(--tab-h); display: flex; align-items: center; gap: 3px; padding: 5px 0 0 8px; }
.o-spacer { flex: 1 0 20px; align-self: stretch; }

.o-cap { display: flex; align-self: stretch; flex: none; margin-top: -5px; }
.o-cap i { width: 40px; display: grid; place-items: center; color: var(--muted); }
.o-cap i:hover { background: var(--hover); color: var(--fg); }
.o-cap i.cl:hover { background: #e81123; color: #fff; }
.o-cap svg { width: 12px; height: 12px; stroke-width: 1.3; }

.o-tab {
  position: relative;
  height: 29px;
  flex: 0 1 168px;
  min-width: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px 0 9px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.o-tab:hover { background: var(--hover); color: var(--fg); }
.o-tab[aria-selected="true"] { background: var(--tab); color: var(--fg); }
.o-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 0; height: 1.5px; border-radius: 2px;
  background: var(--accent); transform-origin: left; animation: o-line .45s var(--ease-out) both;
}
@keyframes o-line { from { transform: scaleX(0); } }
.o-fav { width: 15px; height: 15px; flex: none; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; }
.o-fav.o-int { background: none; color: var(--fg); }
.o-fav.o-int svg { width: 15px; height: 10px; stroke-width: 3; }
.o-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 12px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent); }
.o-x { width: 18px; height: 18px; flex: none; border-radius: 6px; display: grid; place-items: center; opacity: 0; }
.o-x svg { width: 11px; height: 11px; }
.o-tab:hover .o-x, .o-tab[aria-selected="true"] .o-x { opacity: .7; }

.o-ib { width: 29px; height: 29px; flex: none; border-radius: var(--r); display: grid; place-items: center; color: var(--muted); }
.o-ib:hover { background: var(--hover); color: var(--fg); }
.o-ib.off { opacity: .3; }
.o-ib.sm { width: 24px; height: 24px; }
.o-ib.sm svg { width: 13px; height: 13px; }

.o-tool { height: var(--tool-h); display: flex; align-items: center; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.o-omni { flex: 1; min-width: 0; height: 30px; margin: 0 6px; display: flex; align-items: center; gap: 7px; padding: 0 3px 0 11px; border-radius: var(--r); background: var(--input); }
.o-lock { width: 12px !important; height: 12px !important; color: var(--muted); }
.o-url { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; }
.o-shield { height: 22px; display: flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: var(--r); font-size: 11px; font-weight: 600; color: var(--muted); flex: none; }
.o-shield svg { width: 12px; height: 12px; }
.o-grow { flex: none; }

/* ---------- main area: sidebar rail + page ---------- */
.o-main { flex: 1; min-height: 0; display: flex; }
.win[data-side="right"] .o-main { flex-direction: row-reverse; }
.win[data-side="off"] .o-rail { display: none; }

.o-rail { width: 50px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; background: var(--bg); border-right: 1px solid var(--line); }
.win[data-side="right"] .o-rail { border-right: 0; border-left: 1px solid var(--line); }
.o-it { position: relative; width: 34px; height: 34px; flex: none; border-radius: var(--r); display: grid; place-items: center; color: var(--muted); }
.o-it:hover { background: var(--hover); color: var(--fg); }
.o-it.on { background: var(--hover); color: var(--fg); }
.o-it.on::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: -8px; width: 3px; border-radius: 3px; background: var(--accent); }
.win[data-side="right"] .o-it.on::before { left: auto; right: -8px; }
.o-it svg { width: 17px; height: 17px; stroke-width: 1.8; }
.o-fill { flex: 1; }
.o-sep { width: 20px; height: 1px; background: var(--line); margin: 3px 0; flex: none; }

.o-page { flex: 1; min-width: 0; position: relative; overflow: hidden; background: var(--bg); }

/* a website */
.o-site { position: absolute; inset: 0; padding: 26px 28px; display: grid; gap: 10px; align-content: start; }
.o-site h5 { margin: 0; font: 500 clamp(24px, 4.4vw, 38px)/1.1 var(--sans); letter-spacing: -.045em; padding-bottom: 4px; }
.o-site .bar { height: 8px; border-radius: 4px; background: var(--hover); transform-origin: left; animation: bar 1.2s var(--ease-out) both; }
.o-site .bar.b { animation-delay: .08s; width: 72%; }
.o-site .bar.c { animation-delay: .16s; width: 54%; }
.o-site .bar.d { animation-delay: .24s; }
.o-site .bar.a, .o-site .bar.d { width: 88%; }

/* the real new tab page */
.o-ntp { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; padding: 15% 20px 20px; gap: 22px; }
.o-page.ntp .o-site { display: none; }
.o-page.ntp .o-ntp { display: flex; }
.o-search { width: min(420px, 100%); height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: calc(var(--r) * 1.5); border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); animation: o-in .5s var(--ease-out) both; }
.o-search svg { stroke-width: 2; }
.o-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; animation: o-in .5s .06s var(--ease-out) both; }
.o-tiles span { width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 2px 7px; border-radius: var(--r); font-size: 10.5px; color: var(--muted); }
.o-tiles span:hover { background: var(--hover); }
.o-tiles i { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 650; color: var(--fg); background: var(--panel); border: 1px solid var(--line); }
.o-blk { position: absolute; bottom: 14px; font-size: 11px; color: var(--muted); }
.o-blk b { color: var(--fg); font-weight: 600; }
@keyframes o-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- vertical layouts: tabs on the left or right (body.vertical in ui.css) ---------- */
.win[data-tabs="left"], .win[data-tabs="right"] { flex-direction: row; }
.win[data-tabs="right"] { flex-direction: row-reverse; }
.win[data-tabs="left"] .o-chrome, .win[data-tabs="right"] .o-chrome { width: var(--side-w); border-right: 1px solid var(--line); }
.win[data-tabs="right"] .o-chrome { border-right: 0; border-left: 1px solid var(--line); }
.win[data-tabs="left"] .o-head, .win[data-tabs="right"] .o-head { display: flex; height: var(--tab-h); flex: none; }
.o-grab { flex: 1; }
.win[data-tabs="left"] .o-head .o-cap, .win[data-tabs="right"] .o-head .o-cap { margin-top: 0; }
.win[data-tabs="left"] .o-head .o-cap i, .win[data-tabs="right"] .o-head .o-cap i { width: 34px; }
.win[data-tabs="left"] .o-strip .o-cap, .win[data-tabs="right"] .o-strip .o-cap,
.win[data-tabs="left"] .o-spacer, .win[data-tabs="right"] .o-spacer { display: none; }
.win[data-tabs="left"] .o-tool, .win[data-tabs="right"] .o-tool { order: 1; height: auto; flex-wrap: wrap; padding: 0 8px 8px; border-bottom: 0; }
.win[data-tabs="left"] .o-omni, .win[data-tabs="right"] .o-omni { order: 5; flex: 1 0 100%; margin: 6px 0 0; }
.win[data-tabs="left"] .o-grow, .win[data-tabs="right"] .o-grow { flex: 1; }
.win[data-tabs="left"] .o-strip, .win[data-tabs="right"] .o-strip { order: 2; height: auto; flex: 1; min-height: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 8px 8px; border-top: 1px solid var(--line); }
.win[data-tabs="left"] .o-tab, .win[data-tabs="right"] .o-tab { flex: none; width: 100%; }
.win[data-tabs="left"] .o-tab[aria-selected="true"]::after, .win[data-tabs="right"] .o-tab[aria-selected="true"]::after {
  left: 0; right: auto; top: 8px; bottom: 8px; width: 2.5px; height: auto; transform-origin: top; animation-name: o-lineY;
}
@keyframes o-lineY { from { transform: scaleY(0); } }
.win[data-tabs="left"] .o-new, .win[data-tabs="right"] .o-new { width: 100%; display: flex; justify-content: flex-start; gap: 9px; padding: 0 9px; }
.win[data-tabs="left"] .o-new::after, .win[data-tabs="right"] .o-new::after { content: "New tab"; font-size: 12px; }


/* ---------- working demo: settings ---------- */
.win[data-corners="square"] { --r: 0px; } .win[data-corners="soft"] { --r: 5px; } .win[data-corners="round"] { --r: 9px; }
.win[data-density="compact"] { --tab-h: 31px; --tool-h: 34px; } .win[data-density="compact"] .o-tab, .win[data-density="compact"] .o-ib { height: 25px; } .win[data-density="compact"] .o-omni { height: 26px; }
.win[data-density="roomy"] { --tab-h: 42px; --tool-h: 46px; } .win[data-density="roomy"] .o-tab, .win[data-density="roomy"] .o-ib { height: 33px; } .win[data-density="roomy"] .o-omni { height: 34px; }
.win[data-density="compact"] .o-ib, .win[data-density="roomy"] .o-ib { width: auto; aspect-ratio: 1; }

/* address bar input, buttons */
.win .o-url { background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: 12.5px; padding: 0; height: 100%; }
.win .o-url::placeholder { color: var(--muted); }
.o-omni:focus-within { box-shadow: 0 0 0 1.5px var(--accent); }
.o-ib, .o-shield, .o-tab, .o-it { cursor: pointer; }
.o-ib:focus-visible, .o-it:focus-visible, .o-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.o-ib.spin svg { animation: o-spin .45s linear; }
@keyframes o-spin { to { transform: rotate(360deg); } }
.o-omni .o-ib.sm.on { color: var(--accent); } .o-omni .o-ib.sm.on svg { fill: currentColor; }
.o-shield:hover { background: var(--hover); color: var(--fg); }
.o-tab.private { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--fg) 5%, transparent) 6px 12px); }
.o-tab em { font-style: normal; color: var(--muted); }
.o-tab .o-x:hover { background: var(--hover); opacity: 1; }
.o-fav.o-g { color: var(--muted); } .o-fav.o-g svg { width: 12px; height: 12px; }
.o-new { cursor: pointer; }

/* pages */
.o-page > .o-site { overflow: auto; scrollbar-width: none; }
.o-meta { margin: 0 0 4px; font-size: 11px; color: var(--muted); }
.o-res { display: grid; gap: 2px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r); cursor: pointer; text-decoration: none; color: var(--fg); }
.o-res:hover { background: var(--hover); }
.o-res small { color: var(--muted); font-size: 10.5px; } .o-res b { font-weight: 500; font-size: 14px; color: color-mix(in srgb, var(--accent) 70%, var(--fg)); }
.o-res span { height: 6px; width: 70%; border-radius: 3px; background: var(--hover); margin-top: 4px; }
.o-list { display: grid; margin-top: 4px; }
.o-mail { display: grid; grid-template-columns: 22px 110px 1fr auto; gap: 12px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); border-radius: 4px; }
.o-mail:hover { background: var(--hover); }
.o-mail i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; }
.o-mail b { color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-mail span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-mail.unread b, .o-mail.unread span { color: var(--fg); font-weight: 600; }
.o-track { cursor: pointer; } .o-track i { border-radius: 5px; }
.o-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0; }
.o-cards div { height: 64px; border-radius: var(--r); background: var(--hover); }
.o-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; }
.o-search input::placeholder { color: var(--muted); }
.o-search:focus-within { border-color: var(--accent); }
.o-tiles span { cursor: pointer; }
mark.o-hit { background: color-mix(in srgb, #f5c542 55%, transparent); color: inherit; border-radius: 2px; }
mark.o-hit.cur { background: #f5a623; color: #181818; }

/* sidebar panel */
.o-panel { width: 200px; flex: none; display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line); animation: o-pin .3s var(--ease-out); }
.win[data-side="right"] .o-panel { border-right: 0; border-left: 1px solid var(--line); }
.win[data-side="off"] .o-panel { display: none; }
.win.overlay-panel .o-panel { position: absolute; z-index: 3; top: 0; bottom: 0; left: 50px; box-shadow: 12px 0 30px rgba(0, 0, 0, .3); }
.win.overlay-panel[data-side="right"] .o-panel { left: auto; right: 50px; box-shadow: -12px 0 30px rgba(0, 0, 0, .3); }
.o-main { position: relative; }
@keyframes o-pin { from { opacity: 0; transform: translateX(-8px); } }
.o-panel header { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 6px 12px; font-weight: 600; font-size: 12.5px; }
.o-pbody { flex: 1; overflow: auto; padding: 0 6px 8px; scrollbar-width: thin; }
.o-prow { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px; border: 0; background: none; border-radius: var(--r); color: var(--fg); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.o-prow:hover, .o-prow.on { background: var(--hover); }
.o-prow i { width: 16px; height: 16px; flex: none; border-radius: 5px; display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 700; font-style: normal; }
.o-prow span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-prow small { color: var(--muted); font-size: 10.5px; }
.o-empty { color: var(--muted); font-size: 11.5px; padding: 6px; margin: 0; line-height: 1.45; }
.o-notes { width: 100%; height: 100%; min-height: 160px; resize: none; background: var(--input); color: var(--fg); border: 1px solid transparent; border-radius: var(--r); padding: 8px; font: inherit; font-size: 12px; line-height: 1.5; outline: 0; }
.o-notes:focus { border-color: var(--accent); }

/* popovers */
.o-pop { position: absolute; z-index: 6; min-width: 220px; max-width: 290px; max-height: calc(100% - 50px); overflow: auto; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: calc(var(--r) * 1.4); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .18); padding: 5px; animation: o-pop .26s var(--ease-out); transform-origin: top right; scrollbar-width: none; }
.o-pop-settings { width: 290px; }
@keyframes o-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); filter: blur(3px); } }
.o-mi { display: flex; align-items: center; gap: 11px; width: 100%; height: 32px; padding: 0 9px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 12.5px; border-radius: var(--r); cursor: pointer; text-align: left; }
.o-mi:hover { background: var(--hover); }
.o-mi svg { color: var(--muted); width: 15px; height: 15px; } .o-mi span { flex: 1; } .o-mi kbd { font: inherit; font-size: 10.5px; color: var(--muted); }
.o-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.o-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 9px 4px; font-weight: 600; font-size: 13px; }
.o-ph small { font-weight: 400; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-big { display: flex; align-items: baseline; gap: 7px; padding: 8px 9px; }
.o-big b { font-size: 30px; font-weight: 600; letter-spacing: -.04em; line-height: 1; } .o-big span { color: var(--muted); font-size: 12px; }
.o-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; padding: 4px 9px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 12.5px; border-radius: var(--r); text-align: left; }
button.o-row { cursor: pointer; } button.o-row:hover { background: var(--hover); }
.o-key kbd { font: 500 10.5px var(--sans); color: var(--muted); background: var(--hover); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.o-sw { position: relative; width: 32px; height: 19px; border-radius: 10px; background: var(--line); flex: none; transition: background .25s; }
.o-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease-spring); }
.o-sw.on { background: var(--accent); } .o-sw.on::after { transform: translateX(13px); background: var(--bg); }
.o-note { margin: 0; padding: 2px 9px 8px; font-size: 11px; color: var(--muted); }
.o-sec { padding: 10px 9px 4px; font: 500 9.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.o-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--hover); border-radius: calc(var(--r) + 2px); }
.o-seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: var(--r); cursor: pointer; }
.o-seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.o-themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 4px 9px 6px; }
.o-theme { aspect-ratio: 1; border-radius: var(--r); position: relative; overflow: hidden; border: 0; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.o-theme i { position: absolute; right: 0; bottom: 0; width: 45%; height: 45%; }
.o-theme.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--fg); }
.o-accents { display: flex; gap: 9px; padding: 4px 9px 6px; }
.o-accent { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; }
.o-accent.auto { background: linear-gradient(135deg, var(--fg) 50%, var(--bg) 50%) !important; box-shadow: inset 0 0 0 1px var(--line); }
.o-accent.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--fg); }

/* toast, find, music, edit banner */
.o-toast { position: absolute; z-index: 7; left: 50%; top: calc(var(--tab-h) + var(--tool-h) + 10px); transform: translate(-50%, -6px); padding: 7px 14px; border-radius: var(--r); background: var(--fg); color: var(--bg); font-weight: 600; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .35s var(--ease-out); white-space: nowrap; }
.o-toast.show { opacity: 1; transform: translate(-50%, 0); }
.o-find { position: absolute; z-index: 4; top: 8px; right: 10px; display: flex; align-items: center; gap: 7px; padding: 4px 4px 4px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: o-pop .25s var(--ease-out); }
.o-find svg { color: var(--muted); width: 13px; height: 13px; }
.o-find input { width: 130px; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: 12px; }
.o-find small { color: var(--muted); font-size: 11px; min-width: 28px; text-align: center; }
.o-musiccard { position: absolute; z-index: 4; right: 12px; bottom: 12px; width: 280px; display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--r) * 1.4); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .5); animation: o-pop .3s var(--ease-out); }
.o-art { width: 46px; height: 46px; border-radius: var(--r); display: grid; place-items: center; color: #fff; }
.o-mt { min-width: 0; display: grid; gap: 1px; } .o-mt b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-mt span, .o-mt small { font-size: 11px; color: var(--muted); }
.o-prog { height: 2px; background: var(--line); margin: 5px 0 2px; overflow: hidden; border-radius: 2px; }
.o-prog i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform 1s linear; }
.o-mc { display: flex; align-items: center; gap: 1px; } .o-mc .o-ib { color: var(--fg); }
.o-mx { position: absolute; top: -9px; right: -9px; width: 20px !important; height: 20px !important; background: var(--panel); border: 1px solid var(--line); border-radius: 50%; opacity: 0; transition: opacity .15s; }
.o-musiccard:hover .o-mx { opacity: 1; } .o-mx svg { width: 10px; height: 10px; }
.o-banner { position: absolute; z-index: 5; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--r) * 1.4); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); font-size: 12px; color: var(--muted); white-space: nowrap; }
.o-btn { border: 0; background: var(--fg); color: var(--bg); font: inherit; font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: var(--r); cursor: pointer; }
.win.editing .o-tool > * { outline: 1.5px dashed color-mix(in srgb, var(--fg) 35%, transparent); outline-offset: 2px; border-radius: var(--r); cursor: grab; }
.win.editing .o-tool > .dragging { opacity: .4; }
.win.editing .o-it[data-rail="edit"] { background: var(--hover); color: var(--fg); }

/* window buttons: minimise / maximise / close */
.win { transition: background-color .45s var(--ease), opacity .35s var(--ease), translate .45s var(--ease-out), scale .45s var(--ease-out), filter .35s; }
.win.min, .win.closed { opacity: 0; scale: .6; translate: 0 30%; pointer-events: none; filter: blur(6px); }
.win.closed { translate: 0 0; scale: .9; }
.win.max { height: 520px; }
.o-dock { position: absolute; z-index: 2; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid #00000014; border-radius: 999px; background: #181818; color: #fff; font: 500 13px var(--sans); cursor: pointer; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4); animation: o-pop .35s var(--ease-out); }
.o-dock svg { width: 22px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
@media (max-width: 600px) { .o-panel { width: 150px; } .o-musiccard { width: calc(100% - 24px); } .o-mail { grid-template-columns: 22px 1fr auto; } .o-mail span { display: none; } }

/* ==========================================================================
   Capabilities
   ========================================================================== */
.caps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); }
.caps .head { display: grid; gap: var(--md); align-content: start; }
.list { display: grid; }
.item { position: relative; padding: var(--xl) 0; }

/* Hairline that draws in on reveal */
.item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left;
  transition: transform 1.4s var(--ease-in-out) calc(var(--d, 0) * 1ms);
}
.js .item:not(.in)::after { transform: scaleX(0); }

/* Solid line that sweeps across on hover */
.item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--ink);
  z-index: 1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
}
.item:hover::before { transform: scaleX(1); transform-origin: left; }

.item h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -.045em;
  line-height: 1.1;
  display: flex;
  gap: var(--sm);
  align-items: center;
  flex-wrap: wrap;
  transition: transform .6s var(--ease);
}
.item:hover h3 { transform: translateX(12px); }
.item p { color: var(--mute); margin-top: var(--sm); max-width: 34ch; line-height: 1.4; transition: color .4s; }
.item:hover p { color: var(--ink); }
.badge { font: 500 .75rem var(--sans); letter-spacing: -.02em; background: var(--ink); color: var(--bg); padding: 5px 8px; line-height: 1; }
.item code {
  font: 500 .75rem var(--mono);
  letter-spacing: 0;
  display: inline-block;
  margin: var(--sm) 8px 0 0;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  transition: border-color .3s, transform .4s var(--ease-spring);
}
.item code:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ==========================================================================
   Principles
   ========================================================================== */
.dark h2 { max-width: 14ch; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--xl); margin-top: var(--xl6); }
.col .rule { border-top: 1px solid var(--dk-rule); padding-top: var(--md); }
.col h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.045em; line-height: 1.1; }
.col p { color: var(--dk-mute); margin-top: var(--sm); max-width: 30ch; line-height: 1.4; }

/* ==========================================================================
   Engine
   ========================================================================== */
.engine { overflow: hidden; min-height: 760px; }
.streaks {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  filter: blur(3px);
}
.engine .divider { position: relative; z-index: 2; }
.engine .inner {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--md);
  padding-top: clamp(160px, 26vh, 260px);
  padding-bottom: var(--xl6);
}
.engine h2 { max-width: 16ch; font-size: clamp(2.25rem, 4.8vw, 4.25rem); }
.engine .desc { max-width: 44ch; }
.engine .acts { display: flex; gap: var(--xl); flex-wrap: wrap; justify-content: center; margin-top: var(--sm); }

/* ==========================================================================
   Test run
   ========================================================================== */
.get-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); align-items: end; margin-top: var(--xl3); }
.big { font-size: clamp(2.75rem, 8.4vw, 8rem); letter-spacing: -.06em; line-height: 1; max-width: 11ch; }
.get-row .acts { display: grid; gap: var(--md); justify-items: start; }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot { background: var(--bg); color: var(--ink); border-top: 1px solid var(--rule); padding: var(--xl4) 0 var(--xl); }
.foot-top { display: grid; grid-template-columns: 1.4fr 2fr; gap: var(--xl3); }
.foot-brand { display: grid; gap: var(--sm); align-content: start; }
.foot-brand p { color: var(--mute); max-width: 32ch; line-height: 1.4; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--xl); }
.foot-cols div { display: grid; gap: 10px; align-content: start; font-size: .9375rem; }
.foot-cols h4 { font: 500 .75rem var(--mono); letter-spacing: 0; color: var(--mute); margin-bottom: 6px; }
.foot-cols a { text-decoration: none; width: max-content; position: relative; }
.foot-cols a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease);
}
.foot-cols a:hover::after { transform: scaleX(1); transform-origin: left; }
.foot-cols span { color: var(--mute); }
.legal { margin-top: var(--xl3); padding-top: var(--md); border-top: 1px solid var(--rule); color: var(--mute); font-size: .75rem; line-height: 1.4; }
.foot-bottom { margin-top: var(--md); display: flex; justify-content: space-between; gap: var(--md); flex-wrap: wrap; color: var(--mute); font-size: .75rem; }
