/* getfalkenblick.com: Falkenblick native macOS Git client */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(/fonts/space-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(/fonts/space-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Light palette: crisp architectural alpine slate + forged falcon amber */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-subtle: #eaeff5;
  --fg: #0f131c;
  --muted: #4a5266;
  --accent: #b85d00;
  --amber: #f59e0b;
  --amber-hover: #e08e05;
  --on-amber: #0f131c;
  --line: rgba(15, 19, 28, 0.11);
  --line-strong: rgba(15, 19, 28, 0.2);

  /* Contrast obsidian band + macOS workbench window */
  --obsidian: #0e1119;
  --obsidian-surface: #151a26;
  --obsidian-subtle: #1c2233;
  --obsidian-fg: #f2f4fa;
  --obsidian-muted: #9aa4bc;
  --obsidian-line: rgba(242, 244, 250, 0.12);
  --obsidian-accent: #f5a524;

  /* Diff semantics inside the interactive workbench */
  --diff-add-bg: rgba(22, 163, 74, 0.14);
  --diff-add-fg: #4ade80;
  --diff-del-bg: rgba(225, 29, 72, 0.16);
  --diff-del-fg: #fb7185;
  --diff-staged-bg: rgba(245, 165, 36, 0.14);
  --diff-staged-border: rgba(245, 165, 36, 0.5);

  /* Typography: 2 families + monospace strictly for Git diffs & CLI */
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Strict 3-size body scale below hero (h1 & navbar brand exempt) */
  --text-heading: clamp(1.85rem, 3.2vw, 2.75rem);
  --text-body: 1.0625rem;
  --text-sm: 0.875rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e14;
    --surface: #141822;
    --surface-subtle: #1b2030;
    --fg: #f1f4fa;
    --muted: #99a3ba;
    --accent: #f5a524;
    --amber: #f5a524;
    --amber-hover: #ffb73d;
    --on-amber: #0c0e14;
    --line: rgba(241, 244, 250, 0.11);
    --line-strong: rgba(241, 244, 250, 0.22);

    --obsidian: #111520;
    --obsidian-surface: #171c2a;
    --obsidian-subtle: #1e2538;
  }
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--text-body)/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header: borderless over hero at y = 0, separates cleanly on scroll */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--fg);
  text-decoration: none;
  font: 700 1.375rem/1 var(--display);
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

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

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 160ms var(--ease);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--fg);
}

.nav a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}

.nav a.nav-cta:hover {
  background: var(--amber-hover);
  color: var(--on-amber);
}

.nav-soon {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px dashed color-mix(in srgb, var(--amber) 60%, var(--line-strong));
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.soon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--amber) 70%, var(--line-strong));
  color: var(--fg);
  font: 600 var(--text-body)/1 var(--sans);
  white-space: nowrap;
}

.soon-box .ic {
  color: var(--accent);
}

/* Primary CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  background: var(--amber);
  color: var(--on-amber);
  font: 600 var(--text-body)/1 var(--sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.btn-primary:hover {
  background: var(--amber-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Hero: centered monumental headline + wide interactive workbench stage */
.hero {
  position: relative;
  margin-top: -72px;
  padding: 120px 0 88px;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin-bottom: 28px;
  box-shadow: 0 24px 48px -18px rgba(12, 14, 20, 0.55), 0 0 0 1px var(--line);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.8vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 auto 22px;
  max-width: 15ch;
  text-wrap: balance;
}

.hero-lead {
  font-size: var(--text-body);
  color: var(--muted);
  max-width: 48ch;
  margin: 0 auto 30px;
  text-wrap: pretty;
}

.hero-meta {
  margin: 14px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Authentic Falkenblick macOS App Window (AppKit + SwiftUI parity) */
.workbench-stage {
  position: relative;
  z-index: 1;
  margin-top: 52px;
}

.mac-window {
  --app-bg: #1c1d21;
  --app-toolbar: #272930;
  --app-sidebar: #22242a;
  --app-surface: #25272e;
  --app-elevated: #2e313a;
  --app-border: rgba(255, 255, 255, 0.09);
  --app-fg: #eceff4;
  --app-muted: #9299a8;
  --app-blue: #0a84ff;
  --app-teal: #5ac8fa;
  --app-orange: #ff9f0a;
  --app-green: #30d158;
  --app-red: #ff453a;

  background: var(--app-bg);
  color: var(--app-fg);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 40px 90px -28px rgba(8, 10, 18, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-align: left;
  font-family: var(--sans);
}

/* Unified macOS Toolbar */
.mac-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--app-toolbar);
  border-bottom: 1px solid var(--app-border);
  min-height: 48px;
}

.tb-left,
.tb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.traffic-lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

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

.tb-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}

.tb-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-muted);
  font: 500 0.78rem/1 var(--sans);
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}

.tb-btn + .tb-btn {
  border-left: 1px solid var(--app-border);
}

.tb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-fg);
}

.tb-btn.is-active {
  background: rgba(10, 132, 255, 0.24);
  color: #ffffff;
}

.tb-single {
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.tb-ic {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.tb-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.tb-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--app-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-sub {
  font-size: 0.72rem;
  color: var(--app-muted);
  font-family: var(--mono);
  white-space: nowrap;
}

/* Connected Segmented Control (also used in Undo preview below) */
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--app-border);
  border-radius: 7px;
  gap: 2px;
}

.segmented [role="tab"] {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-muted);
  font: 500 0.78rem/1 var(--sans);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
  white-space: nowrap;
}

.segmented [role="tab"]:hover {
  color: var(--app-fg);
}

.segmented [role="tab"][aria-selected="true"] {
  background: var(--app-elevated);
  color: var(--app-fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.segmented-light {
  background: var(--surface-subtle);
  border-color: var(--line);
  padding: 3px;
  border-radius: 9px;
}

.segmented-light [role="tab"] {
  color: var(--muted);
  font-size: var(--text-sm);
  padding: 7px 13px;
}

.segmented-light [role="tab"]:hover {
  color: var(--fg);
}

.segmented-light [role="tab"][aria-selected="true"] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 4px rgba(15, 19, 28, 0.1);
}

/* Real 3-Column App Shell: Left Source-List Sidebar + Main Detail */
.app-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 468px;
}

.app-shell.is-services-mode {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.is-services-mode .app-sidebar {
  display: none;
}

.app-sidebar {
  background: var(--app-sidebar);
  border-right: 1px solid var(--app-border);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  user-select: none;
}

.sb-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--app-muted);
  padding: 0 8px 4px;
  letter-spacing: 0.01em;
}

.sb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-item {
  width: 100%;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-fg);
  font: 400 0.8rem/1.2 var(--sans);
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms var(--ease);
}

.sb-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sb-item.is-active {
  background: var(--app-blue);
  color: #ffffff;
  font-weight: 500;
}

.sb-item.is-static {
  cursor: default;
  color: var(--app-muted);
}

.sb-item.is-static:hover {
  background: transparent;
}

.sb-item.is-head {
  color: var(--app-fg);
  font-weight: 600;
}

.sb-item .sb-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-muted);
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.sb-item.is-active .sb-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.sb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-blue);
  flex-shrink: 0;
}

.app-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wb-panel {
  display: none;
  flex: 1;
  min-width: 0;
}

.wb-panel.is-active {
  display: flex;
  flex-direction: column;
}

/* Mobile quick view switcher (hidden on desktop where sidebar is shown) */
.mobile-view-bar {
  display: none;
  padding: 8px 12px;
  background: var(--app-sidebar);
  border-bottom: 1px solid var(--app-border);
}

/* Panel 1: Working Copy Split [Top Composer + File Table | Right CoreTextDiffView] */
.wc-layout {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  flex: 1;
  min-height: 468px;
}

.wc-left {
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  min-width: 0;
}

/* Real CommitComposerView at TOP of Working Copy column */
.wc-composer {
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface);
}

.composer-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--app-muted);
}

.composer-track strong {
  color: var(--app-fg);
  font-weight: 500;
}

.composer-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wc-msg {
  font-size: 0.8125rem;
  color: var(--app-fg);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 6px 9px;
  line-height: 1.35;
}

.wc-commit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wc-composer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wc-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #486472;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wc-stage-all {
  appearance: none;
  border: 1px solid var(--app-border);
  background: var(--app-elevated);
  color: var(--app-fg);
  font: 500 0.75rem/1 var(--sans);
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.wc-stage-all:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.wc-commit-action {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--app-blue);
  color: #ffffff;
  font: 600 0.78rem/1 var(--sans);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 140ms var(--ease);
}

.wc-commit-action:hover {
  opacity: 0.9;
}

.wc-commit-action:disabled {
  opacity: 0.4;
  cursor: default;
}

.wc-table-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--app-muted);
  border-bottom: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.02);
}

.wc-files {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.wc-file {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  width: 100%;
  padding: 7px 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--app-fg);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms var(--ease);
}

.wc-file:hover {
  background: rgba(255, 255, 255, 0.04);
}

.wc-file.is-selected {
  background: rgba(10, 132, 255, 0.24);
}

.wc-check-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wc-chk {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.wc-chk.is-checked {
  background: var(--app-blue);
  border-color: var(--app-blue);
}

.wc-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--app-orange);
}

.wc-status.added {
  color: var(--app-green);
}

.wc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--app-muted);
  text-align: right;
}

/* Right Column: CoreTextDiffView */
.wc-diff-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #17181c;
}

.diff-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  min-width: 0;
}

.diff-filepath {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--app-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.diff-summary-banner {
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diff-summary-banner strong {
  font-size: 0.78rem;
  color: var(--app-fg);
  font-weight: 600;
}

.diff-summary-banner span {
  font-size: 0.72rem;
  color: var(--app-muted);
}

.diff-hunk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(10, 132, 255, 0.09);
  border-bottom: 1px solid var(--app-border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #8cc4ff;
  min-width: 0;
}

.diff-hunk-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hunk-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--app-elevated);
  color: var(--app-fg);
  font: 500 0.73rem/1 var(--sans);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease);
}

.hunk-toggle:hover {
  background: var(--app-blue);
  border-color: var(--app-blue);
  color: #fff;
}

.diff-lines {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.65;
  overflow-x: auto;
  padding: 4px 0;
  flex: 1;
}

.diff-row {
  display: grid;
  grid-template-columns: 34px 34px 22px minmax(0, 1fr);
  padding: 1px 14px 1px 8px;
  border-left: 3px solid transparent;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease);
}

.diff-row.is-interactive {
  cursor: pointer;
}

.diff-row.is-interactive:hover {
  filter: brightness(1.12);
}

.diff-row.add { background: rgba(48, 209, 88, 0.13); }
.diff-row.del { background: rgba(255, 69, 58, 0.15); }
.diff-row.is-staged {
  border-left-color: var(--app-blue);
  background: rgba(10, 132, 255, 0.16);
}

.diff-ln {
  color: rgba(146, 153, 168, 0.5);
  text-align: right;
  padding-right: 8px;
  user-select: none;
}

.diff-mark {
  text-align: center;
  font-weight: 700;
  user-select: none;
}

.diff-row.add .diff-mark { color: var(--app-green); }
.diff-row.del .diff-mark { color: var(--app-red); }
.diff-row.is-staged .diff-mark { color: #64b5ff; }

.diff-code {
  white-space: pre;
  color: var(--app-fg);
}

.diff-hint {
  padding: 7px 14px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
  font-size: 0.75rem;
  color: var(--app-muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Panel 2: History Split (All Commits with Month Header + CommitInspectorView) */
.graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  flex: 1;
  min-height: 468px;
}

.graph-col {
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pane-subheader {
  padding: 8px 14px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-fg);
}

.month-hdr {
  padding: 6px 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--app-border);
}

.commit-row {
  display: grid;
  grid-template-columns: 44px 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 12px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--app-fg);
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms var(--ease);
}

.commit-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.commit-row.is-selected {
  background: var(--app-blue);
  color: #ffffff;
}

.commit-lanes {
  height: 40px;
  display: block;
}

.author-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4d6272;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-av.is-lg {
  width: 40px;
  height: 40px;
  font-size: 0.95rem;
}

.commit-cell-body {
  min-width: 0;
}

.commit-top-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.commit-author {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ref-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--app-blue);
  color: #fff;
  white-space: nowrap;
}

.ref-pill.is-tag {
  background: #bfa33a;
  color: #141414;
}

.ref-pill.is-branch {
  background: rgba(90, 200, 250, 0.25);
  color: #8ee0ff;
}

.commit-row.is-selected .ref-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.commit-date-sha {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--app-muted);
  white-space: nowrap;
}

.commit-row.is-selected .commit-date-sha,
.commit-row.is-selected .commit-title {
  color: rgba(255, 255, 255, 0.92);
}

.commit-title {
  font-size: 0.78rem;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Right Column: CommitInspectorView */
.inspector-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #17181c;
}

.inspector-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.inspector-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 0.74rem;
  min-width: 0;
}

.meta-k {
  color: var(--app-muted);
  text-align: right;
}

.meta-v {
  color: var(--app-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-v.mono {
  font-family: var(--mono);
}

.inspector-subject {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--app-fg);
  padding-top: 10px;
  border-top: 1px solid var(--app-border);
}

.inspector-files {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspector-files li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--app-fg);
  min-width: 0;
}

.inspector-files .if-st {
  font-weight: 700;
  color: var(--app-orange);
}

.inspector-files .if-st.added {
  color: var(--app-green);
}

.inspector-files .if-st.tree {
  color: var(--app-muted);
  font-weight: 500;
}

.inspector-files .if-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-files .if-stat {
  white-space: nowrap;
  text-align: right;
}

.stat-plus { color: var(--app-green); }
.stat-minus { color: var(--app-red); }

/* Panel 3: WorktreesWorkspaceView */
.wt-list {
  display: flex;
  flex-direction: column;
}

.wt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: none;
  border-bottom: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-fg);
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: background-color 120ms var(--ease);
}

.wt-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.wt-row.is-active {
  background: rgba(10, 132, 255, 0.14);
}

.wt-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wt-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.wt-dir {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-fg);
}

.wt-pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(10, 132, 255, 0.2);
  color: #6ab5ff;
}

.wt-pill.is-dirty {
  background: rgba(255, 159, 10, 0.2);
  color: var(--app-orange);
}

.wt-path {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--app-muted);
  margin-top: 2px;
}

.wt-sync {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--app-muted);
  white-space: nowrap;
}

/* Panel 4: Services & Accounts Hub (real ServicesHubView!) */
.services-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  flex: 1;
  min-height: 468px;
}

.svc-sidebar {
  background: var(--app-sidebar);
  border-right: 1px solid var(--app-border);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.svc-acc {
  width: 100%;
  appearance: none;
  border: none;
  background: transparent;
  padding: 7px 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  color: var(--app-fg);
  cursor: pointer;
}

.svc-acc.is-active {
  background: var(--app-blue);
  color: #fff;
}

.svc-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.svc-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}

.svc-host {
  font-size: 0.7rem;
  color: var(--app-muted);
}

.svc-acc.is-active .svc-host {
  color: rgba(255, 255, 255, 0.8);
}

.svc-repo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-border);
}

.svc-repo-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--app-fg);
}

.svc-repo-desc {
  font-size: 0.74rem;
  color: var(--app-muted);
  margin-top: 2px;
}

/* Collapsible Bottom Git Command Transcript Drawer (real rootVerticalSplit!) */
.transcript-drawer {
  border-top: 1px solid var(--app-border);
  background: #141519;
  display: none;
}

.transcript-drawer.is-open {
  display: block;
}

.transcript-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  font-size: 0.74rem;
  color: var(--app-muted);
}

.transcript-head strong {
  color: var(--app-fg);
}

.transcript-log {
  list-style: none;
  margin: 0;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 0.73rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 124px;
  overflow-y: auto;
}

.transcript-entry {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 54px 48px;
  gap: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  align-items: center;
}

.tr-time { color: var(--app-muted); }
.tr-cmd { color: var(--app-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-ms { color: var(--app-orange); text-align: right; }
.tr-exit { color: var(--app-green); text-align: right; }

/* Bottom macOS Window Status Bar */
.app-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 14px;
  background: var(--app-toolbar);
  border-top: 1px solid var(--app-border);
  font-size: 0.72rem;
  color: var(--app-muted);
}

.statusbar-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-muted);
  font: 500 0.72rem/1 var(--mono);
  cursor: pointer;
  padding: 2px 4px;
}

.statusbar-toggle:hover {
  color: var(--app-fg);
}

/* Sections & Editorial Feature Bands */
.section {
  padding: 88px 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 56px;
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-heading);
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

.editorial-stack {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.editorial-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.editorial-band.is-reversed .editorial-copy {
  order: 2;
}

.editorial-band.is-reversed .editorial-visual {
  order: 1;
}

.editorial-copy h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-heading);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
}

.editorial-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 54ch;
}

.editorial-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editorial-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--fg);
}

.editorial-list .check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Tailored visual companions (single surface, no card-in-card cages) */
.visual-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.scale-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.scale-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
  margin-bottom: 7px;
}

.scale-label strong {
  color: var(--fg);
  font-weight: 600;
}

.scale-label span {
  color: var(--muted);
  font-family: var(--mono);
}

.scale-track {
  height: 12px;
  border-radius: 6px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.scale-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--muted);
  opacity: 0.35;
}

.scale-fill.is-falkenblick {
  background: var(--amber);
  opacity: 1;
}

.visual-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.visual-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.mono-inline {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--fg);
}

/* Interactive Undo Safety Visual */
.undo-controls {
  margin-bottom: 20px;
}

.undo-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.undo-step {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.undo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  margin-top: 8px;
}

.undo-dot.is-amber {
  background: var(--amber);
}

.undo-step strong {
  display: block;
  font-weight: 600;
  color: var(--fg);
}

.undo-step span {
  display: block;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 2px;
}

.undo-panel {
  display: none;
}

.undo-panel.is-active {
  display: block;
}

/* Worktree Topology Visual */
.wt-diagram {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wt-node {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.wt-node:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.wt-node strong {
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--fg);
}

.wt-node span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.wt-root {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--amber);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.wt-root strong {
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--accent);
}

.wt-root span {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Provider Matrix (clean hairline typographic grid) */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.provider-cell {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.provider-cell:nth-child(even) {
  padding-left: 16px;
  padding-right: 0;
  border-left: 1px solid var(--line);
}

.provider-cell strong {
  font-weight: 600;
  color: var(--fg);
}

.provider-cell span {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Feature Index (hairline-divided typographic 2x4 grid, zero boxed cards) */
.feature-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.feature-item {
  padding: 28px 32px 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.feature-item:nth-child(even) {
  padding-left: 32px;
  padding-right: 0;
  border-left: 1px solid var(--line);
}

.feature-item .ic {
  color: var(--accent);
  margin-top: 3px;
}

.feature-item h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-body);
  margin: 0 0 6px;
  color: var(--fg);
}

.feature-item p {
  margin: 0;
  color: var(--muted);
}

/* Full-Bleed Obsidian Privacy Band */
.privacy-band {
  background: var(--obsidian);
  color: var(--obsidian-fg);
  padding: 92px 0;
  border-top: 2px solid var(--obsidian-accent);
  border-bottom: 1px solid var(--obsidian-line);
}

.privacy-band h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-heading);
  line-height: 1.08;
  letter-spacing: -0.028em;
  margin: 0 0 14px;
  color: var(--obsidian-fg);
}

.privacy-lead {
  color: var(--obsidian-muted);
  max-width: 58ch;
  margin: 0 0 48px;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 56px;
  border-top: 1px solid var(--obsidian-line);
  padding-top: 40px;
}

.privacy-point h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-body);
  margin: 0 0 8px;
  color: var(--obsidian-fg);
}

.privacy-point p {
  margin: 0;
  color: var(--obsidian-muted);
  max-width: 48ch;
}

/* FAQ Section */
.faq-list {
  border-top: 1px solid var(--line);
  max-width: 820px;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--text-body);
  color: var(--fg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-plus {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 200ms var(--ease);
}

.faq-item[open] .faq-plus {
  transform: rotate(45deg);
}

.faq-answer {
  margin: 0 0 24px;
  color: var(--muted);
  max-width: 65ch;
}

/* Closing Download Band */
.closing-band {
  padding: 40px 0 84px;
}

.closing-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}

.closing-left {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 56ch;
}

.closing-left img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 16px 32px -14px rgba(12, 14, 20, 0.45);
}

.closing-left h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-heading);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

.closing-left p {
  margin: 0;
  color: var(--muted);
}

.closing-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.closing-meta {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: var(--text-sm);
  color: var(--muted);
}

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

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

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--fg);
}

/* Legal pages (Impressum & Datenschutz) */
.legal-main {
  max-width: 740px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.legal-main h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.legal-main h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
}

.legal-main h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-body);
  margin: 26px 0 8px;
}

.legal-main p,
.legal-main li {
  color: var(--muted);
  max-width: 65ch;
}

.legal-main strong {
  color: var(--fg);
}

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

/* Responsive Breakpoints */
@media (max-width: 1020px) {
  .tb-opt {
    display: none;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .app-sidebar {
    display: none;
  }

  .mobile-view-bar {
    display: block;
  }

  .wc-layout,
  .graph-layout,
  .services-layout,
  .editorial-band {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .wc-left,
  .graph-col,
  .svc-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--app-border);
  }

  .editorial-band {
    gap: 32px;
  }

  .editorial-band.is-reversed .editorial-copy,
  .editorial-band.is-reversed .editorial-visual {
    order: initial;
  }

  .feature-index,
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-item,
  .feature-item:nth-child(even) {
    padding: 24px 0;
    border-left: none;
  }

  .closing-inner {
    padding: 32px;
  }

  .closing-action {
    align-items: flex-start;
  }
}

/* Keeps the header on one line between the tablet and phone breakpoints. */
@media (max-width: 820px) {
  .nav {
    gap: 14px;
  }

  .nav a.nav-opt[href="#ueberblick"],
  .nav a.nav-opt[href="#overview"] {
    display: none;
  }
}

@media (max-width: 680px) {
  .wrap {
    padding: 0 20px;
  }

  .nav a.nav-opt {
    display: none;
  }

  .nav {
    gap: 14px;
  }

  .hero {
    padding: 104px 0 64px;
  }

  .hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 17px;
    margin-bottom: 22px;
  }

  .mac-toolbar {
    padding: 10px 12px;
  }

  .tb-sync-opt {
    display: none;
  }

  .mobile-view-bar .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-view-bar .segmented [role="tab"] {
    text-align: center;
    padding: 8px 8px;
  }

  .undo-controls .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .wt-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .transcript-entry {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tr-time,
  .tr-exit {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .editorial-stack {
    gap: 52px;
  }

  .visual-panel {
    padding: 22px 20px;
  }

  .provider-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .provider-cell,
  .provider-cell:nth-child(even) {
    padding: 12px 0;
    border-left: none;
  }

  .privacy-band {
    padding: 64px 0;
  }

  .closing-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .closing-inner {
    padding: 24px 20px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #2c3345;
    --line: rgba(15, 19, 28, 0.32);
    --line-strong: rgba(15, 19, 28, 0.5);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --muted: #c8d0e2;
      --line: rgba(241, 244, 250, 0.28);
      --line-strong: rgba(241, 244, 250, 0.48);
    }
  }
}

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

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

/* Pricing, Shop, License & Withdrawal boxes */
.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 28px 0;
  box-shadow: 0 24px 56px -36px rgba(15, 19, 28, 0.35);
}

.pricing-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

.pricing-card .price-amt {
  font: 700 clamp(2.5rem, 6vw, 3.75rem)/1 var(--display);
  letter-spacing: -0.03em;
}

.pricing-card .price-sub {
  color: var(--muted);
  font-size: var(--text-sm);
}

.pricing-card .check-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-card .check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pricing-card .check-list .chk {
  color: var(--accent);
  font-weight: 700;
  flex: none;
}

.btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: 0;
  cursor: pointer;
  background: var(--amber);
  color: var(--on-amber);
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  transition: background 0.16s var(--ease);
}

.btn-amber:hover {
  background: var(--amber-hover);
}

.btn-amber:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 18px;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-field input {
  font: 400 1rem/1.45 var(--sans);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}

.form-field input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--amber);
}

.status-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface-subtle);
  font-size: 0.95rem;
}

.status-box.ok {
  border-color: var(--amber);
}

.status-box.err {
  border-color: #e11d48;
  color: #e11d48;
}

.withdrawal-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 18px 0;
}

.legal-main ol {
  padding-left: 22px;
}

.legal-main li {
  margin: 0 0 8px;
}

.sibling-note {
  margin-top: 10px;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Docs / Help pages */
.docs-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 22px 0 32px;
  padding: 0;
  list-style: none;
}

.docs-toc a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.docs-toc a:hover,
.docs-toc a:focus-visible {
  border-color: var(--amber);
  color: var(--amber-ink);
}

.legal-main code,
.legal-main kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
}

.legal-main pre {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 14px 0 18px;
}

.legal-main pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: var(--text-sm);
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table th {
  color: var(--fg);
  font-weight: 600;
}

.docs-table td {
  color: var(--muted);
}

.docs-table td:first-child {
  white-space: nowrap;
  color: var(--fg);
}

.error-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 28px 96px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Security & Transparency page */
.legal-main.sec-wide {
  max-width: 920px;
}

.sec-callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0 28px;
  font-size: 0.96rem;
  color: var(--muted);
}

.sec-callout strong {
  color: var(--fg);
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}

.sec-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.sec-kpi .k {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.sec-kpi .v {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--fg);
}

.sec-kpi .s {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.sec-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 32px;
}

.sec-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.sec-card h3 {
  margin: 0 0 8px;
}

.sec-card p {
  margin: 0;
  font-size: 0.95rem;
}

.sec-code {
  background: var(--obsidian);
  color: var(--obsidian-fg);
  border: 1px solid var(--obsidian-line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 14px 0 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
}

.sec-code code {
  background: none;
  color: inherit;
  padding: 0;
}

.sec-table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sec-table th,
.sec-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
}

.sec-table thead th {
  border-bottom-width: 2px;
  color: var(--fg);
  font-weight: 600;
}

.sec-table td {
  color: var(--muted);
}

.sec-table td:first-child {
  white-space: nowrap;
  color: var(--fg);
}

.sec-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.sec-pill.ok {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.sec-pill.high {
  background: rgba(225, 29, 72, 0.14);
  color: #be123c;
}

.sec-pill.med {
  background: rgba(217, 119, 6, 0.16);
  color: #b45309;
}

.sec-pill.low {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.sec-pill.info {
  background: rgba(100, 116, 139, 0.14);
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  .sec-pill.ok { background: rgba(74, 222, 128, 0.16); color: #4ade80; }
  .sec-pill.high { background: rgba(251, 113, 133, 0.18); color: #fb7185; }
  .sec-pill.med { background: rgba(251, 191, 36, 0.18); color: #fbbf24; }
  .sec-pill.low { background: rgba(96, 165, 250, 0.18); color: #60a5fa; }
}

.sec-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 28px;
}

.sec-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--fg);
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}

.sec-dl:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 780px) {
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-cards { grid-template-columns: minmax(0, 1fr); }
}
