:root {
  --paper: #E8EBEF;
  --ink: #14161A;
  --muted: #5B6270;
  --line: #D3D8DF;
  --card: #F4F6F8;
  --water: #64D2FF;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Funnel Sans", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: "Funnel Display", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

/* TOP BAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}
.pill-icon {
  width: 24px;
  height: 8px;
  border-radius: 4px;
  background-color: #000;
}
.topbar nav {
  display: flex;
  gap: 20px;
}
.topbar nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.topbar nav a:hover {
  text-decoration: underline;
}

/* ISLAND CONTAINER */
#island-container {
  position: sticky;
  top: 10px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  margin-bottom: -40px; /* Let hero content go underneath */
}
#island {
  position: relative;
  background-color: #000;
  color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  pointer-events: auto;
  font-family: system-ui, -apple-system, sans-serif;
  transition-property: width, height, border-radius;
  transition-timing-function: cubic-bezier(0.34, 1.45, 0.55, 1);
}
.face {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  opacity: 0;
  transition: opacity 160ms ease, transform 320ms ease;
  pointer-events: none;
}
.face.on {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  transition: opacity 260ms ease 90ms, transform 320ms ease;
  pointer-events: auto;
}

/* HERO */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.hero {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 800px;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 20px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
}
.btn-black {
  background-color: var(--ink);
  color: var(--paper);
}
.btn-black:hover {
  background-color: #000;
}
.btn-outline {
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
}
.hero-quiet {
  font-size: 15px;
  color: var(--muted);
}

/* CHAPTERS */
.chapter {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
}
.chapter-text {
  max-width: 68ch;
  margin-bottom: 40px;
}
.accent-bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 16px;
}
.chapter h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  margin-bottom: 16px;
}
.chapter p {
  color: var(--muted);
  margin-bottom: 24px;
}
.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink);
}
.chapter-list li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 16px;
}
.chapter-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.chapter-visuals {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card-panel {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.card-panel img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (min-width: 900px) {
  .chapter {
    flex-direction: row;
    align-items: center;
    gap: 60px;
  }
  .chapter-text {
    flex: 5;
    margin-bottom: 0;
  }
  .chapter-visuals {
    flex: 7;
  }
  .claude-chapter .chapter-text {
    flex: 5;
  }
  .claude-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* GALLERY */
.gallery {
  padding: 80px 0;
}
.gallery h2 {
  font-size: 32px;
  margin-bottom: 40px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.gallery-cap {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* INSTALL */
.install {
  padding: 80px 0;
}
.install h2 {
  font-size: 32px;
  margin-bottom: 16px;
}
.install-reqs {
  color: var(--muted);
  margin-bottom: 40px;
}
.install-cards {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .install-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.install-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
}
.install-card h3 {
  font-size: 24px;
  margin-bottom: 24px;
}
.code-block {
  background-color: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.code-block code {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre;
  flex: 1;
}
.copy-btn {
  background-color: #2c2c2e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn:hover {
  background-color: #3a3a3c;
}
.uninstall-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.uninstall-note code {
  background-color: var(--line);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}
.settings-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* PRIVACY */
.privacy {
  padding: 80px 0 120px;
}
.privacy h2 {
  font-size: 32px;
  margin-bottom: 32px;
}
.privacy-table {
  width: 100%;
  border-collapse: collapse;
}
.privacy-table dt {
  font-weight: 600;
  padding: 16px 0 4px;
}
.privacy-table dd {
  margin: 0;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .privacy-table tbody, .privacy-table tr {
    display: flex;
    flex-wrap: wrap;
  }
  .privacy-table tr {
    width: 100%;
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
  }
  .privacy-table dt {
    width: 250px;
    padding: 0;
    border-bottom: none;
  }
  .privacy-table dd {
    flex: 1;
    padding: 0;
    border-bottom: none;
  }
}

/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ISLAND INTERNAL CSS (MIGRATED FROM OLD STYLE.CSS) */
.row { display: flex; align-items: center; height: 100%; }
.dim { color: #a1a1a6; }
.green { color: #8ee6a3; }
.bold { font-weight: 600; }

.f-idle { width: 250px; height: 30px; padding: 0 14px; justify-content: space-between; font-size: 13px; }
.f-idle .prayer { font-size: 11px; }
.battery { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.battery i { position: relative; width: 21px; height: 11px; border: 1px solid #8e8e93; border-radius: 3px; }
.battery i::before { content: ""; position: absolute; inset: 1.5px; width: 70%; border-radius: 1.5px; background: #fff; }
.battery i::after { content: ""; position: absolute; right: -3.5px; top: 3px; width: 1.5px; height: 4px; border-radius: 1px; background: #8e8e93; }

.f-music { width: 320px; height: 32px; padding: 0 14px 0 6px; gap: 10px; font-size: 13px; }
.art { flex: none; width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #f7b267, #f25c54 55%, #6a4c93); }
.marquee { flex: 1; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.marquee span { display: inline-block; animation: slide 9s ease-in-out infinite; }
@keyframes slide { 0%, 18% { transform: translateX(0); } 50%, 68% { transform: translateX(-38%); } 100% { transform: translateX(0); } }
.bars { flex: none; display: flex; align-items: center; gap: 2px; height: 16px; }
.bars b { width: 3px; height: 4px; border-radius: 2px; background: #f7a26b; animation: bar 0.9s ease-in-out infinite; }
.bars b:nth-child(2) { animation-duration: 0.7s; }
.bars b:nth-child(3) { animation-duration: 1.1s; }
.bars b:nth-child(4) { animation-duration: 0.8s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 15px; } }

.f-toast { width: 400px; height: 78px; padding: 0 22px 0 16px; gap: 14px; }
.badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; }
.badge.app { background: linear-gradient(160deg, #4cc3ff, #1d7bd8); font: 700 22px/1 sans-serif; }
.badge.round { border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.toast-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.toast-text .cap { font-size: 11px; }
.toast-text .cap::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.toast-text .title { font-size: 14px; font-weight: 600; }
.toast-text .body { font-size: 12px; color: #a1a1a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.f-expanded { width: 440px; height: 256px; padding: 18px 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.exp-top { display: flex; align-items: center; gap: 14px; }
.exp-top .art { width: 64px; height: 64px; border-radius: 14px; }
.exp-top .meta { flex: 1; min-width: 0; }
.exp-top .meta div:first-child { font-size: 15px; font-weight: 600; }
.exp-top .meta div:last-child { font-size: 13px; color: #a1a1a6; }
.lyric { text-align: center; font-size: 14px; font-weight: 600; color: #f7a26b; margin-top: 4px; min-height: 20px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #a1a1a6; margin-top: 6px; }
.progress .track { flex: 1; height: 5px; border-radius: 3px; background: #3a3a3c; overflow: hidden; }
.progress .track i { display: block; height: 100%; width: 38%; background: #f7a26b; border-radius: 3px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 4px; }
.controls span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; }
.controls span.play { width: 52px; height: 52px; background: #fff; color: #000; }
.controls svg { width: 22px; height: 22px; fill: currentColor; }
.exp-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 12px; }
.chips { display: flex; gap: 8px; }
.chips span { padding: 5px 10px; border-radius: 13px; background: #2c2c2e; font-size: 11px; font-weight: 600; }

.f-job { width: 300px; height: 32px; padding: 0 10px; gap: 8px; font-size: 13px; }
.folder { flex: none; width: 18px; height: 15px; border-radius: 3px; background: linear-gradient(#f9c74f, #f2a541); }
.f-job .name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-job .pct { color: #64d2ff; font-size: 12px; font-weight: 600; }
.ring { flex: none; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#64d2ff calc(var(--p, 0) * 1%), rgba(100, 210, 255, 0.25) 0); -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px); mask: radial-gradient(circle, transparent 5.5px, #000 6px); }

.f-osd { width: 300px; height: 38px; padding: 0 16px 0 14px; gap: 12px; font-size: 13px; }
.f-osd .level { flex: 1; height: 6px; border-radius: 3px; background: #3a3a3c; overflow: hidden; }
.f-osd .level i { display: block; height: 100%; width: var(--v, 60%); background: #fff; border-radius: 3px; transition: width 200ms ease; }

.f-call { width: 250px; height: 34px; padding: 0 4px 0 12px; gap: 8px; font-size: 13px; font-weight: 600; }
.f-call .phone svg { width: 18px; height: 18px; fill: #30d158; display: block; }
.f-call .label { flex: 1; color: #30d158; }
.f-call .mute { width: 26px; height: 26px; border-radius: 50%; background: #2c2c2e; display: grid; place-items: center; }
.f-call .mute svg { width: 15px; height: 15px; fill: #fff; }

.f-claude { width: 250px; height: 32px; padding: 0 14px 0 10px; gap: 8px; font-size: 13px; font-weight: 600; color: #e0896a; }
.f-claude .asterisk { flex: none; font-size: 20px; line-height: 1; margin-top: 5px; }
.f-claude .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: 500; }
.f-claude .js-time { color: #a1a1a6; font-weight: 500; font-size: 12px; }

.f-speed { width: 170px; height: 32px; padding: 0 14px 0 12px; justify-content: space-between; font-size: 13px; font-weight: 600; color: #64d2ff; }
.f-speed .down svg { width: 16px; height: 16px; fill: #64d2ff; display: block; }

.f-focus { width: 210px; height: 32px; padding: 0 14px 0 8px; gap: 8px; font-size: 13px; font-weight: 600; color: #ff6b5f; }
.f-focus .label { flex: 1; }
.f-focus .js-time { font-size: 15px; }
.f-focus .ring { background: conic-gradient(#ff6b5f calc(var(--p, 100) * 1%), rgba(255, 107, 95, 0.25) 0); }

.f-panel { width: 440px; height: 180px; padding: 18px 22px 16px; display: flex; flex-direction: column; gap: 12px; }
.panel-top { display: flex; align-items: center; gap: 12px; }
.panel-top .big { font-size: 34px; font-weight: 300; }
.panel-top .dates { flex: 1; font-size: 12px; line-height: 1.35; color: #a1a1a6; }
.panel-top .weather { font-size: 22px; font-weight: 300; }
.toggles { display: flex; gap: 8px; }
.toggles span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2c2c2e; }
.toggles span.on { background: #0a84ff; }
.toggles svg { width: 18px; height: 18px; fill: #fff; }
.chips .focus-chip { color: #ff9f8a; }

.f-timer { width: 196px; height: 32px; padding: 0 14px 0 8px; justify-content: space-between; font-size: 15px; color: #ff9f0a; font-weight: 600; }
.f-timer .ring { background: conic-gradient(#ff9f0a calc(var(--p, 100) * 1%), rgba(255, 159, 10, 0.25) 0); }

/* CLAUDE APPROVAL */
.f-claude-approval {
  padding: 0 16px;
}
.f-claude-approval .toast-text {
  gap: 0;
}
.f-claude-approval .cap {
  color: #E0896A;
}
.f-claude-approval .badge.aster {
  background: rgba(224,137,106,0.15);
  color: #E0896A;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.toast-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn-toast {
  background: #2c2c2e;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: default;
}
.btn-toast.allow {
  background: #E0896A;
  color: #000;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #island { transition-duration: 1ms !important; }
  .marquee span, .bars b { animation: none; }
  .bars b { height: 10px; }
}

/* RESPONSIVE FIXES */
@media (max-width: 480px) {
  #island {
    transform: scale(0.85);
    transform-origin: top center;
  }
  .topbar {
    padding: 16px;
  }
  .hero {
    padding-top: 80px;
  }
}

/* Long commands scroll inside their block instead of widening the page. */
.install-cards { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .install-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.install-card { min-width: 0; }
.code-block code { overflow-x: auto; min-width: 0; }
.uninstall-note code, .settings-note code { overflow-wrap: anywhere; }

/* On phones the island would sit on the text it describes: give it a strip of page colour,
   like a phone's status bar, that the content scrolls under. */
@media (max-width: 700px) {
  #island-container {
    top: 0;
    padding: 10px 0 14px;
    margin-bottom: 0;
    background: linear-gradient(var(--paper) 82%, rgba(232, 235, 239, 0));
  }
}

/* A text card in place of a screenshot (the Music section, where the live island is the picture). */
.note-panel { padding: 32px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.note-panel p + p { margin-top: 12px; }
.note-panel p:first-child { color: var(--ink); font-weight: 600; }
