:root {
  --green: #2f7a62;
  --green-dark: #256b52;
  --green-mid: #3d9175;
  --green-soft: rgba(47, 122, 98, 0.1);
  --green-glow: rgba(47, 122, 98, 0.12);
  --navy: #2a3331;
  --navy-deep: #1f2826;
  --stone: #fdfbf7;
  --stone-deep: #f3ede4;
  --slate: #5c6e78;
  --slate-light: #8a9aa3;
  --yellow: #ffd633;
  --yellow-soft: rgba(255, 214, 51, 0.22);
  --white: #ffffff;
  --border: rgba(42, 51, 49, 0.07);
  --border-strong: rgba(42, 51, 49, 0.11);
  --shadow-sm: 0 2px 12px rgba(42, 51, 49, 0.04);
  --shadow-md: 0 16px 48px rgba(42, 51, 49, 0.06);
  --shadow-lg: 0 24px 64px rgba(42, 51, 49, 0.08);
  --shadow-xl: 0 32px 80px rgba(47, 122, 98, 0.1);
  --radius: 16px;
  --radius-lg: 22px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: none; }

.mono { font-family: var(--font-mono); font-size: 0.88em; letter-spacing: -0.02em; }

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

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(47, 122, 98, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(240, 201, 66, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(47, 122, 98, 0.05), transparent 50%);
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.brand span { color: var(--green); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a { color: var(--slate); transition: color 0.2s; }
.nav-links a:hover { color: var(--navy); }

.nav-cta {
  padding: 9px 18px !important;
  border-radius: 10px;
  background: var(--green) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover { background: var(--green-dark) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ── Hero ── */

.hero {
  position: relative;
  z-index: 1;
  padding: 0 0 80px;
  background: linear-gradient(180deg, var(--white) 0%, var(--stone) 100%);
}

.hero-top {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}

.hero-top-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-areas:
    "copy portal"
    "kpis portal";
  gap: 28px 56px;
  align-items: start;
}

.hero-copy {
  grid-area: copy;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-top-inner .hero-kpi-row {
  grid-area: kpis;
  margin-top: 0;
}

.hero-top-inner .product-shell {
  grid-area: portal;
  min-width: 0;
  width: 100%;
  align-self: start;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%),
    rgba(255, 255, 255, 0.52);
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.6vw, 3.65rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-feature-settings: "liga" 1, "kern" 1;
  text-wrap: balance;
  margin-bottom: 20px;
  color: var(--navy);
}

.hero-line {
  display: block;
}

.hero-accent {
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.026em;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.pill-light {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--slate);
  box-shadow: var(--shadow-sm);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.hero-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 20px);
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid rgba(42, 51, 49, 0.1);
}

.hero-kpi {
  min-width: 0;
  text-align: left;
}

.hero-kpi-value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-kpi-value .unit {
  font-size: clamp(0.75rem, 1.6vw, 1rem);
  color: var(--slate);
}

.hero-kpi-label {
  display: block;
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  color: var(--slate-light);
  margin-top: 6px;
  font-weight: 500;
  line-height: 1.35;
}

/* ── Product shell ── */

.product-shell {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-shell:hover {
  transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg);
}

.product-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f5f5f4;
  border-bottom: 1px solid var(--border);
}

.chrome-dots { display: flex; gap: 6px; }
.chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}
.chrome-dots span:nth-child(1) { background: #ff5f57; }
.chrome-dots span:nth-child(2) { background: #febc2e; }
.chrome-dots span:nth-child(3) { background: #28c840; }

.chrome-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-light);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
}

.chrome-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

.product-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 340px;
}

.product-sidebar {
  background: linear-gradient(180deg, #f8faf9 0%, var(--stone) 100%);
  padding: 20px 14px;
  border-right: 1px solid var(--border);
}

.sidebar-brand {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 24px;
  padding-left: 8px;
}

.sidebar-brand em { color: var(--green); font-style: italic; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--slate);
  transition: background 0.2s, color 0.2s;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
}

.product-main { padding: 18px; background: var(--white); }

.product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
}

.toolbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2px;
}

.toolbar-filters { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--slate);
}

.filter-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.product-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.pm-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.pm-card.highlight {
  background: var(--yellow-soft);
  border-color: rgba(240, 201, 66, 0.35);
}

.pm-card.highlight .pm-label,
.pm-card.highlight .pm-meta { color: var(--slate); }
.pm-card.highlight .pm-value { color: var(--navy); }

.pm-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}

.pm-value {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--navy);
  line-height: 1.1;
  margin: 4px 0 2px;
}

.pm-meta { font-size: 0.68rem; color: var(--slate-light); }
.pm-meta.up { color: var(--green); font-weight: 600; }

.mini-chart {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.mini-chart-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 10px;
}

.mini-chart-head .up {
  color: var(--green);
  font-weight: 600;
}

.mini-chart svg { width: 100%; height: 80px; display: block; }

/* ── Sections ── */

.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: var(--stone); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-soft {
  background: linear-gradient(180deg, var(--stone) 0%, var(--white) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-intro { max-width: 640px; margin-bottom: 56px; }
.section-intro.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 14px;
}

.section-eyebrow.light { color: var(--green); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.section-title.light { color: var(--navy); }

.section-lead {
  font-size: 1.05rem;
  color: var(--slate);
  line-height: 1.7;
}

.section-lead.light { color: var(--slate); }

/* ── AI metrics ── */

.ai-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ai-metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}

.ai-metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.ai-metric-card.featured {
  grid-row: span 2;
  background: linear-gradient(160deg, #ffffff 0%, #f0f7f4 55%, var(--yellow-soft) 100%);
  border-color: rgba(47, 122, 98, 0.14);
  color: var(--navy);
}

.ai-metric-card.featured .ai-metric-label { color: var(--slate-light); }
.ai-metric-card.featured .ai-metric-desc { color: var(--slate); }
.ai-metric-card.featured .ai-metric-list { color: var(--slate); }
.ai-metric-card.featured .ai-metric-value { color: var(--navy); }

.ai-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.ai-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}

.ai-icon svg { width: 22px; height: 22px; }

.ai-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--white);
  color: var(--slate);
  border: 1px solid var(--border);
}

.ai-metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
  margin-bottom: 8px;
}

.ai-metric-value {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--navy);
}

.ai-metric-value.sm { font-size: 2.2rem; }
.ai-metric-value .unit { font-size: 1.2rem; color: var(--slate); }

.confidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.confidence-ring {
  width: 52px;
  height: 52px;
}

.confidence-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-bg { fill: none; stroke: var(--stone-deep); stroke-width: 3; }
.ring-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  stroke-dashoffset: calc(97.4 - (97.4 * var(--pct) / 100));
}

.ai-metric-desc {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 16px;
}

.ai-metric-list {
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.8;
}

.ai-metric-list .mono {
  color: var(--green);
  font-size: 0.78rem;
}

.ai-metric-foot {
  font-size: 0.72rem;
  color: var(--slate-light);
  margin-top: 12px;
}

.stat-bar {
  height: 6px;
  background: var(--stone-deep);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 8px;
}

.stat-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  border-radius: 999px;
}

.stat-bar.green div { background: linear-gradient(90deg, #1a4d38, #3d9a72); }
.stat-bar.amber div { background: linear-gradient(90deg, #b8860b, var(--yellow)); }

.spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 48px;
  margin-top: 16px;
}

.spark-bars span {
  flex: 1;
  background: linear-gradient(to top, var(--green), rgba(41,111,87,0.3));
  border-radius: 4px 4px 0 0;
  min-height: 8px;
}

.trade-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
}

.trade-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
}

/* ── Quote cards ── */

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quote-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.quote-card:hover {
  border-color: rgba(47, 122, 98, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 0;
}

.quote-id {
  font-size: 0.72rem;
  color: var(--green);
  margin-bottom: 6px;
}

.quote-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.quote-meta {
  font-size: 0.78rem;
  color: var(--slate-light);
}

.quote-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.quote-status.new { background: var(--green-soft); color: var(--green-dark); }
.quote-status.bidding { background: var(--yellow-soft); color: #9a7b0a; }
.quote-status.won { background: rgba(47, 122, 98, 0.15); color: var(--green-dark); }

.quote-estimate {
  padding: 20px 22px;
  margin: 16px 22px 0;
  background: var(--stone);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.quote-estimate .compare-value {
  margin: 6px 0 4px;
}

.compare-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
  margin-bottom: 4px;
}

.compare-value {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.2;
}

.compare-sub {
  font-size: 0.72rem;
  color: var(--slate-light);
  margin-top: 4px;
}

.quote-table {
  width: calc(100% - 44px);
  margin: 16px 22px 0;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.quote-table th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.quote-table td {
  padding: 9px 0;
  color: var(--slate);
  border-bottom: 1px solid rgba(42, 51, 49, 0.05);
}

.quote-table td.mono { color: var(--navy); text-align: right; }
.quote-table th:last-child { text-align: right; }

.quote-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
  margin-top: 8px;
}

.quote-note {
  font-size: 0.75rem;
  color: var(--slate-light);
  line-height: 1.5;
}

.quote-note strong { color: var(--slate); }

/* ── Analytics ── */

.analytics-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 32px);
  margin-top: 32px;
}

.analytics-stat {
  min-width: 0;
}

.analytics-stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1;
}

.analytics-stat-label {
  display: block;
  font-size: clamp(0.62rem, 1.4vw, 0.78rem);
  color: var(--slate-light);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 6px;
}

.analytics-panel { display: flex; flex-direction: column; gap: 16px; }

.panel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-card-head h3 { font-size: 0.95rem; font-weight: 700; }
.panel-card-head .mono { font-size: 0.72rem; color: var(--slate-light); }

.horiz-bars { display: flex; flex-direction: column; gap: 14px; }

.hbar {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--slate);
}

.hbar-track {
  height: 8px;
  background: var(--stone-deep);
  border-radius: 999px;
  overflow: hidden;
}

.hbar-track div {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid));
  border-radius: 999px;
}

.split-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: transparent;
  border: none;
  padding: 0;
}

.split-cards article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-mini-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-light);
  margin-bottom: 6px;
}

.panel-mini-value {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy);
}

.panel-mini-meta { font-size: 0.78rem; color: var(--slate-light); margin-top: 4px; }
.panel-mini-meta.up { color: var(--green); font-weight: 600; }

/* ── Workflow ── */

.section-workflow {
  background: var(--stone);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-workflow .section-intro { max-width: 720px; }

.workflow-track {
  position: relative;
  padding-top: 8px;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  position: absolute;
  top: 36px;
  left: calc(16.666% - 12px);
  right: calc(16.666% - 12px);
  z-index: 0;
  pointer-events: none;
}

.workflow-rail-line {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-mid) 55%, var(--yellow) 100%);
  border-radius: 999px;
  opacity: 0.35;
}

.workflow-rail-dot {
  grid-row: 1;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 4px rgba(47, 122, 98, 0.08);
  position: relative;
  z-index: 1;
}

.workflow-rail-dot:last-child {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-soft);
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 28px 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.workflow-step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.workflow-step-final {
  background: linear-gradient(180deg, var(--white) 0%, rgba(255, 214, 51, 0.06) 100%);
}

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

.workflow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 12px;
}

.workflow-step-final .workflow-num {
  color: var(--navy);
  background: var(--yellow-soft);
}

.workflow-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--stone);
  color: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.workflow-icon svg { width: 22px; height: 22px; }

.workflow-icon-accent {
  background: var(--yellow-soft);
  color: var(--navy);
}

.workflow-body h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.workflow-body p {
  font-size: 0.94rem;
  color: var(--slate);
  line-height: 1.7;
  margin-bottom: 20px;
}

.workflow-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-tags li {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--slate);
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--stone);
  border: 1px solid var(--border);
}

/* ── Homeowner section ── */

.homeowner-section { padding: 80px 0; }

.homeowner-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 48px 52px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 250, 247, 0.95) 42%, rgba(255, 214, 51, 0.12) 100%);
  border: 1px solid rgba(47, 122, 98, 0.12);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.homeowner-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 100%, rgba(47, 122, 98, 0.08), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(255, 214, 51, 0.1), transparent 40%);
  pointer-events: none;
}

.homeowner-copy,
.homeowner-visual {
  position: relative;
  z-index: 1;
}

.homeowner-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 18px;
}

.homeowner-label-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}

.homeowner-label-icon svg { width: 16px; height: 16px; }

.homeowner-copy .section-title {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  margin-bottom: 14px;
}

.homeowner-copy .section-lead {
  max-width: 520px;
  margin-bottom: 32px;
}

.homeowner-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.homeowner-flow li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.homeowner-flow-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--stone);
  color: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.homeowner-flow-icon svg { width: 20px; height: 20px; }

.homeowner-flow-icon-accent {
  background: var(--yellow-soft);
  color: var(--navy);
}

.homeowner-flow-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.homeowner-flow-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
}

.homeowner-flow-text span {
  font-size: 0.78rem;
  color: var(--slate);
  line-height: 1.45;
}

.homeowner-cta { align-self: flex-start; }

.homeowner-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.homeowner-visual-stack {
  position: relative;
  width: min(100%, 380px);
  min-height: 340px;
}

.homeowner-shot {
  position: absolute;
  width: 68%;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.homeowner-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.homeowner-shot figcaption {
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--white);
  border-top: 1px solid var(--border);
}

.homeowner-shot-before {
  top: 0;
  left: 0;
  transform: rotate(-4deg);
  z-index: 1;
}

.homeowner-shot-after {
  top: 48px;
  right: 0;
  transform: rotate(5deg);
  z-index: 2;
  border-color: rgba(47, 122, 98, 0.18);
  box-shadow: var(--shadow-lg);
}

.homeowner-shot-after figcaption {
  color: var(--green);
  background: rgba(244, 250, 247, 0.95);
}

.homeowner-shot-badge {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(31, 40, 38, 0.24);
}

.homeowner-shot-badge svg {
  width: 16px;
  height: 16px;
  color: var(--yellow);
  flex-shrink: 0;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: var(--font);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(255, 214, 51, 0.4);
}

.btn-primary:hover { box-shadow: 0 6px 20px rgba(255, 214, 51, 0.5); }

.btn-accept {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(47, 122, 98, 0.28);
}

.btn-accept:hover {
  background: var(--green-dark);
  box-shadow: 0 6px 20px rgba(47, 122, 98, 0.36);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border-strong);
}

.btn-secondary-dark {
  background: var(--white);
  color: var(--green);
  border: 1px solid var(--border-strong);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--border-strong);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-ghost-light {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-sm { padding: 10px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

button.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Join CTA ── */

.section-join { padding: 56px 0 72px; }

.join-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-join {
  background: var(--green);
  color: var(--white);
  min-width: min(100%, 280px);
  padding: 18px 36px;
  font-size: 1.02rem;
  box-shadow: 0 8px 28px rgba(47, 122, 98, 0.28);
}

.btn-join:hover {
  background: var(--green-dark);
  box-shadow: 0 12px 36px rgba(47, 122, 98, 0.36);
}

/* ── Footer ── */

.site-footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
  background: var(--stone);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p { margin-top: 14px; max-width: 300px; color: var(--slate); font-size: 0.92rem; }
.footer-copy { margin-top: 24px; font-size: 0.82rem; color: var(--slate-light); }

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 6px;
}

.footer-col a { color: var(--slate); font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--green); }

/* ── Reveal animations ── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-shell { transform: none; }
  .product-shell:hover { transform: none; }
}

/* ── Legal pages (unchanged compat) ── */

.legal-page { padding: 72px 0 96px; }
.legal-page h1 { font-family: var(--font-serif); font-size: 2.2rem; margin-bottom: 10px; }
.legal-page h2 { margin-top: 28px; margin-bottom: 10px; }
.legal-page p, .legal-page li { color: var(--slate); margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; }

/* ── App gallery mockup ── */

.gallery-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.gallery-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.gallery-tags li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--slate);
}

.app-gallery-mock {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(380px, 100%);
  background: var(--navy);
  border-radius: 44px;
  padding: 14px 12px 18px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(42, 51, 49, 0.08);
}

.phone-speaker {
  width: 96px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  margin: 0 auto 12px;
}

.phone-screen {
  background: var(--white);
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-gallery-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.app-gallery-filter {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  padding: 6px 10px;
  border-radius: 999px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--stone);
}

.photo-tile {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  background: var(--white);
  isolation: isolate;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.photo-tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 24px 8px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  background: linear-gradient(to top, rgba(31, 40, 38, 0.88), transparent 70%);
  pointer-events: none;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .analytics-layout,
  .gallery-layout,
  .homeowner-panel { grid-template-columns: 1fr; }
  .ai-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-metric-card.featured { grid-row: span 1; }
  .quotes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-top-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "portal"
      "kpis";
    gap: 32px;
  }

  .hero-top-inner .product-shell {
    transform: none;
  }

  .hero-top-inner .product-shell:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }

  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; margin-top: 8px; text-align: center; }
  .site-header .nav { position: relative; }

  .workflow-rail,
  .workflow-steps,
  .ai-metrics-grid,
  .product-metrics,
  .product-body { grid-template-columns: 1fr; }

  .hero-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 20px;
    margin-top: 20px;
  }

  .hero-kpi {
    text-align: center;
  }

  .workflow-track { padding-top: 0; }

  .workflow-rail { display: none; }
  .product-body { grid-template-columns: 1fr; }
  .product-sidebar { display: none; }
  .hero { padding: 0 0 56px; }
  .hero-top { padding: 40px 0 32px; }
  .section { padding: 72px 0; }
  .homeowner-panel { padding: 32px 24px; gap: 36px; }
  .homeowner-flow { grid-template-columns: 1fr; }
  .homeowner-visual { min-height: 300px; }
  .homeowner-visual-stack { min-height: 280px; width: min(100%, 320px); margin: 0 auto; }
  .homeowner-cta { width: 100%; }

  .analytics-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .analytics-stat { text-align: center; }
  .btn-join { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .split-cards { grid-template-columns: 1fr; }
}

/* ── Auth (login) ── */

.auth-page {
  min-height: 100dvh;
  background: var(--white);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(340px, 44%) 1fr;
  min-height: 100dvh;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  background: #1a4338;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 75% 65% at 100% 100%,
    #4fa882 0%,
    rgba(79, 168, 130, 0.35) 32%,
    transparent 68%
  );
  pointer-events: none;
}

.auth-brand-logo {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 1.5rem;
}

.auth-brand-logo span { color: var(--yellow); }

.auth-brand-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  margin: 48px 0;
}

.auth-brand-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 18px;
}

.auth-brand-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.auth-brand-lead {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  margin-bottom: 36px;
}

.auth-brand-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-brand-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.88);
}

.auth-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--yellow);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.auth-brand-icon svg { width: 18px; height: 18px; }

.auth-brand-foot {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 48px;
  background: var(--stone);
}

.auth-top {
  width: min(440px, 100%);
  margin-bottom: 24px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.2s;
}

.auth-back:hover { color: var(--navy); }

.auth-card {
  width: min(440px, 100%);
  padding: 40px 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.auth-card-head { margin-bottom: 28px; }

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.94rem;
  color: var(--slate);
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.auth-alert-error {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.18);
  color: #9b2334;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--green);
}

.field-link:hover { color: var(--green-dark); }

.field-control {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--slate-light);
  pointer-events: none;
  display: grid;
  place-items: center;
}

.field-icon svg { width: 18px; height: 18px; }

.field-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  font-family: var(--font);
  font-size: 0.94rem;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input::placeholder { color: var(--slate-light); }

.field-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.field-input.is-invalid {
  border-color: rgba(220, 53, 69, 0.45);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}

.field-toggle {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--slate-light);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}

.field-toggle:hover {
  color: var(--navy);
  background: var(--stone);
}

.field-toggle svg { width: 18px; height: 18px; }

.field-error {
  font-size: 0.78rem;
  color: #9b2334;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--slate);
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  position: relative;
}

.auth-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.auth-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(42, 51, 49, 0.15);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-footer-text {
  margin-top: 24px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--slate);
}

.auth-footer-text a {
  font-weight: 600;
  color: var(--green);
}

.auth-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.auth-step {
  height: 4px;
  border-radius: 999px;
  background: var(--stone-deep);
  transition: background 0.25s;
}

.auth-step.is-active,
.auth-step.is-done {
  background: var(--green);
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-alert-success {
  background: rgba(47, 122, 98, 0.1);
  border: 1px solid rgba(47, 122, 98, 0.2);
  color: var(--green-dark);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--slate-light);
  line-height: 1.45;
}

.field-input-code {
  letter-spacing: 0.28em;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.auth-subtitle strong {
  color: var(--navy);
  font-weight: 600;
}

.auth-inline-action {
  text-align: center;
  font-size: 0.82rem;
  color: var(--slate-light);
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
}

.auth-link-btn:hover {
  color: var(--green-dark);
}

.btn-join .auth-spinner {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
}

/* ── Portal ── */

.portal-page { background: var(--stone); min-height: 100dvh; }

.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-user {
  font-size: 0.78rem;
  color: var(--slate);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-main { padding: 48px 0 80px; }

.portal-welcome { margin-bottom: 32px; }

.portal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.portal-lead {
  font-size: 0.98rem;
  color: var(--slate);
  max-width: 560px;
}

.portal-shell { transform: none; }

.portal-shell:hover { transform: none; }

.portal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  padding: 40px 24px;
}

.portal-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.portal-empty-icon svg { width: 28px; height: 28px; }

.portal-empty h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portal-empty p {
  font-size: 0.92rem;
  color: var(--slate);
  max-width: 360px;
  margin-bottom: 24px;
  line-height: 1.6;
}

@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }

  .auth-brand {
    padding: 28px 24px 32px;
    min-height: auto;
  }

  .auth-brand-body {
    margin: 24px 0;
    justify-content: flex-start;
  }

  .auth-brand-list { display: none; }

  .auth-brand-foot { display: none; }

  .auth-main { padding-top: 16px; }

  .auth-card { padding: 32px 24px; }
}
