/* Oh My Photos (轻相册) — Archival Light Table & Silver-Gelatin Darkroom Design System */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --well: #eae6dd;
  --table-frame: #20232a;
  --table-bezel: #f9f8f4;
  --darkroom: #111419;
  --darkroom-surface: #191d24;
  --ink: #141518;
  --ink-2: #474b54;
  --ink-3: #5e636f;
  --line: rgba(20, 21, 24, 0.11);
  --line-strong: rgba(20, 21, 24, 0.22);
  --accent: #1858cf;
  --accent-hover: #1348ae;
  --accent-soft: rgba(24, 88, 207, 0.1);
  --keep: #0e673e;
  --keep-soft: rgba(14, 103, 62, 0.11);
  --trash: #ae261d;
  --trash-soft: rgba(174, 38, 29, 0.11);
  --shadow-table: 0 30px 68px -28px rgba(17, 20, 25, 0.24), 0 6px 20px -8px rgba(17, 20, 25, 0.08);
  --shadow-phone: 0 34px 70px -22px rgba(17, 20, 25, 0.34), 0 8px 24px -8px rgba(17, 20, 25, 0.14);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #151921;
  --well: #101319;
  --table-frame: #08090c;
  --table-bezel: #181c24;
  --darkroom: #080a0d;
  --darkroom-surface: #13171f;
  --ink: #f3f4f7;
  --ink-2: #b4bac6;
  --ink-3: #8f97a6;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #5291ff;
  --accent-hover: #3b7ef8;
  --accent-soft: rgba(82, 145, 255, 0.16);
  --keep: #34c785;
  --keep-soft: rgba(52, 199, 133, 0.15);
  --trash: #ff7a70;
  --trash-soft: rgba(255, 122, 112, 0.15);
  --shadow-table: 0 34px 74px -22px rgba(0, 0, 0, 0.65);
  --shadow-phone: 0 36px 80px -20px rgba(0, 0, 0, 0.72);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.22s ease, color 0.22s ease;
}

[data-lang="zh"] [data-i18n="en"] { display: none !important; }
[data-lang="en"] [data-i18n="zh"] { display: none !important; }

.only-dark { display: none; }
[data-theme="dark"] .only-light { display: none; }
[data-theme="dark"] .only-dark { display: block; }

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus {
  outline: none;
}

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

h1, h2, h3 {
  text-wrap: balance;
}

.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Header / Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}

.nav-links a {
  padding: 6px 0;
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  font-weight: 560;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.tool-btn:hover {
  border-color: var(--ink-2);
}

/* ---------- Hero: Asymmetric Archival Light Table Above-the-Fold ---------- */
.hero {
  padding: 36px 0 68px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 44px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--keep);
  display: inline-block;
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.1vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.034em;
  font-weight: 720;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 26px;
  max-width: 460px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: #1858cf;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  box-shadow: 0 10px 24px -10px rgba(24, 88, 207, 0.52);
  transition: transform 0.16s ease, background-color 0.18s ease;
}

.btn-primary:hover {
  background: #1348ae;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
  border: 1px solid var(--line-strong);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--ink-2);
}

.hero-pledge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  width: 100%;
  font-size: 13px;
  color: var(--ink-2);
}

.hero-pledge-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pledge-mark {
  color: var(--keep);
  font-weight: 700;
}

/* ---------- Physical Illuminated Studio Light Table (Single Hero Protagonist) ---------- */
.light-table-housing {
  background: var(--table-frame);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: var(--shadow-table);
}

.light-table-surface {
  background: var(--table-bezel);
  border-radius: 18px;
  padding: 20px 22px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset 0 0 40px rgba(255, 250, 236, 0.32);
}

[data-theme="dark"] .light-table-surface {
  box-shadow: inset 0 0 42px rgba(82, 145, 255, 0.08);
}

/* Filmstrip header with optical registration ticks */
.loupe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.loupe-bar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.loupe-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e59b2d;
  box-shadow: 0 0 8px rgba(229, 155, 45, 0.7);
}

.slide-stage {
  position: relative;
  height: 332px;
  border-radius: 14px;
  background: #14171d;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

/* Optical corner crop marks inside light table */
.slide-stage::before,
.slide-stage::after {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  z-index: 1;
}

.slide-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #14171d;
  color: #ffffff;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: grab;
  will-change: transform;
}

.slide-card.is-dragging {
  transition: none;
  cursor: grabbing;
}

.slide-card.exit-left {
  transform: translateX(-118%) rotate(-9deg);
  opacity: 0;
}

.slide-card.exit-right {
  transform: translateX(118%) rotate(9deg);
  opacity: 0;
}

.slide-card.enter-pop {
  animation: slideReturn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideReturn {
  0% { transform: scale(0.94) translateY(8px); opacity: 0.4; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.slide-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.slide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.16) 0%, rgba(10, 12, 16, 0.06) 42%, rgba(10, 12, 16, 0.86) 100%);
  pointer-events: none;
}

.slide-receipt {
  position: absolute;
  inset: 0;
  background: #eff2f7;
  color: #16181d;
  padding: 52px 22px 86px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.receipt-sheet {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #2f333b;
}

.receipt-row strong {
  color: #111317;
}

.slide-badge-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.slide-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.82);
  color: #f4f6fa;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.slide-pill.warn {
  background: rgba(174, 38, 29, 0.94);
  color: #ffffff;
}

.slide-pill.good {
  background: rgba(19, 122, 75, 0.94);
  color: #ffffff;
}

.slide-caption {
  position: relative;
  z-index: 2;
  padding: 16px 18px;
  pointer-events: none;
}

.slide-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.slide-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.slide-stamp {
  position: absolute;
  top: 52px;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.slide-stamp.trash {
  right: 16px;
  color: #ffffff;
  background: #ae261d;
  transform: rotate(7deg);
}

.slide-stamp.keep {
  left: 16px;
  color: #ffffff;
  background: #137a4b;
  transform: rotate(-7deg);
}

.slide-complete {
  text-align: center;
  padding: 24px 20px;
  color: #f3f5f8;
}

.slide-complete h3 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.slide-complete p {
  margin: 0 0 18px;
  color: #b8c0ce;
  font-size: 14px;
  line-height: 1.6;
}

.slide-complete .btn-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #141518;
  font-size: 14px;
  font-weight: 600;
  border: none;
}

/* Sorter Controls */
.sorter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sorter-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.14s ease, opacity 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.act-btn:active:not(:disabled) { transform: scale(0.97); }
.act-btn:disabled { opacity: 0.42; cursor: not-allowed; }

.act-trash {
  flex: 1;
  background: var(--trash-soft);
  color: var(--trash);
  border-color: color-mix(in srgb, var(--trash) 28%, transparent);
}

.act-trash:hover:not(:disabled) {
  background: #ae261d;
  color: #ffffff;
}

.act-keep {
  flex: 1;
  background: var(--keep-soft);
  color: var(--keep);
  border-color: color-mix(in srgb, var(--keep) 28%, transparent);
}

.act-keep:hover:not(:disabled) {
  background: #137a4b;
  color: #ffffff;
}

.act-undo {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-strong);
  padding: 0 14px;
}

.act-undo:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--ink-2);
}

/* Integrated Safelight Trash Box Tray */
.trash-tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--well);
  font-size: 13px;
}

.trash-tray-left {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 600;
  flex-wrap: wrap;
}

.trash-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ae261d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.trash-size-label {
  color: var(--trash);
  font-weight: 600;
}

.trash-tray-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trash-tray-note {
  color: var(--ink-3);
  font-size: 12px;
}

.tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--ink);
}

.tray-chip:hover {
  border-color: var(--trash);
  color: var(--trash);
}

/* ---------- Chapter 2: Darkroom Honest Math Band ---------- */
.darkroom-band {
  background: var(--darkroom);
  color: #f4f5f8;
  padding: 88px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.darkroom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 52px;
  align-items: center;
}

.section-label-dark {
  font-size: 13px;
  font-weight: 600;
  color: #7ab0ff;
  margin-bottom: 12px;
}

.darkroom-band h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.darkroom-band .lead {
  margin: 0 0 28px;
  color: #b4bcc9;
  font-size: 16px;
  line-height: 1.7;
}

.proof-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.proof-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
}

.proof-label {
  margin-top: 6px;
  font-size: 13px;
  color: #9ba4b4;
  line-height: 1.45;
}

.math-panel {
  background: var(--darkroom-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bar-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.bar-name {
  font-size: 15px;
  font-weight: 600;
  color: #e9ecf2;
}

.bar-price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.bar-price.bad { color: #ff857b; }
.bar-price.good { color: #4ad997; }

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill { height: 100%; border-radius: 999px; }
.bar-fill.bad { width: 100%; background: linear-gradient(90deg, #b6362d 0%, #e0544a 100%); }
.bar-fill.good { width: 3.5%; min-width: 18px; background: #34c785; }

.bar-note {
  font-size: 13px;
  color: #9ba4b4;
  margin: 0;
}

.math-foot {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #cbd2de;
}

/* ---------- Chapter 3: Five Precision Tools + Real iPhone Screens ---------- */
.section {
  padding: 88px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

/* Mobile-only synced pill switcher (hidden on desktop) */
.mobile-feature-pills {
  display: none;
}

.mobile-feature-detail {
  display: none;
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 52px;
  align-items: start;
}

.feature-rail {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.feature-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 20px 16px 20px 20px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  position: relative;
  transition: background-color 0.18s ease;
}

.feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  transition: background-color 0.2s ease;
}

.feature-item:hover {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.feature-item.is-active {
  background: var(--surface);
}

.feature-item.is-active::before {
  background: var(--accent);
}

.feature-idx {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 3px;
}

.feature-item.is-active .feature-idx {
  color: var(--accent);
}

.feature-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.feature-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.feature-stage-sticky {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.iphone-shell {
  width: min(302px, 100%);
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(155deg, #2b2f38 0%, #14171d 55%, #0c0e12 100%);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.iphone-screen {
  border-radius: 35px;
  overflow: hidden;
  background: #0d0f13;
  aspect-ratio: 9 / 19.5;
  position: relative;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.iphone-screen img.is-swapping {
  opacity: 0.35;
  transform: scale(0.985);
}

.stage-caption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  max-width: 340px;
}

/* ---------- Chapter 4: Visual Double-Safe Protection Architecture ---------- */
.safety-section {
  padding: 84px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--well) 55%, var(--bg));
}

.safety-visual-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.safety-gate {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
  border-top: 2px solid var(--line-strong);
}

.safety-gate.gate-final {
  border-top-color: var(--keep);
}

.gate-schematic {
  height: 112px;
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px -12px rgba(17, 20, 25, 0.12);
}

.gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.gate-tag {
  font-weight: 700;
  color: var(--accent);
}

.safety-gate.gate-final .gate-tag {
  color: var(--keep);
}

.gate-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.gate-meter {
  height: 6px;
  border-radius: 999px;
  background: var(--well);
  overflow: hidden;
}

.gate-meter-fill {
  height: 100%;
  border-radius: 999px;
}

.safety-gate h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.safety-gate p {
  margin: 0;
  font-size: 14px;
  line-height: 1.68;
  color: var(--ink-2);
}

/* ---------- Chapter 5: Transparent Pricing Ledger ---------- */
.pricing-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.plan-col {
  padding: 38px 42px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.plan-col + .plan-col {
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.plan-tag {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-3);
}

.plan-col.is-pro .plan-tag {
  color: var(--accent);
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-price {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1;
}

.plan-freq {
  font-size: 14px;
  color: var(--ink-2);
}

.plan-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.plan-list {
  list-style: none;
  margin: 2px 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.plan-check {
  color: var(--keep);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-cta .btn-primary,
.plan-cta .btn-ghost {
  width: 100%;
}

.plan-cta-sub {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- Chapter 6: Closing Acquisition CTA & Footer ---------- */
.closing {
  padding: 80px 0 72px;
  text-align: center;
}

.closing-icon {
  width: 74px;
  height: 74px;
  border-radius: 17px;
  margin: 0 auto 20px;
  box-shadow: 0 18px 36px -14px rgba(17, 20, 25, 0.28);
}

.closing h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.closing p {
  margin: 0 auto 26px;
  max-width: 520px;
  color: var(--ink-2);
  font-size: 16px;
}

.closing .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 38px;
  font-size: 13px;
  color: var(--ink-3);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Get App / TestFlight Lightweight Dialog ---------- */
.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 14, 18, 0.62);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-dialog-backdrop.is-open {
  display: flex;
}

.app-dialog {
  width: min(460px, 100%);
  background: var(--surface);
  color: var(--ink);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.36);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-dialog-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.dialog-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.app-dialog p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.dialog-meta {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--well);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---------- Legal / Support Subpages ---------- */
.doc-wrap {
  padding: 64px 0 96px;
  max-width: 760px;
  margin-inline: auto;
}

.doc-wrap h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.doc-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.doc-wrap h2 {
  margin: 34px 0 12px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.doc-wrap p, .doc-wrap li {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
}

.doc-wrap ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-callout {
  padding: 20px 24px;
  border-left: 3px solid var(--keep);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.doc-callout strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .darkroom-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .safety-visual-rail {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pricing-ledger {
    grid-template-columns: 1fr;
  }

  .plan-col {
    padding: 30px 24px;
  }

  .plan-col + .plan-col {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  /* Switch Feature Rail to compact pill bar directly above the phone on mobile/tablet */
  .feature-rail {
    display: none;
  }

  .mobile-feature-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-feature-pills::-webkit-scrollbar {
    display: none;
  }

  .mobile-pill {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-pill.is-active {
    background: #1858cf;
    border-color: #1858cf;
    color: #ffffff;
  }

  .mobile-feature-detail {
    display: block;
    margin-bottom: 20px;
  }

  .mobile-feature-detail h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 650;
  }

  .mobile-feature-detail p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink-2);
  }

  .feature-stage-sticky {
    position: static;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 20px 0 48px;
  }

  .hero-grid {
    gap: 20px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .hero-lead {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .hero-actions {
    width: 100%;
    margin-bottom: 14px;
    gap: 8px;
  }

  .hero-actions .btn-primary {
    flex: 1;
    height: 42px;
    font-size: 14px;
    padding: 0 16px;
  }

  .hero-actions .btn-ghost {
    height: 42px;
    font-size: 14px;
    padding: 0 14px;
  }

  .hero-pledge-list {
    display: none;
  }

  .light-table-housing {
    padding: 8px;
    border-radius: 20px;
  }

  .light-table-surface {
    padding: 12px 12px 12px;
    border-radius: 14px;
    gap: 10px;
  }

  .loupe-bar {
    padding-bottom: 8px;
    font-size: 12px;
  }

  .slide-stage {
    height: 236px;
    padding: 6px;
  }

  .slide-badge-row .slide-pill:last-child {
    display: none;
  }

  .slide-caption {
    padding: 12px 14px;
  }

  .slide-title {
    font-size: 16px;
  }

  .slide-sub {
    font-size: 12px;
  }

  .act-btn {
    height: 38px;
    font-size: 13px;
    padding: 0 10px;
  }

  .trash-tray {
    padding: 9px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .section,
  .darkroom-band,
  .safety-section {
    padding: 58px 0;
  }

  .proof-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .proof-num {
    font-size: 20px;
  }

  .proof-label {
    font-size: 12px;
  }

  .bar-head {
    flex-wrap: wrap;
  }

  .iphone-shell {
    width: min(268px, 100%);
  }
}
