/* Jot's site. One page, no build step: tokens on :root, light and dark from the system.
   The panel in the hero takes its colors from the app's themes (app/ui/theme.json, themes.json), set by main.js as
   --p-* on the stage. */

:root {
  --bg: #f5f5f8;
  --bg-2: #ebebf1;
  --card: #ffffff;
  --fg: #121327;
  --muted: #5a5d72;
  --faint: #6f7287;
  --line: rgba(18, 19, 39, 0.09);
  --line-2: rgba(18, 19, 39, 0.16);
  /* macOS system blue: #007AFF fills; text in blue uses the deeper ink, which reads at AA on the page. */
  --accent: #007aff;
  --accent-ink: #0066cc;
  --on-accent: #ffffff;
  --agent: #a64818;
  --code: rgba(18, 19, 39, 0.055);
  --shadow: 0 1px 2px rgba(30, 32, 80, 0.06), 0 12px 32px -12px rgba(30, 32, 80, 0.18);
  /* The logo keeps the brand's inks (design/logo/loop/README.md): indigo, lilac on dark. The UI is blue. */
  --logo-sym: #2b2f8f;
  /* Filled buttons: Apple's button blue, deep enough for white text (4.6:1). */
  --btn: #0071e3;
  --btn-hover: #0077ed;
  --logo-word: #15162b;

  --key-top: #fdfdfe;
  --key-bot: #e9eaf1;
  --key-edge: rgba(18, 19, 39, 0.1);
  --key-depth: #cfd1dd;
  --key-fg: #2a2c3c;

  --wall:
    radial-gradient(60% 70% at 8% 0%, #a9cbff 0%, transparent 60%),
    radial-gradient(50% 60% at 62% 18%, #d3e6ff 0%, transparent 62%),
    radial-gradient(60% 70% at 100% 100%, #bfeaff 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, #d9e4ff 0%, transparent 60%),
    #e7eef9;

  --serif: "New York", ui-serif, "Iowan Old Style", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.08);
  --r: 24px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0f;
    --bg-2: #111318;
    --card: #14161c;
    --fg: #ecedf5;
    --muted: #a0a4b4;
    --faint: #848898;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.15);
    --accent: #0a84ff;
    --accent-ink: #4ea1ff;
    --on-accent: #ffffff;
    --agent: #ffb183;
    --code: rgba(255, 255, 255, 0.07);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
    --logo-sym: #9ea2ff;
    --logo-word: #f3f3f8;

    --key-top: #2b2c38;
    --key-bot: #1e1f29;
    --key-edge: rgba(255, 255, 255, 0.09);
    --key-depth: #0c0c13;
    --key-fg: #e3e4ee;

    --wall:
      radial-gradient(60% 70% at 0% 0%, #1550b8 0%, transparent 62%),
      radial-gradient(50% 60% at 55% 30%, #0c2a6b 0%, transparent 62%),
      radial-gradient(60% 70% at 100% 100%, #0b5a7a 0%, transparent 62%),
      radial-gradient(40% 50% at 0% 100%, #102a66 0%, transparent 60%),
      #0b1530;
  }
}

/* Language: every one is in the markup; the root's data-lang hides the others. */
html:not([data-lang="en"]) [data-en],
html:not([data-lang="zh"]) [data-zh],
html:not([data-lang="zh-Hant"]) [data-zh-hant],
html:not([data-lang="ja"]) [data-ja] { display: none !important; }
/* Traditional Chinese and Japanese take their own glyphs before the Simplified ones. */
[data-lang="zh-Hant"] {
  --serif: "New York", ui-serif, "Iowan Old Style", "Songti TC", "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Helvetica Neue", "Segoe UI", "Microsoft JhengHei", sans-serif;
}
[data-lang="ja"] {
  --serif: "New York", ui-serif, "Iowan Old Style", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Helvetica Neue", "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

/* Type. */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
html:not([data-lang="en"]) .display { letter-spacing: 0; line-height: 1.14; }
.nb { display: inline-block; }
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
  text-wrap: balance;
}
html:not([data-lang="en"]) .h2 { letter-spacing: 0; }
.h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 22px auto 0; text-wrap: pretty; }
.body { font-size: 18px; color: var(--muted); max-width: 34em; margin: 0; text-wrap: pretty; }
.small { font-size: 15px; color: var(--muted); margin: 0; text-wrap: pretty; }
.fine { font-size: 13px; color: var(--faint); max-width: 44em; margin: 28px auto 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.body code, .fine code, .small code {
  font-size: 0.86em; background: var(--code); padding: 0.12em 0.4em; border-radius: 6px; color: var(--fg);
}

/* Buttons. Pills everywhere something is pressed; 24px cards; the panel keeps the app's own radii. */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 22px;
  border-radius: var(--pill); border: 0;
  background: var(--btn); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.25s var(--ease);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 8px 20px -10px rgba(0, 90, 200, 0.6);
}
.btn:hover { transform: translateY(-1px); background: var(--btn-hover); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn .ic { font-size: 17px; }
.btn-small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-ghost {
  background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: var(--code); color: var(--fg); }
.btn-ghost[disabled] { opacity: 0.55; cursor: default; transform: none; }

.cmd {
  display: inline-flex; align-items: center; gap: 12px;
  height: 46px; max-width: 100%; padding: 0 16px 0 20px;
  border-radius: var(--pill); border: 0;
  background: var(--code); box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
}
.cmd:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.cmd code { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-dim { color: var(--faint); }
.cmd-ic { font-size: 16px; color: var(--muted); }
.cmd.is-copied .cmd-ic { color: var(--accent); }

.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* Nav. */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-in {
  max-width: 1200px; margin: 0 auto; height: 64px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; }
.brand-mark { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  border-radius: var(--pill); border: 0; background: none;
  color: var(--muted); font-size: 14px; text-decoration: none; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--fg); background: var(--code); }
.nav-link .ic { font-size: 16px; }
/* The language menu: a native select laid over the globe and the language's name. */
.lang-pick { position: relative; }
.lang-pick select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 16px; border: 0;
}
.lang-pick:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero. */
main { overflow-x: clip; }
.hero { padding: clamp(48px, 8vh, 88px) var(--gutter) 0; }
.hero-copy { max-width: 900px; margin: 0 auto; text-align: center; }
.kbd-inline {
  display: inline-grid; place-items: center;
  font-family: var(--sans); font-size: 0.62em; line-height: 1;
  width: 1.5em; height: 1.5em; vertical-align: 0.12em; margin: 0 0.04em;
  border-radius: 0.3em;
  background: linear-gradient(var(--key-top), var(--key-bot));
  box-shadow: inset 0 0 0 1px var(--key-edge), 0 0.09em 0 var(--key-depth);
  color: var(--key-fg);
}

/* The desktop the panel is summoned onto. */
.stage {
  position: relative;
  max-width: 1160px; margin: clamp(44px, 7vh, 72px) auto 0;
  height: clamp(560px, 62vw, 700px);
  border-radius: 32px; overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  user-select: none; -webkit-user-select: none;
}
.wall { position: absolute; inset: 0; background: var(--wall); z-index: -1; }
.wall::after {
  /* A slow drift of the light, so the glass has something to refract. */
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(30% 30% at 50% 50%, rgba(255, 255, 255, 0.35), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
  mix-blend-mode: soft-light;
}
@keyframes drift { from { transform: translate(-18%, -10%); } to { transform: translate(22%, 14%); } }

.keys {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: auto auto; gap: 18px;
  place-content: start center; justify-items: center; padding-top: clamp(64px, 13%, 120px);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease), filter 0.35s;
}
.stage[data-state="open"] .keys { opacity: 0; transform: scale(0.92); filter: blur(6px); pointer-events: none; }
.key {
  position: relative; width: 116px; height: 116px;
  border: 0; border-radius: 20px; cursor: pointer;
  background: linear-gradient(170deg, var(--key-top), var(--key-bot));
  color: var(--key-fg);
  box-shadow:
    inset 0 0 0 1px var(--key-edge),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 7px 0 -1px var(--key-depth),
    0 18px 34px -10px rgba(20, 20, 60, 0.35);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
@media (prefers-color-scheme: dark) { .key { box-shadow: inset 0 0 0 1px var(--key-edge), inset 0 1px 0 rgba(255,255,255,.08), 0 7px 0 -1px var(--key-depth), 0 18px 34px -10px rgba(0,0,0,.6); } }
.key:hover { transform: translateY(-1px); }
.key.is-down {
  transform: translateY(5px);
  box-shadow: inset 0 0 0 1px var(--key-edge), 0 2px 0 -1px var(--key-depth), 0 8px 16px -8px rgba(20, 20, 60, 0.3);
}
.key.is-lit::after {
  content: ""; position: absolute; inset: -6px; border-radius: 25px;
  box-shadow: 0 0 0 2px var(--p-primary, var(--accent));
  animation: lit 0.6s var(--ease) forwards;
}
@keyframes lit { from { opacity: 1; transform: scale(0.96); } to { opacity: 0; transform: scale(1.08); } }
.key-glyph { position: absolute; top: 14px; right: 16px; font-size: 26px; line-height: 1; }
.key-name { position: absolute; bottom: 13px; right: 16px; font-size: 13px; letter-spacing: 0.01em; opacity: 0.6; }
.keys-hint {
  grid-column: 1 / -1; margin: 22px 0 0; font-size: 14px;
  color: color-mix(in srgb, var(--fg) 70%, transparent);
}
.keys-hint b { font-weight: 600; }

/* The panel: a copy of Jot's, in its proportions (the app's macOS tokens). */
.panel {
  --p-radius: 28px;
  position: absolute; left: 50%; top: 9%;
  width: min(640px, calc(100% - 32px));
  transform: translateX(-50%);
  border-radius: var(--p-radius);
  background: var(--p-fill);
  color: var(--p-fg);
  backdrop-filter: blur(34px) saturate(1.7); -webkit-backdrop-filter: blur(34px) saturate(1.7);
  box-shadow:
    inset 0 0 0 1px var(--p-edge, rgba(255, 255, 255, 0.3)),
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 30px 80px -20px var(--p-shadow, rgba(30, 40, 80, 0.35));
  user-select: text; -webkit-user-select: text;
  transition: border-radius 0.4s var(--spring);
}
.panel[hidden] { display: block; visibility: hidden; }
.panel.is-in { animation: summon 0.5s var(--spring) both; }
.panel.is-out { animation: dismiss 0.26s var(--ease) both; }
@keyframes summon { from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.94); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes dismiss { to { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(0.96); } }
.panel.is-capsule { --p-radius: 33px; }

.field { display: flex; align-items: center; gap: 14px; height: 66px; padding: 0 24px; }
.field-ic { font-size: 21px; color: var(--p-muted); }
.field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none;
  font: 400 22px/1 var(--sans); color: var(--p-fg); letter-spacing: -0.01em;
  caret-color: var(--p-primary);
}
.field input::placeholder { color: var(--p-muted); }

.panel-body {
  height: 0; overflow: hidden;
  transition: height 0.46s var(--spring);
}
.panel-in { padding: 4px 8px 6px; max-height: 410px; overflow-y: auto; scrollbar-width: none; }
.panel-in::-webkit-scrollbar { display: none; }

.row {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 14px;
  height: 54px; padding: 0 14px; border-radius: 14px;
  cursor: default; position: relative;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
/* A view showing for the first time: its rows rise in, one after another. */
.is-fresh > .row, .is-fresh > .group, .is-fresh > .trow-p { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 26ms); }
.is-fresh > .ppaper { animation: rise 0.4s var(--ease) both; }
.row:hover { background: var(--p-hover); }
.row.is-sel { background: var(--p-primary); color: var(--p-on); }
.row-ic {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center; font-size: 17px;
  background: color-mix(in srgb, var(--p-fg) 7%, transparent); color: var(--p-fg);
}
.row-ic.is-agent { background: color-mix(in srgb, var(--p-agent) 18%, transparent); color: var(--p-agent); }
.row-ic.is-todo { background: color-mix(in srgb, var(--p-primary) 16%, transparent); color: var(--p-due); }
.row.is-sel .row-ic { background: color-mix(in srgb, var(--p-on) 22%, transparent); color: var(--p-on); }
.row-t { min-width: 0; line-height: 1.25; }
.row-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row.is-sel .row-sub { color: color-mix(in srgb, var(--p-on) 86%, transparent); }
.row-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--p-muted); white-space: nowrap; }
.row.is-sel .row-meta { color: var(--p-on); }
.row-src { color: var(--p-agent-ink); font-weight: 500; }
.row.is-sel .row-src { color: var(--p-on); }
.row.is-new { animation: arrive 0.7s var(--spring) both; }
@keyframes arrive {
  0% { opacity: 0; transform: translateY(-10px) scale(0.98); background: color-mix(in srgb, var(--p-agent) 26%, transparent); }
  60% { opacity: 1; transform: none; background: color-mix(in srgb, var(--p-agent) 16%, transparent); }
  100% { background: transparent; }
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }

/* The to-do view. */
.group { display: flex; gap: 8px; font-size: 13px; font-weight: 600; color: var(--p-muted); padding: 12px 16px 4px; }
.group.is-late { color: var(--p-late); }
.group b { font-weight: 500; opacity: 0.8; }
.trow-p {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 14px; border-radius: 14px;
  transition: opacity 0.35s, transform 0.45s var(--ease);
}
.trow-p:hover { background: var(--p-hover); }
.trow-p.is-sel { background: color-mix(in srgb, var(--p-primary) 22%, transparent); }
.trow-p.is-done { opacity: 0; transform: translateX(16px); }
.tick {
  width: 22px; height: 22px; border-radius: 50%; flex: none; cursor: pointer; padding: 0;
  border: 0; background: none; box-shadow: inset 0 0 0 1.75px color-mix(in srgb, var(--p-fg) 55%, transparent);
  display: grid; place-items: center; color: var(--p-on); position: relative;
  transition: box-shadow 0.2s, background 0.25s var(--spring), transform 0.2s var(--spring);
}
.tick .ic { font-size: 13px; stroke-width: 3; opacity: 0; transform: scale(0.4); transition: 0.3s var(--spring); }
.tick:hover { box-shadow: inset 0 0 0 1.75px var(--p-primary); }
.tick.is-on { background: var(--p-primary); box-shadow: none; transform: scale(1.06); }
.tick.is-on .ic { opacity: 1; transform: none; }
.tick.is-on::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid var(--p-primary); animation: burst 0.5s var(--ease) forwards;
}
@keyframes burst { from { opacity: 0.8; transform: scale(0.6); } to { opacity: 0; transform: scale(1.4); } }
.trow-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s; }
.trow-p.is-ticked .trow-title { text-decoration: line-through; color: var(--p-muted); }
.trow-note { font-size: 13px; color: var(--p-muted); white-space: nowrap; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.pchip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--pill); font-size: 13px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--p-primary) 14%, transparent); color: var(--p-due);
  font-variant-numeric: tabular-nums;
}
.pchip.is-late { background: color-mix(in srgb, var(--p-late) 14%, transparent); color: var(--p-late); }

/* A note open in the panel: Jot's paper. */
.ppaper {
  margin: 2px 8px 6px; padding: 22px 26px; border-radius: 20px; min-height: 250px;
  background: var(--p-paper); color: var(--p-paper-fg);
  box-shadow: 0 0 0 1px var(--p-line);
}
.ppaper h4 { margin: 0 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--p-paper-fg); }
.ppaper p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; }
.ppaper .pl-todo { display: flex; align-items: center; gap: 10px; }
.ppaper .pl-todo i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--p-paper-muted); flex: none; }
.ppaper code { font-size: 13px; background: color-mix(in srgb, var(--p-paper-fg) 7%, transparent); padding: 2px 6px; border-radius: 6px; }
.ppaper textarea {
  width: 100%; min-height: 150px; resize: none; border: 0; outline: 0; background: none; padding: 0;
  font: 15px/1.6 var(--sans); color: var(--p-paper-fg); caret-color: var(--p-primary);
}
.ppaper textarea::placeholder { color: var(--p-paper-muted); }
.psrc { font-size: 12px; font-weight: 600; color: var(--p-agent-ink); margin: -4px 0 12px; }

.panel-foot { display: flex; align-items: center; justify-content: space-between; height: 0; overflow: hidden; padding: 0 10px; transition: height 0.4s var(--spring); }
.panel.is-open .panel-foot { height: 62px; }
.gear {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px;
  color: var(--p-muted); box-shadow: inset 0 0 0 1px var(--p-line);
}
.hints {
  display: inline-flex; align-items: center; gap: 18px; height: 40px; padding: 0 8px 0 16px;
  border-radius: var(--pill); box-shadow: inset 0 0 0 1px var(--p-line); font-size: 14px;
}
.hints span { display: inline-flex; align-items: center; gap: 8px; }
.hints kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 7px; font: 500 13px var(--sans); color: var(--p-muted);
  box-shadow: inset 0 0 0 1px var(--p-line); background: color-mix(in srgb, var(--p-fg) 5%, transparent);
}
.hints kbd .ic { font-size: 14px; }

/* AI cursors on the stage. */
.cursors { position: absolute; inset: 0; pointer-events: none; }
.acur {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: flex-start; gap: 2px;
  transition: transform 1.25s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s;
  will-change: transform;
}
.acur .ic { font-size: 22px; fill: var(--c); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.acur span {
  margin-top: 16px; padding: 3px 9px; border-radius: var(--pill);
  background: var(--c); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.35);
}
.acur.is-click .ic { animation: press 0.3s var(--ease); }
@keyframes press { 50% { transform: scale(0.82); } }

/* Sections. */
section { scroll-margin-top: 72px; }
.ai, .todo, .more, .get { max-width: 1200px; margin: 0 auto; padding: clamp(96px, 14vh, 160px) var(--gutter) 0; }

/* AI apps. */
.ai { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.asks { display: grid; gap: 4px; margin-top: 36px; }
.ask {
  text-align: left; border: 0; background: none; cursor: pointer;
  padding: 16px 20px; border-radius: 18px; position: relative;
  transition: background 0.25s;
}
.ask:hover { background: var(--code); }
.ask-app { display: block; font-size: 13px; font-weight: 600; color: var(--faint); margin-bottom: 4px; transition: color 0.25s; }
.ask-q { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--faint); transition: color 0.25s; }
.ask.is-on { background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.ask.is-on .ask-q { color: var(--fg); }
.ask.is-on .ask-app { color: var(--agent); }
.ask-bar { position: absolute; left: 20px; right: 20px; bottom: 8px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; opacity: 0; }
.ask.is-on .ask-bar { opacity: 1; }
.ask-bar i { display: block; height: 100%; width: 100%; background: var(--agent); transform-origin: left; transform: scaleX(0); }
.ask.is-on.is-auto .ask-bar i { animation: fill var(--dur, 6s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.ai-demo {
  position: relative; padding: clamp(28px, 4vw, 48px); border-radius: 32px; overflow: hidden; isolation: isolate;
  background: var(--wall); box-shadow: inset 0 0 0 1px var(--line);
  min-height: 460px; display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.call {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 8px 14px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 13px var(--mono); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.call b { font: 600 13px var(--sans); color: var(--agent); }
.call em { font-style: normal; color: var(--fg); }
.paper {
  background: var(--card); border-radius: 20px; padding: 28px 30px; min-height: 250px;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.paper h4 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.paper .src { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--agent); margin-bottom: 16px; }
.paper .src .ic { font-size: 13px; }
.paper p { margin: 0 0 10px; color: var(--fg); min-height: 1.6em; }
.paper pre {
  margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--code);
  font: 13.5px/1.5 var(--mono); white-space: pre; overflow-x: auto; scrollbar-width: none;
}
.paper .pl-todo { display: flex; align-items: center; gap: 12px; }
.paper .pl-todo > i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.75px var(--faint); flex: none; }
.paper .chip { margin-left: auto; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -0.18em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.paper .new { animation: rise 0.45s var(--ease) both; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--pill); font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-ink);
  font-family: var(--sans); font-variant-numeric: tabular-nums; vertical-align: 0.05em;
}
.chip .ic { font-size: 14px; }

/* To-dos. */
.todo { text-align: center; }
.todo .body { margin-bottom: 48px; }
.tparse { max-width: 760px; margin: 0 auto; }
.tline {
  display: flex; align-items: center; gap: 18px;
  height: 82px; padding: 0 30px; border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  cursor: text; transition: box-shadow 0.25s;
}
.tline:focus-within { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent); }
.tbox { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); flex: none; }
.tline input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 400 clamp(19px, 2.4vw, 25px) var(--sans); color: var(--fg); letter-spacing: -0.01em; caret-color: var(--accent);
}
.tout { display: grid; gap: 14px; margin-top: 18px; text-align: left; }
.tfile {
  display: flex; align-items: center; gap: 14px; padding: 0 30px; min-height: 30px;
  font-size: 13px; color: var(--faint);
}
.tfile code { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.tfile code b { color: var(--fg); font-weight: 600; }
.tfile-name { flex: none; width: 5.5em; }
.trow { display: flex; align-items: center; gap: 14px; padding: 0 30px; min-height: 34px; font-size: 17px; }
.trow .chip { margin-left: auto; }
.trow .is-none { color: var(--faint); font-size: 14px; }
.trow .chip { animation: pop 0.4s var(--spring); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 40px 0 28px; }
.tchip {
  height: 36px; padding: 0 16px; border-radius: var(--pill); border: 0; cursor: pointer;
  background: var(--code); color: var(--muted); font-size: 14px;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.tchip:hover { color: var(--fg); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tchip:active { transform: scale(0.97); }

/* The grid of the rest. */
.more .h2 { margin-bottom: 44px; }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cell {
  border-radius: var(--r); padding: 30px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 340px;
}
.cell > :first-child { margin-bottom: auto; }
.cell-md { grid-column: span 2; }
.cell-lock { grid-column: span 2; }
.cell-files { background: var(--bg-2); }
.cell-themes { background: var(--wall); }
.cell-themes .small { color: color-mix(in srgb, var(--fg) 72%, transparent); }

.md { padding-top: 6px; }
.md-line {
  margin: 0; padding: 7px 12px; border-radius: 10px; font-size: 17px; line-height: 1.5; outline: 0;
  transition: background 0.2s; cursor: text;
}
.md-line:hover, .md-line:focus { background: var(--code); }
.md-h { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; }
.md-line a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.md-line code { font-size: 14.5px; background: var(--code); padding: 2px 7px; border-radius: 6px; }
.md-box { display: inline-block; width: 17px; height: 17px; border-radius: 50%; box-shadow: inset 0 0 0 1.75px var(--faint); vertical-align: -0.2em; margin-right: 10px; }
.mk { display: none; color: var(--faint); font-weight: 400; font-family: var(--mono); font-size: 0.86em; }
.md-line:hover .mk, .md-line:focus .mk { display: inline; }
.md-line:hover .md-box, .md-line:focus .md-box,
.md-line:hover .chip, .md-line:focus .chip { display: none; }
.md-line .chip { margin-left: 8px; }

.files { font: 14px/1.5 var(--mono); padding-top: 4px; }
.files-dir { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 10px; }
.files-dir .ic { font-size: 16px; }
.files-f { padding: 6px 0 6px 24px; border-left: 1px solid var(--line-2); margin-left: 7px; color: var(--fg); position: relative; }
.files-f::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1px; background: var(--line-2); }
.files-fm { display: block; font-size: 12px; color: var(--agent); }

.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw {
  width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; position: relative;
  background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px -2px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--spring);
}
.sw::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--sw-fg); }
.sw:hover { transform: scale(1.08); }
.sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.mini {
  margin: 22px 0 18px; padding: 8px; border-radius: 18px;
  background: var(--p-fill); color: var(--p-fg);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--p-edge, rgba(255,255,255,.3)), 0 14px 30px -14px rgba(0, 0, 0, 0.35);
  transition: background 0.4s, color 0.4s;
}
.mini-row { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; transition: background 0.4s, color 0.4s; }
.mini-row span { flex: 1; }
.mini-row em { font-style: normal; font-size: 12px; color: var(--p-muted); }
.mini-row.is-sel { background: var(--p-primary); color: var(--p-on); }
.mini-row.is-sel em { color: var(--p-on); }
.mini-agent { color: var(--p-agent); }
.mini-tag { color: var(--p-agent-ink) !important; font-weight: 600; }

.cell-lock { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto auto; column-gap: 24px; align-items: start; }
.cell-lock > .h3, .cell-lock > .small { grid-column: 1 / -1; }
.cell-lock > :first-child { margin-bottom: 0; }
.lock-btn {
  width: 64px; height: 64px; border-radius: 20px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 26px;
  background: var(--code); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--spring);
}
.lock-btn:hover { color: var(--fg); }
.lock-btn:active { transform: scale(0.94); }
.lock-btn .lock-on { display: none; }
.cell-lock[data-locked="true"] .lock-btn { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.cell-lock[data-locked="true"] .lock-on { display: block; }
.cell-lock[data-locked="true"] .lock-off { display: none; }
.lock-note { min-width: 0; padding: 20px 22px; margin-bottom: 24px; border-radius: 18px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.lock-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.lock-line { font-family: var(--mono); font-size: 14px; color: var(--muted); margin-top: 4px; }
.lock-agent { margin-top: 14px; min-height: 26px; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--agent); }
.lock-agent .ic { font-size: 15px; }
.lock-agent.is-denied { animation: deny 0.45s var(--ease); }
@keyframes deny { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.lock-agent .add { color: var(--fg); font-family: var(--mono); font-size: 13px; }

/* Install. */
.get { text-align: center; padding-bottom: clamp(96px, 14vh, 150px); }
.get-icon { display: block; width: 112px; height: 112px; margin: 0 auto 32px; }
.get-icon img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 30px rgba(0, 90, 200, 0.26)); }
.get .body { margin-top: 22px; }

.foot { border-top: 1px solid var(--line); }
.foot-in {
  max-width: 1200px; margin: 0 auto; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center;
  font-size: 14px; color: var(--faint);
}
.foot-in > span { color: var(--fg); font-weight: 600; margin-right: auto; }
.foot a, .foot button { color: var(--faint); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
.foot a:hover, .foot button:hover { color: var(--fg); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.foot-langs button[aria-current="true"] { color: var(--fg); }

/* The notch island, for a reminder that comes due. */
.island {
  position: fixed; left: 50%; top: 10px; z-index: 40;
  width: 128px; height: 36px; border-radius: 20px;
  background: #050507; color: #fff;
  transform: translateX(-50%) translateY(-60px); opacity: 0;
  transition: transform 0.5s var(--spring), opacity 0.3s, width 0.56s var(--spring), height 0.56s var(--spring), border-radius 0.56s var(--spring);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.island.is-peek { transform: translateX(-50%); opacity: 1; }
.island.is-open { width: min(380px, calc(100vw - 32px)); height: 72px; border-radius: 30px; }
.island-in {
  display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 14px 0 16px;
  opacity: 0; transition: opacity 0.25s 0.1s;
}
.island.is-open .island-in { opacity: 1; }
.island-bell {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 19px;
  background: conic-gradient(from 200deg, #ff9f43, #ff5e8a, #b07cff, #4fa8ff, #ffcf5c, #ff9f43);
  animation: ring 0.8s var(--ease) 0.35s;
}
.island-bell .ic { color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
@keyframes ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
.island-t { flex: 1; min-width: 0; text-align: left; line-height: 1.25; }
.island-t small { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.58); }
.island-t b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island-done {
  height: 34px; padding: 0 14px; border-radius: var(--pill); border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.island-done:hover { background: rgba(255, 255, 255, 0.22); }
.island-done .ic { font-size: 14px; stroke-width: 3; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--pill);
  background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 600;
  transition: transform 0.4s var(--spring), opacity 0.25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Reveal on scroll. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Narrow screens: one column, the stage shorter, the keys smaller. */
@media (max-width: 900px) {
  .ai { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .cell-md, .cell-lock { grid-column: auto; }
  .cell { min-height: 0; }
  .cell > :first-child { margin-bottom: 24px; }
}
@media (max-width: 640px) {
  .nav-link span { display: none; }
  .stage { height: 600px; border-radius: 24px; margin-top: 40px; }
  .key { width: 92px; height: 92px; border-radius: 17px; }
  .key-glyph { font-size: 22px; top: 11px; right: 13px; }
  .keys-hint { max-width: 260px; text-align: center; }
  .panel { top: 4%; }
  .field { height: 56px; padding: 0 18px; }
  .field input { font-size: 18px; }
  .row { grid-template-columns: 30px 1fr; gap: 12px; padding: 0 10px; }
  .row-meta { display: none; }
  .trow-note { display: none; }
  .hints span:last-child { display: none; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  .cmd { justify-content: space-between; }
  .tline { height: 68px; padding: 0 20px; }
  .tfile, .trow { padding: 0 8px; }
  .tfile { flex-direction: column; align-items: flex-start; gap: 2px; }
  .trow { font-size: 16px; }
  .ask-q { font-size: 19px; }
  .ai-demo { min-height: 0; padding: 20px; }
  .paper { padding: 22px; }
  .cell { padding: 24px; }
  .cell-lock { grid-template-columns: 1fr; }
  .lock-btn { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .wall::after { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .mini, .call, .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .panel, .mini { background: var(--p-paper); }
}
