:root {
  --ink: #111111;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-light: rgba(255, 255, 255, 0.15);
  --bg: #ffffff;
  --card: #ffffff;
  --accent: #0071e3;
  --accent-purple: #9b51e0;
  --accent-orange: #ff9500;
  --accent-mint: #34c759;
  --accent-blue: #0ea5e9;
  --deck-bg: rgba(24, 24, 27, 0.82);
  --deck-border: rgba(255, 255, 255, 0.14);
  --flyout-bg: rgba(28, 28, 30, 0.94);
  --flyout-border: rgba(255, 255, 255, 0.16);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Stage container matching Foldy */
.stage {
  max-width: 920px;
  margin: 0 auto;
  padding: 104px 24px 80px;
}

/* Real-Time Online Visitors Presence Pill */
.presence-counter {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  cursor: default;
  user-select: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.presence-counter:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.14);
}

.counter-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--ink);
}

.counter-live {
  font-weight: 500;
}

.counter-live strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.presence-label {
  color: var(--muted);
  font-size: 12.5px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 2.5px rgba(52, 199, 89, 0.24);
  animation: livePulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.counter-info {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(10px);
  pointer-events: none;
}

/* Top Navigation Bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.avatar-logo {
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.atlas-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.nav-divider {
  color: rgba(0, 0, 0, 0.22);
  font-weight: 400;
  font-size: 15px;
  margin: 0 2px;
}

.crumb-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.crumb-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crumb-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.badge.os {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: -0.01em;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, background 0.15s ease;
}

.pill:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.back-pill {
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.18);
}

.back-pill:hover {
  background: rgba(0, 113, 227, 0.12);
}

/* Intro Section */
.intro {
  margin-bottom: 28px;
}

.pill-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 113, 227, 0.09);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  text-wrap: balance;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.038em;
  font-weight: 600;
  margin: 0 0 16px;
}

.lede {
  font-size: 20px;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
}

/* CTAs & Install Buttons */
.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 48px;
}

.purchase-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.button.primary {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.button.primary:hover {
  background: #222222;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.amount {
  opacity: 0.65;
  font-size: 13px;
  margin-left: 2px;
}

.brew-box {
  display: inline-flex;
  align-items: center;
  background: #f5f5f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 6px 3px 14px;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brew-box:hover {
  background: #ebebed;
  border-color: rgba(0, 0, 0, 0.14);
}

.brew-box code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: #1d1d1f;
  user-select: all;
}

.copy-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1d1d1f;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: #fafafa;
}

.requirements {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Interactive Display Canvas Figure */
.figure {
  margin: 0 0 64px;
  position: relative;
}

.simulator-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 13px;
  flex-wrap: wrap;
}

.sim-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-label {
  font-weight: 600;
  color: var(--muted);
  font-size: 12.5px;
}

.sim-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
}

.segment {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}

.segment.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.wallpaper-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.wp-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.wp-dot.active {
  border-color: #0071e3;
  transform: scale(1.15);
}

.sound-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.sound-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Mac Display Screen */
/* Mac Display Screen with Adaptive Themes */
.mac-display-frame {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Theme Design Tokens matching SideDeckView.swift */
.mac-display-frame.theme-light {
  --sd-canvas: #EEF1F5;
  --sd-rail: #F7F9FC;
  --sd-surface: #FFFFFF;
  --sd-elevated: #F3F6FA;
  --sd-primary-text: #15181D;
  --sd-secondary-text: #626A76;
  --sd-tertiary-text: #858D99;
  --sd-border: #D4DAE3;
  --sd-control-fill: #E8ECF2;
  --sd-track-bg: #E2E8F0;
  --sd-shadow: rgba(0, 0, 0, 0.08);
}

.mac-display-frame.theme-light .canvas-wallpaper {
  background: radial-gradient(circle at 50% 25%, #dbe4f0 0%, #cbd5e1 50%, #94a3b8 100%);
}

.mac-display-frame.theme-light .mac-menubar {
  background: rgba(245, 245, 247, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
}

.mac-display-frame.theme-light .active-app {
  color: #000000;
}

.mac-display-frame.theme-light .menu-item,
.mac-display-frame.theme-light .battery-pill {
  color: #6e6e73;
}

.mac-display-frame.theme-light .menubar-time {
  color: #1d1d1f;
}

.mac-display-frame.theme-dark {
  --sd-canvas: #090B0E;
  --sd-rail: #0D0F12;
  --sd-surface: #171A1F;
  --sd-elevated: #1D2127;
  --sd-primary-text: #F5F7FA;
  --sd-secondary-text: #9299A6;
  --sd-tertiary-text: #69717E;
  --sd-border: #2A2F38;
  --sd-control-fill: #252A31;
  --sd-track-bg: #262626;
  --sd-shadow: rgba(0, 0, 0, 0.45);
}

.mac-display-frame.theme-dark .canvas-wallpaper {
  background: radial-gradient(circle at 50% 30%, #1e2638 0%, #0d1117 100%);
}

.mac-display-frame.theme-dark .mac-menubar {
  background: rgba(24, 24, 28, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
}

.mac-screen-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  background: #11141c;
}

.mac-menubar {
  height: 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
  z-index: 10;
  user-select: none;
}

.menubar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.apple-logo {
  opacity: 0.9;
  display: flex;
}

.active-app {
  font-weight: 600;
}

.menubar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.battery-pill {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.menubar-time {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Desktop Canvas */
.desktop-canvas {
  position: relative;
  flex: 1;
  min-height: 590px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wallpaper {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background 0.4s ease;
}

/* ==========================================================================
   THE AUTHENTIC SIDEDECK DOCK & RAIL (100% Native SwiftUI Faithful Replicant)
   ========================================================================== */
.sidedeck-wrapper {
  position: absolute;
  top: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  z-index: 20;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidedeck-wrapper.dock-right {
  right: 14px;
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
}

.sidedeck-wrapper.dock-left {
  left: 14px;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
}

/* The Vertical SideDeck Rail (width: ~89px, radius: 22px) */
.sidedeck-rail {
  width: 89.28px;
  padding: 4.6px;
  background: var(--sd-rail);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--sd-border);
  border-radius: 22px;
  box-shadow: 0 12px 32px var(--sd-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  z-index: 10;
  transition: all 0.25s ease;
}

/* Rail Cards Base Styling */
.rail-card {
  width: 80.08px;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 17px;
  box-shadow: 0 1px 3px var(--sd-shadow);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 4.2px;
  box-sizing: border-box;
}

.rail-card:hover {
  transform: scale(1.025);
  border-color: #0071e3;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.18);
}

.rail-card.active {
  border-color: #0071e3;
  box-shadow: 0 0 0 1.5px #0071e3, 0 4px 14px rgba(0, 113, 227, 0.24);
  transform: scale(1.02);
}

/* Sibling card dimming when any card is active */
.sidedeck-rail.has-active-card .rail-card:not(.active) {
  opacity: 0.65;
}

.sidedeck-rail.has-active-card .rail-card:not(.active):hover {
  opacity: 0.92;
}

/* 1. Focus Card (height: 135.1px) */
.focus-card {
  height: 135.1px;
  padding: 8px 0;
  justify-content: space-between;
}

.bolt-ring-wrap {
  position: relative;
  width: 56.56px;
  height: 56.56px;
  margin: 2px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bolt-ring-svg {
  width: 56.56px;
  height: 56.56px;
  transform: rotate(-90deg);
}

.bolt-ring-svg .track-bg {
  stroke: var(--sd-track-bg);
}

.bolt-ring-svg .track-fg {
  stroke: #0071e3;
  stroke-dasharray: 160;
  stroke-dashoffset: 35;
  transition: stroke-dashoffset 0.4s ease;
}

.bolt-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 26px;
  color: var(--sd-primary-text);
  pointer-events: none;
}

.rail-time-pill {
  width: 66.2px;
  height: 24.3px;
  background: var(--sd-canvas);
  border: 0.8px solid var(--sd-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sd-primary-text);
}

.rail-time-pill .colon {
  margin: 0 1px;
  color: var(--sd-tertiary-text);
}

.rail-task-label {
  font-size: 8.4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 500;
  color: var(--sd-secondary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
  padding: 0 4px;
}

/* 2. Clock Card (height: 55.44px) */
.clock-card {
  height: 55.44px;
  gap: 3px;
}

.rail-digital-time {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.rd-time {
  font-size: 17.5px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
  letter-spacing: -0.02em;
}

.rd-ampm {
  font-size: 7.2px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-tertiary-text);
}

.rail-clock-date {
  font-size: 9.2px;
  font-weight: 500;
  color: var(--sd-secondary-text);
}

/* 3. Status Card (height: 55.44px) */
.status-card {
  height: 55.44px;
  gap: 4px;
}

.rail-racetrack {
  width: 72px;
  height: 28px;
  border-radius: 14px;
  border: 2.8px solid var(--sd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.status-card.active .rail-racetrack,
.rail-racetrack.charging {
  border-color: #34c759;
}

.rr-pct-wrap {
  display: flex;
  align-items: baseline;
}

.rr-val {
  font-size: 12.5px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
}

.rr-sym {
  font-size: 7.5px;
  color: var(--sd-tertiary-text);
}

.rr-wifi-icon {
  color: var(--sd-primary-text);
}

.rail-status-dots {
  display: flex;
  gap: 3px;
}

.rs-dot {
  width: 2.8px;
  height: 2.8px;
  border-radius: 50%;
  background: var(--sd-border);
}

.rs-dot.on {
  background: var(--sd-primary-text);
}

/* 4. Habits Card (height: 80.08px) */
.habits-card {
  height: 80.08px;
}

.rail-habits-grid {
  display: grid;
  grid-template-columns: repeat(6, 6.3px);
  grid-template-rows: repeat(6, 6.3px);
  gap: 4.7px;
}

.rh-dot {
  width: 6.3px;
  height: 6.3px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.rh-dot.l0 {
  background: transparent;
  border: 0.6px solid var(--sd-tertiary-text);
}

.rh-dot.l1 {
  background: var(--sd-tertiary-text);
  opacity: 0.4;
}

.rh-dot.l2 {
  background: #a1a1a1;
}

.rh-dot.l3 {
  background: var(--sd-secondary-text);
}

.rh-dot.l4 {
  background: var(--sd-primary-text);
}

.rh-dot:hover {
  transform: scale(1.4);
}

/* 5. Hydration Card (height: 80.08px) */
.hydration-card {
  height: 80.08px;
  overflow: hidden;
  border-radius: 19px;
  position: relative;
}

.rail-water-reservoir {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  overflow: hidden;
  border-radius: 0 0 19px 19px;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-water-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 225, 255, 0.8) 0%, rgba(27, 121, 255, 0.95) 100%);
  border-radius: 38% 38% 0 0;
  animation: waterSine 4s infinite linear;
}

@keyframes waterSine {
  0% { transform: translateX(0); }
  50% { transform: translateX(-25%); }
  100% { transform: translateX(-50%); }
}

.rail-water-label {
  position: absolute;
  top: 10px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
  z-index: 2;
}

/* 6. Notes Card (height: 74.34px) */
.notes-card {
  height: 74.34px;
  padding: 4px 6px;
  justify-content: flex-start;
}

.rail-notes-pill {
  width: 65.8px;
  height: 13.8px;
  background: var(--sd-canvas);
  border: 0.8px solid var(--sd-border);
  border-radius: 7px;
  font-size: 6.8px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
  display: flex;
  align-items: center;
  padding-left: 6px;
  margin-top: 2px;
}

.rail-notes-mini-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  margin-top: 5px;
}

.rn-line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 6.8px;
  color: var(--sd-secondary-text);
}

.rn-circle {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  border: 0.8px solid var(--sd-tertiary-text);
  flex-shrink: 0;
}

.rn-line.done .rn-circle {
  background: #0071e3;
  border-color: #0071e3;
}

.rn-line.done .rn-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.rn-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* 7. Settings Handle Bar */
.rail-bottom-handle {
  width: 80.08px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
}

.handle-btn {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--sd-control-fill);
  border: none;
  color: var(--sd-secondary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.handle-btn:hover {
  background: rgba(0, 113, 227, 0.16);
  color: #0071e3;
  transform: scale(1.08);
}

/* ==========================================================================
   THE FLYOUT CALLOUT CARD WITH TRIANGULAR BEAK
   ========================================================================== */
.sidedeck-flyout {
  position: relative;
  width: 340px;
  background: var(--sd-rail);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--sd-border);
  border-radius: 22px;
  box-shadow: 0 20px 48px var(--sd-shadow);
  color: var(--sd-primary-text);
  padding: 18px 20px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
  z-index: 15;
}

.sidedeck-flyout.wide {
  width: 440px;
}

/* The Pointing Triangle Beak */
.flyout-beak {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--sd-rail);
  border-style: solid;
  border-color: var(--sd-border);
  transform: rotate(45deg);
  transition: top 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dock-right .flyout-beak {
  right: -7px;
  border-width: 1px 1px 0 0;
}

.dock-left .flyout-beak {
  left: -7px;
  border-width: 0 0 1px 1px;
}

/* Flyout Panes */
.flyout-pane {
  display: none;
}

.flyout-pane.active {
  display: block;
  animation: fpFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fpFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fp-title-wrap {
  display: flex;
  flex-direction: column;
}

.fp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sd-primary-text);
}

.fp-subtitle {
  font-size: 11.5px;
  color: var(--sd-secondary-text);
}

.fp-tz-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--sd-control-fill);
  border-radius: 6px;
  color: var(--sd-secondary-text);
  font-weight: 600;
}

/* Focus Flyout */
.fp-presets {
  display: flex;
  gap: 6px;
}

.fp-pill-btn {
  background: var(--sd-control-fill);
  border: none;
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-pill-btn.active,
.fp-pill-btn:hover {
  background: #0071e3;
  color: #ffffff;
}

.fp-task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0 10px;
}

.fp-task-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-task-item.active {
  border-color: #0071e3;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.12);
}

.fp-task-item.done .fp-task-name {
  text-decoration: line-through;
  color: var(--sd-tertiary-text);
}

.fp-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--sd-tertiary-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.fp-checkbox.checked {
  background: #0071e3;
  border-color: #0071e3;
}

.fp-task-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sd-primary-text);
  flex: 1;
}

.fp-task-timer {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #0071e3;
}

.fp-task-del {
  background: none;
  border: none;
  color: var(--sd-tertiary-text);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.fp-task-del:hover {
  color: #ff3b30;
}

.fp-clear-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.fp-clear-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  color: var(--sd-secondary-text);
  cursor: pointer;
}

.fp-clear-btn:hover {
  color: var(--sd-primary-text);
}

.fp-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-timer-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--sd-control-fill);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.fp-timer-fill {
  height: 100%;
  background: #0071e3;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fp-timer-icon-cancel {
  position: absolute;
  right: 4px;
  top: -7px;
  font-size: 14px;
  cursor: pointer;
  color: var(--sd-tertiary-text);
}

.fp-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sd-control-fill);
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--sd-primary-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.fp-add-btn:hover {
  background: #0071e3;
  color: #fff;
}

/* Clock Flyout */
.fp-clock-hero {
  text-align: center;
  padding: 16px 0;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 14px;
  margin-bottom: 14px;
}

.fp-clock-time {
  font-size: 32px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
  letter-spacing: -0.03em;
}

.fp-clock-ampm {
  font-size: 14px;
  color: var(--sd-tertiary-text);
  font-weight: 500;
}

.fp-clock-date {
  font-size: 12px;
  color: var(--sd-secondary-text);
  margin-top: 4px;
}

.fp-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.fp-option-label {
  font-size: 12.5px;
  color: var(--sd-primary-text);
  font-weight: 500;
}

.fp-segmented {
  display: flex;
  background: var(--sd-control-fill);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.fp-seg-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sd-secondary-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-seg-btn.active {
  background: var(--sd-surface);
  color: var(--sd-primary-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Status Flyout */
.fp-battery-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.fp-battery-pct {
  font-size: 26px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
}

.fp-battery-state {
  font-size: 12px;
  color: var(--sd-secondary-text);
}

.fp-battery-glyph {
  width: 64px;
  height: 26px;
  border-radius: 7px;
  border: 2.2px solid var(--sd-primary-text);
  padding: 2px;
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.fp-battery-glyph::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 7px;
  width: 3px;
  height: 8px;
  border-radius: 0 2px 2px 0;
  background: var(--sd-primary-text);
}

.fp-battery-fill-bar {
  height: 100%;
  background: #34c759;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.fp-toggle-pill {
  background: var(--sd-control-fill);
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-toggle-pill.active {
  background: #34c759;
  color: #fff;
}

.fp-wifi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
}

.fp-wifi-icon {
  color: #0071e3;
  flex-shrink: 0;
}

.fp-wifi-details strong {
  display: block;
  font-size: 13px;
  color: var(--sd-primary-text);
}

.fp-wifi-details span {
  font-size: 11px;
  color: var(--sd-secondary-text);
}

.fp-wifi-footer {
  margin-top: 10px;
  text-align: right;
}

.fp-link-btn {
  background: none;
  border: none;
  font-size: 11.5px;
  color: #0071e3;
  cursor: pointer;
}

/* Habits Flyout (wide: 440px) */
.fp-blue-action-btn {
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.fp-blue-action-btn:hover {
  filter: brightness(1.1);
}

.fp-habits-hero {
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.fp-hh-title {
  font-size: 12px;
  color: var(--sd-secondary-text);
  margin-bottom: 4px;
}

.fp-hh-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.fp-hh-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--sd-primary-text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.fp-hh-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--sd-tertiary-text);
}

.fp-leg-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.fp-leg-dot.l0 { background: var(--sd-control-fill); }
.fp-leg-dot.l1 { background: #9be9a8; }
.fp-leg-dot.l2 { background: #40c463; }
.fp-leg-dot.l3 { background: #30a14e; }
.fp-leg-dot.l4 { background: #216e39; }

.fp-annual-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  margin: 8px 0 6px;
}

.fp-annual-grid {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  grid-template-rows: repeat(7, 9px);
  gap: 3px;
  padding: 8px;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 10px;
}

.fp-ag-cell {
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.1s;
}

.fp-ag-cell.l0 { background: var(--sd-control-fill); }
.fp-ag-cell.l1 { background: #9be9a8; }
.fp-ag-cell.l2 { background: #40c463; }
.fp-ag-cell.l3 { background: #30a14e; }
.fp-ag-cell.l4 { background: #216e39; }

.fp-ag-cell:hover {
  transform: scale(1.35);
}

.fp-habits-tasks-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  margin: 10px 0 6px;
}

.fp-completed-task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--sd-secondary-text);
}

/* Hydration Flyout (wide: 440px) */
.fp-water-split {
  display: flex;
  gap: 16px;
}

.fp-water-left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
}

.fp-water-right {
  flex: 1;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.fp-water-reminder-card {
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin-bottom: 10px;
}

.fp-remind-sub {
  font-size: 11px;
  color: var(--sd-secondary-text);
}

.fp-remind-time {
  font-size: 28px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--sd-primary-text);
  margin: 4px 0 8px;
}

.fp-add-water-pill {
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: filter 0.15s ease;
}

.fp-add-water-pill:hover {
  filter: brightness(1.1);
}

.fp-water-presets-row {
  display: flex;
  gap: 6px;
}

.fp-wp-btn {
  flex: 1;
  background: var(--sd-control-fill);
  border: none;
  border-radius: 8px;
  padding: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-wp-btn:hover {
  background: #0071e3;
  color: #fff;
}

.fp-wp-btn.reset:hover {
  background: #ff3b30;
  color: #fff;
}

.fp-right-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-secondary-text);
  margin-bottom: 6px;
}

.fp-today-drinks {
  font-size: 12px;
  color: var(--sd-primary-text);
  margin-bottom: 12px;
}

.fp-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--sd-border);
  margin-bottom: 10px;
}

.fp-bar {
  flex: 1;
  background: var(--sd-control-fill);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.3s ease, background 0.2s ease;
}

.fp-bar.active {
  background: #0071e3;
}

.fp-bar:hover {
  background: #38bdf8;
}

.fp-stats-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--sd-secondary-text);
}

.fp-stats-row strong {
  color: var(--sd-primary-text);
}

/* Notes Flyout */
.fp-notes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.fp-note-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--sd-surface);
  border: 1px solid var(--sd-border);
  border-radius: 10px;
}

.fp-note-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fp-note-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--sd-primary-text);
}

.fp-note-time {
  font-size: 9.5px;
  color: var(--sd-tertiary-text);
}

.fp-note-del {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--sd-tertiary-text);
  cursor: pointer;
}

.fp-note-del:hover {
  color: #ff3b30;
}

/* Settings Flyout */
.fp-settings-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fp-sg-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--sd-tertiary-text);
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.caption strong {
  color: var(--ink);
}

/* Interactive Apple-Style Settings Studio */
.settings-studio-section {
  margin-bottom: 64px;
}

.section-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.section-lede {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 50ch;
}

.settings-window-mockup {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.window-titlebar {
  height: 38px;
  background: #f6f6f8;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 14px;
  position: relative;
}

.window-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.window-body {
  display: flex;
  min-height: 380px;
}

.window-sidebar {
  width: 200px;
  background: #fbfbfd;
  border-right: 1px solid var(--line);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #8e8e93;
  padding: 0 8px 4px;
  letter-spacing: 0.04em;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.sidebar-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-item.active {
  background: #0071e3;
  color: #ffffff;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.sidebar-icon.purple { background: var(--accent-purple); }
.sidebar-icon.blue { background: var(--accent); }
.sidebar-icon.orange { background: var(--accent-orange); }
.sidebar-icon.gray { background: #8e8e93; }

.window-detail {
  flex: 1;
  padding: 24px 28px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.pane-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}

.pane-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

.setting-group {
  margin-bottom: 24px;
}

.group-title {
  font-size: 11px;
  font-weight: 600;
  color: #8e8e93;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.style-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.web-style-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.web-style-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.web-style-card.active {
  border-color: #0071e3;
  background: rgba(0, 113, 227, 0.04);
}

.card-icon {
  color: #0071e3;
  margin-bottom: 8px;
}

.card-name {
  font-weight: 600;
  font-size: 13px;
}

.card-desc {
  font-size: 11.5px;
  color: var(--muted);
}

.sliders-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.row-label {
  width: 140px;
  font-weight: 500;
}

.mini-slider {
  flex: 1;
  accent-color: #0071e3;
}

.row-value {
  width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: none;
}

.subtext {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

.apple-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 24px;
  background: #e5e5ea;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease;
}

.apple-toggle:checked {
  background: #34c759;
}

.apple-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-toggle:checked::after {
  transform: translateX(16px);
}

/* Support Tab */
.support-card-content {
  text-align: center;
  max-width: 440px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-cup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 149, 0, 0.12);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.support-card-content h4 {
  font-size: 18px;
  margin: 0 0 8px;
}

.support-card-content p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.kofi-submit-btn {
  background: #ff5e5b;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 94, 91, 0.3);
  transition: all 0.2s ease;
}

.kofi-submit-btn:hover {
  background: #fa4a46;
  transform: translateY(-1px);
}

/* About Tab */
.about-pane-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.about-icon {
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  margin-bottom: 12px;
}

.about-title {
  font-size: 20px;
  margin: 0 0 2px;
}

.about-ver {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.about-copy {
  font-size: 13.5px;
  color: var(--ink);
  margin: 0 0 16px;
}

.about-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.about-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f4f4f5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #52525b;
}

/* Architecture & Features Grid (.stack) */
.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--card);
}

.card h2 {
  font-size: 22px;
  margin: 0 0 16px;
}

dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
}

dt {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

dd {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

dd strong {
  color: var(--ink);
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 14px;
}

footer a {
  color: var(--ink);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.links {
  display: flex;
  gap: 16px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .topbar .badge.os {
    display: none;
  }
  .topbar .brand .pill:not(.back-pill) span {
    display: none;
  }
  .topbar .brand .pill:not(.back-pill) {
    padding: 0 8px;
  }
  .topbar .presence-label {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 14px;
    height: 56px;
  }
  .topbar-actions {
    display: none;
  }
  .topbar .brand .pill:not(.back-pill) {
    display: none;
  }
  .brand {
    gap: 8px;
  }
  .stage {
    padding: 76px 14px 60px;
  }
  h1 {
    font-size: clamp(26px, 5.5vw, 36px);
  }
  .lede {
    font-size: 16px;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .card {
    padding: 24px 16px;
  }
  .simulator-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .sim-divider {
    display: none;
  }
  .sim-group {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .sim-group .segmented-control {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .desktop-canvas {
    min-height: 940px;
    height: auto;
    overflow-y: visible;
    overflow-x: auto;
    padding: 20px 8px;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
  }
  .mac-menubar .menu-item {
    display: none;
  }
  .sidedeck-wrapper {
    position: relative;
    top: auto;
    bottom: auto;
    right: auto;
    left: auto;
    flex-direction: column-reverse !important;
    gap: 16px;
    align-items: center;
    width: 100%;
  }
  .flyout-beak {
    display: none;
  }
  .sidedeck-flyout {
    width: min(340px, 94vw) !important;
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .sidedeck-flyout.wide {
    width: min(360px, 96vw) !important;
  }
  .fp-water-split {
    flex-direction: column;
    gap: 14px;
    align-items: center;
  }
  .fp-water-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  .fp-annual-grid {
    grid-template-columns: repeat(14, 1fr);
    gap: 2.5px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .window-body {
    flex-direction: column;
  }
  .window-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .style-cards-grid {
    grid-template-columns: 1fr;
  }
  .specs-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 0 10px;
  }
  .brand {
    gap: 6px;
  }
  .brand-name {
    font-size: 13.5px;
  }
  .crumb-name {
    font-size: 13.5px;
  }
  .back-pill {
    padding: 0 8px;
    font-size: 11.5px;
  }
  .pill-kicker {
    font-size: 11.5px;
    padding: 4px 10px;
  }
  .purchase-row .button.primary {
    width: 100%;
    padding: 0 12px;
    font-size: 13px;
    justify-content: center;
  }
  .purchase-row .button.primary .amount {
    font-size: 11px;
  }
  .brew-box {
    max-width: 100%;
    padding: 0 8px 0 10px;
  }
  .brew-box code {
    font-size: 11.5px;
  }
}

@media (max-width: 360px) {
  .purchase-row .button.primary .amount {
    display: none;
  }
}

