/* PostAI — postal intelligence console */

:root {
  --canvas: #f6f4ed;
  --canvas-deep: #ece9df;
  --surface: #fffefa;
  --surface-soft: #faf8f2;
  --ink: #17221e;
  --ink-soft: #26342f;
  --muted: #59635e;
  --muted-light: #68716c;
  --line: #dedfd7;
  --line-strong: #c9ccc2;
  --brand: #dd5b3f;
  --brand-dark: #b9442e;
  --brand-soft: #f7ded5;
  --data: #376f7b;
  --data-soft: #e0edef;
  --success: #28745d;
  --success-soft: #dceee7;
  --warning: #96651b;
  --warning-soft: #f4ead1;
  --danger: #b5473d;
  --danger-soft: #f7dfdc;

  /* Legacy aliases used by the application renderers. */
  --navy-950: var(--ink);
  --navy-900: #1d2a25;
  --navy-800: #2a3a34;
  --navy-700: #384b44;
  --blue-600: var(--brand-dark);
  --blue-500: var(--brand);
  --blue-400: #e68169;
  --cyan-500: var(--data);
  --cyan-400: #79aab3;
  --green-500: var(--success);
  --green-100: var(--success-soft);
  --amber-500: var(--warning);
  --amber-100: var(--warning-soft);
  --red-500: var(--danger);
  --red-100: var(--danger-soft);
  --slate-50: var(--surface-soft);
  --slate-100: var(--canvas);
  --slate-200: var(--line);
  --slate-300: var(--line-strong);
  --slate-400: var(--muted-light);
  --slate-500: var(--muted);
  --slate-600: #59635e;
  --slate-700: var(--ink-soft);
  --slate-800: var(--ink);
  --slate-900: #101713;

  --shadow-xs: 0 1px 2px rgba(20, 31, 26, 0.04);
  --shadow-sm: 0 8px 24px rgba(20, 31, 26, 0.06);
  --shadow: 0 18px 45px rgba(20, 31, 26, 0.09);
  --shadow-lg: 0 28px 80px rgba(20, 31, 26, 0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--brand-soft); color: var(--ink); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--data);
  outline-offset: 3px;
}
.page h1[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 2000;
  padding: 9px 14px;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* Navigation */
#navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(28px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(23, 34, 30, 0.09);
  background: rgba(246, 244, 237, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  background: transparent;
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  box-shadow: 0 7px 18px rgba(221, 91, 63, 0.22);
}
.nav-logo-mark svg { width: 25px; height: 25px; }
.nav-logo-text { font-size: 19px; font-weight: 780; letter-spacing: -0.045em; }
.nav-logo-text span { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5c6560;
  font-size: 13.5px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease;
}
.nav-link:hover { background: rgba(23, 34, 30, 0.055); color: var(--ink); }
.nav-link.active { background: var(--ink); color: white; }
.nav-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 14px;
  padding-left: 20px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.nav-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
#mobile-menu-btn {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
#mobile-menu-btn svg { width: 24px; height: 24px; }
#mobile-nav {
  position: fixed;
  inset: var(--nav-height) 12px auto;
  z-index: 999;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.98);
  box-shadow: var(--shadow-lg);
}
#mobile-nav .nav-link { width: 100%; text-align: left; }

/* Shared layout and typography */
.page { display: none; min-height: 100vh; padding-top: var(--nav-height); }
.page.active { display: block; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section-pad { padding: 96px 0; }
.section-pad-sm { padding: 64px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-muted { color: var(--muted); font-size: 12px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}
.section-eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.section-title {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 720;
  letter-spacing: -0.052em;
  line-height: 1.06;
}
.section-sub { max-width: 560px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.section-intro { margin-bottom: 52px; }
.split-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.75fr); align-items: end; gap: 72px; }
.centered-intro { max-width: 700px; margin-right: auto; margin-left: auto; text-align: center; }
.centered-intro .section-eyebrow { justify-content: center; }
.centered-intro .section-sub { margin: 20px auto 0; }

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-large { min-height: 52px; padding: 0 24px; }
.btn-primary { background: var(--brand-dark); color: white; box-shadow: 0 10px 24px rgba(185, 68, 46, 0.22); }
.btn-primary:hover { background: #96331f; }
.btn-outline { border-color: var(--line-strong); background: rgba(255, 254, 250, 0.66); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost-light { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); color: white; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; }

.card, .result-card, .chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.card { padding: 24px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-title { color: var(--ink); font-size: 16px; font-weight: 750; letter-spacing: -0.025em; }

/* Home hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 88px;
  background:
    radial-gradient(circle at 89% 16%, rgba(221, 91, 63, 0.1), transparent 22%),
    linear-gradient(rgba(23, 34, 30, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 34, 30, 0.035) 1px, transparent 1px),
    var(--canvas);
  background-size: auto, 40px 40px, 40px 40px, auto;
}
.hero::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  top: -245px;
  left: -210px;
  border: 1px solid rgba(23, 34, 30, 0.1);
  border-radius: 50%;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(480px, 0.9fr); align-items: center; gap: 88px; }
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border: 2px solid var(--brand); border-radius: 50%; box-shadow: 0 0 0 5px var(--brand-soft); }
.hero-title {
  max-width: 650px;
  color: var(--ink);
  font-size: clamp(58px, 5.35vw, 76px);
  font-weight: 720;
  letter-spacing: -0.068em;
  line-height: 0.98;
}
.hero-title span { color: var(--brand); }
.hero-sub { max-width: 590px; margin-top: 30px; color: #59635e; font-size: 18px; line-height: 1.72; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-badges { display: flex; gap: 28px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line-strong); }
.hero-badge { display: flex; flex-direction: column; }
.hero-badge strong { color: var(--ink); font-size: 19px; font-weight: 760; letter-spacing: -0.035em; }
.hero-badge span { color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: 0.03em; }
.hero-product { position: relative; min-width: 0; }
.hero-demo-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow-lg);
}
.hero-demo-card::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -120px;
  top: -120px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.018), 0 0 0 76px rgba(255, 255, 255, 0.018);
}
.demo-card-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.demo-card-header > div { display: flex; flex-direction: column; }
.demo-card-header strong { font-size: 17px; font-weight: 720; letter-spacing: -0.025em; }
.demo-kicker { margin-bottom: 4px; color: rgba(255, 255, 255, 0.48); font-size: 10px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.live-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; color: rgba(255, 255, 255, 0.72); font-size: 11px; font-weight: 650; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #70c7a5; }
.demo-input-mock { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 15px 16px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 11px; background: rgba(255, 255, 255, 0.055); color: rgba(255, 255, 255, 0.9); font-size: 13px; }
.demo-input-label { color: rgba(255, 255, 255, 0.42); font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.demo-steps { position: relative; display: grid; gap: 0; margin: 18px 0; }
.demo-step { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); font-size: 12.5px; }
.demo-step:last-child { border-bottom: 0; }
.demo-step-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; color: rgba(255, 255, 255, 0.76); font-size: 8px; font-weight: 800; }
.demo-step b { color: #82cdb0; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.demo-result { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 17px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.result-route-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.result-route-mark svg { width: 24px; height: 24px; }
.demo-result-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.demo-result-name { margin-top: 2px; font-size: 15px; font-weight: 760; letter-spacing: -0.025em; }
.demo-result-sub { color: var(--muted); font-size: 11px; }
.demo-result-score { display: flex; flex-direction: column; align-items: flex-end; padding-left: 14px; border-left: 1px solid var(--line); }
.demo-result-score strong { color: var(--success); font-size: 27px; line-height: 1; letter-spacing: -0.06em; }
.demo-result-score span { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.hero-orbit { position: absolute; z-index: 1; border: 1px solid rgba(221, 91, 63, 0.28); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 80px; height: 80px; top: -30px; right: -30px; }
.orbit-two { width: 42px; height: 42px; bottom: -17px; left: -15px; background: var(--brand); box-shadow: inset 0 0 0 10px var(--canvas); }

/* Home content */
.problem-section { background: var(--surface); }
.impact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.impact-item { min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; gap: 34px; padding: 30px; border-right: 1px solid var(--line); background: var(--surface); }
.impact-item:last-child { border-right: 0; }
.impact-featured { background: var(--ink); color: white; }
.impact-index { color: var(--brand); font-size: 11px; font-weight: 850; letter-spacing: 0.12em; }
.impact-item h3 { margin-bottom: 10px; font-size: 20px; font-weight: 720; letter-spacing: -0.035em; }
.impact-item p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.impact-featured p { color: rgba(255, 255, 255, 0.62); }
.problem-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.problem-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11.5px; font-weight: 650; }
.home-method { overflow: clip; background: var(--canvas); scroll-margin-top: var(--nav-height); }
.home-method-intro { align-items: start; }
.home-method-intro-copy { display: flex; align-items: flex-start; flex-direction: column; gap: 22px; }
.home-method-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.home-method-link:hover { transform: translateY(-1px); border-color: var(--ink); background: white; }
.home-method-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(430px, 1.12fr);
  grid-template-areas: "steps flow";
  align-items: start;
  gap: 72px;
}
.home-method-steps { grid-area: steps; list-style: none; border-top: 1px solid var(--line-strong); }
.home-method-step {
  min-height: 118px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
}
.home-method-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 254, 250, 0.46);
  color: var(--brand-dark);
  font-size: 10.5px;
  font-weight: 850;
}
.home-method-copy > span { color: var(--muted); font-size: 10.5px; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.home-method-copy h3 { margin-top: 3px; color: var(--ink); font-size: 18px; font-weight: 730; letter-spacing: -0.03em; }
.home-method-copy p { max-width: 480px; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.home-flow-card {
  grid-area: flow;
  position: sticky;
  top: calc(var(--nav-height) + 22px);
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 4%, rgba(221, 91, 63, 0.14), transparent 28%),
    var(--ink);
  color: white;
  box-shadow: var(--shadow-lg);
}
.home-flow-card::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -120px;
  top: -120px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.015), 0 0 0 68px rgba(255, 255, 255, 0.015);
  pointer-events: none;
}
.home-flow-head { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.home-flow-head > div:first-child { display: flex; flex-direction: column; }
.home-flow-head span { margin-bottom: 3px; color: rgba(255, 255, 255, 0.68); font-size: 10px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.home-flow-head strong { font-size: 16px; font-weight: 730; letter-spacing: -0.025em; }
.home-flow-progress { width: 112px; display: flex; gap: 4px; padding-bottom: 3px; }
.home-flow-progress i { width: 100%; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.home-flow-progress i::after { content: ""; display: block; width: 100%; height: 100%; border-radius: inherit; background: #ef967f; }
.home-flow-stack { position: relative; z-index: 1; }
.home-flow-node {
  position: relative;
  min-height: 67px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
}
.home-flow-node-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px; color: #efa28f; font-size: 10px; font-weight: 850; }
.home-flow-node-icon svg { width: 22px; height: 22px; }
.home-flow-node small { display: block; color: rgba(255, 255, 255, 0.62); font-size: 9.5px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.home-flow-node strong { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.92); font-size: 13px; font-weight: 690; }
.home-flow-state { margin: 0; padding: 5px 8px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; color: rgba(255, 255, 255, 0.72); font-size: 9.5px; font-weight: 750; letter-spacing: 0.02em; text-transform: none; white-space: nowrap; }
.home-flow-connector { position: relative; width: 2px; height: 20px; margin: 0 auto; background: rgba(255, 255, 255, 0.1); transform-origin: top; }
.home-flow-connector span { position: absolute; inset: 0; background: linear-gradient(var(--brand), #ef967f); }
.home-flow-connector::after { content: ""; position: absolute; left: -3px; bottom: 1px; width: 6px; height: 6px; border-right: 1px solid #ef967f; border-bottom: 1px solid #ef967f; transform: rotate(45deg); }
.home-flow-node-result { border-color: transparent; background: var(--surface); color: var(--ink); }
.home-flow-node-result .home-flow-node-icon { border-color: var(--line); background: var(--brand-soft); color: var(--brand-dark); }
.home-flow-node-result small { color: var(--brand-dark); }
.home-flow-node-result strong { color: var(--ink); font-size: 14px; }
.home-flow-node-result .home-flow-state { border-color: #c9ddd4; background: var(--success-soft); color: var(--success); }

/* One-pass workflow reveal. Content stays visible without JavaScript. */
.home-method.is-enhanced .home-method-step,
.home-method.is-enhanced .home-flow-node { opacity: 0; transform: translateY(14px); }
.home-method.is-enhanced .home-flow-connector { opacity: 0; transform: scaleY(0); }
.home-method.is-enhanced .home-flow-progress i::after { transform: scaleX(0); transform-origin: left; }
.home-method.is-enhanced.is-in-view .home-method-step {
  animation: home-method-step-in 560ms cubic-bezier(.22,.8,.28,1) both;
  animation-delay: calc(80ms + (var(--step) * 320ms));
}
.home-method.is-enhanced.is-in-view .home-flow-node {
  animation: home-flow-node-in 540ms cubic-bezier(.22,.8,.28,1) both;
  animation-delay: calc(180ms + (var(--step) * 420ms));
}
.home-method.is-enhanced.is-in-view .home-flow-connector {
  animation: home-flow-connector-in 360ms ease-out both;
  animation-delay: calc(650ms + (var(--step) * 420ms));
}
.home-method.is-enhanced.is-in-view .home-flow-progress i::after {
  animation: home-flow-meter-in 430ms ease-out both;
  animation-delay: calc(410ms + (var(--step) * 420ms));
}
.home-method.is-enhanced.is-in-view .home-flow-node-result::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(221, 91, 63, 0.42);
  border-radius: 13px;
  pointer-events: none;
  animation: home-flow-result-glow 900ms ease-out 2350ms both;
}
.home-cta { padding: 0 0 72px; background: var(--canvas); }
.cta-banner { display: flex; align-items: center; justify-content: space-between; gap: 36px; padding: 46px 50px; border-radius: var(--radius-xl); background: var(--ink); color: white; box-shadow: var(--shadow); }
.cta-kicker { display: block; margin-bottom: 9px; color: #e98a74; font-size: 10px; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }
.cta-banner h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 690; letter-spacing: -0.05em; line-height: 1.1; }
.cta-banner p { margin-top: 9px; color: rgba(255, 255, 255, 0.58); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }

/* Shared subpage header */
.page-header { padding: 70px 0 64px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-header-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr); align-items: end; gap: 64px; }
.page-header h1 { max-width: 700px; font-size: clamp(42px, 5vw, 64px); font-weight: 700; letter-spacing: -0.062em; line-height: 1; }
.page-header p { max-width: 500px; padding-bottom: 3px; color: var(--muted); font-size: 16px; line-height: 1.75; }

/* Analyze workspace */
.analyze-body { padding: 42px 0 80px; }
.analyze-layout { display: grid; grid-template-columns: 410px minmax(0, 1fr); align-items: start; gap: 28px; }
.analyze-layout > *, .analysis-output, #results-section, .result-card { min-width: 0; max-width: 100%; }
.input-panel { position: sticky; top: calc(var(--nav-height) + 18px); }
.tool-card { padding: 22px; box-shadow: var(--shadow-sm); }
.panel-heading, .processing-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.panel-number { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--brand-dark); font-size: 9px; font-weight: 850; }
.panel-heading h2 { font-size: 17px; font-weight: 750; letter-spacing: -0.025em; }
.panel-heading p { color: var(--muted); font-size: 12px; }
.tab-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 10px; background: var(--canvas); }
.tab-btn { min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.tab-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.field-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
#address-input, #ocr-extracted {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 14px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
#address-input::placeholder, #ocr-extracted::placeholder { color: #737c77; }
#address-input:focus, #ocr-extracted:focus { border-color: var(--data); box-shadow: 0 0 0 3px rgba(55, 111, 123, 0.12); }
.field-hint { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted-light); font-size: 11.5px; }
#analyze-btn {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background: var(--brand-dark);
  color: white;
  font-size: 13.5px;
  font-weight: 780;
  box-shadow: 0 10px 24px rgba(185, 68, 46, 0.2);
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}
#analyze-btn:hover:not(:disabled) { transform: translateY(-1px); background: #96331f; }
#analyze-btn:disabled { opacity: 0.65; }
.demo-buttons { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-buttons-label { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.demo-btn { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 650; text-align: left; transition: border-color 160ms ease, background 160ms ease; }
.demo-btn span { color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-btn:hover { border-color: #b8c4bf; background: white; }
.model-card { margin-top: 14px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--ink); color: white; }
.model-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.model-card-head span { color: rgba(255, 255, 255, 0.68); font-size: 10.5px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.model-card-head b { color: rgba(255, 255, 255, 0.78); font-size: 11px; font-weight: 650; }
.model-weight { display: flex; justify-content: space-between; align-items: center; min-height: 32px; color: rgba(255, 255, 255, 0.76); font-size: 12.5px; }
.model-weight strong { color: #f0a390; font-size: 12.5px; }
.dropzone { display: grid; place-items: center; min-height: 218px; padding: 28px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-soft); color: var(--muted); text-align: center; transition: border-color 160ms ease, background 160ms ease; }
.dropzone:hover, .dropzone.drag-over { border-color: var(--data); background: var(--data-soft); }
.dropzone-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 12px; background: var(--surface); color: var(--data); box-shadow: var(--shadow-xs); }
.dropzone-icon svg { width: 25px; height: 25px; }
.dropzone p { font-size: 12.5px; line-height: 1.6; }
.dropzone p strong { color: var(--ink); font-weight: 750; }
.dropzone small { margin-top: 9px; color: var(--muted-light); font-size: 11px; }
#file-input { display: none; }
.ocr-demo-banner { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 11.5px; line-height: 1.5; }
#ocr-preview-wrap, #ocr-processing, #ocr-result-wrap { margin-top: 14px; }
#ocr-preview { width: 100%; max-height: 190px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
.ocr-processing-row, .ocr-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.ocr-result-heading label { color: var(--ink-soft); font-weight: 750; }
.ocr-spinner { width: 14px; height: 14px; flex: 0 0 auto; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
.ocr-progress-track { height: 4px; overflow: hidden; border-radius: 999px; background: var(--canvas-deep); }
#ocr-progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width 240ms ease; }
#ocr-extracted { min-height: 112px; }
#use-ocr-btn { width: 100%; margin-top: 12px; }

.analysis-output { min-height: 100%; }
#empty-state { min-height: 560px; display: grid; place-items: center; align-content: center; padding: 54px 30px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: rgba(255, 254, 250, 0.56); text-align: center; }
.empty-visual { position: relative; width: 210px; height: 150px; margin-bottom: 24px; }
.empty-visual::before { content: ""; position: absolute; inset: 19px 27px 25px; border: 1px solid var(--line); border-radius: 50%; }
.empty-visual::after { content: ""; position: absolute; width: 7px; height: 7px; left: 53px; top: 47px; border: 5px solid var(--brand); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.empty-office { position: absolute; right: 37px; bottom: 22px; width: 49px; height: 49px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow-sm); }
.empty-office svg { width: 28px; }
.empty-route { position: absolute; height: 1px; background: var(--line-strong); transform-origin: left; }
.route-a { width: 72px; left: 68px; top: 58px; transform: rotate(13deg); }
.route-b { width: 58px; left: 128px; top: 76px; transform: rotate(58deg); }
.empty-kicker { color: var(--brand-dark); font-size: 10.5px; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
#empty-state h3 { margin-top: 8px; font-size: 22px; font-weight: 720; letter-spacing: -0.035em; }
#empty-state p { max-width: 390px; margin-top: 8px; color: var(--muted); font-size: 13.5px; }

#processing-section { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.processing-head { margin-bottom: 18px; }
.processing-title { color: var(--ink); font-size: 17px; font-weight: 750; letter-spacing: -0.025em; }
.processing-sub { color: var(--muted); font-size: 12px; }
#processing-steps { display: grid; gap: 7px; }
.step-item { min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.step-icon-wrap { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); }
.step-emoji { font-size: 9px; font-weight: 850; }
.step-label { color: var(--ink-soft); font-size: 12px; font-weight: 720; }
.step-status { color: var(--muted-light); font-size: 10px; }
.step-item.active { border-color: rgba(221, 91, 63, 0.36); background: #fff8f5; }
.step-item.active .step-icon-wrap { border-color: var(--brand); color: var(--brand); }
.step-item.done .step-icon-wrap { border-color: var(--success); background: var(--success); color: white; }
.step-spinner { width: 15px; height: 15px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Dynamic analysis result cards */
#results-section { display: grid; gap: 14px; scroll-margin-top: calc(var(--nav-height) + 16px); }
#results-section:focus { outline: none; }
.result-card { padding: 24px; overflow: hidden; }
.result-card.recommendation-card { border-color: #bfcfc8; background: linear-gradient(135deg, #fffefa, #f6faf7); box-shadow: var(--shadow-sm); }
.warn-card { border-color: #e6d2a3; background: #fffbf0; }
.warn-text { color: #76531c; font-size: 13px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.025em; white-space: nowrap; }
.badge-blue { background: var(--data-soft); color: #285d68; }
.badge-green { background: var(--success-soft); color: #1d614d; }
.badge-warn { background: var(--warning-soft); color: #815714; }
.badge-red { background: var(--danger-soft); color: #963a32; }
.badge-gray { background: var(--canvas); color: var(--muted); }
.address-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.addr-field { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.addr-label { margin-bottom: 4px; color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.addr-value { overflow-wrap: anywhere; color: var(--ink-soft); font-size: 13px; font-weight: 680; }
.warn-val { color: var(--warning); }
.validation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.v-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.v-row:nth-child(2n) { border-right: 0; }
.v-row:nth-last-child(-n+2) { border-bottom: 0; }
.v-label { color: var(--muted); font-size: 12px; }
.v-val { font-size: 11.5px; font-weight: 750; text-align: right; }
.v-ok { color: var(--success); }
.v-err { color: var(--danger); }
.v-warn { color: var(--warning); }
.v-info { color: var(--data); }
.validation-issue { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 11px 12px; border-radius: 8px; background: var(--warning-soft); color: #79531a; font-size: 11.5px; }
.issue-icon { flex: 0 0 auto; }
.map-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; }
.map-meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.meta-val { color: var(--ink-soft); font-size: 12.5px; font-weight: 680; }
.map-container { width: 100%; height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
.map-fallback { height: 100%; display: grid; place-items: center; padding: 20px; color: var(--muted); text-align: center; }
.map-marker { width: 30px; height: 30px; display: grid; place-items: center; border: 3px solid white; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--data); color: white; box-shadow: 0 4px 12px rgba(23, 34, 30, 0.22); font-size: 10px; font-weight: 800; }
.map-marker > * { transform: rotate(45deg); }
.user-marker { width: 34px; height: 34px; background: var(--brand); }
.user-marker svg { transform: rotate(45deg); }
.po-marker-top { background: var(--success); }
.po-marker { background: var(--data); }
.rec-main { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 24px; padding: 22px; border-radius: 12px; background: var(--ink); color: white; }
.rec-office-info { display: flex; align-items: center; gap: 13px; min-width: 0; }
.rec-office-icon { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, 0.1); font-size: 19px; }
.rec-office-name { overflow-wrap: anywhere; font-size: 19px; font-weight: 730; letter-spacing: -0.035em; }
.rec-office-sub { margin-top: 3px; color: rgba(255, 255, 255, 0.58); font-size: 11px; }
.rec-score-block { padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, 0.12); }
.score-number { font-size: 40px; font-weight: 760; line-height: 1; letter-spacing: -0.06em; }
.score-pct { margin-left: 2px; font-size: 18px; }
.score-label { margin-top: 4px; color: rgba(255, 255, 255, 0.72); font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.score-bar-wrap { height: 4px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.score-bar-fill { height: 100%; border-radius: inherit; }
.rec-details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rec-detail { padding: 12px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rec-detail:nth-child(3n) { border-right: 0; }
.rec-detail:nth-last-child(-n+3) { border-bottom: 0; }
.rec-detail-label { color: var(--muted-light); font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.rec-detail-val { margin-top: 3px; overflow-wrap: anywhere; color: var(--ink-soft); font-size: 12.5px; font-weight: 680; }
.reasons-section { margin-top: 16px; }
.reasons-title { margin-bottom: 8px; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.reasons-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.reason-chip { padding: 6px 9px; border-radius: 999px; background: var(--success-soft); color: #27634f; font-size: 11px; font-weight: 680; }
.model-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--canvas); color: var(--muted); font-size: 11px; line-height: 1.6; }
.table-hint { display: none; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.candidates-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 11.5px; }
.candidates-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted-light); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.candidates-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.candidates-table tr:last-child td { border-bottom: 0; }
.candidates-table .top-row { background: #f4faf7; }
.candidates-table strong { color: var(--ink-soft); font-weight: 720; }
.area-badge, .pin-badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--canvas); color: var(--muted); font-size: 10px; font-weight: 800; }
.area-high, .pin-exactmatch { background: var(--success-soft); color: var(--success); }
.area-partial, .pin-subzone, .pin-zonematch { background: var(--warning-soft); color: var(--warning); }
.area-nomatch, .pin-nomatch { background: var(--danger-soft); color: var(--danger); }
.mini-score { color: var(--ink); font-weight: 800; }
.breakdown-grid { display: grid; gap: 12px; }
.breakdown-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(220px, 1.2fr); align-items: center; gap: 18px; }
.br-label { color: var(--ink-soft); font-size: 11.5px; font-weight: 720; }
.br-sub { color: var(--muted-light); font-size: 10.5px; }
.br-right { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 10px; }
.br-bar-wrap { height: 6px; overflow: hidden; border-radius: 999px; background: var(--canvas-deep); }
.br-bar { height: 100%; border-radius: inherit; }
.br-score { color: var(--ink-soft); font-size: 11px; font-weight: 800; text-align: right; }
.slide-up { animation: rise 360ms ease both; }

/* Dashboard */
.dashboard-body { background: var(--canvas); }
.prototype-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding: 13px 16px; border: 1px solid #dfd4b8; border-radius: 10px; background: #fbf6e8; color: #70531f; }
.prototype-banner span { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; background: #eadbb8; font-size: 9px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.prototype-banner p { font-size: 11.5px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 190px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand-dark); font-size: 8px; font-weight: 850; }
.stat-value { margin-top: auto; color: var(--ink); font-size: 38px; font-weight: 730; letter-spacing: -0.06em; line-height: 1; }
.stat-label { margin-top: 7px; color: var(--muted); font-size: 11.5px; font-weight: 650; }
.stat-change { color: var(--muted-light); font-size: 9.5px; font-weight: 700; }
.stat-change.up { color: var(--success); }
.stat-change.warn { color: var(--warning); }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-card { min-width: 0; padding: 22px; }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.chart-heading > span { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 750; }
.chart-title { color: var(--ink); font-size: 14px; font-weight: 750; letter-spacing: -0.02em; }
.chart-sub { margin-top: 3px; color: var(--muted-light); font-size: 11.5px; }
.chart-card canvas { width: 100% !important; height: 260px !important; max-height: none; display: block; }

/* Method */
.how-body { background: var(--canvas); }
.how-layout { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.8fr); align-items: start; gap: 74px; }
.workflow-steps { margin-top: 36px; border-top: 1px solid var(--line-strong); }
.workflow-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line-strong); }
.ws-number { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--brand-dark); font-size: 9px; font-weight: 850; }
.ws-step-label { color: var(--muted-light); font-size: 9px; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.ws-title { margin-top: 3px; color: var(--ink); font-size: 17px; font-weight: 730; letter-spacing: -0.03em; }
.ws-desc { max-width: 520px; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.method-column { display: grid; gap: 16px; }
.architecture-card { padding: 24px; border-radius: var(--radius-lg); background: var(--ink); color: white; box-shadow: var(--shadow); }
.architecture-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.architecture-heading span, .architecture-heading h4 { font-size: 14px; font-weight: 730; }
.architecture-heading b { color: rgba(255, 255, 255, 0.46); font-size: 9px; font-weight: 650; }
.arch-diagram { display: grid; justify-items: stretch; }
.arch-node { padding: 13px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 9px; background: rgba(255, 255, 255, 0.055); color: rgba(255, 255, 255, 0.85); font-size: 12px; font-weight: 650; text-align: left; }
.arch-node small { display: block; margin-bottom: 2px; color: rgba(255, 255, 255, 0.38); font-size: 8px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.arch-primary { border-color: rgba(221, 91, 63, 0.6); }
.arch-api { border-color: rgba(121, 170, 179, 0.45); }
.arch-highlight { background: var(--surface); color: var(--ink); }
.arch-highlight small { color: var(--brand-dark); }
.arch-arrow { height: 22px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.26); font-size: 12px; }
.scoring-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.scoring-card h2, .scoring-card h4 { margin-bottom: 22px; font-size: 23px; font-weight: 700; letter-spacing: -0.045em; }
.scoring-weights { display: grid; gap: 0; border-top: 1px solid var(--line); }
.weight-card { min-height: 70px; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.weight-pct { color: var(--brand); font-size: 18px; font-weight: 760; letter-spacing: -0.04em; }
.weight-label { color: var(--ink-soft); font-size: 12px; font-weight: 720; }
.weight-sub { margin-top: 2px; color: var(--muted-light); font-size: 9.5px; }
.integration-section { margin-top: 96px; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.integration-grid article { min-height: 185px; padding: 26px; border-right: 1px solid var(--line); background: var(--surface); }
.integration-grid article:last-child { border-right: 0; }
.integration-grid span { color: var(--brand-dark); font-size: 9px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.integration-grid h3, .integration-grid h4 { margin-top: 22px; font-size: 19px; font-weight: 730; letter-spacing: -0.03em; }
.integration-grid p { margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* About */
.about-body { background: var(--canvas); }
.brief-card { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.brief-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.brief-heading > div > span { color: var(--brand-dark); font-size: 9.5px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.brief-heading h2, .brief-heading h3 { margin-top: 4px; font-size: 26px; font-weight: 720; letter-spacing: -0.045em; }
.sih-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; padding: 16px 0; }
.sih-field { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sih-label { color: var(--muted-light); font-size: 8.5px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.sih-value { margin-top: 5px; color: var(--ink-soft); font-size: 13px; font-weight: 680; }
.brief-problem { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding-top: 24px; }
.brief-problem span { color: var(--muted-light); font-size: 9px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.brief-problem p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.about-section, .stack-section { padding-top: 96px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.principles-grid article { min-height: 240px; padding: 28px 26px; border-right: 1px solid var(--line-strong); }
.principles-grid article:first-child { padding-left: 0; }
.principles-grid article:last-child { padding-right: 0; border-right: 0; }
.principles-grid span { color: var(--brand-dark); font-size: 9px; font-weight: 850; }
.principles-grid h3, .principles-grid h4 { margin-top: 56px; font-size: 19px; font-weight: 720; letter-spacing: -0.035em; }
.principles-grid p { margin-top: 9px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.tech-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 32px; }
.tech-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tech-name { color: var(--ink-soft); font-size: 12.5px; font-weight: 720; }
.tech-role { margin-top: 3px; color: var(--muted-light); font-size: 10.5px; }
.disclaimer-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 30px; margin-top: 64px; padding: 28px 30px; border-radius: var(--radius-lg); background: var(--ink); color: white; }
.disclaimer-card > span { color: #e88b76; font-size: 9px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.disclaimer-card h3 { font-size: 18px; font-weight: 700; }
.disclaimer-card p { max-width: 790px; margin-top: 6px; color: rgba(255, 255, 255, 0.57); font-size: 12px; line-height: 1.7; }

/* Footer and notifications */
.footer { padding: 24px 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 10.5px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 1600; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; font-weight: 650; opacity: 0; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-success { border-color: rgba(112, 199, 165, 0.55); }
.toast-error { border-color: rgba(236, 132, 123, 0.6); }
.toast-info { border-color: rgba(121, 170, 179, 0.5); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes home-method-step-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes home-flow-node-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes home-flow-connector-in { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes home-flow-meter-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes home-flow-result-glow { 0% { opacity: 0; transform: scale(.98); } 45% { opacity: 1; } 100% { opacity: 0; transform: scale(1.025); } }

/* Tablet */
@media (max-width: 1040px) {
  .nav-links-desktop { display: none; }
  #mobile-menu-btn { display: grid; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(400px, 0.8fr); gap: 48px; }
  .hero-title { font-size: 58px; }
  .analyze-layout { grid-template-columns: 370px minmax(0, 1fr); gap: 20px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 165px; }
  .home-method-layout { grid-template-columns: minmax(0, .8fr) minmax(410px, 1.2fr); gap: 44px; }
  .how-layout { gap: 42px; }
}

@media (max-width: 860px) {
  .container { width: min(100% - 36px, 720px); }
  .section-pad { padding: 72px 0; }
  .hero { padding: 72px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 54px; }
  .hero-copy { max-width: 700px; }
  .hero-title { font-size: clamp(52px, 10vw, 70px); }
  .hero-product { max-width: 620px; }
  .split-intro, .page-header-inner { grid-template-columns: 1fr; gap: 24px; }
  .page-header { padding: 54px 0 48px; }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-item { min-height: 165px; border-right: 0; border-bottom: 1px solid var(--line); }
  .impact-item:last-child { border-bottom: 0; }
  .home-method-layout { grid-template-columns: 1fr; grid-template-areas: "flow" "steps"; gap: 36px; }
  .home-flow-card { position: static; }
  .cta-banner { align-items: flex-start; flex-direction: column; }
  .analyze-layout { grid-template-columns: 1fr; }
  .input-panel { position: static; }
  #empty-state { min-height: 460px; }
  .charts-grid, .how-layout { grid-template-columns: 1fr; }
  .method-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-section { margin-top: 72px; }
  .about-section, .stack-section { padding-top: 72px; }
}

/* Mobile */
@media (max-width: 620px) {
  :root { --nav-height: 64px; }
  #navbar { padding: 0 16px; }
  .nav-logo-mark { width: 34px; height: 34px; }
  .nav-logo-text { font-size: 18px; }
  #mobile-nav { inset: calc(var(--nav-height) + 8px) 10px auto; }
  .container { width: calc(100% - 28px); }
  .section-pad { padding: 60px 0; }
  .section-title { font-size: 34px; }
  .section-intro { margin-bottom: 36px; }
  .section-sub { font-size: 14px; }
  .hero { padding: 54px 0 58px; }
  .hero-grid { gap: 44px; }
  .hero-eyebrow { margin-bottom: 20px; font-size: 9px; }
  .hero-title { font-size: clamp(43px, 14vw, 58px); }
  .hero-sub { margin-top: 22px; font-size: 16px; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }
  .hero-badges { gap: 18px; margin-top: 34px; padding-top: 20px; }
  .hero-badge strong { font-size: 17px; }
  .hero-badge span { font-size: 9.5px; }
  .hero-demo-card { padding: 17px; border-radius: 18px; }
  .demo-card-header { margin-bottom: 16px; }
  .hero-demo-card .demo-input-mock,
  .hero-demo-card .demo-steps { display: none; }
  .demo-result { grid-template-columns: 38px minmax(0, 1fr); }
  .demo-result-score { grid-column: 2; align-items: flex-start; margin-top: 8px; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .demo-result-score strong { font-size: 23px; }
  .impact-item { padding: 24px; }
  .problem-chips { gap: 7px; }
  .home-method-intro-copy { gap: 18px; }
  .home-method-link { width: 100%; justify-content: center; }
  .home-method-layout { gap: 28px; }
  .home-flow-card { padding: 18px; border-radius: 18px; }
  .home-flow-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; }
  .home-flow-progress { width: 100%; }
  .home-flow-node { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 11px 12px; }
  .home-flow-node-icon { width: 34px; height: 34px; }
  .home-flow-state { grid-column: 2; justify-self: start; margin-top: -5px; }
  .home-method-step { min-height: 108px; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 19px 0; }
  .home-method-number { width: 36px; height: 36px; }
  .home-method-copy h3 { font-size: 17px; }
  .home-method-copy p { font-size: 12.5px; }
  .home-cta { padding-bottom: 50px; }
  .cta-banner { padding: 32px 24px; border-radius: 18px; }
  .cta-actions { width: 100%; flex-direction: column; }
  .cta-actions .btn { width: 100%; }
  .page-header { padding: 44px 0 40px; }
  .page-header h1 { font-size: 42px; }
  .page-header p { font-size: 14px; }
  .analyze-body { padding: 22px 0 54px; }
  .tool-card { padding: 17px; }
  .model-card { padding: 18px; }
  .analysis-output, #processing-section, #results-section, .result-card { width: 100%; min-width: 0; max-width: 100%; }
  #empty-state { min-height: 390px; padding: 36px 20px; }
  .empty-visual { transform: scale(0.84); margin-bottom: 8px; }
  .result-card { padding: 17px; border-radius: 14px; }
  .card-header { align-items: flex-start; flex-direction: column; margin-bottom: 15px; }
  .address-grid, .validation-grid { grid-template-columns: 1fr; }
  .addr-field, .addr-field:nth-child(3n), .addr-field:nth-last-child(-n+3) { border: 1px solid var(--line); }
  .v-row, .v-row:nth-child(2n), .v-row:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .v-row:last-child { border-bottom: 0; }
  .map-meta { flex-direction: column; gap: 8px; }
  .map-container { height: 300px; }
  .rec-main { grid-template-columns: 1fr; gap: 17px; padding: 18px; }
  .rec-score-block { padding: 15px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.12); border-left: 0; }
  .rec-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-detail:nth-child(3n), .rec-detail:nth-last-child(-n+3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .rec-detail:nth-child(2n) { border-right: 0; }
  .rec-detail:nth-last-child(-n+2) { border-bottom: 0; }
  .breakdown-row { grid-template-columns: 1fr; gap: 7px; }
  .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
  .table-hint { display: block; }
  .candidates-table { min-width: 640px; }
  .prototype-banner { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 145px; }
  .chart-card { padding: 17px; }
  .chart-heading { flex-direction: column; }
  .method-column { grid-template-columns: 1fr; }
  .architecture-card, .scoring-card { padding: 20px; }
  .integration-grid { grid-template-columns: 1fr; }
  .integration-grid article { min-height: 155px; border-right: 0; border-bottom: 1px solid var(--line); }
  .integration-grid article:last-child { border-bottom: 0; }
  .brief-card { padding: 22px; }
  .brief-heading { flex-direction: column; }
  .sih-info-grid { grid-template-columns: 1fr; }
  .brief-problem { grid-template-columns: 1fr; gap: 8px; }
  .principles-grid { grid-template-columns: 1fr; }
  .principles-grid article, .principles-grid article:first-child, .principles-grid article:last-child { min-height: 0; padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .principles-grid article:last-child { border-bottom: 0; }
  .principles-grid h3, .principles-grid h4 { margin-top: 30px; }
  .tech-grid { grid-template-columns: 1fr; }
  .disclaimer-card { grid-template-columns: 1fr; gap: 12px; padding: 24px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
  #toast-container { right: 12px; bottom: 12px; left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .home-method.is-enhanced .home-method-step,
  .home-method.is-enhanced .home-flow-node,
  .home-method.is-enhanced .home-flow-connector { opacity: 1; transform: none; animation: none !important; }
  .home-method.is-enhanced .home-flow-progress i::after { transform: scaleX(1); animation: none !important; }
  .home-method.is-enhanced .home-flow-node-result::after { display: none; }
}
