@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,800&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #fcfbf7;
  --bg-soft: #f6f3ea;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(249, 245, 235, 0.88);
  --ink: #461220;
  --muted: #6f5b61;
  --muted-strong: #414535;
  --accent: #efbf04;
  --accent-strong: #c49700;
  --accent-soft: #a9e5bb;
  --good: #386150;
  --line: rgba(70, 18, 32, 0.08);
  --line-strong: rgba(239, 191, 4, 0.28);
  --shadow: 0 24px 60px rgba(70, 18, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(239, 191, 4, 0.12), transparent 20%),
    radial-gradient(circle at 85% 10%, rgba(169, 229, 187, 0.14), transparent 18%),
    linear-gradient(180deg, #fffdf7 0%, #fbf8ef 38%, #f7f3e8 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(70, 18, 32, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 85%);
  opacity: 0.35;
}

.page-shell {
  position: relative;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-page .page-shell {
  width: 100%;
  max-width: none;
  padding-top: 0;
}

.analysis-page .page-shell,
.subpage .page-shell {
  width: 100%;
  max-width: none;
  padding-top: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px 0 12px;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.topbar-split {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-inline: clamp(20px, 4vw, 42px);
}

.brand-link,
.topbar-link {
  color: var(--ink);
  text-decoration: none;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: max-content;
}

.topbar-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.topbar-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 160ms ease, background 160ms ease;
}

.topbar-link:hover {
  color: var(--ink);
  background: rgba(239, 191, 4, 0.12);
}

.topbar-link.active {
  background: rgba(239, 191, 4, 0.14);
  color: var(--ink);
}

.hero-copy,
.hero-visual,
.card,
.metric-card {
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 28px;
  box-shadow: none;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 22px 0 14px;
}

.hero-copy-landing {
  max-width: 500px;
  width: min(500px, calc(100vw - 48px));
  padding: 0;
  color: #311019;
  text-align: center;
  margin-inline: auto;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: "Fraunces", serif;
  font-size: clamp(3rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  max-width: 11ch;
  margin-inline: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-text {
  margin: 0;
  max-width: 56ch;
  color: var(--muted-strong);
  font-size: 1.07rem;
  line-height: 1.8;
}

.hero-copy-landing .hero-text {
  max-width: 30ch;
  font-size: 0.98rem;
  line-height: 1.65;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  justify-content: center;
}

.hero-primary,
.hero-secondary {
  width: auto;
  min-width: 0;
}

.hero-primary {
  padding-inline: 22px;
}

.hero-secondary {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(70, 18, 32, 0.06);
  backdrop-filter: blur(8px);
}

.hero-proof {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.hero-microproof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  color: rgba(70, 18, 32, 0.62);
  font-size: 0.82rem;
  justify-content: center;
}

.hero-microproof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-microproof span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-badge-label,
.eyebrow,
.section-kicker,
.panel-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-stage {
  position: relative;
  margin-bottom: 34px;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-stage-landing {
  min-height: min(78vh, 980px);
  margin-left: 0;
  margin-right: 0;
  margin-top: -300px;
}

.hero-stage-landing img {
  width: 100%;
  height: 100%;
  min-height: min(78vh, 980px);
  object-fit: cover;
  object-position: center top;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 76%, rgba(0, 0, 0, 0.28) 92%, transparent 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(250px, 18vw, 330px) clamp(34px, 5vw, 62px) clamp(34px, 5vw, 62px);
  background:
    radial-gradient(circle at 50% 11%, rgba(252, 249, 241, 0.26) 0%, rgba(252, 249, 241, 0.14) 18%, rgba(252, 249, 241, 0) 42%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.04) 0%, rgba(255, 253, 247, 0) 24%);
}

.hero-overlay .eyebrow,
.hero-overlay .hero-text,
.hero-overlay .hero-microproof,
.hero-overlay h1 {
  text-shadow: 0 1px 12px rgba(255, 252, 245, 0.14);
}

.workflow-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 54px;
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.workflow-strip-header {
  display: grid;
  gap: 6px;
}

.workflow-strip-header p:last-child {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.workflow-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.workflow-chip {
  padding: 8px 6px 8px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.workflow-chip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.workflow-chip div {
  color: var(--muted-strong);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 64px;
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.trust-item {
  padding: 8px 8px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.trust-item p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.trust-value {
  display: inline-block;
  font-family: "Fraunces", serif;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.feature-showcase {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  width: 100%;
  min-height: 560px;
  margin: 0 0 88px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.feature-showcase-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(252, 249, 241, 0.94) 0%, rgba(252, 249, 241, 0.7) 28%, rgba(252, 249, 241, 0.18) 56%, rgba(252, 249, 241, 0) 84%),
    linear-gradient(180deg, rgba(252, 249, 241, 0) 0%, rgba(252, 249, 241, 0) 78%, #f7f3e8 100%),
    url("./kiwidiv-feature-visual.png") center center / cover no-repeat;
  opacity: 0.96;
}

.feature-showcase-copy {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 88px) 0;
}

.feature-showcase-copy h2 {
  margin: 0 0 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.feature-showcase-points {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.feature-showcase-points p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.8;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 76px;
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.feature-copy h2 {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.feature-card p:last-child {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.landing-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 24px;
  align-items: center;
  width: min(1280px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 96px;
}

.landing-cta-copy h2 {
  margin: 0 0 12px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.landing-cta-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.landing-page .topbar {
  position: relative;
  z-index: 3;
  margin-bottom: 0;
  margin-top: 0;
}

.analysis-page .topbar,
.subpage .topbar {
  position: relative;
  z-index: 3;
  margin-bottom: 20px;
  margin-top: 0;
}

.analysis-page main,
.subpage main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.admin-shell main {
  width: min(980px, calc(100% - 40px));
}

.landing-page .topbar-link,
.landing-page .brand-copy span,
.analysis-page .topbar-link,
.analysis-page .brand-copy span,
.subpage .topbar-link,
.subpage .brand-copy span {
  color: rgba(70, 18, 32, 0.78);
}

.landing-page .brand-copy strong,
.landing-page .topbar-link,
.analysis-page .brand-copy strong,
.analysis-page .topbar-link,
.subpage .brand-copy strong,
.subpage .topbar-link {
  text-shadow: 0 1px 14px rgba(255, 252, 245, 0.18);
}

.analysis-page .access-banner,
.analysis-page .card,
.analysis-page .history-card,
.analysis-page .metric-card {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(70, 18, 32, 0.05);
}

.analysis-page .summary-grid {
  gap: 14px;
  margin-bottom: 18px;
}

.analysis-page .metric-card {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 24px rgba(70, 18, 32, 0.04);
}

.analysis-grid-mercury {
  gap: 18px;
  margin-bottom: 24px;
}

.analysis-page .table-section {
  padding: 28px 28px 30px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(70, 18, 32, 0.08);
  box-shadow: 0 28px 70px rgba(70, 18, 32, 0.1);
}

.analysis-page .table-wrap {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(70, 18, 32, 0.06);
  max-height: min(72vh, 980px);
}

.analysis-page .sheet-tab {
  background: rgba(255, 255, 255, 0.82);
}

.analysis-page .table-meta {
  margin-bottom: 14px;
}

.analysis-page .analysis-grid {
  opacity: 0.94;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(70, 18, 32, 0.06);
  box-shadow: var(--shadow);
}

.metric-label,
.metric-footnote {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.metric-label {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.metric-value {
  margin: 16px 0 10px;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.upload-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.upload-text,
.upload-status {
  margin: 0;
  overflow-wrap: anywhere;
}

.upload-text {
  color: var(--muted-strong);
  line-height: 1.75;
}

.upload-actions {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.workbook-input,
.upload-button,
.access-select,
.history-select,
.search-input {
  width: 100%;
  font: inherit;
}

.workbook-input,
.access-select,
.history-select,
.search-input {
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(19, 33, 26, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.workbook-input::file-selector-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  margin-right: 12px;
  background: rgba(239, 191, 4, 0.16);
  color: var(--ink);
  font: inherit;
}

.upload-button {
  padding: 13px 16px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, #efbf04, #d9a100);
  color: #461220;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(239, 191, 4, 0.2);
}

.upload-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.admin-shell {
  max-width: 980px;
}

.admin-auth {
  display: grid;
  gap: 14px;
  max-width: 680px;
  margin: 10vh auto 0;
}

.admin-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-password-input {
  width: 100%;
}

.admin-logout-button {
  justify-self: start;
}

.history-picker-card {
  margin-bottom: 24px;
}

.access-banner,
.account-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.access-banner,
.card,
.history-card,
.metric-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(70, 18, 32, 0.06);
  box-shadow: var(--shadow);
}

.card {
  padding: 28px;
  border-radius: 30px;
}

.landing-page .card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-inline: 0;
}

.access-banner-copy,
.access-banner-actions,
.pricing-shell,
.pricing-grid,
.locked-state,
.access-admin-grid {
  min-width: 0;
}

.access-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.access-link-button {
  text-decoration: none;
}

.secondary-link-button {
  display: inline-grid;
  place-items: center;
}

.locked-state {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(239, 191, 4, 0.16), rgba(255, 255, 255, 0.72));
}

.locked-state h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
}

.locked-tab {
  opacity: 0.72;
}

.pricing-shell {
  display: grid;
  gap: 18px;
}

.pricing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.pricing-hero-copy h1 {
  margin: 0 0 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(2.5rem, 4.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.pricing-hero-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(70, 18, 32, 0.06);
  box-shadow: var(--shadow);
}

.pricing-points {
  margin: 0;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.9;
}

.pricing-grid {
  margin-bottom: 0;
}

.pricing-card {
  min-height: 200px;
}

.pricing-card-actions {
  margin-top: 18px;
}

.pricing-note {
  padding-top: 22px;
  padding-bottom: 22px;
}

.access-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.access-admin-form {
  display: grid;
  gap: 12px;
}

.history-picker {
  display: grid;
  gap: 14px;
}

.history-picker summary {
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 800;
}

.history-picker-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.history-picker-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.history-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.history-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
}

.history-meta {
  margin: 0;
  color: var(--muted-strong);
}

.card-header h2,
.table-toolbar h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.95rem;
  line-height: 0.98;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.table-toolbar-copy {
  display: grid;
  gap: 8px;
}

.analysis-page .table-toolbar h2 {
  font-size: clamp(2.35rem, 3.4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.table-intro {
  margin: 0;
  max-width: 44ch;
  color: var(--muted-strong);
  line-height: 1.75;
}

.pipeline-list,
.sector-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(19, 33, 26, 0.06);
}

.pipeline-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.step-index {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #efbf04, #d9a100);
  color: #461220;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.step-content h3,
.step-content p,
.bar-row p {
  margin: 0;
}

.step-content h3 {
  font-family: "Fraunces", serif;
  font-size: 1.17rem;
  letter-spacing: -0.02em;
}

.step-content p {
  color: var(--muted-strong);
  margin-top: 6px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-line {
  height: 12px;
  border-radius: 999px;
  background: rgba(19, 33, 26, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efbf04, #386150);
}

.table-section {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.table-toolbar > *,
.toolbar-actions,
.sheet-tabs {
  min-width: 0;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: end;
}

.sheet-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sheet-tab {
  border: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sheet-tab:hover {
  transform: translateY(-1px);
  background: rgba(239, 191, 4, 0.14);
  color: var(--ink);
}

.sheet-tab.active {
  background: linear-gradient(135deg, rgba(239, 191, 4, 0.22), rgba(255, 255, 255, 0.88));
  color: var(--ink);
}

.search-input {
  min-width: 300px;
}

.table-meta {
  margin-bottom: 14px;
  color: var(--muted-strong);
  overflow-wrap: anywhere;
  font-size: 0.96rem;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
}

table {
  width: max-content;
  min-width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

thead {
  background: rgba(239, 191, 4, 0.12);
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(19, 33, 26, 0.06);
  vertical-align: top;
  white-space: nowrap;
}

th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-strong);
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9f2cf;
  box-shadow: inset 0 -1px 0 rgba(19, 33, 26, 0.06);
}

th.key-metric-column {
  background: linear-gradient(180deg, rgba(239, 191, 4, 0.32), rgba(249, 242, 207, 0.98));
  color: #461220;
}

th.primary-outcome-column {
  background: linear-gradient(180deg, rgba(70, 18, 32, 0.92), rgba(98, 30, 47, 0.96));
  color: #fff6d9;
}

td {
  font-size: 0.94rem;
  color: var(--ink);
}

td.key-metric-column {
  background: rgba(239, 191, 4, 0.08);
  font-weight: 700;
}

td.primary-outcome-column {
  background: linear-gradient(180deg, rgba(70, 18, 32, 0.12), rgba(239, 191, 4, 0.16));
  color: #461220;
  font-weight: 800;
}

td.primary-outcome-column .muted {
  color: rgba(70, 18, 32, 0.58);
}

td a,
.workflow-chip div,
.step-content h3,
.bar-row p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

td a {
  color: var(--accent-strong);
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(239, 191, 4, 0.06);
}

tbody tr:hover td.key-metric-column {
  background: rgba(239, 191, 4, 0.14);
}

tbody tr:hover td.primary-outcome-column {
  background: linear-gradient(180deg, rgba(70, 18, 32, 0.18), rgba(239, 191, 4, 0.22));
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(169, 229, 187, 0.24);
  color: var(--good);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(70, 18, 32, 0.1);
  background: rgba(255, 255, 255, 0.68);
  color: #461220;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rank-badge-strong {
  background: linear-gradient(135deg, #efbf04, #f7d95a);
  color: #3a1404;
  border-color: rgba(239, 191, 4, 0.7);
  box-shadow: 0 10px 22px rgba(239, 191, 4, 0.34);
}

.rank-badge-buy {
  background: linear-gradient(135deg, rgba(169, 229, 187, 0.96), rgba(56, 97, 80, 0.22));
  color: #214537;
  border-color: rgba(56, 97, 80, 0.28);
}

.rank-badge-hold {
  background: linear-gradient(135deg, rgba(255, 247, 217, 0.98), rgba(239, 191, 4, 0.18));
  color: #6a4e00;
  border-color: rgba(239, 191, 4, 0.32);
}

.rank-badge-strong-sell {
  background: linear-gradient(135deg, #9a2734, #c84a55);
  color: #fff7f7;
  border-color: rgba(154, 39, 52, 0.84);
  box-shadow: 0 10px 22px rgba(154, 39, 52, 0.28);
}

.muted {
  color: var(--muted);
}

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

.site-footer {
  width: 100%;
  margin-top: auto;
  margin-left: 0;
  margin-right: 0;
  padding: 104px clamp(20px, 4vw, 42px) 22px;
  background: #14100d;
}

.site-footer-surface {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding-top: 34px;
  border-top: 1px solid rgba(255, 245, 219, 0.12);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.4fr);
  gap: 44px;
  align-items: start;
}

.site-footer-brand {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.site-footer-brand-link {
  width: fit-content;
}

.site-footer-copy {
  margin: 0;
  color: rgba(255, 248, 231, 0.74);
  line-height: 1.8;
  max-width: 38ch;
}

.site-footer-contact {
  width: fit-content;
  color: rgba(255, 248, 231, 0.88);
  text-decoration: none;
  font-weight: 600;
}

.site-footer-contact:hover {
  color: #ffffff;
}

.site-footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-column {
  display: grid;
  gap: 10px;
}

.footer-heading {
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(239, 191, 4, 0.88);
}

.footer-column a {
  width: fit-content;
  color: rgba(255, 248, 231, 0.82);
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-column a:hover {
  color: #ffffff;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 245, 219, 0.08);
}

.site-footer-bottom p {
  margin: 0;
  color: rgba(255, 248, 231, 0.56);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer .brand-copy strong {
  color: #fff8e7;
}

.site-footer .brand-copy span {
  color: rgba(255, 248, 231, 0.54);
}

.legal-shell {
  display: grid;
  gap: 20px;
}

.legal-hero h1,
.legal-document h1 {
  margin: 0 0 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-card {
  display: grid;
  gap: 12px;
}

.legal-card h2,
.legal-document h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.legal-link {
  width: fit-content;
  padding-left: 0;
}

.legal-document {
  max-width: 880px;
}

.legal-document p {
  color: var(--muted-strong);
  line-height: 1.85;
}

.legal-updated {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .topbar-split,
  .trust-strip,
  .feature-showcase,
  .feature-band,
  .feature-grid,
  .pricing-hero,
  .workflow-strip,
  .upload-section,
  .analysis-grid,
  .summary-grid,
  .access-banner,
  .account-card,
  .access-admin-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 20px;
  }

  .landing-page .page-shell {
    width: 100%;
    padding-top: 0;
  }

  .analysis-page .page-shell,
  .subpage .page-shell {
    width: 100%;
    padding-top: 0;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-nav,
  .topbar-account {
    position: static;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
  }

  .topbar-split {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-inline: 0;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-link,
  .brand-link {
    text-align: center;
  }

  .brand-link {
    justify-content: center;
  }

  .hero-copy {
    padding: 8px 0 0;
  }

  .workflow-cards {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-primary,
  .hero-secondary {
    width: 100%;
  }

  .hero-copy-landing {
    max-width: 100%;
    padding-top: 18px;
  }

  .hero-stage {
    border-radius: 0;
  }

  .hero-stage-landing,
  .hero-stage-landing img {
    min-height: 72vh;
  }

  .hero-stage-landing {
    margin-top: -260px;
  }

  .hero-overlay {
    align-items: end;
    justify-content: center;
    padding: 22px 22px 28px;
    background:
      linear-gradient(180deg, rgba(252, 249, 241, 0.02) 0%, rgba(252, 249, 241, 0.1) 36%, rgba(252, 249, 241, 0.84) 100%);
  }

  .table-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .analysis-page .table-section {
    padding: 22px 22px 24px;
  }

  .analysis-page .table-wrap {
    max-height: 68vh;
  }

  .landing-cta-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .search-input {
    width: 100%;
  }

  .trust-strip,
  .feature-showcase,
  .feature-band,
  .landing-cta {
    width: min(100%, calc(100% - 20px));
  }

  .analysis-page main,
  .subpage main,
  .admin-shell main {
    width: min(100%, calc(100% - 20px));
  }

  .feature-showcase {
    min-height: 420px;
    border-radius: 0;
  }

  .feature-showcase-bg {
    background:
      linear-gradient(180deg, rgba(252, 249, 241, 0.84) 0%, rgba(252, 249, 241, 0.58) 42%, rgba(252, 249, 241, 0.2) 68%, #f7f3e8 100%),
      url("./kiwidiv-feature-visual.png") center center / cover no-repeat;
  }

  .feature-showcase-copy {
    width: min(100%, calc(100% - 20px));
  }

  .search-input {
    min-width: 0;
  }

  .access-banner-actions {
    justify-content: stretch;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-links-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-nav {
    justify-content: flex-start;
  }
}
