/* ---------- Tokens ---------- */
:root {
  --bg: #FAF8F2;
  --ink: #21201C;
  --ink-2: #6F6B62;
  --ink-3: #746E64;
  --accent: #C4622C;
  --accent-deep: #A64D1B;
  --accent-ink: #FFF6EA;
  --hairline: rgb(33 32 28 / 0.10);

  /* dashboard mock */
  --panel: #FCFCFC;
  --panel-card: #F3F3F1;
  --panel-ink: #1D1D1F;
  --panel-ink-2: #7A7A7E;
  --panel-track: rgb(0 0 0 / 0.10);
  --panel-hairline: rgb(0 0 0 / 0.09);
  --picker-track: #EAEAE8;
  --picker-pill: #FFFFFF;
  --menubar: rgb(252 251 247 / 0.85);
  --menubar-ink: #1D1D1F;
  --donut-cursor: #13120A;
  --donut-grok: #8E8E93;

  --meter-ok: #007AFF;
  --meter-warn: #E7B800;
  --meter-crit: #FF3B30;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B1C1F;
    --ink: #F0EEE7;
    --ink-2: #979593;
    --ink-3: #8C8C90;
    --accent: #E0813F;
    --accent-deep: #E0813F;
    --accent-ink: #211508;
    --hairline: rgb(240 238 231 / 0.12);

    --panel: #28292C;
    --panel-card: #313236;
    --panel-ink: #F2F2F3;
    --panel-ink-2: #9C9CA1;
    --panel-track: rgb(255 255 255 / 0.14);
    --panel-hairline: rgb(255 255 255 / 0.10);
    --picker-track: rgb(255 255 255 / 0.09);
    --picker-pill: #46474C;
    --menubar: #2D2E31;
    --menubar-ink: #EDEDEF;
    --donut-cursor: #F5F5F7;
    --donut-grok: #98989D;
  }
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.num { font-variant-numeric: tabular-nums; }
.mono.as-is { text-transform: none; }

/* ---------- Header ---------- */
header { padding: 28px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; text-decoration: none; }
.wordmark svg { width: 22px; height: 22px; color: var(--accent); }
.gh-link { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.gh-link:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 0; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 5.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 750;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 46ch;
}
.cta-row { display: flex; align-items: center; gap: 22px; margin-top: 36px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-deep); color: var(--accent-ink);
  font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn svg { width: 15px; height: 15px; }
.link-quiet { font-size: 15px; font-weight: 550; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 1px; }
.link-quiet:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- Dashboard mock ---------- */
.stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.menubar {
  display: flex; align-items: center; gap: 14px;
  background: var(--menubar); color: var(--menubar-ink);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
}
.menubar .seg { display: flex; align-items: center; gap: 5px; }
.menubar svg { width: 14px; height: 14px; opacity: 0.85; }
.menubar .div { width: 1px; height: 14px; background: currentColor; opacity: 0.22; }
.menubar .clock { font-weight: 600; opacity: 0.9; }

.panel {
  width: 320px;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 13px;
  box-shadow: 0 18px 44px rgb(0 0 0 / 0.16), 0 2px 8px rgb(0 0 0 / 0.08);
  padding-top: 12px;
  font-size: 12px;
}
.panel .inner { padding: 0 14px; }

.p-header { display: flex; align-items: center; gap: 6px; padding: 0 8px 6px; font-size: 13px; font-weight: 600; }
.p-header .badge { font-size: 10px; font-weight: 400; color: var(--panel-ink-2); }
.p-header svg.mark { width: 14px; height: 14px; color: var(--panel-ink-2); }
.p-header svg.chev { width: 9px; height: 9px; color: var(--panel-ink-2); margin-top: 1px; }

.card { background: var(--panel-card); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }

/* segmented picker */
.picker { display: flex; gap: 2px; background: var(--picker-track); border-radius: 999px; padding: 3px; width: max-content; margin: 0 auto 14px; }
.picker span { font-size: 11px; font-weight: 500; color: var(--panel-ink-2); padding: 4px 12px; border-radius: 999px; }
.picker .on { background: var(--picker-pill); color: var(--panel-ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }

/* donut + legend */
.spend { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 104px; height: 104px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 20; }
.donut .c-claude { stroke: #DE7356; }
.donut .c-codex { stroke: #10A37F; }
.donut .c-cursor { stroke: var(--donut-cursor); }
.donut .c-grok { stroke: var(--donut-grok); }
.donut .center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut .center b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut .center i { font-style: normal; font-size: 9px; font-weight: 500; color: var(--panel-ink-2); }
.legend { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.legend div { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend b { font-weight: 500; }
.legend em { font-style: normal; margin-left: auto; color: var(--panel-ink-2); font-variant-numeric: tabular-nums; }

/* metric rows */
.row { padding: 5px 0; }
.row + .row { padding-top: 9px; }
.row .top, .row .bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.row .top b { font-size: 12px; font-weight: 600; }
.row .top span { font-size: 11px; color: var(--panel-ink-2); }
.row .flame { display: inline-flex; align-items: center; gap: 4px; }
.row .flame svg { width: 9px; height: 11px; color: var(--meter-crit); align-self: center; }
.row .bottom { margin-top: 3px; font-size: 11px; }
.row .bottom span { color: var(--panel-ink-2); font-variant-numeric: tabular-nums; }
.row .bottom b { font-weight: 400; font-variant-numeric: tabular-nums; }

.meter { position: relative; height: 4px; border-radius: 999px; background: var(--panel-track); margin: 6px 0 0; }
.meter i {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--w);
  border-radius: 999px;
  min-width: 4px;
}
.meter .tick {
  position: absolute; top: -2px;
  left: var(--t);
  width: 2px; height: 8px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--panel-ink) 55%, transparent);
}
.meter .ok { background: var(--meter-ok); }
.meter .warn { background: var(--meter-warn); }
.meter .crit { background: var(--meter-crit); }
@media (prefers-reduced-motion: no-preference) {
  .meter i { animation: fill 0.9s cubic-bezier(0.25, 1, 0.4, 1) backwards; }
  @keyframes fill { from { width: 4px; } }
}

.caret { display: flex; justify-content: center; padding-top: 2px; margin-top: 4px; }
.caret svg { width: 10px; height: 10px; color: var(--panel-ink-2); }

.p-footer {
  margin-top: 4px;
  border-top: 1px solid var(--panel-hairline);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 14px;
  font-size: 11px; color: var(--panel-ink-2);
  font-variant-numeric: tabular-nums;
}
.p-footer .refresh { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.p-footer .refresh svg { width: 10px; height: 10px; }
.p-footer .gear {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-card);
  display: flex; align-items: center; justify-content: center;
}
.p-footer .gear svg { width: 13px; height: 13px; }

/* ---------- Features ---------- */
.features { padding: 128px 0 0; }
.features .grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 56px;
}
.feature h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.feature p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* ---------- Sections ---------- */
.section { padding: 128px 0 0; }
.section h2 { margin-top: 12px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; font-weight: 700; }
.section .lead { margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 58ch; }

/* performance table */
.perf { margin-top: 26px; width: 100%; max-width: 760px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.perf + h2 { margin-top: 40px; }
.section .lead a { color: var(--ink-2); }
.perf th { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); text-align: right; padding: 0 0 10px; }
.perf th:first-child { text-align: left; }
.perf td { padding: 11px 0; border-top: 1px solid var(--hairline); }
.perf td + td { text-align: right; padding-left: 24px; white-space: nowrap; }
.perf .old { color: var(--ink-2); }
.perf .new { font-weight: 650; }
.perf .ratio { font-family: var(--mono); font-size: 12px; color: var(--accent-deep); }
/* menu bar pins mock */
.menubar.big { font-size: 15px; gap: 16px; padding: 11px 18px; border-radius: 12px; }
.menubar.big svg { width: 17px; height: 17px; }
.menubar.big .div { height: 17px; }
.mbars { width: 19px; display: flex; flex-direction: column; gap: 3px; }
.mbars i { position: relative; height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.mbars i b { position: absolute; inset: 0; width: var(--w); background: currentColor; border-radius: 2px; }

/* split rows (memory, iphone) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split .lead { max-width: none; }

/* ios widgets mock */
.widgets { display: flex; gap: 12px; justify-content: center; align-items: stretch; flex-wrap: wrap; }
.widget {
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.14), 0 2px 6px rgb(0 0 0 / 0.07);
  padding: 13px 14px;
  width: 136px; height: 136px;
  display: flex; flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.widget.med { width: 284px; }
.w-head { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--panel-ink-2); }
.w-head svg { width: 11px; height: 11px; }
.w-cap { display: block; font-size: 10px; line-height: 1.3; color: var(--panel-ink-2); }
.w-big { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.w-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; }
.w-row .w-cap { display: inline; }
.w-row b { font-size: 12px; font-weight: 600; }
.w-cols { display: flex; gap: 14px; margin-top: 6px; flex: 1; min-height: 0; }
.w-stack { display: flex; flex-direction: column; justify-content: space-between; }
.w-stack span { display: block; }
.w-stack b { font-size: 12.5px; font-weight: 650; display: block; line-height: 1.25; }
.w-chart { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.w-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; }
.w-bars i { flex: 1; border-radius: 2px; background: var(--meter-ok); height: var(--h); }
.w-updated { font-size: 9px; color: var(--panel-ink-2); text-align: right; margin-top: 5px; }

/* memory window mock */
.memwin {
  width: min(500px, 100%);
  margin: 0 auto;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 13px;
  box-shadow: 0 18px 44px rgb(0 0 0 / 0.16), 0 2px 8px rgb(0 0 0 / 0.08);
  overflow: hidden;
  font-size: 12px;
}
.memwin .titlebar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; }
.memwin .titlebar i { width: 11px; height: 11px; border-radius: 50%; }
.memwin .titlebar .t { margin: 0 auto; transform: translateX(-24px); font-size: 12px; font-weight: 600; color: var(--panel-ink-2); }
.memwin .cols { display: grid; grid-template-columns: 152px 1fr; border-top: 1px solid var(--panel-hairline); }
.memwin .side { background: var(--panel-card); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.memwin .side .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--panel-ink-2); padding: 0 9px 6px; }
.memwin .side div { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; border-radius: 6px; font-size: 11.5px; }
.memwin .side div.on { background: color-mix(in srgb, var(--panel-ink) 9%, transparent); font-weight: 600; }
.memwin .side em { font-style: normal; font-size: 9px; color: var(--panel-ink-2); font-variant-numeric: tabular-nums; background: var(--panel-track); border-radius: 999px; padding: 1px 6px; }
.memwin .file { padding: 13px 16px 17px; }
.memwin .tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.memwin .tab { font-family: var(--mono); font-size: 10px; color: var(--panel-ink-2); padding: 3px 9px; border-radius: 6px; }
.memwin .tab.on { background: var(--panel-card); color: var(--panel-ink); font-weight: 600; }
.memwin .code { font-family: var(--mono); font-size: 10.5px; line-height: 2; color: var(--panel-ink-2); white-space: nowrap; overflow: hidden; }
.memwin .code .h { color: var(--panel-ink); font-weight: 600; }
.memwin .code .h + .h-gap { margin-top: 8px; }

/* ---------- Download ---------- */
.download { padding: 140px 0 150px; text-align: center; }
.download img {
  width: 108px; height: 108px;
  border-radius: 24.5%; /* the macOS squircle is applied by the OS; approximate it here */
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.16), 0 1px 3px rgb(0 0 0 / 0.10);
}
.download h2 { margin-top: 10px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; font-weight: 720; }
.download .sub { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.download .btn { margin-top: 26px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--hairline); padding: 26px 0 40px; }
footer .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
footer .wordmark { font-size: 14px; }
footer .wordmark svg { width: 16px; height: 16px; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .push { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 64px; }
  .hero-copy { text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .features .grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 44px; }
}
@media (min-width: 921px) {
  .split.flip > :first-child { order: 2; }
  .split.flip > :last-child { order: 1; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(40px, 11vw, 52px); }
  .features .grid { grid-template-columns: 1fr; }
  .perf td + td { padding-left: 12px; }
}
