:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-soft: #0b111c;
  --surface: rgba(13, 22, 36, 0.72);
  --surface-strong: rgba(15, 25, 42, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f8fb;
  --muted: #a6afbd;
  --mint: #0a84ff;
  --mint-strong: #409cff;
  --on-accent: #ffffff;
  --indigo: #506dc9;
  /* Per-tool bar colors as rendered over dark panels: Codex keeps its brand
     blue in both appearances; Claude Code is OKLab hue 55° and OpenCode is
     achromatic at the dark-panel lightness. */
  --tool-codex: #4144f5;
  --tool-claude: #f5ab77;
  --tool-opencode: #bebebe;
  --max: 1320px;
  --page-pad: clamp(22px, 5vw, 76px);
  --radius: 24px;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

.desktop-experience {
  display: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #eaf0f7;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(9, 19, 32, 0.12);
  --line-strong: rgba(9, 19, 32, 0.22);
  --text: #0b1421;
  --muted: #5c6878;
  --mint: #007aff;
  --mint-strong: #006ee6;
  --on-accent: #ffffff;
  --shadow: 0 32px 90px rgba(28, 45, 70, 0.2);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #f4f7fb;
    --bg-soft: #eaf0f7;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --line: rgba(9, 19, 32, 0.12);
    --line-strong: rgba(9, 19, 32, 0.22);
    --text: #0b1421;
    --muted: #5c6878;
    --mint: #007aff;
    --mint-strong: #006ee6;
    --on-accent: #ffffff;
    --shadow: 0 32px 90px rgba(28, 45, 70, 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(52, 76, 150, 0.18), transparent 30%),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--mint);
  color: #ffffff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main > section,
footer {
  width: min(100%, calc(var(--max) + var(--page-pad) * 2));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), calc(var(--max) + var(--page-pad) * 2));
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(22px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  overflow: visible;
  fill: none;
  stroke: var(--mint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
  filter: drop-shadow(0 0 10px rgba(10, 132, 255, 0.2));
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  color: var(--muted);
  font-size: 14px;
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.control-select {
  position: relative;
}

.control-select::after {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.control-select select {
  min-height: 36px;
  padding: 0 27px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: none;
  background: var(--surface);
  color: var(--text);
  font: 600 12px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  cursor: pointer;
}

.control-select select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

nav a {
  transition: color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding-top: 152px;
  padding-bottom: 110px;
}

.hero-copy {
  position: relative;
  z-index: 6;
  width: min(100%, 920px);
  min-width: 0;
  margin-inline: auto;
  text-align: center;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-right: auto;
  margin-bottom: 24px;
  margin-left: auto;
  font-size: clamp(52px, 4.8vw, 70px);
  font-weight: 720;
  letter-spacing: -0.06em;
  line-height: 1.08;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-copy > p {
  max-width: 720px;
  margin-right: auto;
  margin-bottom: 34px;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.65;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 620;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button svg {
  width: 21px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button span {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: inherit;
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.button-primary {
  background: var(--mint);
  color: var(--on-accent);
  box-shadow: 0 13px 36px rgba(10, 132, 255, 0.22);
}

.button-primary:hover {
  background: var(--mint-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
}

.product-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 68px 0 0;
  perspective: 1200px;
}

.mockup-frame {
  position: relative;
  width: 100%;
}

.product-stage::before {
  position: absolute;
  inset: 4% 7% -3%;
  border-radius: 50%;
  background: rgba(62, 83, 159, 0.18);
  content: "";
  filter: blur(46px);
}

.desktop {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background-color: #151b25;
  background-image: url("./assets/golden-gate-dark.png");
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  transform: none;
}

.desktop::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.055), transparent 28%);
  content: "";
  pointer-events: none;
}

:root[data-theme="light"] .desktop {
  background-color: #d9d7d1;
  background-image: url("./assets/golden-gate-light.jpg");
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .desktop {
    background-color: #d9d7d1;
    background-image: url("./assets/golden-gate-light.jpg");
  }
}

.desktop-bar {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 16px;
  align-items: center;
  height: 29px;
  padding: 0 15px;
  background: rgba(3, 7, 14, 0.78);
  color: rgba(255, 255, 255, 0.88);
  font-size: 9px;
}

.desktop-bar time {
  margin-left: auto;
}

.desktop-apple {
  color: var(--text);
  font-size: 7px;
}

.wallpaper-orbit {
  position: absolute;
  border: 1px solid rgba(128, 161, 255, 0.19);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.codex-window {
  position: absolute;
  z-index: 2;
  top: 68px;
  left: 50%;
  width: 66%;
  height: 60%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 13px;
  background: rgba(15, 18, 24, 0.91);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 75px rgba(0, 0, 0, 0.42);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transform: translateX(-50%);
  backdrop-filter: blur(24px) saturate(125%);
}

.codex-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 23, 30, 0.82);
  font-size: 9px;
}

.traffic-lights {
  display: flex;
  gap: 5px;
}

.traffic-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5f57;
}

.traffic-lights i:nth-child(2) {
  background: #febc2e;
}

.traffic-lights i:nth-child(3) {
  background: #28c840;
}

.window-actions {
  justify-self: end;
  color: rgba(255, 255, 255, 0.52);
}

.codex-shell {
  display: grid;
  grid-template-columns: 25% 1fr;
  height: calc(100% - 34px);
}

.codex-sidebar {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 12, 17, 0.48);
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
}

.codex-sidebar b {
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.codex-account {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
}

.codex-account img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.codex-content {
  position: relative;
  padding: 20px 30px 54px;
  font-size: 9px;
}

.codex-thread-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.codex-thread-title strong {
  font-size: 13px;
}

.codex-thread-title span {
  color: rgba(255, 255, 255, 0.44);
}

.codex-message {
  max-width: 80%;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.45;
}

.user-message {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.09);
}

.assistant-message {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 7px;
  padding-left: 0;
}

.assistant-message p {
  margin: 0;
}

.codex-composer {
  position: absolute;
  right: 28px;
  bottom: 15px;
  left: 28px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.035);
}

.codex-icon-theme {
  display: none;
}

.codex-icon-dark {
  display: block;
}

:root[data-theme="light"] .codex-window {
  border-color: rgba(11, 20, 33, 0.18);
  background: rgba(247, 248, 251, 0.9);
  color: rgba(11, 20, 33, 0.9);
  box-shadow: 0 26px 75px rgba(33, 41, 54, 0.24);
}

:root[data-theme="light"] .codex-titlebar,
:root[data-theme="light"] .codex-sidebar {
  border-color: rgba(11, 20, 33, 0.1);
  background: rgba(237, 239, 244, 0.74);
}

:root[data-theme="light"] .window-actions,
:root[data-theme="light"] .codex-sidebar {
  color: rgba(11, 20, 33, 0.5);
}

:root[data-theme="light"] .codex-sidebar b,
:root[data-theme="light"] .codex-account {
  border-color: rgba(11, 20, 33, 0.12);
  color: rgba(11, 20, 33, 0.88);
}

:root[data-theme="light"] .user-message {
  background: rgba(11, 20, 33, 0.07);
}

:root[data-theme="light"] .codex-composer {
  border-color: rgba(11, 20, 33, 0.12);
  color: rgba(11, 20, 33, 0.38);
  background: rgba(255, 255, 255, 0.58);
}

:root[data-theme="light"] .codex-icon-dark {
  display: none;
}

:root[data-theme="light"] .codex-icon-light {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .codex-window {
    border-color: rgba(11, 20, 33, 0.18);
    background: rgba(247, 248, 251, 0.9);
    color: rgba(11, 20, 33, 0.9);
    box-shadow: 0 26px 75px rgba(33, 41, 54, 0.24);
  }

  :root[data-theme="auto"] .codex-titlebar,
  :root[data-theme="auto"] .codex-sidebar {
    border-color: rgba(11, 20, 33, 0.1);
    background: rgba(237, 239, 244, 0.74);
  }

  :root[data-theme="auto"] .window-actions,
  :root[data-theme="auto"] .codex-sidebar {
    color: rgba(11, 20, 33, 0.5);
  }

  :root[data-theme="auto"] .codex-sidebar b,
  :root[data-theme="auto"] .codex-account {
    border-color: rgba(11, 20, 33, 0.12);
    color: rgba(11, 20, 33, 0.88);
  }

  :root[data-theme="auto"] .user-message {
    background: rgba(11, 20, 33, 0.07);
  }

  :root[data-theme="auto"] .codex-composer {
    border-color: rgba(11, 20, 33, 0.12);
    color: rgba(11, 20, 33, 0.38);
    background: rgba(255, 255, 255, 0.58);
  }

  :root[data-theme="auto"] .codex-icon-dark {
    display: none;
  }

  :root[data-theme="auto"] .codex-icon-light {
    display: block;
  }
}

.orbit-one {
  width: 520px;
  height: 210px;
  right: -130px;
  top: 77px;
}

.orbit-two {
  width: 590px;
  height: 270px;
  left: -240px;
  bottom: 18px;
}

.dock-panel {
  --panel-scale: clamp(0.78, calc((100vw - 140px) / 1320), 1);
  position: absolute;
  z-index: 3;
  bottom: 7px;
  width: 350px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  line-height: 1;
  text-shadow: 0 1px 1.3px rgba(0, 0, 0, 0.92);
  transform: scale(var(--panel-scale));
  transform-origin: bottom center;
}

.usage-panel {
  right: auto;
  left: 2px;
  display: flex;
  gap: 6px;
  align-items: end;
  height: 56px;
  padding: 0 6px 4px;
}

.usage-trend {
  display: flex;
  flex: 0 0 150px;
  flex-direction: column;
  gap: 1px;
  min-width: 116px;
}

.usage-title,
.usage-dates,
.weekly-title,
.weekly-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.usage-title {
  font-size: 10px;
  font-weight: 600;
}

.usage-title strong:last-child {
  font-family: ui-rounded, -apple-system, "SF Pro Rounded", inherit;
  font-variant-numeric: tabular-nums;
}

.usage-bars {
  display: flex;
  gap: 2px;
  align-items: end;
  height: 21px;
}

.usage-bars i {
  display: block;
  flex: 1;
  height: var(--bar);
  min-height: 3px;
  border-radius: 1.5px;
  /* Stacked per-tool segments, bottom to top: Claude Code, Codex, OpenCode.
     --s1/--s2 are the per-day boundaries between the segments. */
  background: linear-gradient(
    to top,
    var(--tool-claude) 0 var(--s1, 100%),
    var(--tool-codex) var(--s1, 100%) var(--s2, 100%),
    var(--tool-opencode) var(--s2, 100%) 100%
  );
}

.usage-dates {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
}

.usage-legend {
  display: flex;
  gap: 5px;
  align-items: baseline;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  white-space: nowrap;
}

.legend-item {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.legend-dot {
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--session-color, currentColor);
}

.tool-codex {
  --session-color: var(--tool-codex);
}

.tool-claude {
  --session-color: var(--tool-claude);
}

.tool-opencode {
  --session-color: var(--tool-opencode);
}

.panel-divider {
  width: 1px;
  height: 24px;
  align-self: center;
  background: rgba(255, 255, 255, 0.14);
}

.weekly-limit {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
}

.weekly-title {
  gap: 5px;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  white-space: nowrap;
}

.weekly-title strong {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.weekly-quota-status {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.weekly-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.088);
}

.weekly-track i {
  display: block;
  width: 32%;
  height: 100%;
  border-radius: inherit;
  background: var(--tool-codex);
}

.weekly-meta {
  gap: 4px;
  white-space: nowrap;
}

.weekly-meta span:last-child {
  font-variant-numeric: tabular-nums;
}

.weekly-countdown {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-panel {
  right: 2px;
  left: auto;
  min-height: 61px;
  padding: 0 6px 4px;
}

.project-row,
.session-row,
.task-row {
  display: flex;
  align-items: center;
}

.project-row {
  height: 10px;
  overflow: hidden;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-row {
  height: 11px;
  padding-left: 8px;
  overflow: hidden;
  font-size: 8px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 45px;
  gap: 3px;
  height: 12px;
  padding-left: 8px;
  font-size: 9px;
}

.task-row p {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row time {
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.task-dimmed p {
  opacity: 0.45;
}

/* App running indicator: 9×9 box, 7×7 ring, 1.4pt stroke, 288° arc whose
   conic trail fades 0.08 → 0.40 → 1.0 in the session color; one linear
   360° spin every 0.9s. */
.status-spinner {
  display: block;
  position: relative;
  width: 9px;
  height: 9px;
}

.status-spinner::before {
  content: "";
  position: absolute;
  inset: 0.3px;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    color-mix(in srgb, var(--session-color, var(--mint)) 8%, transparent) 0deg,
    color-mix(in srgb, var(--session-color, var(--mint)) 40%, transparent) 158.4deg,
    var(--session-color, var(--mint)) 288deg,
    transparent 288deg 360deg
  );
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.9px), #000 calc(100% - 1.4px));
  mask: radial-gradient(closest-side, transparent calc(100% - 1.9px), #000 calc(100% - 1.4px));
  animation: spin 0.9s linear infinite;
}

/* App completed indicator: SF `checkmark.circle.fill` at 8pt in the session
   color — the checkmark is knocked out so the wallpaper shows through. */
.status-done {
  display: block;
  position: relative;
  width: 9px;
  height: 9px;
  color: transparent;
  font-size: 0;
  text-shadow: none;
}

.status-done::before {
  content: "";
  position: absolute;
  inset: 0.5px;
  border-radius: 50%;
  background: var(--session-color, #34c759);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.2 4.2 3.5 5.5 5.9 2.8' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 8px 8px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.2 4.2 3.5 5.5 5.9 2.8' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 8px 8px no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.dock {
  --dock-icon-size: 44px;
  position: absolute;
  z-index: 5;
  bottom: 7px;
  left: 50%;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 17px;
  background: rgba(234, 239, 246, 0.42);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
}

:root[data-resolved-theme="dark"] .dock {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(22, 26, 33, 0.62);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.46);
}

.preview-dock-icon {
  display: grid;
  flex: 0 0 var(--dock-icon-size);
  width: var(--dock-icon-size);
  height: var(--dock-icon-size);
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.preview-dock-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dock .dock-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 35px;
  margin: 0 1px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 1px 0 rgba(0, 0, 0, 0.2);
}

:root[data-resolved-theme="light"] .dock .dock-divider {
  background: rgba(72, 79, 88, 0.32);
  box-shadow: 1px 0 rgba(255, 255, 255, 0.48);
}

.preview-dock-icon .dock-trash {
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.26));
}

.mockup-note {
  position: relative;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.features {
  padding-top: 145px;
  padding-bottom: 145px;
  border-top: 1px solid var(--line);
}

.section-intro {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 105px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 690;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.section-intro p,
.privacy-copy > p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
}

.feature {
  display: grid;
  grid-template-columns: 60px 0.72fr 1.28fr;
  gap: clamp(24px, 4vw, 62px);
  align-items: center;
  min-height: 390px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.feature-number {
  align-self: start;
  color: var(--mint);
  font: 12px ui-monospace, "SFMono-Regular", monospace;
  letter-spacing: 0.1em;
}

.feature-copy h3 {
  margin-bottom: 18px;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.feature-copy p {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.feature-visual {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(43, 68, 137, 0.34), transparent 48%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.trend-visual {
  padding: 30px 34px 0;
}

.trend-meta {
  color: var(--muted);
  font-size: 13px;
}

.trend-meta strong {
  color: var(--text);
  font-size: 20px;
}

.trend-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.trend-legend .legend-item {
  gap: 6px;
}

.trend-legend .legend-dot {
  width: 7px;
  height: 7px;
}

/* Feature cards sit on the page surface, so tool hues follow the page theme
   the way panel colors follow wallpaper polarity in the app. */
:root[data-resolved-theme="light"] .features {
  --tool-claude: #824103;
  --tool-opencode: #555555;
}

.trend-visual svg {
  position: absolute;
  inset: 70px 0 0;
  width: 100%;
  height: calc(100% - 70px);
}

.large-chart-fill {
  fill: rgba(10, 132, 255, 0.09);
}

.large-chart-line {
  fill: none;
  stroke: var(--mint);
  stroke-width: 3;
}

.task-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 40px;
}

.mini-session {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.mini-session strong {
  font-size: 18px;
}

.mini-session span {
  color: var(--muted);
  font-size: 13px;
}

.mini-task {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.mini-task time {
  color: var(--muted);
  font-size: 12px;
}

.placement-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 30px;
}

.placement-screen {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: linear-gradient(150deg, #15254c, #090e19 80%);
}

.placement-screen i,
.placement-screen b {
  position: absolute;
  display: block;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.23);
}

.dock-bottom i,
.dock-bottom b {
  bottom: 22px;
  width: 36%;
  height: 24px;
}

.dock-bottom i {
  left: 7px;
}

.dock-bottom b {
  right: 7px;
}

.dock-left i,
.dock-left b,
.dock-right i,
.dock-right b {
  width: 70%;
  height: 22px;
}

.dock-left i,
.dock-left b {
  left: 20px;
}

.dock-right i,
.dock-right b {
  right: 20px;
}

.dock-left i,
.dock-right i {
  bottom: 46px;
}

.dock-left b,
.dock-right b {
  bottom: 18px;
}

.placement-screen span {
  position: absolute;
  display: block;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
}

.dock-bottom span {
  bottom: 6px;
  left: 50%;
  width: 55px;
  height: 9px;
  transform: translateX(-50%);
}

.dock-left span,
.dock-right span {
  top: 50%;
  width: 8px;
  height: 56px;
  transform: translateY(-50%);
}

.dock-left span {
  left: 5px;
}

.dock-right span {
  right: 5px;
}

.adaptive-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 30px;
}

.adaptive-swatch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
}

.adaptive-swatch strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.adaptive-swatch span {
  font-size: 12px;
  opacity: 0.78;
}

.adaptive-swatch-light {
  background: linear-gradient(150deg, #f7e7cf, #dbe4f1 78%);
  color: #46351f;
}

.adaptive-swatch-dark {
  background: linear-gradient(150deg, #2c3a63, #0b1020 80%);
  color: #f2e5d2;
}

.privacy {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(60px, 10vw, 150px);
  align-items: center;
  min-height: 750px;
  padding-top: 130px;
  padding-bottom: 130px;
  border-top: 1px solid var(--line);
}

.privacy-visual {
  display: grid;
  min-height: 430px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 93, 178, 0.26), rgba(18, 26, 44, 0.11) 47%, transparent 70%);
}

.privacy-visual svg {
  width: min(280px, 65%);
  overflow: visible;
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.32));
}

.shield {
  fill: rgba(18, 33, 57, 0.78);
  stroke: rgba(10, 132, 255, 0.68);
  stroke-width: 2;
}

.pulse {
  fill: none;
  stroke: var(--mint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.privacy-copy h2 {
  margin-bottom: 32px;
}

.privacy-copy > p {
  max-width: 590px;
  margin-bottom: 44px;
}

.privacy-copy ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.privacy-copy li {
  display: flex;
  gap: 22px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.privacy-copy li:last-child {
  border-bottom: 1px solid var(--line);
}

.privacy-copy li span {
  color: var(--mint);
  font: 11px ui-monospace, "SFMono-Regular", monospace;
}

.privacy-copy li b {
  font-weight: 400;
}

.start {
  padding-top: 145px;
  padding-bottom: 145px;
  border-top: 1px solid var(--line);
}

.start-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 90px;
}

.start-heading p {
  max-width: 450px;
  margin-bottom: 5px;
  color: var(--muted);
  text-align: right;
}

.steps {
  padding: 0;
  margin: 0 0 54px;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps > li > span {
  padding-top: 5px;
  color: var(--mint);
  font: 12px ui-monospace, "SFMono-Regular", monospace;
}

.steps h3 {
  margin-bottom: 14px;
  font-size: 23px;
  font-weight: 610;
}

.install-ai-detail {
  margin: -7px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.install-ai-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.install-ai-prompt code {
  min-width: 0;
  font: 12px/1.55 ui-monospace, "SFMono-Regular", Menlo, monospace;
  overflow-wrap: anywhere;
}

.install-copy-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font: 600 11px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.install-copy-button:hover,
.install-copy-button:focus-visible {
  color: #fff;
  outline: none;
  border-color: #0a84ff;
  background: #0a84ff;
}

.install-copy-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

pre {
  margin: 0;
  overflow-x: auto;
  color: var(--muted);
  font: 14px/1.7 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.start-cta {
  min-width: 140px;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 42px;
  align-items: center;
  min-height: 150px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer .brand {
  color: var(--text);
  font-size: 17px;
}

footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1080px) {
  .hero {
    min-height: auto;
    padding-top: 136px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-copy h1 br {
    display: none;
  }

  .feature {
    grid-template-columns: 45px 0.8fr 1.2fr;
  }
}

@media (max-width: 900px) {
  nav > a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 58px;
    padding-inline: 14px;
    border-radius: 15px;
  }

  nav > a:not(.nav-cta),
  .nav-cta {
    display: none;
  }

  nav {
    gap: 8px;
  }

  .control-select select {
    width: 86px;
    min-height: 34px;
    padding-left: 9px;
    font-size: 11px;
  }

  .control-select + .control-select select {
    width: 112px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 29px;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    min-height: auto;
    position: static;
    padding-top: 104px;
    padding-bottom: 88px;
  }

  .hero-copy {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    text-align: left;
    text-shadow: none;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(38px, 11vw, 58px);
    line-height: 1.12;
  }

  .hero-copy > p {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    font-size: 17px;
    line-height: 1.65;
  }

  .product-stage {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 0;
    container-type: inline-size;
  }

  .mockup-frame {
    --mockup-width: 1320;
    --mockup-height: 742.5;
    --mockup-scale: min(1, calc(100cqw / (var(--mockup-width) * 1px)));
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: calc(var(--mockup-height) * 1px * var(--mockup-scale));
    overflow: hidden;
    contain: layout paint;
  }

  .desktop {
    width: calc(var(--mockup-width) * 1px);
    height: calc(var(--mockup-height) * 1px);
    aspect-ratio: auto;
    transform: scale(var(--mockup-scale));
    transform-origin: top left;
  }

  .dock-panel {
    --panel-scale: 1;
    width: 350px;
  }

  .usage-panel {
    top: auto;
    right: auto;
    bottom: 7px;
    left: 2px;
    transform: scale(var(--panel-scale));
    transform-origin: bottom center;
  }

  .task-panel {
    right: 2px;
    bottom: 7px;
    left: auto;
    transform: scale(var(--panel-scale));
    transform-origin: bottom center;
  }

  .mockup-note {
    margin-right: 0;
  }

  .features,
  .start {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .section-intro,
  .privacy {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .section-intro {
    margin-bottom: 70px;
  }

  .feature {
    grid-template-columns: 38px 1fr;
    gap: 20px;
    padding: 52px 0;
  }

  .feature-visual {
    grid-column: 1 / -1;
    min-height: 230px;
  }

  .feature-copy h3 {
    font-size: 32px;
  }

  .privacy {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .privacy-visual {
    min-height: 300px;
  }

  .start-heading {
    display: block;
    margin-bottom: 60px;
  }

  .start-heading h2 {
    margin-bottom: 24px;
  }

  .start-heading p {
    text-align: left;
  }

  .steps li {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  footer {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 42px;
    padding-bottom: 42px;
  }
}

@media (max-width: 480px) {
  .site-header .brand span {
    display: none;
  }

  .control-select select {
    width: 78px;
  }

  .control-select + .control-select select {
    width: 104px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .button {
    width: 100%;
    min-width: 0;
  }

  .desktop-bar {
    gap: 10px;
  }

  .placement-visual {
    gap: 8px;
    padding: 18px;
  }

  .placement-screen {
    min-height: 150px;
  }

  pre {
    font-size: 12px;
  }

  .install-ai-prompt {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .install-copy-button {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Desktop-only macOS experience. The original landing remains the <=760px route. */
@media (min-width: 761px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    background: #10151c;
  }

  .mobile-site {
    display: none;
  }

  .desktop-experience {
    --menu-height: 30px;
    /* Panel semantic appearance (dark wallpaper): white adaptive text, the
       app's real text shadow is black @62% with a 0.45pt blur — very subtle. */
    --desktop-ink: #fff;
    --desktop-ink-secondary: rgba(255, 255, 255, 0.55);
    --desktop-ink-faint: rgba(255, 255, 255, 0.088);
    --desktop-shadow: 0 0 1px rgba(0, 0, 0, 0.62);
    --window-surface: rgba(239, 241, 244, 0.86);
    --window-surface-strong: rgba(252, 252, 253, 0.92);
    --window-border: rgba(255, 255, 255, 0.48);
    --window-line: rgba(25, 28, 34, 0.15);
    --window-text: #22262c;
    --window-muted: rgba(28, 31, 37, 0.56);
    display: block;
    position: fixed;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    color: var(--window-text);
    font: 13px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
    user-select: none;
  }

  /* Light wallpaper → the app samples it and flips to near-black text with a
     white shadow and light-appearance tool colors (OKLab L 0.45). The
     :not(dark) form keeps the no-JS default coherent with the default light
     wallpaper. */
  :root:not([data-resolved-theme="dark"]) .desktop-experience {
    --desktop-ink: #241a10;
    --desktop-ink-secondary: rgba(36, 26, 16, 0.55);
    --desktop-ink-faint: rgba(20, 14, 8, 0.12);
    --desktop-shadow: 0 0 1px rgba(255, 255, 255, 0.62);
    --tool-claude: #824103;
    --tool-opencode: #555555;
  }

  :root[data-resolved-theme="dark"] .desktop-experience {
    --window-surface: rgba(31, 35, 40, 0.87);
    --window-surface-strong: rgba(40, 44, 50, 0.94);
    --window-border: rgba(255, 255, 255, 0.19);
    --window-line: rgba(255, 255, 255, 0.12);
    --window-text: #f3f4f6;
    --window-muted: rgba(239, 242, 246, 0.55);
  }

  .mac-menu-bar {
    position: absolute;
    z-index: 1000;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--menu-height);
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(13, 18, 25, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    font-size: 12px;
    line-height: 1;
  }

  :root:not([data-resolved-theme="dark"]) .mac-menu-bar {
    color: rgba(20, 24, 29, 0.92);
    background: rgba(244, 246, 249, 0.73);
    border-bottom-color: rgba(0, 0, 0, 0.1);
  }

  .mac-menu-left,
  .mac-menu-status {
    display: flex;
    align-items: center;
    height: 100%;
  }

  .mac-menu-left {
    gap: 2px;
  }

  .mac-menu-left > strong {
    margin: 0 10px 0 5px;
    font-weight: 650;
  }

  .mac-apple {
    width: 18px;
    font-size: 11px;
    text-align: center;
  }

  .mac-menu-trigger {
    height: 24px;
    padding: 0 10px;
    color: inherit;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font: inherit;
    cursor: default;
  }

  .mac-menu-trigger:hover,
  .mac-menu-trigger[aria-expanded="true"] {
    color: #fff;
    background: #0a84ff;
  }

  .mac-menu-status {
    gap: 15px;
    font-variant-numeric: tabular-nums;
  }

  .status-wifi {
    font-size: 18px;
    transform: rotate(90deg);
  }

  .status-toggle {
    letter-spacing: -2px;
  }

  .mac-popover {
    position: absolute;
    z-index: 1100;
    top: calc(var(--menu-height) + 4px);
    display: none;
    width: 286px;
    padding: 6px;
    overflow: hidden;
    color: var(--window-text);
    background: var(--window-surface-strong);
    border: 1px solid var(--window-border);
    border-radius: 9px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 2px 7px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(34px) saturate(155%);
    -webkit-backdrop-filter: blur(34px) saturate(155%);
  }

  .mac-popover.is-open {
    display: block;
  }

  .install-popover {
    left: 98px;
  }

  .features-popover {
    left: 140px;
    width: 305px;
  }

  .theme-popover {
    left: 188px;
    width: 154px;
  }

  .mac-popover a,
  .mac-popover button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 27px;
    padding: 5px 8px;
    color: inherit;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font: inherit;
    text-align: left;
  }

  .mac-popover a:hover,
  .mac-popover button:hover,
  .mac-popover a:focus-visible,
  .mac-popover button:focus-visible {
    color: #fff;
    outline: none;
    background: #0a84ff;
  }

  .mac-popover strong,
  .mac-popover small {
    display: block;
  }

  .mac-popover strong {
    font-weight: 590;
  }

  .mac-popover small {
    margin-top: 2px;
    color: var(--window-muted);
    font-size: 10px;
  }

  .mac-popover a:hover small,
  .mac-popover button:hover small {
    color: rgba(255, 255, 255, 0.76);
  }

  .copy-status {
    color: var(--window-muted);
    font-size: 10px;
  }

  .mac-menu-separator {
    height: 1px;
    margin: 5px 7px;
    background: var(--window-line);
  }

  .feature-menu-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 5px;
    align-items: start;
    min-height: 52px;
    padding: 7px 8px;
  }

  .feature-menu-item > span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #fff;
    border-radius: 5px;
    background: #0a84ff;
    font-size: 11px;
  }

  .feature-menu-item p {
    margin: 0;
  }

  .feature-menu-note {
    padding: 6px 8px;
    color: var(--window-muted);
    font-size: 10px;
  }

  .theme-popover button {
    justify-content: flex-start;
    gap: 7px;
  }

  .theme-check {
    width: 13px;
    opacity: 0;
  }

  .theme-popover [aria-checked="true"] .theme-check {
    opacity: 1;
  }

  .mac-desktop {
    position: absolute;
    inset: var(--menu-height) 0 0;
    width: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: center center / cover no-repeat url("./assets/golden-gate-light.jpg");
  }

  :root[data-resolved-theme="dark"] .mac-desktop {
    background-image: url("./assets/golden-gate-dark.png");
  }

  .mac-window {
    position: absolute;
    z-index: 20;
    width: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--window-text);
    background: var(--window-surface);
    border: 1px solid var(--window-border);
    border-radius: 13px;
    box-shadow: 0 23px 55px rgba(0, 0, 0, 0.36), 0 2px 9px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(42px) saturate(125%);
    -webkit-backdrop-filter: blur(42px) saturate(125%);
  }

  .codex-desktop-window {
    top: 6vh;
    left: 5vw;
    width: min(54vw, 760px);
    height: min(54vh, 525px);
    min-width: 430px;
    min-height: 280px;
  }

  .activity-window {
    top: 9vh;
    right: 5vw;
    width: min(36vw, 530px);
    min-width: 340px;
    height: min(49vh, 475px);
    min-height: 285px;
  }

  .mac-window.is-front {
    z-index: 30;
  }

  .mac-window.is-dragging {
    box-shadow: 0 30px 74px rgba(0, 0, 0, 0.45);
  }

  .mac-window-titlebar {
    position: relative;
    display: grid;
    grid-template-columns: 82px 1fr 82px;
    align-items: center;
    height: 38px;
    border-bottom: 1px solid var(--window-line);
    cursor: default;
    touch-action: none;
  }

  .mac-window-titlebar strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mac-traffic-lights {
    display: flex;
    gap: 7px;
    padding-left: 13px;
  }

  .mac-traffic-lights i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
  }

  .mac-traffic-lights i:nth-child(1) { background: #ff5f57; }
  .mac-traffic-lights i:nth-child(2) { background: #febc2e; }
  .mac-traffic-lights i:nth-child(3) { background: #28c840; }

  .activity-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 34px;
    padding: 4px 9px;
    border-bottom: 1px solid var(--window-line);
  }

  .activity-toolbar button {
    width: 24px;
    height: 24px;
    color: var(--window-muted);
    border: 1px solid var(--window-line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--window-surface-strong) 50%, transparent);
    font: 15px/1 inherit;
  }

  .activity-toolbar > span {
    flex: 1;
  }

  .activity-search {
    width: 104px;
    height: 23px;
    padding: 4px 8px;
    color: var(--window-muted);
    border: 1px solid var(--window-line);
    border-radius: 6px;
    font-size: 10px;
  }

  .activity-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: inherit;
    font-size: clamp(9px, 0.78vw, 11px);
    font-variant-numeric: tabular-nums;
  }

  .activity-table th,
  .activity-table td {
    height: 29px;
    padding: 0 9px;
    overflow: hidden;
    border-right: 1px solid var(--window-line);
    border-bottom: 1px solid var(--window-line);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-table th {
    height: 27px;
    font-weight: 500;
    text-align: left;
  }

  .activity-table th:first-child,
  .activity-table td:first-child {
    width: 59%;
  }

  .activity-table th:not(:first-child),
  .activity-table td:not(:first-child) {
    text-align: right;
  }

  .activity-selected {
    color: #fff;
    background: linear-gradient(#2479df, #1463c7);
  }

  .process-icon {
    display: inline-grid;
    width: 17px;
    height: 17px;
    margin-right: 7px;
    place-items: center;
    color: #fff;
    border-radius: 4px;
    background: #6e747c;
    font-size: 8px;
    vertical-align: middle;
  }

  .pulse-icon {
    background: #20252c;
  }

  .desktop-dock-panel {
    /* App: default width 350, min 180, screen-edge inset 2, no window shadow,
       fully transparent — content floats directly over the wallpaper. */
    --panel-width: 350px;
    position: absolute;
    z-index: 10;
    width: var(--panel-width);
    min-width: 180px;
    max-width: calc(50% - 205px);
    margin: 0;
    padding: 0;
    color: var(--desktop-ink);
    text-shadow: var(--desktop-shadow);
    transition: left 220ms ease, right 220ms ease, top 220ms ease, bottom 220ms ease;
  }

  .desktop-dock-panel[data-location="bottom-left"] {
    bottom: 2px;
    left: 2px;
  }

  .desktop-dock-panel[data-location="bottom-right"] {
    right: 2px;
    bottom: 2px;
  }

  /* Colocated stacking offset (other panel height + 10px gap) is set inline
     by script.js, measured from the sibling panel's real height. */

  /* Wallpaper-adaptive ink: route every hardcoded white/secondary in the
     shared panel styles through the desktop ink variables so the whole
     panel flips with the sampled wallpaper appearance. */
  .desktop-dock-panel .usage-dates,
  .desktop-dock-panel .usage-legend,
  .desktop-dock-panel .weekly-limit,
  .desktop-dock-panel .weekly-title,
  .desktop-dock-panel .weekly-countdown,
  .desktop-dock-panel .task-row p,
  .desktop-dock-panel .task-row time {
    color: var(--desktop-ink-secondary);
  }

  .desktop-dock-panel .weekly-title strong,
  .desktop-dock-panel .task-session-link,
  .desktop-dock-panel .session-row,
  .desktop-dock-panel .project-row {
    color: var(--desktop-ink);
  }

  .desktop-dock-panel .weekly-track {
    background: var(--desktop-ink-faint);
  }

  .desktop-dock-panel .panel-divider {
    background: color-mix(in srgb, var(--desktop-ink) 14%, transparent);
  }

  /* Eye button state: `eye.slash` while the weekly section is visible,
     plain `eye` once it is hidden. */
  .desktop-usage-panel.weekly-hidden .panel-eye-slash {
    display: none;
  }

  .desktop-usage-panel.weekly-hidden .panel-divider,
  .desktop-usage-panel.weekly-hidden .weekly-limit {
    display: none;
  }

  /* App splits leftover width ~50/50 between trend and weekly (trend min 116);
     weekly rows truncate rather than spill past the panel edge. */
  .desktop-usage-panel .usage-trend {
    flex: 1 1 0;
    min-width: 116px;
  }

  .desktop-usage-panel .weekly-limit {
    flex: 1 1 0;
    overflow: hidden;
  }

  .desktop-usage-panel .weekly-title,
  .desktop-usage-panel .weekly-quota-status,
  .desktop-usage-panel .weekly-meta {
    min-width: 0;
  }

  .desktop-usage-panel .weekly-quota-status span,
  .desktop-usage-panel .weekly-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desktop-usage-panel[data-location="bottom-right"] .weekly-countdown {
    text-align: right;
  }

  .usage-panel-content {
    display: flex;
    gap: 6px;
    align-items: end;
    height: 56px;
    padding: 0 6px 4px;
  }

  .task-panel-content {
    min-height: 61px;
    padding: 0 6px 4px;
    text-align: left;
  }

  .desktop-usage-panel[data-location="bottom-right"] .usage-panel-content {
    flex-direction: row-reverse;
  }

  .desktop-usage-panel[data-location="bottom-right"] .usage-trend,
  .desktop-usage-panel[data-location="bottom-right"] .weekly-limit,
  .desktop-task-panel[data-resolved-align="right"] .task-panel-content {
    text-align: right;
  }

  .desktop-usage-panel[data-location="bottom-right"] .usage-legend {
    justify-content: flex-end;
  }

  .task-session-link {
    width: 100%;
    color: #fff;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: inherit;
    text-shadow: var(--desktop-shadow);
    cursor: pointer;
  }

  .desktop-task-panel .project-row,
  .desktop-task-panel .session-row {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .desktop-task-panel[data-resolved-align="right"] .project-row,
  .desktop-task-panel[data-resolved-align="right"] .session-row {
    justify-content: flex-end;
    text-align: right;
  }

  .desktop-task-panel[data-resolved-align="right"] .session-row {
    padding-right: 8px;
    padding-left: 0;
  }

  .desktop-task-panel[data-resolved-align="right"] .task-row {
    grid-template-columns: 45px minmax(0, 1fr) 9px;
    padding-right: 8px;
    padding-left: 0;
  }

  .desktop-task-panel[data-resolved-align="right"] .task-row > :first-child {
    grid-column: 3;
    grid-row: 1;
  }

  .desktop-task-panel[data-resolved-align="right"] .task-row p {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .desktop-task-panel[data-resolved-align="right"] .task-row time {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  /* App overlay: covers the panel plus a 6px overhang past the inner edge;
     the 34px resize strip then sits flush with the panel's inner edge. */
  .panel-hover-controls {
    position: absolute;
    z-index: 3;
    right: -6px;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: max(80px, 100%);
    padding: 6px 46px 6px 6px;
    opacity: 0;
    transform: scale(0.98);
    transform-origin: center bottom;
    pointer-events: none;
    text-shadow: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }

  .desktop-dock-panel[data-location="bottom-right"] .panel-hover-controls {
    right: 0;
    left: -6px;
    padding-right: 6px;
    padding-left: 46px;
  }

  .panel-hover-controls::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: color-mix(in srgb, var(--window-surface-strong) 82%, transparent);
    border: 1px solid var(--window-border);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    content: "";
    transition: opacity 340ms ease, inset 340ms ease, border-radius 340ms ease;
  }

  .desktop-dock-panel.controls-visible .panel-hover-controls,
  .desktop-dock-panel:focus-within .panel-hover-controls {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .panel-actions {
    display: grid;
    flex: 1;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 6px;
    align-items: stretch;
    min-height: 0;
  }

  /* Usage-tool legend strip: 14px tall, 5px dots, 9px medium labels. */
  .control-legend {
    display: flex;
    flex: none;
    gap: 8px;
    align-items: center;
    height: 14px;
    padding: 0 4px;
    overflow: hidden;
    color: var(--window-muted);
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 340ms ease, transform 340ms ease;
  }

  .control-legend .legend-item {
    gap: 3px;
  }

  .control-legend .legend-dot {
    width: 5px;
    height: 5px;
  }

  .desktop-dock-panel[data-location="bottom-right"] .control-legend {
    justify-content: flex-end;
  }

  .panel-actions > button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    padding: 0;
    place-items: center;
    color: var(--window-text);
    border: 1px solid var(--window-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--window-surface-strong) 68%, transparent);
    font: 15px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transition: opacity 340ms ease, transform 340ms ease;
  }

  .sf-symbol {
    width: 20px;
    height: 20px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
  }

  .sf-symbol-dot {
    fill: currentColor;
    stroke: none;
  }

  .panel-side-icon,
  .panel-align-icon {
    display: none;
  }

  .desktop-dock-panel[data-location="bottom-left"] .panel-side-icon-right,
  .desktop-dock-panel[data-location="bottom-right"] .panel-side-icon-left,
  .desktop-task-panel[data-align="auto"] .panel-align-icon-auto,
  .desktop-task-panel[data-align="left"] .panel-align-icon-left,
  .desktop-task-panel[data-align="right"] .panel-align-icon-right {
    display: inline;
  }

  .panel-actions > button:hover,
  .panel-actions > button:focus-visible {
    color: #fff;
    outline: none;
    background: #0a84ff;
  }

  .panel-actions > button:disabled {
    display: none;
  }

  /* Vertical language wheel: three visible rows — 10px semibold selected,
     8px @46% neighbors, 14px row height, glass surface radius 10. */
  .panel-language-wheel {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 2px;
    align-items: stretch;
    justify-content: center;
    padding: 4px;
    color: var(--window-text);
    border: 1px solid var(--window-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--window-surface-strong) 68%, transparent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    touch-action: none;
  }

  .panel-language-wheel[hidden] {
    display: none;
  }

  .wheel-row {
    display: block;
    height: 14px;
    overflow: hidden;
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    font: 400 8px/14px inherit;
    opacity: 0.46;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
  }

  .wheel-row.wheel-current {
    font-size: 10px;
    font-weight: 600;
    opacity: 1;
  }

  .desktop-dock-panel.language-picker-visible .panel-actions > button,
  .desktop-dock-panel.language-picker-visible .control-legend {
    display: none;
  }

  .desktop-dock-panel.resize-focused .panel-hover-controls::before {
    inset: 6px;
    border-radius: 10px;
    opacity: 0;
  }

  .desktop-dock-panel.resize-focused .panel-hover-controls button,
  .desktop-dock-panel.resize-focused .panel-hover-controls .control-legend,
  .desktop-dock-panel.resize-focused .panel-hover-controls .panel-language-wheel {
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
  }

  .panel-resize-handle {
    position: absolute;
    z-index: 4;
    bottom: 6px;
    display: grid;
    width: 34px;
    height: calc(max(80px, 100%) - 12px);
    opacity: 0;
    place-items: center;
    color: var(--window-text);
    cursor: ew-resize;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: opacity 200ms ease, background 200ms ease;
    touch-action: none;
  }

  .panel-resize-symbol {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
    pointer-events: none;
  }

  .desktop-dock-panel[data-location="bottom-left"] .panel-resize-handle {
    right: 0;
  }

  .desktop-dock-panel[data-location="bottom-right"] .panel-resize-handle {
    right: auto;
    left: 0;
  }

  .desktop-dock-panel.controls-visible .panel-resize-handle,
  .desktop-dock-panel.resize-focused .panel-resize-handle,
  .panel-resize-handle:focus-visible {
    opacity: 1;
    outline: none;
  }

  .mac-dock {
    --dock-icon-size: 44px;
    position: absolute;
    z-index: 40;
    bottom: 8px;
    left: 50%;
    display: flex;
    gap: 7px;
    align-items: center;
    height: auto;
    padding: 7px 9px;
    background: rgba(234, 239, 246, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 17px;
    box-shadow: 0 15px 38px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    transform: translateX(-50%);
  }

  :root[data-resolved-theme="dark"] .mac-dock {
    background: rgba(22, 26, 33, 0.62);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 38px rgba(0, 0, 0, 0.46);
  }

  .mac-dock button {
    flex: 0 0 var(--dock-icon-size);
    width: var(--dock-icon-size);
    height: var(--dock-icon-size);
    margin: 0;
    padding: 0;
    overflow: visible;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: transparent;
    transition: transform 130ms ease;
  }

  .mac-dock button {
    position: relative;
    transform-origin: center bottom;
    transition: transform 150ms ease;
  }

  .mac-dock button:hover {
    outline: none;
    transform: translateY(-7px) scale(1.3);
  }

  .mac-dock button:hover + button,
  .mac-dock button:has(+ button:hover) {
    transform: translateY(-3px) scale(1.12);
  }

  .mac-dock button:focus-visible {
    outline: 2px solid #0a84ff;
    outline-offset: 2px;
    transform: translateY(-5px) scale(1.05);
  }

  /* Running-app indicator dots. */
  .mac-dock button[data-dock-running]::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(-50%);
  }

  :root:not([data-resolved-theme="dark"]) .mac-dock button[data-dock-running]::after {
    background: rgba(40, 44, 52, 0.7);
  }

  .mac-dock img,
  .dock-native-icon {
    display: block;
    width: var(--dock-icon-size);
    height: var(--dock-icon-size);
    object-fit: cover;
    border-radius: inherit;
  }

  .dock-app-icon {
    transition: opacity 160ms ease;
  }

  .dock-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 35px;
    margin: 0 1px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 1px 0 rgba(0, 0, 0, 0.2);
  }

  .dock-trash {
    object-fit: contain !important;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.26));
  }

  :root:not([data-resolved-theme="dark"]) .dock-divider {
    background: rgba(72, 79, 88, 0.32);
    box-shadow: 1px 0 rgba(255, 255, 255, 0.48);
  }

  .mac-menu-trigger:focus-visible,
  .task-session-link:focus-visible {
    outline: 2px solid #7fc1ff;
    outline-offset: 1px;
  }

  /* ------- Menu-bar status icons ------- */

  .mac-menu-status .status-icon {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mac-menu-status .status-icon .filled {
    fill: currentColor;
    stroke: none;
  }

  /* ------- Inactive window traffic lights ------- */

  .mac-window:not(.is-front) .mac-traffic-lights i {
    background: rgba(140, 145, 152, 0.5);
  }

  /* ------- Fixed row metrics matching TaskExecutionLayout ------- */

  .desktop-task-panel .project-row {
    line-height: 10px;
  }

  .desktop-task-panel .session-row,
  .desktop-task-panel .task-session-link {
    line-height: 11px;
  }

  .desktop-task-panel .task-row {
    line-height: 12px;
  }

  /* ------- Codex chat window content ------- */

  .codex-desktop-shell {
    display: grid;
    grid-template-columns: minmax(150px, 24%) 1fr;
    height: calc(100% - 38px);
    font-size: 12px;
  }

  .codex-desktop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    border-right: 1px solid var(--window-line);
    background: color-mix(in srgb, var(--window-surface-strong) 28%, transparent);
  }

  .codex-desktop-account {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    padding: 2px 6px;
    font-weight: 650;
  }

  .codex-desktop-account img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .codex-desktop-new-task {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 8px;
    color: inherit;
    border: 0;
    border-radius: 7px;
    background: color-mix(in srgb, var(--window-text) 8%, transparent);
    font: inherit;
    font-weight: 550;
  }

  .codex-desktop-new-task span:first-child {
    font-size: 13px;
    line-height: 1;
  }

  .codex-sidebar-label {
    padding: 4px 8px 2px;
    color: var(--window-muted);
    font-size: 10px;
    font-weight: 600;
  }

  .codex-thread-item {
    overflow: hidden;
    padding: 5px 8px;
    border-radius: 7px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .codex-thread-item.is-selected {
    background: color-mix(in srgb, var(--window-text) 10%, transparent);
  }

  .codex-desktop-main {
    display: flex;
    position: relative;
    flex-direction: column;
    min-width: 0;
  }

  .codex-desktop-thread-head {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 14px 20px 10px;
  }

  .codex-desktop-thread-head strong {
    font-size: 14px;
  }

  .codex-desktop-thread-head span {
    color: var(--window-muted);
    font-size: 11px;
  }

  .codex-desktop-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding: 6px 20px 74px;
    overflow: hidden;
  }

  .codex-user-message {
    align-self: flex-end;
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 14px 14px 4px 14px;
    background: color-mix(in srgb, var(--window-text) 9%, transparent);
    line-height: 1.45;
  }

  .codex-assistant-message {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 8px;
    align-self: stretch;
    max-width: 88%;
    line-height: 1.45;
  }

  .codex-assistant-message .status-done {
    margin-top: 3px;
  }

  .codex-assistant-message .status-done::before {
    background: #34c759;
  }

  .codex-assistant-steps {
    margin: 6px 0 0;
    padding: 0;
    color: var(--window-muted);
    font-size: 11px;
    list-style: none;
  }

  .codex-assistant-steps li {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 2px 0;
  }

  .codex-assistant-steps li::before {
    content: "";
    flex: none;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
  }

  .codex-desktop-composer {
    display: flex;
    position: absolute;
    right: 16px;
    bottom: 14px;
    left: 16px;
    gap: 10px;
    align-items: center;
    height: 42px;
    padding: 0 8px 0 14px;
    color: var(--window-muted);
    border: 1px solid var(--window-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--window-surface-strong) 45%, transparent);
  }

  .codex-composer-placeholder {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .codex-composer-send {
    display: grid;
    flex: none;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: #0a84ff;
  }

  .codex-composer-send svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* ------- Floating utility windows (color settings / photo permission) ------- */

  .mac-utility-window {
    position: absolute;
    z-index: 35;
    width: 320px;
    overflow: hidden;
    color: var(--window-text);
    background: var(--window-surface-strong);
    border: 1px solid var(--window-border);
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.18);
    font-size: 12px;
    text-shadow: none;
  }

  .mac-utility-window[hidden] {
    display: none;
  }

  .utility-titlebar {
    display: grid;
    position: relative;
    align-items: center;
    height: 28px;
    border-bottom: 1px solid var(--window-line);
  }

  .utility-titlebar strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .utility-close {
    position: absolute;
    left: 9px;
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
    cursor: default;
  }

  .utility-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .utility-explanation {
    margin: 0;
    color: var(--window-muted);
    font-size: 12px;
    line-height: 1.3;
  }

  .utility-divider {
    height: 1px;
    background: var(--window-line);
  }

  .color-row {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 24px;
  }

  .color-row label {
    display: flex;
    flex: 1;
    gap: 8px;
    align-items: center;
    min-width: 0;
    font-size: 13px;
  }

  .color-row input[type="color"] {
    flex: none;
    width: 44px;
    height: 24px;
    padding: 2px;
    border: 1px solid var(--window-line);
    border-radius: 5px;
    background: color-mix(in srgb, var(--window-text) 5%, transparent);
  }

  .color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 1px;
  }

  .color-row input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 3px;
  }

  .color-row.reset-all {
    justify-content: flex-end;
  }

  .mac-push-button {
    flex: none;
    height: 22px;
    padding: 0 10px;
    color: var(--window-text);
    border: 1px solid var(--window-line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--window-text) 7%, transparent);
    font: 500 12px/1 inherit;
    white-space: nowrap;
  }

  .mac-push-button:disabled {
    opacity: 0.4;
  }

  .mac-push-button.is-default {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(#2f8bff, #0a6ef0);
  }

  .photo-permission-note {
    margin: 0;
    color: var(--window-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  .utility-actions {
    display: flex;
    justify-content: flex-end;
  }
}

@media (min-width: 761px) and (max-height: 690px) {
  .codex-desktop-window {
    top: 4vh;
    height: 48vh;
  }

  .activity-window {
    top: 6vh;
    height: 46vh;
  }

  .desktop-dock-panel[data-location="bottom-left"],
  .desktop-dock-panel[data-location="bottom-right"] {
    bottom: 2px;
    transform: scale(0.9);
  }

  .desktop-dock-panel[data-location="bottom-left"] {
    transform-origin: left bottom;
  }

  .desktop-dock-panel[data-location="bottom-right"] {
    transform-origin: right bottom;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .codex-desktop-window {
    left: 3vw;
    width: 57vw;
    min-width: 400px;
  }

  .activity-window {
    right: 3vw;
    width: 38vw;
    min-width: 315px;
  }

  .activity-table th:first-child,
  .activity-table td:first-child {
    width: 54%;
  }

  .desktop-dock-panel {
    min-width: 250px;
    max-width: calc(50vw - 16px);
  }
}

@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .desktop-task-panel .status-spinner::before {
    animation: none !important;
  }

  .desktop-dock-panel,
  .mac-dock button,
  .panel-hover-controls {
    transition: none !important;
  }
}
