

:root {
  /* Phase 40 — full UI restyle from the founder-provided enhanced HTML reference. */
  --ink-950: #0f172a;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-soft: #64748b;
  --brand-950: #172554;
  --brand-900: #1e3a8a;
  --brand-800: #1e40af;
  --brand-700: #1d4ed8;
  --brand-600: #2563eb;
  --brand-500: #3b82f6;
  --brand-400: #60a5fa;
  --brand-300: #93c5fd;
  --brand-200: #bfdbfe;
  --brand-100: #dbeafe;
  --brand-50: #eff6ff;
  --accent-cyan: #06b6d4;
  --accent-lime: #dbeafe;
  --accent-lime-strong: #2563eb;
  --accent-lime-soft: #eff6ff;
  --success-700: #047857;
  --success-600: #059669;
  --success-500: #10b981;
  --success-100: #d1fae5;
  --success-50: #ecfdf5;
  --warning-700: #b45309;
  --warning-600: #d97706;
  --warning-100: #fef3c7;
  --warning-50: #fffbeb;
  --danger-700: #be123c;
  --danger-600: #e11d48;
  --danger-100: #ffe4e6;
  --danger-50: #fff1f2;
  --canvas: #f8fafc;
  --paper-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-warm: #f8fafc;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px -18px rgba(15, 23, 42, 0.18);
  --shadow-card-hover: 0 24px 48px -24px rgba(15, 23, 42, 0.24);
  --shadow-button: 0 10px 20px -10px rgba(37, 99, 235, 0.55);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Compatibility aliases retained for older components. */
  --navy-950: var(--ink-950);
  --navy-900: var(--ink-900);
  --navy-800: var(--ink-800);
  --navy-700: #334155;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-800: var(--brand-800);
  --emerald-700: var(--brand-700);
  --emerald-600: var(--brand-600);
  --emerald-500: var(--brand-500);
  --emerald-100: var(--brand-100);
  --emerald-50: var(--brand-50);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--navy-950);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select {
  font-family: var(--font-sans);
}

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

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-lime);
  color: var(--ink-950);
}

:focus-visible {
  outline: 3px solid rgba(22, 40, 232, 0.30);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  transform: translateY(-160%);
  background: var(--navy-950);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  overflow: hidden;
}

.site-header {
  height: 96px;
  border-bottom: 1px solid rgba(217, 225, 232, 0.38);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner {
  width: min(1440px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  align-items: center;
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 14px;
  color: var(--navy-950);
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.brand-mark {
  width: 54px;
  height: 58px;
  flex: 0 0 auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 3.5vw, 56px);
  font-size: 16px;
  font-weight: 560;
}

.desktop-nav a,
.sign-in {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.sign-in:hover {
  color: var(--emerald-700);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  font-size: 16px;
  font-weight: 560;
}

.button {
  min-height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  box-shadow: 0 8px 20px rgba(0, 109, 94, 0.12);
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 109, 94, 0.19);
}

.button:active {
  transform: translateY(0);
}

.button-small {
  min-height: 54px;
  padding-inline: 29px;
  font-size: 16px;
}

.mobile-menu {
  display: none;
  position: relative;
  justify-self: end;
}

.mobile-menu-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--navy-950);
}

.mobile-menu-icon {
  width: 23px;
  height: 23px;
}

.mobile-navigation {
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.mobile-navigation a {
  padding: 12px 14px;
  border-radius: 7px;
  font-weight: 600;
}

.mobile-navigation a:hover {
  background: var(--emerald-50);
  color: var(--emerald-800);
}

.section-container {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
}

.hero {
  padding-block: 51px 38px;
  display: grid;
  grid-template-columns: minmax(420px, 0.83fr) minmax(650px, 1.28fr);
  gap: clamp(48px, 5vw, 82px);
  align-items: center;
}

.hero-copy {
  padding-left: 1px;
}

.market-badge {
  width: max-content;
  margin-bottom: 24px;
  padding: 7px 13px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 680;
}

.market-badge i,
.micro-trust i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.hero h1 {
  max-width: 600px;
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(54px, 4.55vw, 72px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.hero-description {
  max-width: 590px;
  margin: 27px 0 0;
  color: #263a55;
  font-size: clamp(18px, 1.4vw, 21px);
  letter-spacing: -0.025em;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.hero-actions .button {
  min-width: 220px;
}

.text-link {
  padding-block: 9px 5px;
  border-bottom: 1px solid var(--emerald-700);
  color: var(--emerald-800);
  font-size: 17px;
  font-weight: 600;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.text-link:hover {
  border-color: var(--navy-900);
  color: var(--navy-900);
}

.micro-trust {
  margin-top: 21px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--slate-600);
  font-size: 13px;
  white-space: nowrap;
}

.micro-trust i {
  width: 3px;
  height: 3px;
}

.calculator-card {
  min-height: 518px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 47% 53%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.calculator-form {
  padding: 24px 25px;
  display: grid;
  align-content: start;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 560;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-button,
.clear-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #6e8096;
}

.info-button {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
}

.info-button .svg-icon {
  width: 16px;
  height: 16px;
}

.control {
  position: relative;
  min-height: 42px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  display: flex;
  align-items: center;
  background: #fff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.control:focus-within {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(0, 139, 120, 0.11);
}

.control input,
.control select {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy-950);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.control input {
  padding: 0 39px 0 13px;
}

.control select {
  appearance: none;
  padding: 0 40px 0 42px;
}

.flag-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  width: 22px;
  height: 17px;
  border: 1px solid rgba(8, 27, 61, 0.08);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(8, 27, 61, 0.08);
}

.control-icon {
  position: absolute;
  right: 10px;
  width: 19px;
  height: 19px;
  pointer-events: none;
  color: #54667d;
}

.clear-button {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
}

.clear-button:hover {
  background: #f1f5f7;
  color: var(--navy-900);
}

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

.calculate-button {
  width: 100%;
  min-height: 52px;
  margin-top: 5px;
}

.calculator-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b9ddd4;
  border-radius: 6px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 12px;
  line-height: 1.45;
}

.result-panel {
  padding: 25px 28px 20px 31px;
  border-left: 1px solid var(--line);
  background: linear-gradient(145deg, #fff, #fefefc);
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-panel h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.sample-label {
  padding: 4px 7px;
  border: 1px solid #d8e4e0;
  border-radius: 5px;
  background: #f6faf8;
  color: var(--emerald-800);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.total {
  margin: 9px 0 8px;
  color: var(--emerald-800);
  font-size: clamp(39px, 3.15vw, 49px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.verified-badge {
  width: max-content;
  padding: 6px 9px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #e9f6ed;
  color: #197244;
  font-size: 12px;
  font-weight: 620;
}

.verified-badge .svg-icon {
  width: 16px;
  height: 16px;
}

.result-list {
  margin: 17px 0 0;
}

.result-row {
  position: relative;
  min-height: 56px;
  padding: 10px 0 9px 27px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.result-dot {
  position: absolute;
  top: 17px;
  left: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.result-dot-navy {
  background: #173d7a;
}

.result-dot-blue {
  background: #3f94dc;
}

.result-dot-teal {
  background: #1b9699;
}

.result-dot-purple {
  background: #7a55bd;
}

.result-dot-orange {
  background: #f39224;
}

.result-row dt {
  font-size: 14px;
  font-weight: 560;
  line-height: 1.25;
}

.result-row dt small {
  margin-top: 2px;
  display: block;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 450;
}

.result-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 570;
  text-align: right;
}

.formula-link {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 640;
}

.formula-link .svg-icon {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.formula-link:hover .svg-icon {
  transform: translateX(3px);
}

.data-note {
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px dashed #dce3e7;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.45;
}

.trust-strip {
  border-block: 1px solid #e5e6e4;
  background: var(--surface-warm);
}

.trust-strip-inner {
  width: min(1380px, calc(100% - 96px));
  min-height: 98px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(650px, 1.65fr);
  align-items: center;
  gap: 40px;
}

.trust-strip p {
  margin: 0;
  color: var(--navy-950);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.trust-items {
  display: grid;
  grid-template-columns: 1fr 1px 1.2fr 1px 0.55fr;
  align-items: center;
  gap: 27px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
}

.trust-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2f2ed;
  color: var(--emerald-800);
}

.trust-icon .svg-icon {
  width: 31px;
  height: 31px;
}

.trust-divider {
  width: 1px;
  height: 48px;
  background: #deded9;
}

.features {
  padding-block: 38px 48px;
}

.section-heading {
  text-align: center;
}

.section-heading > p {
  margin: 0;
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 11px 0 0;
  color: var(--navy-950);
  font-size: clamp(32px, 2.8vw, 42px);
  font-weight: 710;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.feature-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.feature-card {
  min-height: 136px;
  padding: 21px 23px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 19px;
  background: #fff;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: #b9cbc7;
  box-shadow: 0 14px 30px rgba(13, 34, 65, 0.07);
}

.feature-icon {
  width: 98px;
  height: 96px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f4f1, #f5faf8);
  color: var(--emerald-800);
}

.feature-icon .svg-icon {
  width: 56px;
  height: 56px;
}

.feature-card h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 18px;
  font-weight: 690;
  letter-spacing: -0.035em;
}

.feature-card p {
  max-width: 270px;
  margin: 9px 0 0;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.55;
}

.closing-note {
  margin-top: 34px;
  padding: 23px 25px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-950);
  color: #fff;
}

.closing-note > span {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.closing-note a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #bcecdf;
  font-size: 14px;
  font-weight: 650;
}

.closing-note a .svg-icon {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.closing-note a:hover .svg-icon {
  transform: translateX(3px);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #f8faf9;
}

.footer-inner {
  width: min(1380px, calc(100% - 96px));
  min-height: 118px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 30px;
  color: var(--slate-600);
  font-size: 13px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner p:nth-child(2) {
  text-align: center;
}

.footer-inner p:last-child {
  text-align: right;
}

.footer-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 9px;
  color: var(--navy-950);
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.footer-brand img {
  width: 34px;
  height: 37px;
}

.error-page {
  width: min(620px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.error-page .error-code {
  margin: 70px 0 5px;
  color: var(--emerald-700);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.error-page h1 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(42px, 8vw, 68px);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.error-page > p:not(.error-code) {
  max-width: 520px;
  margin: 22px 0 28px;
  color: var(--slate-600);
  font-size: 18px;
  line-height: 1.6;
}

@media (max-width: 1220px) {
  .header-inner {
    grid-template-columns: 220px 1fr 230px;
  }

  .desktop-nav {
    gap: 26px;
  }

  .header-actions {
    gap: 18px;
  }

  .hero {
    grid-template-columns: 0.78fr 1.22fr;
    gap: 36px;
  }

  .section-container,
  .trust-strip-inner,
  .footer-inner {
    width: min(1140px, calc(100% - 56px));
  }

  .hero h1 {
    font-size: 55px;
  }

  .calculator-form {
    padding-inline: 20px;
  }

  .result-panel {
    padding-inline: 25px;
  }

  .trust-strip-inner {
    grid-template-columns: 0.8fr 1.4fr;
  }

  .trust-items {
    gap: 16px;
  }

  .feature-card {
    grid-template-columns: 76px 1fr;
    gap: 15px;
  }

  .feature-icon {
    width: 72px;
    height: 72px;
  }

  .feature-icon .svg-icon {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 1020px) {
  .site-header {
    height: 82px;
  }

  .header-inner {
    width: min(920px, calc(100% - 40px));
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .brand {
    font-size: 23px;
  }

  .brand-mark {
    width: 47px;
    height: 51px;
  }

  .hero {
    padding-top: 48px;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    max-width: 700px;
    font-size: clamp(48px, 7vw, 66px);
  }

  .calculator-card {
    min-height: auto;
  }

  .trust-strip-inner {
    padding-block: 26px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    min-height: 124px;
    grid-template-columns: 86px 1fr;
  }

  .feature-icon {
    width: 82px;
    height: 82px;
  }

  .footer-inner {
    padding-block: 26px;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .footer-inner p:nth-child(2),
  .footer-inner p:last-child {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .header-inner,
  .section-container,
  .trust-strip-inner,
  .footer-inner {
    width: min(100% - 32px, 620px);
  }

  .hero {
    padding-block: 34px 30px;
  }

  .market-badge {
    margin-bottom: 20px;
    font-size: 12px;
    gap: 7px;
  }

  .hero h1 {
    font-size: clamp(42px, 12.5vw, 58px);
    line-height: 1.02;
  }

  .hero-description {
    margin-top: 22px;
    font-size: 18px;
  }

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

  .hero-actions .button {
    width: 100%;
  }

  .text-link {
    align-self: center;
  }

  .micro-trust {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
  }

  .calculator-card {
    grid-template-columns: 1fr;
  }

  .calculator-form {
    padding: 23px 20px 24px;
  }

  .result-panel {
    padding: 25px 21px 21px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .result-heading {
    align-items: flex-start;
  }

  .total {
    font-size: 44px;
  }

  .trust-items {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trust-divider {
    display: none;
  }

  .trust-strip p {
    font-size: 17px;
  }

  .features {
    padding-block: 34px 38px;
  }

  .feature-grid {
    margin-top: 24px;
  }

  .feature-card {
    padding: 17px;
    grid-template-columns: 68px 1fr;
    gap: 15px;
  }

  .feature-icon {
    width: 64px;
    height: 64px;
  }

  .feature-icon .svg-icon {
    width: 42px;
    height: 42px;
  }

  .feature-card h3 {
    font-size: 17px;
  }

  .feature-card p {
    margin-top: 5px;
  }

  .closing-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .site-header {
    height: 74px;
  }

  .brand {
    gap: 9px;
    font-size: 21px;
  }

  .brand-mark {
    width: 42px;
    height: 46px;
  }

  .market-badge {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 43px;
  }

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

  .result-heading {
    display: block;
  }

  .sample-label {
    margin-top: 8px;
    display: inline-block;
  }
}

/* Release 0.9 commercial, help and educational surfaces */
.pricing-hero,
.help-hero {
  position: relative;
  overflow: hidden;
}

.pricing-hero::after,
.help-hero::after {
  position: absolute;
  right: max(4vw, 30px);
  bottom: -150px;
  width: 390px;
  height: 390px;
  border: 1px solid rgb(117 231 197 / 18%);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgb(117 231 197 / 4%),
    0 0 0 92px rgb(117 231 197 / 3%);
  content: "";
  pointer-events: none;
}

.pricing-section {
  background:
    radial-gradient(circle at 50% 0, rgb(34 175 133 / 8%), transparent 31%),
    #f7fafb;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  min-height: 620px;
  padding: 28px;
  border-color: #dce6e8;
  display: flex;
  flex-direction: column;
}

.pricing-card-featured {
  border-color: var(--emerald-500);
  box-shadow: 0 24px 70px rgb(8 48 58 / 14%);
  transform: translateY(-8px);
}

.pricing-card-featured::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--emerald-500), #6fe0bc);
  content: "";
}

.pricing-card-heading {
  min-height: 83px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pricing-card-heading > div > span {
  color: var(--emerald-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-card h2 {
  margin: 7px 0 0;
  color: var(--navy-900);
  font-size: 28px;
}

.price-line {
  min-height: 88px;
  padding: 20px 0;
  border-block: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.price-line strong {
  color: var(--navy-900);
  font-size: 42px;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.price-line span {
  max-width: 96px;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.35;
}

.pricing-card > p {
  min-height: 74px;
  margin: 20px 0 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.check-list {
  padding: 0;
  margin: 21px 0 28px;
  display: grid;
  gap: 13px;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--slate-700);
  font-size: 13px;
  line-height: 1.55;
}

.check-list .svg-icon {
  width: 19px;
  height: 19px;
  color: var(--emerald-600);
}

.pricing-card > .button {
  width: 100%;
  margin-top: auto;
}

.commercial-intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(460px, 1.15fr);
  gap: 36px;
  align-items: start;
}

.commercial-intake-layout > div > h2 {
  margin: 8px 0 0;
  color: var(--navy-900);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.commercial-intake-layout > div > p {
  color: var(--slate-600);
  line-height: 1.7;
}

.intake-card {
  padding: 32px;
  box-shadow: 0 22px 65px rgb(8 48 58 / 11%);
}

.intake-card h2,
.intake-card h3 {
  margin: 7px 0 12px;
  color: var(--navy-900);
}

.intake-card > p {
  color: var(--slate-600);
  line-height: 1.65;
}

.stacked-form {
  display: grid;
  gap: 19px;
}

.stacked-form .form-grid {
  margin: 0;
}

.support-options {
  display: grid;
  gap: 16px;
}

.support-option {
  padding: 24px;
}

.support-option h2 {
  margin: 14px 0 7px;
  color: var(--navy-900);
  font-size: 20px;
}

.support-option p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.55;
}

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

.help-card {
  min-height: 290px;
  padding: 27px;
  display: flex;
  flex-direction: column;
}

.help-card h2 {
  margin: 18px 0 8px;
  color: var(--navy-900);
  font-size: 21px;
  line-height: 1.2;
}

.help-card p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.help-card .text-link {
  margin-top: auto;
}

.help-contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
}

.help-contact-strip h2 {
  margin: 6px 0;
  color: var(--navy-900);
  font-size: 30px;
}

.help-contact-strip p {
  margin: 0;
  color: var(--slate-600);
}

.light-link {
  color: #a9f1dc;
}

.help-article .help-check-list {
  margin-top: 22px;
}

.related-help-card nav {
  display: grid;
  gap: 0;
}

.related-help-card nav a {
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--navy-800);
  font-size: 13px;
  font-weight: 730;
}

.related-help-card nav a:first-child {
  margin-top: 8px;
}

.formula-panel {
  padding: 20px 22px;
  margin-top: 22px;
  border: 1px solid #cfe8df;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1fbf7, #f8fcfb);
  display: grid;
  gap: 7px;
}

.formula-panel span {
  color: var(--emerald-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.formula-panel strong {
  color: var(--navy-900);
  font-size: 15px;
  line-height: 1.55;
}

.faq-stack {
  display: grid;
  gap: 13px;
}

.faq-stack article {
  padding: 21px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}

.faq-stack h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 17px;
}

.faq-stack p {
  margin: 8px 0 0;
}

.source-link-list {
  display: grid;
  gap: 10px;
}

.source-link-list a {
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcfc;
  display: grid;
  gap: 5px;
}

.source-link-list strong {
  color: var(--navy-800);
  font-size: 13px;
  line-height: 1.4;
}

.source-link-list span {
  color: var(--slate-600);
  font-size: 11px;
}

.guide-cta-card .button {
  margin-top: 12px;
}

.fee-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}

.fee-tool-form,
.fee-tool-result {
  min-height: 470px;
  padding: 31px;
}

.fee-tool-form h2,
.fee-tool-result h2 {
  margin: 7px 0 22px;
  color: var(--navy-900);
  font-size: 25px;
}

.currency-control {
  grid-template-columns: auto 1fr;
}

.currency-control > span {
  padding-left: 14px;
  color: var(--slate-600);
  font-weight: 750;
}

.currency-control input {
  padding-left: 7px;
}

.fee-tool-result {
  border-color: #bce2d5;
  background:
    radial-gradient(circle at 100% 0, rgb(42 179 139 / 14%), transparent 36%),
    #fff;
}

.fee-tool-result > .feature-icon {
  margin-top: 30px;
}

.result-kicker {
  display: block;
  margin-top: 22px;
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fee-tool-total {
  display: block;
  margin: 7px 0 23px;
  color: var(--navy-900);
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.commercial-record-card {
  padding: 26px;
}

.commercial-message {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fafcfc;
  color: var(--slate-700);
  line-height: 1.65;
}

.commercial-record-form {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 16px;
}

.launch-readiness-summary {
  padding: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.launch-readiness-summary h2 {
  margin: 6px 0;
  color: var(--navy-900);
  font-size: 25px;
}

.launch-readiness-summary p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.launch-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.launch-check-card {
  padding: 20px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
}

.launch-check-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

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

.launch-check-icon.check-pass {
  background: #eaf8f3;
  color: var(--emerald-600);
}

.launch-check-icon.check-pending {
  background: #fff4df;
  color: #a86b13;
}

.launch-check-card h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 15px;
}

.launch-check-card p {
  margin: 5px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

@media (max-width: 1120px) {
  .pricing-grid,
  .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .pricing-card-featured {
    transform: none;
  }
}

@media (max-width: 820px) {
  .commercial-intake-layout,
  .fee-tool-layout {
    grid-template-columns: 1fr;
  }

  .help-contact-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .pricing-grid,
  .help-grid,
  .launch-check-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card,
  .fee-tool-form,
  .fee-tool-result {
    min-height: 0;
  }

  .commercial-intake-layout {
    gap: 22px;
  }

  .intake-card,
  .pricing-card,
  .fee-tool-form,
  .fee-tool-result {
    padding: 22px;
  }

  .launch-readiness-summary {
    flex-direction: column;
  }
}

/* Release 0.8: recurring workspace value and account data controls */

.workspace-user-actions,
.workspace-heading-actions,
.workspace-product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.workspace-user-actions {
  margin-top: 8px;
}

.workspace-user-actions a {
  color: #8de0cf;
  font-size: 12px;
  font-weight: 700;
}

.workspace-heading-actions {
  justify-content: flex-end;
}

.workspace-record-actions > a {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.workspace-record-actions > div:last-child {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.workspace-record-actions > div:last-child > span {
  color: var(--slate-600);
  font-size: 12px;
}

.text-link {
  color: var(--emerald-800);
  font-size: 12px;
  font-weight: 740;
}

.workspace-form-intro {
  margin: 10px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.workspace-product-row > span {
  min-width: 0;
}

.workspace-product-row > span > a {
  color: var(--navy-950);
}

.workspace-product-actions {
  justify-content: flex-end;
}

.workspace-product-actions form {
  margin: 0;
}

.calculator-product-context,
.calculator-context-notice {
  grid-column: 1 / -1;
}

.calculator-product-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 25px;
  border-color: #b9ded6;
  background: linear-gradient(135deg, #f0fdf9 0%, #ffffff 78%);
}

.calculator-product-context h2 {
  margin: 4px 0 0;
  color: var(--navy-950);
  font-size: 24px;
}

.calculator-product-context p:last-child {
  margin: 7px 0 0;
  color: var(--slate-600);
  line-height: 1.55;
}

.product-overview-card {
  padding: 30px;
}

.product-metadata,
.snapshot-input-grid {
  margin-top: 24px;
}

.snapshot-input-grid {
  padding-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.product-description-block {
  display: grid;
  gap: 7px;
  padding: 17px 19px;
  margin-top: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.product-description-block strong {
  color: var(--navy-950);
}

.product-description-block p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.65;
}

.product-prefill-notice {
  margin-top: 20px;
}

.product-history-section,
.data-request-history {
  display: grid;
  gap: 16px;
}

.comparison-picker,
.data-control-card,
.deletion-request-card,
.data-rights-admin-card {
  padding: 28px;
}

.comparison-picker h2,
.data-control-card h2,
.deletion-request-card h2,
.data-rights-admin-card h2 {
  margin: 5px 0 0;
  color: var(--navy-950);
  font-size: 25px;
  letter-spacing: -0.035em;
}

.comparison-picker form,
.data-control-card form,
.deletion-request-card form,
.data-rights-admin-form {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}

.comparison-picker > .notice {
  margin-top: 20px;
}

.comparison-picker > .button {
  margin-top: 18px;
}

.comparison-record-headings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.comparison-record-headings > div {
  display: grid;
  gap: 5px;
  padding: 17px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.comparison-record-headings span {
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.comparison-record-headings strong {
  color: var(--navy-950);
}

.comparison-record-headings a {
  color: var(--emerald-800);
  font-size: 12px;
  font-weight: 730;
}

.workspace-comparison > h2 {
  margin-top: 30px;
}

.workspace-comparison-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-comparison-metrics .change-metric strong {
  font-size: 21px;
}

.workspace-comparison .change-table small {
  display: block;
  margin-top: 4px;
  color: var(--slate-600);
}

.comparison-hash {
  max-width: 310px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.comparison-warning-grid,
.data-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.comparison-warning-grid {
  margin-top: 20px;
}

.comparison-warning-grid > div {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
}

.comparison-warning-grid strong {
  color: var(--navy-950);
}

.comparison-warning-grid p {
  margin: 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
}

.data-control-grid {
  align-items: stretch;
}

.data-control-card {
  display: flex;
  flex-direction: column;
}

.data-control-card > p:not(.step-label),
.deletion-request-card > div > p:last-child {
  color: var(--slate-600);
  line-height: 1.65;
}

.data-control-card > .button {
  align-self: flex-start;
  margin-top: auto;
}

.deletion-request-card {
  border-color: #efc5c7;
  background: linear-gradient(135deg, #fffafa 0%, #ffffff 78%);
}

.destructive-request-button {
  border-color: #b42318;
  color: #b42318;
}

.destructive-request-button:hover {
  border-color: #912018;
  background: #fff1f1;
  color: #912018;
}

.data-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
}

.data-request-row > div {
  display: grid;
  gap: 4px;
}

.data-request-row span,
.data-request-row small {
  color: var(--slate-600);
  font-size: 12px;
}

.data-request-row strong {
  color: var(--navy-950);
}

.account-side-actions {
  margin-top: 28px;
}

.data-rights-admin-list {
  display: grid;
  gap: 18px;
}

.data-rights-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.data-rights-admin-heading > div {
  display: grid;
  gap: 4px;
}

.data-rights-admin-heading > div > span,
.data-rights-admin-heading small {
  color: var(--slate-600);
  font-size: 12px;
}

.data-rights-admin-card > .notice,
.data-rights-admin-card > .metadata-grid {
  margin-top: 20px;
}

.data-rights-admin-form {
  padding-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.button:disabled,
.button[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 820px) {
  .calculator-product-context,
  .data-request-row,
  .data-rights-admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-heading-actions {
    justify-content: flex-start;
  }

  .comparison-warning-grid,
  .data-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace-heading-actions,
  .workspace-heading-actions .button {
    width: 100%;
  }

  .workspace-heading-actions {
    display: grid;
  }

  .workspace-record-actions > div:last-child {
    justify-items: start;
  }

  .comparison-record-headings,
  .workspace-comparison-metrics {
    grid-template-columns: 1fr;
  }

  .product-overview-card,
  .comparison-picker,
  .data-control-card,
  .deletion-request-card,
  .data-rights-admin-card {
    padding: 22px;
  }
}

/* Release 0.7 pilot-ready foundation */
.pilot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  gap: 32px;
  align-items: start;
}

.pilot-sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 118px;
}

.pilot-sidebar .app-card,
.pilot-closed-card,
.pilot-form,
.feedback-result-card,
.calculation-feedback-card,
.pilot-config-card {
  padding: 30px;
}

.pilot-sidebar h2,
.pilot-closed-card h2,
.pilot-form h2,
.feedback-result-card h1,
.calculation-feedback-card h2,
.pilot-config-card h2 {
  margin: 6px 0 12px;
}

.pilot-market-fieldset,
.feedback-choice-fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.pilot-market-fieldset legend,
.feedback-choice-fieldset legend {
  margin-bottom: 10px;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 700;
}

.pilot-market-options,
.feedback-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-check,
.feedback-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--slate-50);
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.compact-check:has(input:checked),
.feedback-choice:has(input:checked) {
  border-color: var(--emerald-600);
  background: var(--emerald-50);
  box-shadow: 0 0 0 1px rgba(0, 139, 120, 0.16);
}

.compact-check input,
.feedback-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--emerald-700);
}

.calculation-feedback-card {
  margin-top: 20px;
}

.calculation-feedback-card form {
  display: grid;
  gap: 18px;
}

.feedback-result-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.feedback-result-card .feature-icon {
  margin: 0 auto 18px;
}

.feedback-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

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

.pilot-config-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(320px, 1.2fr) minmax(250px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.pilot-config-list,
.pilot-record-meta {
  display: grid;
  gap: 9px;
  margin: 0;
}

.pilot-config-list > div,
.pilot-record-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.pilot-config-list dt,
.pilot-record-meta dt {
  color: var(--slate-600);
}

.pilot-config-list dd,
.pilot-record-meta dd {
  margin: 0;
  color: var(--navy-950);
  font-weight: 700;
  text-align: right;
}

.inline-admin-action {
  display: grid;
  gap: 12px;
}

.pilot-admin-section {
  margin-top: 42px;
}

.pilot-admin-list {
  display: grid;
  gap: 16px;
}

.pilot-application-card,
.pilot-feedback-card {
  padding: 24px;
}

.pilot-record-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.pilot-record-heading > div {
  display: grid;
  gap: 4px;
}

.pilot-record-heading a,
.pilot-record-heading span {
  color: var(--slate-600);
  font-size: 14px;
}

.pilot-record-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
}

.pilot-record-meta > div {
  display: grid;
  gap: 3px;
}

.pilot-record-meta dd {
  text-align: left;
}

.pilot-record-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.pilot-record-actions form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--slate-50);
}

.pilot-feedback-card blockquote {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--emerald-600);
  background: var(--emerald-50);
  color: var(--navy-900);
}

.feedback-admin-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.pilot-delivery-table-wrap {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.pilot-delivery-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.pilot-delivery-table th,
.pilot-delivery-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.pilot-delivery-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .pilot-layout,
  .pilot-config-card {
    grid-template-columns: 1fr;
  }

  .pilot-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-record-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pilot-sidebar,
  .pilot-admin-stat-grid,
  .pilot-record-actions,
  .feedback-admin-form {
    grid-template-columns: 1fr;
  }

  .pilot-sidebar .app-card,
  .pilot-closed-card,
  .pilot-form,
  .feedback-result-card,
  .calculation-feedback-card,
  .pilot-config-card,
  .pilot-application-card,
  .pilot-feedback-card {
    padding: 21px;
  }

  .pilot-record-heading {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .pilot-market-options,
  .feedback-choice-grid,
  .pilot-record-meta {
    grid-template-columns: 1fr;
  }
}

/* Release 0.6: production operations and gated customer workspace */

textarea {
  width: 100%;
  min-height: 92px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  background: #fff;
  color: var(--navy-950);
  font: inherit;
  line-height: 1.55;
}

textarea:focus {
  border-color: var(--emerald-600);
  outline: 3px solid rgba(0, 139, 120, 0.12);
}

.account-section {
  min-height: calc(100vh - 96px);
  padding-block: 78px 96px;
  background:
    radial-gradient(circle at 16% 8%, rgba(16, 164, 139, 0.1), transparent 31%),
    linear-gradient(180deg, #f8fbfb 0%, #ffffff 76%);
}

.account-shell {
  width: min(1080px, calc(100% - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  align-items: center;
  gap: clamp(50px, 7vw, 94px);
}

.account-intro h1 {
  max-width: 650px;
  margin: 15px 0 0;
  font-size: clamp(44px, 5vw, 67px);
  line-height: 0.99;
  letter-spacing: -0.058em;
}

.account-intro > p:last-of-type {
  max-width: 600px;
  margin: 23px 0 0;
  color: var(--slate-600);
  font-size: 18px;
  line-height: 1.75;
}

.account-trust-list {
  margin-top: 30px;
  display: grid;
  gap: 13px;
}

.account-trust-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 680;
}

.account-trust-list .svg-icon {
  width: 21px;
  height: 21px;
  color: var(--emerald-700);
}

.account-card {
  padding: 36px;
}

.account-card h1,
.account-card h2 {
  margin: 8px 0 0;
  color: var(--navy-950);
  font-size: 31px;
  letter-spacing: -0.04em;
}

.account-card > p:not(.step-label) {
  margin: 12px 0 0;
  color: var(--slate-600);
  line-height: 1.65;
}

.account-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.account-form .field,
.workspace-product-form .field {
  margin: 0;
}

.account-form .button {
  width: 100%;
  margin-top: 4px;
}

.account-links {
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
}

.account-links a {
  color: var(--emerald-800);
  font-size: 13px;
  font-weight: 700;
}

.centered-account-card,
.account-result-card {
  width: min(560px, 100%);
  margin-inline: auto;
}

.account-result-card {
  text-align: center;
}

.account-result-card .feature-icon {
  margin-inline: auto;
}

.account-result-card .button {
  margin-top: 26px;
}

.account-security-panel {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.account-security-panel h3 {
  margin: 7px 0 0;
  color: var(--navy-950);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.account-security-panel > p:not(.step-label) {
  margin: 9px 0 18px;
  color: var(--slate-600);
  line-height: 1.6;
}

.workspace-hero {
  padding-block: 56px;
}

.workspace-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.workspace-user-card {
  min-width: 300px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.workspace-user-card span,
.workspace-user-card small {
  color: #c8d6e8;
  font-size: 12px;
}

.workspace-user-card strong {
  color: #fff;
}

.workspace-user-card form {
  margin-top: 8px;
}

.workspace-user-card .text-button {
  color: #8de0cf;
}

.workspace-container {
  display: grid;
  gap: 28px;
}

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

.workspace-stat {
  padding: 24px 26px;
  display: grid;
  gap: 6px;
}

.workspace-stat span,
.workspace-stat small {
  color: var(--slate-600);
  font-size: 12px;
}

.workspace-stat strong {
  color: var(--navy-950);
  font-size: 27px;
  letter-spacing: -0.035em;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.7fr);
  align-items: start;
  gap: 26px;
}

.workspace-main,
.workspace-sidebar {
  display: grid;
  gap: 18px;
}

.workspace-section-heading {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.workspace-section-heading h2,
.workspace-product-form h2,
.workspace-products h2 {
  margin: 4px 0 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.workspace-record-list {
  display: grid;
  gap: 12px;
}

.workspace-record {
  padding: 21px 23px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.workspace-record:hover {
  border-color: #a9d8ce;
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.workspace-record > div {
  display: grid;
  gap: 5px;
}

.workspace-record > div:last-child {
  justify-items: end;
}

.workspace-record span,
.workspace-record small {
  color: var(--slate-600);
  font-size: 12px;
}

.workspace-record strong {
  color: var(--navy-950);
}

.compact-empty {
  min-height: 270px;
}

.workspace-product-form,
.workspace-products {
  padding: 26px;
}

.workspace-product-form form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.workspace-product-form .button {
  width: 100%;
}

.workspace-product-list {
  margin-top: 16px;
  display: grid;
}

.workspace-product-list > div {
  padding-block: 13px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.workspace-product-list > div:first-child {
  border-top: 0;
}

.workspace-product-list span {
  display: grid;
  gap: 4px;
}

.workspace-product-list small {
  color: var(--slate-600);
  font-size: 11px;
}

.workspace-save-form {
  padding: 18px;
  border: 1px solid #c6e5de;
  border-radius: 11px;
  background: var(--emerald-50);
}

.workspace-signin-callout {
  padding-inline: 0;
}

.admin-toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.readiness-overview {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.readiness-overview h2,
.release-gate-card h2,
.operation-history h2 {
  margin: 5px 0 0;
  font-size: 26px;
  letter-spacing: -0.035em;
}

.readiness-overview p:last-child {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.6;
}

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

.readiness-check {
  min-height: 160px;
  padding: 21px;
  border-top-width: 4px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.readiness-check span {
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.readiness-check strong {
  margin-top: 14px;
  color: var(--navy-950);
  font-size: 18px;
}

.readiness-check p {
  margin: 8px 0 0;
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.55;
}

.readiness-passed {
  border-top-color: var(--emerald-600);
}

.readiness-warning {
  border-top-color: #d97706;
}

.readiness-failed {
  border-top-color: #dc2626;
}

.operation-card {
  display: flex;
  flex-direction: column;
}

.operation-card > p:not(.step-label) {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.operation-card form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.operation-card .field {
  margin: 0;
}

.release-gate-card,
.operation-history {
  padding: 28px;
}

.release-gate-card .metadata-grid {
  margin-top: 22px;
}

.operation-history .admin-table-wrap {
  margin-top: 18px;
}

.maintenance-section {
  min-height: calc(100vh - 190px);
  display: grid;
  align-items: center;
  background: var(--slate-50);
}

.maintenance-card {
  padding: 48px;
  text-align: center;
}

.maintenance-card .feature-icon {
  margin-inline: auto;
}

.maintenance-card h1 {
  margin: 14px 0 0;
  font-size: clamp(38px, 6vw, 56px);
  letter-spacing: -0.05em;
}

.maintenance-card > p:not(.eyebrow, .field-help) {
  max-width: 660px;
  margin: 18px auto 0;
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.65;
}

.maintenance-card .field-help {
  max-width: 620px;
  margin: 13px auto 0;
}

.maintenance-card .button {
  margin-top: 27px;
}

.standalone-status-page {
  min-height: 100vh;
  padding: 32px;
  display: grid;
  place-items: center;
  background: var(--slate-50);
}

.standalone-status-card {
  width: min(620px, 100%);
  padding: 48px;
}

.standalone-status-card h1 {
  margin: 14px 0 0;
  font-size: clamp(36px, 6vw, 50px);
  letter-spacing: -0.05em;
}

.standalone-status-card p {
  margin: 16px 0 0;
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.65;
}

.standalone-status-card .button {
  margin-top: 26px;
}

@media (max-width: 1040px) {
  .account-shell,
  .workspace-grid,
  .workspace-hero-grid {
    grid-template-columns: 1fr;
  }

  .workspace-user-card {
    width: min(420px, 100%);
  }

  .readiness-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .account-section {
    padding-block: 48px 64px;
  }

  .account-shell {
    width: min(100% - 30px, 1080px);
    gap: 38px;
  }

  .account-intro h1 {
    font-size: 43px;
  }

  .account-card,
  .maintenance-card,
  .standalone-status-card {
    padding: 24px;
  }

  .workspace-stat-grid,
  .readiness-check-grid {
    grid-template-columns: 1fr;
  }

  .workspace-section-heading,
  .readiness-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-section-heading .button,
  .readiness-overview .button {
    width: 100%;
  }

  .workspace-record {
    grid-template-columns: 1fr;
  }

  .workspace-record > div:last-child {
    justify-items: start;
  }
}

/* Phase 4: audit records, trust pages, and tariff data operations */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer-links a {
  color: #b9c8dc;
  font-size: 13px;
  font-weight: 680;
}

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

.save-calculation-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.save-calculation-form div {
  display: grid;
  gap: 4px;
}

.save-calculation-form strong {
  color: var(--navy-950);
  font-size: 14px;
}

.save-calculation-form small {
  color: var(--slate-600);
  line-height: 1.5;
}

.saved-result-stack,
.editorial-stack {
  display: grid;
  gap: 22px;
}

.snapshot-verification {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
}

.snapshot-verification h2,
.editorial-card h2,
.correction-process h2,
.comparison-report h2,
.schedule-history-admin h2,
.operations-grid h2 {
  margin: 5px 0 0;
  color: var(--navy-950);
  font-size: 25px;
}

.snapshot-verification p:last-child,
.editorial-card > p,
.correction-process > p {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.snapshot-metadata {
  padding-top: 22px;
  margin-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.metadata-grid .wide-metadata {
  grid-column: 1 / -1;
}

.wide-metadata code {
  overflow-wrap: anywhere;
}

.saved-result-actions,
.trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.editorial-card {
  padding: 32px;
}

.editorial-card ol {
  color: var(--slate-600);
  line-height: 1.7;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.method-grid div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--slate-50);
}

.method-grid strong {
  color: var(--navy-950);
  font-size: 13px;
}

.method-grid span {
  color: var(--slate-600);
  font-size: 12px;
}

.formula-example {
  display: grid;
  gap: 9px;
  padding: 18px 20px;
  margin: 22px 0;
  border-left: 3px solid var(--emerald-500);
  border-radius: 0 12px 12px 0;
  background: #f0fdf7;
}

.formula-example strong {
  color: var(--emerald-800);
  font-size: 13px;
}

.formula-example code {
  color: var(--navy-950);
  white-space: normal;
}

.correction-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  align-items: start;
  gap: 24px;
}

.correction-form,
.correction-process {
  padding: 30px;
}

.correction-form > .field,
.correction-form > .form-grid,
.correction-form > .button {
  margin-top: 22px;
}

.textarea-control {
  align-items: stretch;
}

.textarea-control textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px 15px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--navy-950);
  font: inherit;
  line-height: 1.55;
}

.field label span {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 600;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.correction-process {
  position: sticky;
  top: 104px;
}

.correction-process ol,
.numbered-method {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 24px 0;
  list-style: none;
  counter-reset: correction-step;
}

.correction-process li,
.numbered-method li {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 42px;
  counter-increment: correction-step;
}

.correction-process li::before,
.numbered-method li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-950);
  color: #fff;
  content: counter(correction-step);
  font-size: 12px;
  font-weight: 750;
}

.correction-process li strong,
.numbered-method li strong {
  color: var(--navy-950);
}

.correction-process li span,
.numbered-method li span {
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.55;
}

.correction-process > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 720;
}

.correction-success {
  margin-bottom: 18px;
}

.version-timeline {
  position: relative;
  display: grid;
  gap: 20px;
  padding-left: 20px;
}

.version-timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: var(--slate-200);
  content: "";
}

.version-entry {
  position: relative;
  padding: 28px;
}

.version-marker {
  position: absolute;
  top: 34px;
  left: -22px;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 1px var(--slate-300);
}

.comparison-report,
.schedule-history-admin {
  padding: 30px;
}

.comparison-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.change-metric {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: var(--slate-50);
}

.change-metric span {
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 700;
}

.change-metric strong {
  color: var(--navy-950);
  font-size: 25px;
}

.change-added {
  color: #047857;
}

.change-removed {
  color: #b42318;
}

.change-changed {
  color: #9a6700;
}

.changed-fields {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.changed-fields > strong {
  color: var(--navy-950);
  font-size: 13px;
}

.changed-fields > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.changed-fields span {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 11px;
}

.change-table {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
}

.change-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.change-table th,
.change-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--slate-200);
  text-align: left;
  vertical-align: top;
}

.change-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.change-table tbody tr:last-child td {
  border-bottom: 0;
}

.change-label {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--slate-100);
  font-size: 10px;
  font-weight: 760;
}

.publish-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  margin-top: 24px;
  border: 1px solid #a7f3d0;
  border-radius: 16px;
  background: #f0fdf7;
}

.publish-form .button {
  justify-self: start;
}

.admin-version-list,
.compact-log {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.admin-version-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
}

.admin-version-row > div:first-child {
  display: grid;
  gap: 4px;
}

.admin-version-row strong {
  color: var(--navy-950);
}

.admin-version-row span {
  color: var(--slate-600);
  font-size: 12px;
}

.admin-version-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.rollback-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--slate-200);
}

.inline-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-600);
  font-size: 12px;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.operations-grid > .app-card {
  padding: 26px;
}

.compact-log > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
}

.compact-log strong {
  color: var(--navy-950);
  font-size: 13px;
}

.compact-log small {
  grid-column: 2;
  color: var(--slate-500);
}

.status-succeeded {
  background: var(--emerald-500);
}

.status-failed {
  background: #dc2626;
}

.status-running,
.status-queued {
  background: #d97706;
}

.admin-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.correction-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.correction-admin-list {
  display: grid;
  gap: 20px;
}

.correction-admin-card {
  padding: 28px;
}

.correction-description {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--slate-50);
  color: var(--slate-600);
  line-height: 1.65;
}

.correction-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.correction-evidence-links a {
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 720;
}

.correction-resolution-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(300px, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--slate-200);
}

.validation-admin-page .comparison-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}

.review-fixture-list {
  display: grid;
  gap: 22px;
}

.review-fixture-card {
  padding: 28px;
}

.review-fixture-card .source-title code {
  display: inline-block;
  margin-top: 8px;
  color: var(--slate-500);
  font-size: 11px;
}

.review-json-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.review-json-grid > div {
  min-width: 0;
}

.review-json-grid h3 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-size: 13px;
}

.review-json-grid pre {
  min-height: 150px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  margin: 0;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-json-grid code {
  color: var(--slate-700);
  font-size: 11px;
  line-height: 1.55;
}

.review-fixture-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(260px, 0.8fr);
  align-items: end;
  gap: 16px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--slate-200);
}

.review-fixture-form .textarea-control,
.review-fixture-form .button {
  grid-column: 1 / -1;
}

.review-fixture-form .button {
  justify-self: start;
}

.correction-resolution-form textarea {
  min-height: 86px;
}

@media (max-width: 1080px) {
  .comparison-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .correction-layout,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .correction-process {
    position: static;
  }

  .admin-version-row {
    grid-template-columns: 1fr auto;
  }

  .admin-version-counts {
    grid-column: 1;
  }

  .correction-resolution-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .save-calculation-form,
  .rollback-form {
    grid-template-columns: 1fr;
  }

  .save-calculation-form .button,
  .rollback-form .button {
    width: 100%;
  }

  .snapshot-verification {
    flex-direction: column;
  }

  .method-grid,
  .comparison-metrics,
  .correction-metrics {
    grid-template-columns: 1fr;
  }

  .editorial-card,
  .correction-form,
  .correction-process,
  .comparison-report,
  .schedule-history-admin {
    padding: 21px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .no-print,
  .saved-result-actions {
    display: none !important;
  }

  body,
  .app-main,
  .app-section {
    background: #ffffff !important;
  }

  .app-hero {
    padding: 20px 0;
    background: #ffffff;
    color: #081b3d;
  }

  .app-hero h1,
  .app-hero p {
    color: #081b3d !important;
  }

  .app-card {
    break-inside: avoid;
    border: 1px solid #cbd5e1;
    box-shadow: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Application pages: calculator, HTS search, data status and protected import. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-page {
  min-height: 100vh;
  background: #f7f8f6;
}

.app-header {
  position: relative;
  z-index: 20;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: var(--navy-950);
}

.app-header .brand,
.app-header .desktop-nav,
.app-header .mobile-menu-button {
  color: #fff;
}

.app-header .brand {
  position: relative;
}

.app-header .brand small {
  position: absolute;
  left: 68px;
  bottom: -9px;
  color: #88dccb;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-header .desktop-nav a {
  color: rgba(255, 255, 255, 0.74);
}

.app-header .desktop-nav a:hover,
.app-header .desktop-nav a[aria-current="page"] {
  color: #fff;
}

.app-header .desktop-nav a[aria-current="page"] {
  position: relative;
}

.app-header .desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -13px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: #45c5aa;
}

.app-main {
  min-height: calc(100vh - 236px);
}

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

.narrow-container {
  width: min(960px, calc(100% - 48px));
}

.app-hero {
  padding: 66px 0 72px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 86% 5%, rgba(52, 190, 161, 0.19), transparent 25%),
    linear-gradient(135deg, #071a3b, #0d2854);
  color: #fff;
}

.app-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -260px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(255, 255, 255, 0.018),
    0 0 0 116px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}

.app-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 72px;
}

.eyebrow,
.step-label {
  margin: 0 0 13px;
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.app-hero .eyebrow {
  color: #75dbc6;
}

.app-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.app-hero p:not(.eyebrow, .search-version) {
  max-width: 690px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.68;
}

.data-version-card {
  position: relative;
  z-index: 1;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
}

.data-version-card > span {
  display: block;
  color: #75dbc6;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.data-version-card strong {
  margin-top: 9px;
  display: block;
  color: #fff;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.data-version-card small {
  margin-top: 8px;
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.5;
}

.data-version-card a {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 680;
}

.data-version-card a .svg-icon {
  width: 18px;
  height: 18px;
}

.app-section {
  padding: 58px 0 76px;
}

.app-card {
  border: 1px solid #dce3e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(12, 31, 58, 0.055);
}

.calculator-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 28px;
}

.calculation-form,
.result-summary,
.result-empty,
.warning-card,
.evidence-card {
  padding: 30px;
}

.form-heading,
.result-heading,
.source-title,
.admin-toolbar,
.results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.form-heading h2,
.result-heading h2,
.source-title h2,
.results-heading h2,
.admin-toolbar h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.beta-pill,
.coverage-badge {
  padding: 7px 10px;
  border: 1px solid #b7e3d8;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.coverage-incomplete {
  border-color: #ffd0b5;
  background: #fff5ed;
  color: #a84514;
}

.coverage-expanded_beta {
  border-color: #9ed8ca;
  background: #e9f8f3;
  color: #126a58;
}

.coverage-review_required {
  border-color: #ffd0b5;
  background: #fff5ed;
  color: #a84514;
}

.calculation-form > .field,
.calculation-form > .form-grid,
.calculation-form > .check-field,
.calculation-form > .calculate-button {
  margin-top: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.calculation-form .field {
  gap: 8px;
}

.calculation-form .field-label a {
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 700;
}

.field-help {
  color: var(--slate-500);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 650;
}

.money-control {
  display: grid;
  grid-template-columns: auto 1fr;
}

.money-control > span {
  padding-left: 16px;
  align-self: center;
  color: var(--slate-600);
  font-weight: 720;
}

.money-control input {
  padding-left: 9px;
}

.check-field {
  min-height: 66px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fbfcfc;
  cursor: pointer;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--emerald-700);
}

.check-field span {
  display: grid;
  gap: 3px;
}

.check-field strong {
  font-size: 13px;
}

.check-field small {
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.45;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.button-secondary {
  border: 1px solid #a8d8ce;
  background: var(--emerald-50);
  box-shadow: none;
  color: var(--emerald-800);
}

.result-column {
  display: grid;
  gap: 20px;
}

.result-empty {
  min-height: 430px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}

.result-empty h2 {
  max-width: 430px;
  margin: 22px 0 0;
  font-size: 30px;
  letter-spacing: -0.045em;
}

.result-empty > p {
  max-width: 480px;
  margin: 13px 0 0;
  color: var(--slate-600);
  line-height: 1.65;
}

.coverage-list {
  padding: 0;
  margin: 25px 0 0;
  display: grid;
  gap: 11px;
  list-style: none;
}

.coverage-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 620;
}

.coverage-list .svg-icon {
  width: 19px;
  height: 19px;
  color: var(--emerald-700);
}

.warning-icon {
  border-color: #f4d3bd;
  background: #fff6ef;
  color: #b5521d;
}

.result-summary .result-heading h2 {
  margin-top: 2px;
  font-size: clamp(35px, 4vw, 51px);
  letter-spacing: -0.055em;
}

.code-summary {
  margin-top: 23px;
  padding: 17px 18px;
  border: 1px solid #dbe7e4;
  border-radius: 10px;
  background: #f8fbfa;
}

.code-summary > span {
  color: var(--emerald-800);
  font-size: 17px;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.code-summary small {
  display: block;
  margin-top: 7px;
  color: var(--slate-500);
  line-height: 1.45;
}

.measure-review {
  padding: 17px 18px;
  margin-top: 18px;
  border: 1px solid #f0cfb9;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  background: #fff9f4;
}

.measure-review > strong {
  color: #8d3b14;
  font-size: 13px;
}

.measure-review > div {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: start;
  gap: 12px;
}

.measure-review code {
  color: var(--navy-800);
  font-size: 11px;
}

.measure-review p {
  margin: 0;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.5;
}

.code-summary p {
  margin: 7px 0 0;
  color: var(--navy-700);
  font-size: 13px;
  line-height: 1.55;
}

.code-summary small {
  margin-top: 8px;
  display: block;
  color: var(--slate-500);
  font-size: 11px;
}

.calculation-breakdown {
  margin: 20px 0 0;
}

.calculation-breakdown > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calculation-breakdown dt,
.calculation-breakdown dd {
  margin: 0;
}

.calculation-breakdown dt {
  color: var(--slate-600);
  font-size: 13px;
}

.calculation-breakdown dt small {
  margin-top: 3px;
  display: block;
  color: var(--slate-500);
  font-size: 10px;
}

.calculation-breakdown dd {
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 760;
  text-align: right;
}

.unit-cost-row {
  padding: 15px 17px;
  margin-top: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--navy-950);
  color: #fff;
}

.unit-cost-row span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.data-proof {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-proof > .svg-icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.data-proof div {
  display: grid;
  gap: 2px;
}

.data-proof strong {
  font-size: 12px;
}

.data-proof span {
  color: var(--slate-500);
  font-size: 11px;
}

.warning-list {
  margin-top: 21px;
  display: grid;
  gap: 10px;
}

.warning-item {
  padding: 13px;
  border: 1px solid #e1e7eb;
  border-radius: 9px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  background: #fafbfb;
}

.warning-item .svg-icon {
  width: 19px;
  height: 19px;
}

.warning-item p {
  margin: 0;
  color: var(--navy-700);
  font-size: 12px;
  line-height: 1.55;
}

.warning-critical {
  border-color: #f2ceb8;
  background: #fff7f1;
  color: #b44a16;
}

.warning-notice {
  color: #7c5b12;
}

.formula-list {
  margin-top: 20px;
  display: grid;
  gap: 11px;
}

.formula-list > div {
  display: grid;
  gap: 6px;
}

.formula-list strong {
  font-size: 12px;
}

.formula-list code {
  padding: 10px 11px;
  overflow-x: auto;
  border-radius: 7px;
  background: #f3f6f6;
  color: #284054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
}

.source-list {
  margin-top: 22px;
  display: grid;
  gap: 9px;
}

.source-list a {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.source-list a:hover {
  border-color: #9fd2c6;
  transform: translateY(-1px);
}

.source-list span {
  color: var(--emerald-700);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-list strong {
  font-size: 12px;
  line-height: 1.45;
}

.source-list small {
  color: var(--slate-500);
  font-size: 10px;
}

.notice {
  padding: 16px 18px;
  border: 1px solid #dce3e8;
  border-radius: 10px;
  background: #fff;
}

.notice strong {
  display: block;
  font-size: 13px;
}

.notice p {
  margin: 4px 0 0;
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.55;
}

.notice-critical {
  border-color: #f1c9b0;
  background: #fff7f1;
}

.notice-success {
  border-color: #adddce;
  background: var(--emerald-50);
}

.notice-neutral {
  background: #f8faf9;
}

.search-hero {
  padding-bottom: 54px;
  text-align: center;
}

.search-hero h1,
.search-hero p {
  margin-inline: auto !important;
}

.search-form {
  max-width: 780px;
  min-height: 72px;
  padding: 7px 7px 7px 20px;
  margin: 32px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16);
}

.search-form > .svg-icon {
  width: 24px;
  height: 24px;
  color: var(--emerald-700);
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy-950);
  font-size: 16px;
}

.search-form .button {
  min-height: 54px;
}

.search-version {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.61);
  font-size: 12px;
}

.search-intro-grid,
.admin-grid,
.admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.search-intro-grid {
  margin-bottom: 20px;
}

.search-intro-grid .app-card,
.admin-actions .app-card {
  padding: 27px;
}

.search-intro-grid h2,
.admin-actions h2,
.empty-search h2 {
  margin: 18px 0 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.search-intro-grid p,
.admin-actions p,
.empty-search p {
  margin: 9px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.results-heading {
  margin-bottom: 20px;
}

.results-heading > span {
  color: var(--slate-500);
  font-size: 12px;
}

.hts-results {
  display: grid;
  gap: 11px;
}

.hts-result {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.hts-result-code {
  display: grid;
  gap: 5px;
}

.hts-result-code strong {
  color: var(--emerald-800);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.hts-result-code span {
  color: var(--slate-500);
  font-size: 10px;
  text-transform: uppercase;
}

.hts-result-description h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.hts-result-description p {
  margin: 7px 0 0;
  color: var(--slate-500);
  font-size: 11px;
}

.hts-result-description small {
  margin-left: 5px;
}

.result-action,
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 720;
}

.result-action .svg-icon,
.source-link .svg-icon {
  width: 17px;
  height: 17px;
}

.empty-search {
  padding: 46px;
  text-align: center;
}

.empty-search .feature-icon {
  margin-inline: auto;
}

.status-stack {
  display: grid;
  gap: 20px;
}

.status-banner {
  padding: 18px 20px;
  border: 1px solid #aedccd;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 12px 1fr;
  align-items: start;
  gap: 13px;
  background: var(--emerald-50);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--emerald-600);
  box-shadow: 0 0 0 5px rgba(0, 139, 120, 0.1);
}

.status-banner strong {
  font-size: 14px;
}

.status-banner p {
  margin: 4px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

.status-setup {
  border-color: #f1c9b0;
  background: #fff7f1;
}

.status-setup .status-dot {
  background: #cf5b24;
  box-shadow: 0 0 0 5px rgba(207, 91, 36, 0.1);
}

.source-detail,
.coverage-matrix,
.validation-report {
  padding: 29px;
}

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

.metadata-grid > div {
  display: grid;
  gap: 4px;
}

.metadata-grid dt,
.metadata-grid dd {
  margin: 0;
}

.metadata-grid dt {
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metadata-grid dd {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
}

.source-detail .source-link {
  margin-top: 22px;
}

.compact-source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.compact-source h2 {
  margin: 0;
  font-size: 22px;
}

.compact-source p:not(.step-label) {
  margin: 7px 0 0;
  color: var(--slate-600);
  font-size: 12px;
}

.compact-source .source-link {
  grid-column: 1 / -1;
  margin-top: 0;
}

.fee-rate {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.fee-rate strong {
  color: var(--emerald-800);
  font-size: 28px;
}

.fee-rate span {
  color: var(--slate-500);
  font-size: 10px;
}

.coverage-table {
  margin-top: 23px;
  display: grid;
}

.coverage-row {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 82px 190px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.coverage-state {
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.state-included {
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.state-review {
  background: #fff1e7;
  color: #aa491b;
}

.coverage-row strong {
  font-size: 12px;
}

.coverage-row p {
  margin: 0;
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.5;
}

.faq-section {
  padding-top: 0;
}

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

.faq-grid .app-card {
  padding: 23px;
}

.faq-grid h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 17px;
  letter-spacing: -0.025em;
}

.faq-grid p {
  margin: 10px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.65;
}

.faq-grid a,
.related-guides a {
  color: var(--emerald-800);
  font-weight: 700;
}

.related-guides {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  font-size: 13px;
}

.guide-hero .hero-actions {
  margin-top: 25px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 46px;
}

.guide-content {
  min-width: 0;
}

.guide-content > section + section {
  padding-top: 42px;
  margin-top: 42px;
  border-top: 1px solid var(--line-soft);
}

.guide-content h2 {
  margin: 7px 0 0;
  color: var(--navy-950);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.guide-content > section > p:not(.step-label) {
  margin: 17px 0 0;
  color: var(--slate-600);
  font-size: 16px;
  line-height: 1.75;
}

.guide-steps {
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps li {
  min-height: 67px;
  padding: 16px 0 16px 55px;
  border-top: 1px solid var(--line-soft);
  position: relative;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.6;
  counter-increment: guide-step;
}

.guide-steps li::before {
  content: counter(guide-step);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  position: absolute;
  top: 13px;
  left: 0;
  display: grid;
  place-items: center;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 12px;
  font-weight: 780;
}

.guide-steps strong {
  color: var(--navy-900);
}

.guide-coverage {
  margin-top: 21px;
}

.guide-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.guide-sidebar .source-detail,
.guide-cta {
  padding: 25px;
}

.guide-sidebar .source-detail h2,
.guide-cta h2 {
  margin: 7px 0 0;
  font-size: 23px;
}

.guide-sidebar .source-detail p,
.guide-cta p {
  margin: 12px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.guide-sidebar .source-link {
  margin-top: 16px;
}

.guide-cta .button {
  width: 100%;
  margin-top: 19px;
}

.formula-callout {
  padding: 22px;
  margin-top: 24px;
  border: 1px solid #cce3de;
  border-radius: 11px;
  display: grid;
  gap: 9px;
  background: #f4faf8;
}

.formula-callout strong {
  color: var(--navy-900);
}

.formula-callout code {
  color: var(--emerald-800);
  font-size: 14px;
  white-space: normal;
}

.formula-callout small {
  color: var(--slate-500);
}

.registry-table {
  max-height: 310px;
  margin-top: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  overflow: auto;
  background: #fbfcfc;
}

.registry-table > div {
  min-height: 43px;
  padding: 10px 13px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.registry-table > div:first-child {
  border-top: 0;
}

.registry-table code {
  color: var(--navy-800);
  font-size: 12px;
}

.registry-table span {
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 700;
}

.app-footer {
  background: #061731;
}

.app-footer .footer-inner {
  color: #fff;
}

.admin-container {
  width: min(1040px, calc(100% - 48px));
  display: grid;
  gap: 20px;
}

.admin-login {
  max-width: 540px;
  padding: 34px;
  margin-inline: auto;
}

.admin-login h2 {
  margin: 20px 0 0;
  font-size: 27px;
}

.admin-login p {
  margin: 10px 0 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.admin-login .field,
.admin-login .button {
  margin-top: 22px;
}

.admin-toolbar {
  align-items: center;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 720;
}

.admin-actions .app-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.admin-actions .button {
  width: 100%;
  margin-top: auto;
}

.admin-actions .compact-check {
  margin: 18px 0;
}

.validation-report h2 {
  margin: 0;
  font-size: 23px;
}

.total-copy {
  max-width: 440px;
  font-size: clamp(34px, 4.3vw, 54px);
  line-height: 1.02;
}

@media (max-width: 980px) {
  .app-header .header-inner {
    grid-template-columns: 1fr auto;
  }

  .app-header .desktop-nav,
  .app-header .header-actions {
    display: none;
  }

  .app-hero-grid,
  .calculator-workspace,
  .guide-layout,
  .review-json-grid {
    grid-template-columns: 1fr;
  }

  .app-hero-grid {
    gap: 36px;
  }

  .data-version-card {
    max-width: 560px;
  }

  .result-column {
    grid-row: auto;
  }

  .guide-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-container,
  .narrow-container,
  .admin-container {
    width: min(100% - 30px, 1180px);
  }

  .app-hero {
    padding: 46px 0 50px;
  }

  .app-hero h1 {
    font-size: 43px;
  }

  .app-hero p:not(.eyebrow, .search-version) {
    font-size: 16px;
  }

  .app-section {
    padding: 34px 0 52px;
  }

  .calculation-form,
  .result-summary,
  .result-empty,
  .warning-card,
  .evidence-card,
  .source-detail,
  .coverage-matrix,
  .validation-report,
  .admin-login {
    padding: 21px;
  }

  .form-grid,
  .search-intro-grid,
  .admin-grid,
  .admin-actions,
  .faq-grid,
  .guide-sidebar,
  .review-fixture-form,
  .validation-admin-page .comparison-metrics {
    grid-template-columns: 1fr;
  }

  .search-form {
    min-height: 64px;
    padding: 6px 6px 6px 15px;
    grid-template-columns: 21px 1fr;
  }

  .search-form .button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .hts-result {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .result-action {
    width: max-content;
  }

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

  .compact-source {
    grid-template-columns: 1fr;
  }

  .compact-source .source-link {
    grid-column: auto;
  }

  .fee-rate {
    justify-items: start;
  }

  .coverage-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .guide-layout {
    gap: 32px;
  }

  .guide-content > section + section {
    padding-top: 32px;
    margin-top: 32px;
  }

  .measure-review > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .app-header .brand small {
    left: 51px;
  }

  .app-hero h1 {
    font-size: 38px;
  }

  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .form-heading,
  .result-heading,
  .source-title,
  .results-heading {
    flex-direction: column;
    gap: 10px;
  }
}

/* Phase 21 — invite-only pilot journey */
.account-next-step {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #c6e5de;
  border-radius: 10px;
  background: var(--emerald-50);
}

.account-next-step strong {
  display: block;
  color: var(--navy-950);
}

.account-next-step p {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.invitation-expiry-note {
  margin: 0;
}

.pilot-process-list {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
  list-style: none;
}

.pilot-process-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.5;
}

.pilot-process-list strong {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-size: 12px;
}

.pilot-journey-card {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.pilot-journey-heading,
.pilot-journey-action,
.pilot-journey-buttons,
.empty-state-actions,
.repeat-calculation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.pilot-journey-heading h2,
.repeat-calculation-card h2 {
  margin: 5px 0 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.pilot-journey-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pilot-journey-steps > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  background: var(--slate-50);
}

.pilot-journey-steps > div > strong {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--slate-200);
  color: var(--navy-700);
  font-size: 12px;
}

.pilot-journey-steps span {
  display: grid;
  gap: 3px;
  color: var(--navy-950);
  font-size: 13px;
  font-weight: 700;
}

.pilot-journey-steps small {
  color: var(--slate-600);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.pilot-journey-steps .is-complete,
.pilot-journey-steps .is-current {
  border-color: #b8ded6;
  background: var(--emerald-50);
}

.pilot-journey-steps .is-complete > strong,
.pilot-journey-steps .is-current > strong {
  background: var(--emerald-700);
  color: #fff;
}

.pilot-journey-action {
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.pilot-journey-action > div:first-child {
  max-width: 690px;
}

.pilot-journey-action p,
.repeat-calculation-card p {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.6;
}

.product-prefill-summary {
  margin: 14px 0 2px;
  padding: 13px 14px;
  border-radius: 9px;
  display: grid;
  gap: 7px;
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 11px;
  line-height: 1.5;
}

.product-prefill-summary strong {
  color: var(--navy-950);
}

.workspace-help-link {
  align-self: center;
}

.calculator-repeat-context small {
  display: block;
  margin-top: 8px;
  color: var(--slate-600);
  font-size: 11px;
}

.repeat-calculation-card {
  padding: 26px;
}

.repeat-calculation-card > div {
  max-width: 680px;
}

@media (max-width: 980px) {
  .pilot-journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pilot-journey-steps {
    grid-template-columns: 1fr;
  }

  .pilot-journey-buttons,
  .pilot-journey-buttons .button,
  .empty-state-actions,
  .empty-state-actions .button,
  .repeat-calculation-card .button {
    width: 100%;
  }
}


.commercial-capability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.65rem 1rem;
    margin-top: 0.65rem;
}

/* Phase 27: guided classification assistance. */
.guided-classification-form {
  display: grid;
  gap: 20px;
}

.guided-classification-form .field-stack {
  display: grid;
  gap: 8px;
}

.guided-classification-form .field-stack label {
  color: var(--navy-950);
  font-size: 13px;
  font-weight: 700;
}

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.classification-results {
  display: grid;
  gap: 18px;
}

.classification-candidate {
  align-items: start;
}

.classification-candidate .hts-result-description {
  display: grid;
  gap: 8px;
}

.classification-candidate .hts-result-description > strong {
  margin-top: 6px;
  color: var(--navy-950);
  font-size: 12px;
}

.plain-list {
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.6;
}

.notice-warning {
  border-color: #f3c969;
  background: #fffaf0;
}

@media (max-width: 760px) {
  .two-column-grid {
    grid-template-columns: 1fr;
  }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* Phase 30 evidence packs */
.report-actions,
.report-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.report-footer-actions form { margin: 0; }
.report-section-block { margin-top: 1.5rem; }
.evidence-pack-sheet code { overflow-wrap: anywhere; word-break: break-word; }
.report-integrity-grid .wide-metadata dd { overflow-wrap: anywhere; }
.professional-review-report-state {
    border-top: 1px solid var(--border-color, #d9dde3);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}
@media print {
    .evidence-report-page .site-header,
    .evidence-report-page .site-footer,
    .evidence-report-page .no-print { display: none !important; }
    .evidence-report-section { padding: 0; }
    .evidence-report-section .app-container { max-width: none; width: 100%; }
    .evidence-pack-sheet { box-shadow: none; border: 0; padding: 0; }
    .evidence-pack-sheet a { color: inherit; text-decoration: none; }
}

/* Phase 31 SEO authority expansion */
.seo-chapter-grid .app-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.seo-chapter-grid .result-action {
    margin-top: auto;
}

.seo-indexing-note {
    margin-top: 1.5rem;
}

.seo-heading-list,
.seo-sample-list {
    margin-top: 1rem;
}


/* Phase 33: screenshot-inspired visual theme and color pattern refactor. */
body {
  background: var(--canvas);
}

.site-header,
.app-header {
  border-bottom-color: rgba(6, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 34px rgba(6, 24, 39, 0.035);
}

.app-header .brand,
.app-header .desktop-nav,
.app-header .mobile-menu-button {
  color: var(--ink-950);
}

.app-header .brand small {
  color: var(--brand-700);
}

.app-header .desktop-nav a {
  color: rgba(6, 24, 39, 0.72);
}

.app-header .desktop-nav a:hover,
.app-header .desktop-nav a[aria-current="page"] {
  color: var(--brand-700);
}

.app-header .desktop-nav a[aria-current="page"]::after {
  background: var(--accent-lime-strong);
}

.desktop-nav a:hover,
.sign-in:hover,
.text-link,
.formula-link,
.calculation-form .field-label a,
.source-list span,
.comparison-record-headings a {
  color: var(--brand-700);
}

.text-link {
  border-bottom-color: var(--brand-600);
}

.button {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
  box-shadow: 0 9px 24px rgba(0, 21, 193, 0.18);
}

.button:hover {
  box-shadow: 0 12px 30px rgba(0, 21, 193, 0.26);
}

.button-secondary {
  border-color: #cbd2ff;
  background: var(--brand-50);
  color: var(--brand-800);
}

.control:focus-within {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(22, 40, 232, 0.11);
}

.market-badge {
  background: var(--accent-lime-soft);
  color: var(--ink-950);
}

.hero-highlight,
.accent-highlight {
  padding: 0 0.12em 0.04em;
  border-radius: 0.12em;
  background: var(--accent-lime);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--ink-950);
}

.hero-description {
  color: #314657;
}

.calculator-card,
.app-card,
.feature-card,
.search-form,
.faq-stack article,
.source-link-list a {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.result-panel {
  background: linear-gradient(145deg, #ffffff, #fafbff);
}

.sample-label,
.beta-pill,
.coverage-badge {
  border-color: #cbd2ff;
  background: var(--brand-50);
  color: var(--brand-800);
}

.total,
.section-heading > p,
.error-page .error-code,
.pricing-card-heading > div > span,
.result-kicker,
.formula-panel span {
  color: var(--brand-800);
}

.trust-strip,
.site-footer,
.notice-neutral {
  background: var(--surface-warm);
}

.trust-icon,
.feature-icon,
.data-proof > .svg-icon {
  background: var(--accent-lime-soft);
  color: var(--brand-800);
}

.closing-note,
.unit-cost-row {
  background: var(--brand-800);
}

.closing-note a,
.light-link,
.workspace-user-actions a {
  color: var(--accent-lime);
}

.app-hero {
  background:
    radial-gradient(circle at 86% 6%, rgba(212, 246, 153, 0.78), transparent 18%),
    radial-gradient(circle at 76% 12%, rgba(22, 40, 232, 0.08), transparent 27%),
    var(--canvas);
  color: var(--ink-950);
}

.app-hero::after {
  border-color: rgba(0, 21, 193, 0.08);
  box-shadow:
    0 0 0 58px rgba(0, 21, 193, 0.025),
    0 0 0 116px rgba(212, 246, 153, 0.08);
}

.app-hero .eyebrow {
  width: max-content;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--accent-lime-soft);
  color: var(--ink-950);
}

.app-hero h1 {
  color: var(--ink-950);
}

.app-hero p:not(.eyebrow, .search-version) {
  color: #4e6170;
}

.data-version-card {
  border-color: #d8deff;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 18px 50px rgba(6, 24, 39, 0.08);
  backdrop-filter: blur(10px);
}

.data-version-card > span {
  color: var(--brand-700);
}

.data-version-card strong,
.data-version-card a {
  color: var(--ink-950);
}

.data-version-card small {
  color: var(--slate-600);
}

.pricing-hero::after,
.help-hero::after {
  border-color: rgba(0, 21, 193, 0.12);
  box-shadow:
    0 0 0 46px rgba(0, 21, 193, 0.025),
    0 0 0 92px rgba(212, 246, 153, 0.10);
}

.pricing-section {
  background:
    radial-gradient(circle at 50% 0, rgba(0, 21, 193, 0.06), transparent 31%),
    var(--canvas);
}

.pricing-card-featured {
  border-color: var(--brand-500);
  box-shadow: 0 24px 70px rgba(6, 24, 39, 0.12);
}

.pricing-card-featured::before {
  background: linear-gradient(90deg, var(--brand-600), var(--accent-lime-strong));
}

.formula-panel,
.calculator-product-context,
.fee-tool-result {
  border-color: #d4daff;
  background:
    radial-gradient(circle at 100% 0, rgba(212, 246, 153, 0.42), transparent 36%),
    #fff;
}

.compact-check:has(input:checked),
.feedback-choice:has(input:checked),
.pilot-journey-steps .is-complete,
.pilot-journey-steps .is-current {
  border-color: #c9d0ff;
  background: var(--brand-50);
  box-shadow: 0 0 0 1px rgba(22, 40, 232, 0.12);
}

.compact-check input,
.feedback-choice input,
.check-field input {
  accent-color: var(--brand-700);
}

.pilot-journey-steps .is-complete > strong,
.pilot-journey-steps .is-current > strong {
  background: var(--brand-700);
}

.notice-success,
.verified-badge,
.launch-check-icon.check-pass {
  border-color: #b9e2c8;
  background: var(--success-50);
  color: var(--success-700);
}

.launch-check-icon.check-pass {
  border: 0;
}

.source-list a:hover,
.feature-card:hover {
  border-color: #c7ceff;
}

.search-form > .svg-icon {
  color: var(--brand-700);
}

@media (max-width: 1020px) {
  .app-header .mobile-navigation {
    background: #fff;
  }
}

/* Phase 33 light-hero compatibility for components previously designed on navy. */
.app-page {
  background: var(--canvas);
}

.workspace-user-card {
  border-color: #d8deff;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(6, 24, 39, 0.07);
}

.workspace-user-card span,
.workspace-user-card small {
  color: var(--slate-600);
}

.workspace-user-card strong {
  color: var(--ink-950);
}

.workspace-user-card .text-button {
  color: var(--brand-700);
}

.search-version {
  color: var(--slate-600);
}

.calculator-message {
  border-color: #cdd3ff;
  background: var(--brand-50);
  color: var(--brand-800);
}

.app-footer {
  background: var(--brand-800);
}

.app-footer .footer-inner {
  color: #fff;
}


/* Phase 33 refinement — founder-provided TariffCalc design-system alignment. */
html { scroll-behavior: smooth; }
body { background: var(--canvas); color: var(--ink-950); font-family: var(--font-sans); }
body, button, input, select, textarea { font-family: var(--font-sans); }
h1, h2, h3, h4, h5, h6, .brand, .total, .result-total .value, .stat-value, .pricing-price, .total-copy {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
code, pre, kbd, samp, .mono, .registry-table code, .result-row dd, .calculation-breakdown dd, .comparison-value, .api-key-value {
  font-family: var(--font-mono);
}
::selection { background: var(--accent-lime); color: var(--ink-950); }
:focus-visible { outline: 3px solid var(--brand-800); outline-offset: 3px; }

.site-header, .app-header {
  position: sticky; top: 0; z-index: 50; height: auto; min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(243,244,247,.88);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.header-inner { min-height: 76px; }
.brand { font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { width: 42px; height: 46px; }
.desktop-nav, .header-actions { font-size: 15px; font-weight: 500; }
.desktop-nav a { opacity: .78; transition: opacity .15s, color .15s; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { opacity: 1; color: var(--ink-950); }
.app-header .desktop-nav a[aria-current="page"]::after { height: 3px; background: var(--accent-lime-strong); }

.button {
  min-height: 48px; padding: 0 24px; border-radius: 10px;
  background: var(--brand-800); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-button);
  transition: transform .12s, box-shadow .12s, background .15s, opacity .15s;
}
.button:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--brand-900); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-900); }
.button-small { min-height: 40px; padding-inline: 16px; border-radius: 8px; font-size: 13.5px; }
.button-secondary {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-950); box-shadow: none;
}
.button-secondary:hover { border-color: var(--ink-950); background: var(--surface); box-shadow: none; transform: translateY(0); }
.button:disabled { box-shadow: none; opacity: .42; }
.text-button, .text-link, .formula-link { color: var(--brand-800); font-weight: 600; }
.text-link { border-bottom: 2px solid var(--ink-950); }

.control, .input, select.input, textarea {
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
}
.control { min-height: 46px; }
.control input, .control select { height: 44px; font-size: 15px; }
.control:focus-within, .input:focus, select.input:focus, textarea:focus {
  border-color: var(--brand-800); outline: none; box-shadow: 0 0 0 3px rgba(30,58,240,.12);
}
.field { gap: 8px; }
.field label, .field-label { font-size: 13px; font-weight: 600; }
.field-help { color: var(--ink-soft); }
.check-field { border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
.check-field input, .compact-check input, .feedback-choice input { accent-color: var(--brand-800); }

.calculator-card, .app-card, .feature-card, .pricing-card, .faq-stack article, .source-link-list a,
.data-version-card, .workspace-user-card, .search-form {
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card);
}
.calculator-card { border-radius: var(--radius-lg); }
.feature-card { border-radius: var(--radius-md); }
.feature-card:hover { border-color: var(--brand-800); transform: translateY(-2px); box-shadow: var(--shadow-card); }

.hero { padding-block: 76px 58px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(44px, 5vw, 64px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.hero-description { color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.market-badge, .app-hero .eyebrow, .eyebrow {
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-950);
}
.market-badge i { color: var(--brand-800); }
.hero-highlight, .accent-highlight { padding: 0 .12em .05em; border-radius: 6px; background: var(--accent-lime); color: var(--ink-950); }
.micro-trust { color: #6B718C; }

.app-hero {
  background: var(--canvas); color: var(--ink-950); border-bottom: 1px solid var(--line);
}
.app-hero::after { border-color: rgba(30,58,240,.12); box-shadow: 0 0 0 58px rgba(30,58,240,.03), 0 0 0 116px rgba(220,255,166,.10); }
.app-hero .eyebrow { color: var(--brand-800); border: 0; border-radius: 0; background: transparent; padding: 0; }
.app-hero h1 { font-family: var(--font-display); color: var(--ink-950); font-weight: 700; letter-spacing: -0.02em; }
.app-hero p:not(.eyebrow, .search-version) { color: var(--ink-soft); }
.data-version-card > span, .section-heading > p, .result-kicker { color: var(--brand-800); }

.result-panel { background: var(--canvas); }
.result-panel h2, .result-heading h2, .form-heading h2, .source-title h2, .results-heading h2 { font-family: var(--font-display); }
.total { color: var(--ink-950); }
.result-row dd { font-size: 13px; }
.sample-label, .beta-pill, .coverage-badge, .badge-blue {
  border: 0; border-radius: 999px; background: #E4E9FE; color: var(--brand-800);
}
.verified-badge { background: var(--success-50); color: var(--success-700); }

.notice, .alert { border-radius: var(--radius-md); }
.notice-neutral { background: var(--paper-alt); }
.notice-success { border-color: #BFE3CC; background: var(--success-50); color: var(--success-700); }
.notice-warning { border-color: #F0DBA6; background: var(--warning-50); color: var(--warning-700); }
.notice-critical { border-color: #F4C6C1; background: var(--danger-50); color: var(--danger-700); }

.table-scroll { border-radius: var(--radius-md); }
table, .data-table { font-size: 14px; }
table th, .data-table th { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
table td, table th, .data-table td, .data-table th { border-color: var(--line); }
table tbody tr:hover td, .data-table tr:hover td { background: var(--paper-alt); }

.trust-strip, .site-footer { background: var(--canvas); border-color: var(--line); }
.trust-icon, .feature-icon, .data-proof > .svg-icon { background: var(--accent-lime); color: var(--brand-800); }
.section-heading > p, .section-eyebrow { letter-spacing: .08em; }
.section-heading h2 { font-family: var(--font-display); letter-spacing: -0.02em; }
.closing-note { border-radius: 28px; background: var(--ink-950); }
.closing-note a { color: var(--accent-lime); }

.formula-panel, .calculator-product-context, .fee-tool-result {
  border-color: var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: none;
}
.formula-panel span { color: var(--brand-800); }

.pricing-card-featured { border-color: var(--brand-800); }
.pricing-card-featured::before { background: linear-gradient(90deg, var(--brand-800), var(--accent-lime)); }

.app-footer { background: var(--ink-950); }
.app-footer .footer-inner { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Design-system finishing details from the approved landing reference. */
.header-actions .button {
  min-height: 44px;
  background: var(--ink-950);
  box-shadow: none;
}
.header-actions .button:hover {
  transform: translateY(-1px);
  background: var(--ink-950);
  box-shadow: none;
}
.button-lime {
  background: var(--accent-lime);
  color: var(--ink-950);
  box-shadow: 0 5px 0 var(--accent-lime-strong);
}
.button-lime:hover { box-shadow: 0 3px 0 var(--accent-lime-strong); }
.button-danger {
  background: var(--danger-700);
  color: #fff;
  box-shadow: none;
}
.closing-note { background: var(--brand-900); }
.notice-success p { color: var(--success-700); }
.notice-warning p { color: var(--warning-700); }
.notice-critical p { color: var(--danger-700); }

/* Phase 33 final visual refinement — section rhythm and cleanliness from founder reference. */
:root {
  --home-max: 1240px;
  --home-gutter: 32px;
}

/* Clean surfaces: reserve heavy shadow for the calculator/data focal objects. */
.app-card,
.feature-card,
.pricing-card,
.faq-stack article,
.source-link-list a,
.search-form,
.workspace-user-card {
  box-shadow: none;
}

.calculator-card,
.data-version-card {
  box-shadow: var(--shadow-card);
}

.site-shell {
  overflow: clip;
}

.site-header {
  min-height: 74px;
  background: rgba(243, 244, 247, 0.88);
}

.header-inner,
.section-container,
.footer-inner {
  width: min(var(--home-max), calc(100% - (var(--home-gutter) * 2)));
}

.header-inner {
  min-height: 74px;
  grid-template-columns: 220px 1fr 250px;
}

.brand {
  gap: 10px;
  font-size: 20px;
}

.brand-mark {
  width: 34px;
  height: 38px;
}

.desktop-nav {
  gap: 36px;
  font-size: 15px;
}

.header-actions {
  gap: 20px;
  font-size: 14px;
}

.header-actions .button {
  min-height: 42px;
  padding-inline: 20px;
  border-radius: 8px;
}

/* Landing hero: light, spacious, and visually calm. */
.hero {
  padding: 88px 0 72px;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 64px;
}

.hero-copy {
  max-width: 590px;
}

.market-badge {
  margin-bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: none;
}

.hero h1 {
  max-width: 610px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.05;
}

.hero-description {
  max-width: 540px;
  margin-top: 26px;
}

.hero-actions {
  margin-top: 34px;
  gap: 26px;
}

.hero-actions .button {
  min-width: 0;
  min-height: 50px;
  padding-inline: 28px;
}

.micro-trust {
  margin-top: 36px;
}

.calculator-card {
  min-height: 0;
  border-radius: 22px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.calculator-form,
.result-panel {
  padding: 28px;
}

.result-panel {
  background: var(--canvas);
}

.result-row {
  min-height: 52px;
}

/* Reduce the rainbow effect in status decoration: brand blue + semantic states only. */
.result-dot-navy { background: var(--brand-900); }
.result-dot-blue { background: var(--brand-800); }
.result-dot-teal { background: var(--success-700); }
.result-dot-purple { background: var(--brand-500); }
.result-dot-orange { background: var(--warning-700); }

/* Shared landing section typography mirrors the reference page. */
.home-section-head,
.home-process-head {
  max-width: 650px;
}

.home-section-eyebrow {
  margin: 0 0 14px;
  color: var(--brand-800);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-section-head h2,
.home-process-head h2,
.home-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.home-section-head > p:last-child,
.home-process-head > p:last-child,
.home-cta-inner > p:not(.home-section-eyebrow) {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

/* Light section: broad whitespace, thin borders, no decorative shadow. */
.proof-section {
  padding: 96px 0;
}

.proof-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.proof-card {
  min-height: 210px;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.proof-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--paper-alt);
  color: var(--brand-800);
  font-size: 12px;
  font-weight: 600;
}

.proof-card h3 {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.proof-card p {
  margin: 10px 0 0;
  color: var(--slate-600);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Signature deep-blue band: the intentional contrast break from the reference. */
.home-process {
  margin-top: 0;
  margin-bottom: 0;
  padding: 72px 56px 64px;
  border-radius: 28px;
  background: var(--brand-900);
  color: var(--surface);
}

.home-process .home-section-eyebrow {
  color: var(--accent-lime);
}

.home-process-head h2 {
  color: var(--surface);
}

.home-process-head > p:last-child {
  color: #B9BEDC;
}

.home-process-grid {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.home-process-step {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.home-process-number {
  display: block;
  margin-bottom: 16px;
  color: var(--accent-lime);
  font-size: 13px;
}

.home-process-step h3 {
  margin: 0;
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.home-process-step p {
  margin: 10px 0 0;
  color: #B9BEDC;
  font-size: 14.5px;
  line-height: 1.65;
}

/* Return to a light section after the dark band. */
.features {
  padding: 96px 0;
}

.section-heading {
  max-width: 650px;
  text-align: left;
}

.section-heading > p {
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin-top: 0;
  font-size: clamp(30px, 3.4vw, 42px);
}

.feature-grid {
  margin-top: 52px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  min-height: 220px;
  padding: 26px 22px;
  border-radius: 14px;
  display: block;
}

.feature-card:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.feature-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: var(--paper-alt);
  color: var(--brand-800);
}

.feature-icon .svg-icon {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 17px;
}

.feature-card p {
  max-width: none;
  margin-top: 9px;
}

/* Final ink CTA is separate from the deep-blue process band. */
.home-cta {
  padding: 0 0 96px;
}

.home-cta-inner {
  position: relative;
  overflow: hidden;
  padding: 72px 56px;
  border-radius: 28px;
  background: var(--ink-950);
  text-align: center;
}

.home-cta-inner::before {
  position: absolute;
  width: 520px;
  height: 520px;
  top: -260px;
  right: -150px;
  border-radius: 50%;
  background: var(--brand-800);
  content: "";
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
}

.home-cta .home-section-eyebrow,
.home-cta h2,
.home-cta-inner > p,
.home-cta-actions {
  position: relative;
}

.home-cta .home-section-eyebrow {
  color: var(--accent-lime);
}

.home-cta h2 {
  max-width: 760px;
  margin-inline: auto;
  color: var(--surface);
}

.home-cta-inner > p:not(.home-section-eyebrow) {
  max-width: 690px;
  margin-inline: auto;
  color: #AEB3D0;
}

.home-cta-actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.home-cta-link {
  padding-bottom: 2px;
  border-bottom: 2px solid var(--surface);
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
}

/* Footer stays light and quiet after the dark CTA. */
.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}

.footer-inner {
  min-height: 0;
  padding: 54px 0 38px;
}

/* Internal product surfaces: lighter, flatter cards and deliberate dark bands where already used. */
.app-section {
  padding: 72px 0 88px;
}

.app-card {
  border-color: var(--line);
  background: var(--surface);
}

.app-hero {
  padding: 64px 0 70px;
  border-bottom: 0;
  background: var(--canvas);
}

.app-hero::after {
  display: none;
}

.app-footer {
  background: var(--ink-950);
}

@media (max-width: 1020px) {
  .header-inner {
    width: min(920px, calc(100% - 40px));
    grid-template-columns: 1fr auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .proof-grid,
  .home-process-grid {
    grid-template-columns: 1fr;
  }

  .home-process {
    padding-inline: 40px;
  }
}

@media (max-width: 760px) {
  :root { --home-gutter: 16px; }

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

  .proof-section,
  .features {
    padding: 72px 0;
  }

  .proof-grid,
  .feature-grid {
    margin-top: 36px;
  }

  .home-process,
  .home-cta-inner {
    padding: 52px 24px;
    border-radius: 22px;
  }

  .home-process-grid {
    margin-top: 34px;
  }

  .home-cta {
    padding-bottom: 72px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }
}

/* Phase 34 team/bulk workspace utilities */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.row-actions form {
  margin: 0;
}

@media (max-width: 640px) {
  .row-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Phase 35 — Canada controlled-beta result/support layout */
.canada-alert-stack {
  display: grid;
  gap: 12px;
}

.canada-alert-stack .alert {
  margin: 0;
}

/* ==========================================================================\n   Phase 40 — TariffCalc full UI restyle\n   Visual source: founder-provided tariffcalc-enhanced.html.\n   Presentation only: no route, form, data attribute, auth, calculation, or\n   workflow contract is changed by this section.\n   ========================================================================== */

/* Global canvas, type, selection, focus, and native control normalization. */
html {
  background: #fff;
  color-scheme: light;
}

body {
  background: #fff;
  color: var(--ink-800);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.008em;
}

body.app-page {
  background:
    radial-gradient(circle at 16% 0%, rgba(59, 130, 246, 0.055), transparent 28rem),
    var(--canvas);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6,
.hero h1,
.app-hero h1,
.section-heading h2,
.home-section-head h2,
.home-process-head h2,
.home-cta h2 {
  font-family: var(--font-display);
  color: var(--ink-950);
  letter-spacing: -0.035em;
}

p { color: var(--ink-soft); }

::selection {
  background: var(--brand-100);
  color: var(--brand-950);
}

:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.25);
  outline-offset: 2px;
}

.skip-link {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: var(--ink-950);
  box-shadow: 0 14px 30px rgba(15,23,42,.22);
  color: #fff;
}

/* Header / navigation — mirrors the reference's dark translucent nav. */
.site-header,
.app-header {
  height: 72px;
  position: relative;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 8px 30px -24px rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 48px));
  min-height: 72px;
  height: 72px;
  grid-template-columns: 230px 1fr 310px;
}

.brand,
.app-header .brand {
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-mark,
.app-header .brand-mark {
  width: 38px;
  height: 42px;
  filter: drop-shadow(0 8px 16px rgba(37,99,235,.18));
}

.app-header .brand small {
  margin-left: 2px;
  padding: 4px 8px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.desktop-nav,
.header-actions {
  gap: clamp(18px, 2.3vw, 30px);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
}

.desktop-nav a,
.sign-in,
.app-header .desktop-nav a {
  position: relative;
  color: #cbd5e1;
  opacity: 1;
}

.desktop-nav a:hover,
.sign-in:hover,
.app-header .desktop-nav a:hover,
.app-header .desktop-nav a[aria-current="page"] {
  color: #fff;
}

.app-header .desktop-nav a[aria-current="page"]::after {
  height: 2px;
  bottom: -8px;
  border-radius: 999px;
  background: var(--brand-400);
}

.header-actions .button,
.button,
.calculate-button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand-600);
  box-shadow: var(--shadow-button);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.button-small,
.header-actions .button {
  min-height: 40px;
  padding-inline: 17px;
  border-radius: 10px;
  font-size: 13px;
}

.button:hover,
.calculate-button:hover,
.header-actions .button:hover {
  transform: translateY(-1px);
  background: var(--brand-700);
  box-shadow: 0 14px 26px -14px rgba(37, 99, 235, 0.7);
}

.button:active,
.calculate-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px -10px rgba(37, 99, 235, .65);
}

.button:disabled,
.button[disabled] {
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .48;
}

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-xs);
  color: var(--ink-800);
}

.button-secondary:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  box-shadow: var(--shadow-xs);
  color: var(--brand-700);
  transform: translateY(-1px);
}

.button-danger,
.destructive-request-button {
  border-color: var(--danger-600);
  background: var(--danger-600);
  box-shadow: 0 10px 20px -12px rgba(225,29,72,.55);
  color: #fff;
}

.button-danger:hover,
.destructive-request-button:hover {
  border-color: var(--danger-700);
  background: var(--danger-700);
  color: #fff;
}

.button-lime {
  background: #fff;
  color: var(--brand-700);
  border-color: var(--brand-100);
  box-shadow: var(--shadow-xs);
}

.text-link,
.text-button,
.formula-link,
.result-action,
.source-link,
.light-link,
.workspace-user-actions a,
.comparison-record-headings a {
  color: var(--brand-600);
  font-weight: 650;
}

.text-link {
  border-bottom: 1px solid var(--brand-200);
}

.text-link:hover,
.text-button:hover,
.formula-link:hover,
.result-action:hover,
.source-link:hover,
.light-link:hover,
.workspace-user-actions a:hover,
.comparison-record-headings a:hover {
  color: var(--brand-800);
}

.mobile-menu-button,
.app-header .mobile-menu-button {
  border: 1px solid #334155;
  border-radius: 10px;
  background: #1e293b;
  color: #e2e8f0;
}

.mobile-menu-button:hover {
  border-color: #475569;
  background: #334155;
  color: #fff;
}

.mobile-navigation {
  top: calc(100% + 10px);
  min-width: 250px;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #0f172a;
  box-shadow: 0 24px 48px -20px rgba(15,23,42,.7);
}

.mobile-navigation a {
  padding: 10px 12px;
  border-radius: 9px;
  color: #cbd5e1;
}

.mobile-navigation a:hover {
  background: #1e293b;
  color: #fff;
}

/* Width and section rhythm. */
.section-container,
.header-inner,
.footer-inner,
.app-container,
.admin-container {
  width: min(1200px, calc(100% - 48px));
}

.narrow-container { width: min(820px, calc(100% - 48px)); }

.app-main { min-height: calc(100vh - 72px); }

.app-section {
  padding: 64px 0 80px;
}

.app-section:nth-of-type(even) {
  background: rgba(255,255,255,.48);
}

/* Public landing hero. */
.hero {
  position: relative;
  padding: 92px 0 78px;
  gap: clamp(46px, 6vw, 82px);
  background:
    radial-gradient(ellipse 70% 54% at 50% -15%, rgba(59,130,246,.16), transparent 68%);
}

.hero-copy { max-width: 650px; }

.market-badge,
.eyebrow,
.app-hero .eyebrow,
.home-section-eyebrow,
.step-label,
.result-kicker {
  color: var(--brand-700);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.market-badge,
.app-hero .eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-50);
}

.market-badge i,
.micro-trust i {
  width: 4px;
  height: 4px;
  background: var(--brand-400);
}

.hero h1 {
  max-width: 680px;
  margin-top: 20px;
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.08;
}

.hero-highlight,
.accent-highlight {
  padding: 0;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-500) 55%, var(--accent-cyan) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 610px;
  color: var(--slate-500);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions { gap: 18px; }
.hero-actions .button { min-width: 165px; }

.micro-trust {
  gap: 16px;
  color: #94a3b8;
  font-size: 13px;
}

/* App page hero. */
.app-hero,
.search-hero,
.pricing-hero,
.help-hero,
.guide-hero,
.workspace-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 62px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 80% 80% at 50% -35%, rgba(59,130,246,.12), transparent 70%),
    #fff;
}

.app-hero::after,
.pricing-hero::after,
.help-hero::after {
  display: none;
}

.app-hero h1,
.search-hero h1,
.guide-hero h1,
.workspace-hero h1,
.account-intro h1 {
  max-width: 790px;
  color: var(--ink-950);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
}

.app-hero p:not(.eyebrow, .search-version),
.search-hero p,
.guide-hero p,
.workspace-hero p,
.account-intro > p:last-of-type {
  max-width: 760px;
  color: var(--slate-500);
  font-size: 16px;
  line-height: 1.7;
}

/* Cards and shared surfaces. */
.calculator-card,
.app-card,
.feature-card,
.pricing-card,
.faq-stack article,
.source-link-list a,
.data-version-card,
.workspace-user-card,
.search-form,
.help-card,
.support-option,
.intake-card,
.fee-tool-form,
.fee-tool-result,
.account-card,
.operation-card,
.maintenance-card,
.standalone-status-card,
.editorial-card,
.correction-form,
.correction-process,
.comparison-report,
.schedule-history-admin,
.data-control-card,
.deletion-request-card,
.data-rights-admin-card,
.pilot-config-card,
.pilot-closed-card,
.pilot-form,
.calculation-feedback-card,
.workspace-product-form,
.workspace-products {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.app-card,
.feature-card,
.pricing-card,
.help-card,
.support-option,
.editorial-card {
  padding: 24px;
}

.calculator-card,
.data-version-card,
.account-card,
.operation-card,
.maintenance-card,
.standalone-status-card {
  box-shadow: var(--shadow-card);
}

.feature-card,
.help-card,
.support-option,
.source-link-list a,
.hts-result,
.workspace-record,
.pricing-card {
  transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease, background .2s ease;
}

.feature-card:hover,
.help-card:hover,
.support-option:hover,
.source-link-list a:hover,
.hts-result:hover,
.workspace-record:hover,
.pricing-card:hover {
  border-color: var(--brand-200);
  background: #fff;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.feature-icon,
.trust-icon,
.launch-check-icon,
.data-proof > .svg-icon,
.proof-mark,
.warning-icon {
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
}

.feature-card h3,
.app-card h2,
.app-card h3,
.help-card h2,
.support-option h2,
.editorial-card h2 {
  color: var(--ink-950);
  font-weight: 700;
}

.feature-card p,
.app-card > p:not(.step-label, .eyebrow),
.help-card p,
.support-option p,
.editorial-card > p {
  color: var(--slate-500);
}

/* Forms and field controls. */
.field { gap: 7px; }

.field label,
.field-label,
.field-stack label,
.pilot-market-fieldset legend,
.feedback-choice-fieldset legend {
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 650;
}

.control,
.input,
select.input,
textarea,
.textarea-control {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  box-shadow: none;
  color: var(--ink-950);
}

.control {
  min-height: 46px;
}

.control input,
.control select,
.input,
select.input,
textarea,
.textarea-control textarea {
  color: var(--ink-950);
  font-size: 14px;
}

.control input::placeholder,
.input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

.control:hover,
.input:hover,
textarea:hover,
.textarea-control:hover {
  border-color: #cbd5e1;
}

.control:focus-within,
.input:focus,
select.input:focus,
textarea:focus,
.textarea-control:focus-within {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.select-control .control-icon,
.control-icon,
.info-button,
.clear-button {
  color: #94a3b8;
}

.info-button:hover,
.clear-button:hover {
  color: var(--brand-600);
}

.money-control > span,
.currency-control > span {
  border-color: var(--line);
  background: var(--paper-alt);
  color: var(--slate-600);
}

.field-help,
.field-error,
.calculator-message {
  font-size: 12px;
  line-height: 1.55;
}

.field-help { color: var(--slate-500); }
.field-error { color: var(--danger-700); }

.check-field,
.compact-check,
.feedback-choice {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.check-field:hover,
.compact-check:hover,
.feedback-choice:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.compact-check:has(input:checked),
.feedback-choice:has(input:checked) {
  border-color: var(--brand-400);
  background: var(--brand-50);
  box-shadow: 0 0 0 2px rgba(59,130,246,.08);
}

.check-field input,
.compact-check input,
.feedback-choice input {
  accent-color: var(--brand-600);
}

/* Calculator and result panels. */
.calculator-card {
  overflow: hidden;
  border-color: rgba(203, 213, 225, .82);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 60px -32px rgba(15,23,42,.32);
}

.calculator-form { background: #fff; }

.result-panel,
.result-summary,
.result-empty,
.evidence-card,
.warning-card {
  border-radius: var(--radius-lg);
}

.result-panel {
  background: var(--canvas);
  border-left-color: var(--line);
}

.result-heading h2,
.form-heading h2,
.source-title h2,
.results-heading h2,
.admin-toolbar h2 {
  color: var(--ink-950);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.sample-label,
.beta-pill,
.coverage-badge,
.badge,
.change-label {
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .045em;
}

.verified-badge,
.notice-success,
.alert-success,
.state-included,
.readiness-passed,
.status-succeeded {
  border-color: #a7f3d0;
  background: var(--success-50);
  color: var(--success-700);
}

.total,
.fee-tool-total {
  color: var(--ink-950);
  font-weight: 800;
}

.result-row,
.calculation-breakdown > div,
.formula-list > div,
.registry-table > div,
.workspace-product-list > div,
.data-request-row,
.comparison-record-headings > div,
.method-grid div {
  border-color: var(--line-soft);
}

.result-row dt,
.calculation-breakdown dt,
.metadata-grid dt,
.pilot-config-list dt,
.pilot-record-meta dt {
  color: var(--slate-500);
}

.result-row dd,
.calculation-breakdown dd,
.metadata-grid dd,
.pilot-config-list dd,
.pilot-record-meta dd {
  color: var(--ink-950);
  font-weight: 650;
}

.result-dot-navy { background: var(--brand-900); }
.result-dot-blue { background: var(--brand-500); }
.result-dot-teal { background: var(--success-500); }
.result-dot-purple { background: #8b5cf6; }
.result-dot-orange { background: #f59e0b; }

.code-summary,
.measure-review,
.formula-panel,
.formula-callout,
.calculator-product-context,
.product-description-block,
.product-prefill-summary,
.data-proof,
.snapshot-verification,
.account-next-step,
.repeat-calculation-card {
  border: 1px solid var(--brand-100);
  border-radius: 14px;
  background: var(--brand-50);
}

.formula-panel span,
.formula-callout strong,
.data-proof strong,
.code-summary > span {
  color: var(--brand-700);
}

.mono,
code,
pre,
.hts-result-code strong,
.formula-example code,
.formula-list code,
.formula-callout code,
.wide-metadata code,
.comparison-hash {
  font-family: var(--font-mono);
}

/* Notices, alerts, status and semantic states. */
.notice,
.alert,
.status-banner {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.notice-neutral {
  border-color: var(--line);
  background: var(--paper-alt);
  color: var(--slate-700);
}

.notice-neutral p { color: var(--slate-600); }

.notice-success,
.alert-success {
  border-color: #a7f3d0;
  background: var(--success-50);
  color: var(--success-700);
}

.notice-success p,
.alert-success p { color: var(--success-700); }

.notice-warning,
.alert-warning,
.warning-notice,
.readiness-warning,
.status-running,
.status-queued {
  border-color: #fde68a;
  background: var(--warning-50);
  color: var(--warning-700);
}

.notice-warning p,
.alert-warning p { color: var(--warning-700); }

.notice-critical,
.alert-error,
.warning-critical,
.readiness-failed,
.status-failed {
  border-color: #fecdd3;
  background: var(--danger-50);
  color: var(--danger-700);
}

.notice-critical p,
.alert-error p { color: var(--danger-700); }

.coverage-expanded_beta,
.coverage-incomplete,
.state-review {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
}

.coverage-review_required,
.coverage-base_only {
  border-color: #fde68a;
  background: var(--warning-50);
  color: var(--warning-700);
}

/* Search, HTS results, source records. */
.search-form {
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.search-form > .svg-icon { color: var(--brand-500); }

.hts-result {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.hts-result-code {
  border-right-color: var(--line-soft);
  background: var(--canvas);
}

.hts-result-code strong { color: var(--brand-700); }
.hts-result-description h3 { color: var(--ink-950); }
.hts-result-description p,
.hts-result-description small { color: var(--slate-500); }

.source-list a,
.source-link-list a,
.compact-source {
  border-color: var(--line);
  background: #fff;
}

.source-list a:hover,
.source-link-list a:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.source-list span { color: var(--brand-600); }

/* Tables: admin, reports, comparison, delivery and general data. */
.table-scroll,
.table-wrap,
.admin-table-wrap,
.change-table,
.compare-table-wrapper {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

table,
.data-table,
.pilot-delivery-table,
.change-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
.pilot-delivery-table th,
.change-table th,
.data-table th {
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}

td,
.pilot-delivery-table td,
.change-table td,
.data-table td {
  border-bottom: 1px solid var(--line-soft);
  color: var(--slate-700);
  font-size: 13px;
}

tbody tr:hover td { background: rgba(248,250,252,.86); }
tbody tr:last-child td { border-bottom: 0; }

/* Home proof/process/features/CTA. */
.proof-section,
.features {
  background: #fff;
}

.home-section-head,
.home-process-head,
.section-heading {
  max-width: 760px;
}

.home-section-head h2,
.home-process-head h2,
.section-heading h2,
.home-cta h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.12;
}

.home-section-head > p:last-child,
.home-process-head > p:last-child,
.section-heading > p:last-child,
.home-cta-inner > p:not(.home-section-eyebrow) {
  color: var(--slate-500);
  font-size: 17px;
}

.proof-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.home-process {
  border: 1px solid #1e3a8a;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(59,130,246,.22), transparent 40%),
    #0f172a;
  box-shadow: 0 30px 70px -40px rgba(15,23,42,.75);
}

.home-process .home-section-eyebrow { color: var(--brand-300); }
.home-process-head h2 { color: #fff; }
.home-process-head > p:last-child { color: #94a3b8; }

.home-process-step {
  border: 1px solid #334155;
  border-radius: 16px;
  background: rgba(30,41,59,.72);
}

.home-process-number {
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--brand-300);
}

.home-process-step h3 { color: #fff; }
.home-process-step p { color: #94a3b8; }

.home-cta-inner {
  border: 1px solid #1e3a8a;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(6,182,212,.16), transparent 34%),
    linear-gradient(135deg, #0f172a, #172554);
  box-shadow: 0 30px 70px -40px rgba(15,23,42,.82);
}

.home-cta-inner::before { display: none; }
.home-cta .home-section-eyebrow { color: var(--brand-300); }
.home-cta h2 { color: #fff; }
.home-cta-inner > p:not(.home-section-eyebrow) { color: #94a3b8; }
.home-cta-link { border-bottom-color: var(--brand-300); color: #fff; }

/* Pricing. */
.pricing-section { background: #fff; }

.pricing-card {
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
}

.pricing-card-featured {
  border-color: var(--brand-300);
  background: var(--brand-600);
  box-shadow: 0 24px 50px -28px rgba(37,99,235,.72);
  color: #fff;
}

.pricing-card-featured::before {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-300), #fff, var(--accent-cyan));
}

.pricing-card-featured h2,
.pricing-card-featured .price-line strong { color: #fff; }

.pricing-card-featured p,
.pricing-card-featured li,
.pricing-card-featured .price-line span { color: #dbeafe; }

.pricing-card-featured .button {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 10px 24px -14px rgba(15,23,42,.5);
}

.price-line strong {
  color: var(--ink-950);
  font-weight: 800;
}

/* Account access and workspace. */
.account-section {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at 18% 12%, rgba(59,130,246,.08), transparent 24rem),
    var(--canvas);
}

.account-shell { gap: clamp(42px, 7vw, 92px); }

.account-intro {
  padding: 22px 0;
}

.account-trust-list span {
  color: var(--slate-600);
  font-size: 13px;
}

.account-trust-list .svg-icon { color: var(--success-500); }

.account-card {
  border-radius: 18px;
  box-shadow: 0 28px 55px -34px rgba(15,23,42,.38);
}

.account-links {
  border-top-color: var(--line-soft);
}

.account-links a { color: var(--brand-600); }

.workspace-hero {
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 82% 0%, rgba(59,130,246,.1), transparent 24rem),
    #fff;
}

.workspace-user-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink-800);
  box-shadow: var(--shadow-card);
}

.workspace-user-card span,
.workspace-user-card small { color: var(--slate-500); }
.workspace-user-card strong { color: var(--ink-950); }
.workspace-user-card .text-button { color: var(--brand-600); }

.workspace-stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.workspace-stat span,
.workspace-stat small { color: var(--slate-500); }
.workspace-stat strong { color: var(--brand-700); font-weight: 800; }

.workspace-record {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.workspace-record:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.workspace-record span,
.workspace-record small { color: var(--slate-500); }
.workspace-record strong { color: var(--ink-950); }

.compact-empty,
.result-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: var(--canvas);
  color: var(--slate-500);
}

/* Admin and operations. */
.admin-container { padding-top: 34px; }

.admin-toolbar {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar-actions { gap: 10px; }

.admin-login {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.operations-grid > .app-card,
.operation-card,
.release-gate-card,
.operation-history,
.readiness-overview {
  border-color: var(--line);
  background: #fff;
}

.readiness-check {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
}

.readiness-check span { color: var(--slate-500); }
.readiness-check strong { color: var(--ink-950); }

.compact-log > div,
.admin-version-row,
.correction-admin-card,
.review-fixture-card,
.pilot-application-card,
.pilot-feedback-card,
.commercial-record-card,
.data-rights-admin-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

/* Privacy/data-rights destructive controls remain visually explicit. */
.deletion-request-card {
  border-color: #fecdd3;
  background: #fff;
}

.data-control-card {
  border-color: var(--brand-100);
}

/* Guides, help, editorial, policy and FAQ pages. */
.guide-layout,
.correction-layout,
.commercial-intake-layout,
.fee-tool-layout {
  gap: clamp(28px, 4vw, 48px);
}

.guide-sidebar .source-detail,
.guide-cta,
.related-help-card,
.faq-grid .app-card,
.source-detail,
.coverage-matrix,
.validation-report {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.guide-content h2 {
  color: var(--ink-950);
  font-weight: 750;
}

.guide-content > section + section {
  border-top-color: var(--line-soft);
}

.guide-steps li::before,
.numbered-method li::before {
  background: var(--brand-600);
  color: #fff;
}

.faq-stack article,
.faq-grid .app-card {
  border-color: var(--line);
}

.faq-stack h3,
.faq-grid h3 { color: var(--ink-950); }
.faq-stack p,
.faq-grid p { color: var(--slate-500); }

/* Corrections, pilot and workflow selection surfaces. */
.pilot-market-options,
.feedback-choice-grid,
.two-column-grid,
.data-control-grid,
.comparison-warning-grid {
  gap: 12px;
}

.pilot-record-heading,
.data-rights-admin-heading,
.workspace-section-heading,
.pricing-card-heading,
.result-heading,
.form-heading,
.source-title,
.results-heading {
  border-color: var(--line-soft);
}

/* Changelog / timeline / comparison metrics. */
.version-timeline::before { background: var(--line); }
.version-marker { border-color: var(--brand-200); background: var(--brand-600); }

.change-metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
}

.change-added { color: var(--success-700); }
.change-removed { color: var(--danger-700); }
.change-changed { color: var(--brand-700); }

/* Error / maintenance / standalone pages. */
.error-page,
.standalone-status-page,
.maintenance-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(59,130,246,.1), transparent 28rem),
    var(--canvas);
}

.error-page .brand { color: var(--ink-950); }
.error-page .error-code { color: var(--brand-600); }

.standalone-status-card,
.maintenance-card {
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

/* Footer. */
.site-footer,
.app-footer {
  margin-top: 0;
  border-top: 1px solid #1e293b;
  background: #0f172a;
}

.footer-inner,
.app-footer .footer-inner {
  padding: 46px 0 34px;
  color: #cbd5e1;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
}

.footer-inner p,
.app-footer .footer-inner p {
  color: #94a3b8;
}

.footer-links a {
  color: #cbd5e1;
}

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

/* Responsive safeguards. */
@media (max-width: 1120px) {
  .header-inner {
    width: min(100% - 36px, 1040px);
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-actions .sign-in {
    display: none;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    margin-right: 54px;
  }

  .mobile-menu {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 820px) {
  .section-container,
  .header-inner,
  .footer-inner,
  .app-container,
  .admin-container,
  .narrow-container {
    width: min(100% - 32px, 100%);
  }

  .site-header,
  .app-header,
  .header-inner {
    height: 66px;
    min-height: 66px;
  }

  .header-actions .button { display: none; }
  .header-actions { margin-right: 50px; }

  .hero,
  .app-section,
  .app-hero,
  .search-hero,
  .pricing-hero,
  .help-hero,
  .guide-hero,
  .workspace-hero {
    padding-top: 46px;
    padding-bottom: 52px;
  }

  .hero h1 { font-size: clamp(38px, 10vw, 52px); }

  .app-hero h1,
  .search-hero h1,
  .guide-hero h1,
  .workspace-hero h1,
  .account-intro h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .account-shell,
  .workspace-grid,
  .calculator-workspace,
  .guide-layout,
  .correction-layout,
  .commercial-intake-layout,
  .fee-tool-layout {
    gap: 26px;
  }

  .app-card,
  .feature-card,
  .pricing-card,
  .help-card,
  .support-option,
  .editorial-card {
    padding: 20px;
  }

  .home-process,
  .home-cta-inner {
    padding: 44px 22px;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  body { font-size: 14px; }

  .brand { font-size: 18px; }
  .brand-mark { width: 34px; height: 38px; }

  .market-badge {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-actions,
  .home-cta-actions,
  .saved-result-actions,
  .trust-actions,
  .workspace-heading-actions,
  .workspace-product-actions,
  .report-actions,
  .report-footer-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .hero-actions .text-link,
  .home-cta-actions .button,
  .home-cta-link,
  .saved-result-actions .button,
  .trust-actions .button,
  .report-actions .button,
  .report-footer-actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .button { min-height: 44px; }

  .calculator-card,
  .account-card,
  .standalone-status-card {
    border-radius: 16px;
  }

  th,
  td,
  .pilot-delivery-table th,
  .pilot-delivery-table td,
  .change-table th,
  .change-table td {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .help-card,
  .support-option,
  .source-link-list a,
  .hts-result,
  .workspace-record,
  .pricing-card,
  .button {
    transition: none !important;
  }
}

/* Wrapped textareas use the control shell as the single visible border. */
.control.textarea-control,
.control:has(> textarea) {
  height: auto;
  min-height: 0;
  align-items: stretch;
  padding: 0;
}

.control.textarea-control textarea,
.control > textarea {
  min-height: 110px;
  padding: 13px 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.control.textarea-control textarea:focus,
.control > textarea:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

/* Phase 40 coverage for low-frequency page-specific components. */
.a-title {
  margin-bottom: 3px;
  color: currentColor;
  font-weight: 750;
}

.section-soft,
.app-section-muted {
  background:
    radial-gradient(circle at 84% 12%, rgba(59,130,246,.045), transparent 22rem),
    var(--canvas) !important;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.saved-result-hero,
.pilot-hero,
.admin-hero {
  background:
    radial-gradient(ellipse 70% 90% at 50% -35%, rgba(59,130,246,.13), transparent 72%),
    #fff;
}

.printable-calculation {
  overflow: hidden;
  border-color: var(--line);
  background: #fff;
}

.badge-default {
  border-color: var(--line);
  background: var(--paper-alt);
  color: var(--slate-600);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.link-grid .app-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.link-grid .app-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-card-hover);
}

.link-grid strong { color: var(--ink-950); }
.link-grid span { color: var(--slate-500); font-size: 13px; }

.classification-candidate-list { gap: 12px; }

.report-disclaimer { margin-top: 18px; }

.pilot-process-card {
  border-color: var(--brand-100);
  background: linear-gradient(180deg, #fff, var(--brand-50));
}

.pilot-admin-note,
.field-hint,
.report-disclaimer,
.field-hint p {
  color: var(--slate-500);
  font-size: 12px;
  line-height: 1.55;
}

.invitation-state-notice { margin-bottom: 18px; }

.help-sidebar { align-self: start; }

.data-rights-hold-card {
  padding: 0;
  overflow: hidden;
  border-color: #fde68a;
}

.data-rights-hold-card > summary {
  padding: 16px 18px;
  background: var(--warning-50);
  color: var(--warning-700);
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.data-rights-hold-card[open] > summary {
  border-bottom: 1px solid #fde68a;
}

.data-rights-hold-card > form { padding: 18px; }

.data-request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.comparison-warning-card {
  border-color: #fde68a;
  background: var(--warning-50);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.checkbox-row:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--brand-600);
}

.checkbox-row span { display: grid; gap: 2px; }
.checkbox-row strong { color: var(--ink-950); font-size: 13px; }
.checkbox-row small { color: var(--slate-500); font-size: 11px; line-height: 1.45; }

.workspace-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--slate-700);
}

.workspace-record-row:last-child { border-bottom: 0; }
.workspace-record-row > div:first-child { display: grid; gap: 2px; }
.workspace-record-row strong { color: var(--ink-950); }
.workspace-record-row small,
.workspace-record-row > span { color: var(--slate-500); font-size: 12px; }

.admin-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-table { min-width: 720px; }

/* API-key page contains two intentionally direct controls rather than .control wrappers. */
.workspace-page .app-card > form > label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 650;
}

.workspace-page .app-card > form > label > input[type="text"],
.workspace-page .app-card > form > label > select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink-950);
  font: inherit;
}

.workspace-page .app-card > form > label > input[type="text"]:focus,
.workspace-page .app-card > form > label > select:focus {
  border-color: var(--brand-500);
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.14);
}

.workspace-page .app-card > form > fieldset {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.workspace-page .app-card > form > fieldset > legend {
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 650;
}

@media (max-width: 900px) {
  .admin-summary-grid,
  .link-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .workspace-record-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-request-actions { align-items: stretch; flex-direction: column; }
  .data-request-actions .button { width: 100%; }
}

/* ========================================================================== 
   Phase 40.1 — visual correction pass
   The first Phase 40 pass intentionally preserved legacy geometry. This pass
   removes the remaining legacy look and aligns composition, spacing, controls,
   tables, account/workspace/admin surfaces and responsive states with the
   founder-provided enhanced HTML reference.
   ========================================================================== */

/* ---------- Foundation ---------- */
:root {
  --ui-container: 1280px;
  --ui-page-x: 48px;
  --ui-section-y: 88px;
  --ui-card-radius: 16px;
  --ui-control-radius: 12px;
  --ui-soft-shadow: 0 1px 2px rgba(15,23,42,.035), 0 8px 28px -22px rgba(15,23,42,.24);
  --ui-raised-shadow: 0 24px 55px -32px rgba(15,23,42,.32);
}

html { background: #fff; }

body {
  background: #fff;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.6;
}

body.app-page {
  background: #f8fafc;
}

.site-shell { overflow: visible; }

main,
.app-main,
section,
article,
aside,
form,
fieldset,
div { min-width: 0; }

p { margin-top: 0; }

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

p,
li,
dd,
td,
small,
.field-help,
.field-error {
  overflow-wrap: break-word;
}

code,
pre,
.mono,
.comparison-hash {
  overflow-wrap: anywhere;
}

.section-container,
.header-inner,
.footer-inner,
.app-container,
.admin-container {
  width: min(var(--ui-container), calc(100% - var(--ui-page-x)));
}

.narrow-container {
  width: min(860px, calc(100% - var(--ui-page-x)));
}

.app-section {
  padding: 72px 0 88px;
  background: transparent;
}

.app-section:nth-of-type(even) { background: transparent; }

.app-section-muted,
.section-soft {
  background-color: #f8fafc !important;
  background-image:
    radial-gradient(at 40% 20%, rgba(59,130,246,.065) 0, transparent 48%),
    radial-gradient(at 82% 0%, rgba(6,182,212,.045) 0, transparent 46%),
    radial-gradient(at 0% 55%, rgba(37,99,235,.04) 0, transparent 45%) !important;
}

/* ---------- Header / navigation ---------- */
.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 64px;
  border-bottom: 1px solid rgba(51,65,85,.72);
  background: rgba(15,23,42,.94);
  box-shadow: 0 10px 30px -28px rgba(2,6,23,.9);
  backdrop-filter: blur(20px) saturate(145%);
}

.header-inner {
  min-height: 64px;
  height: 64px;
  grid-template-columns: minmax(180px, 235px) minmax(0, 1fr) minmax(210px, 300px);
  gap: 24px;
}

.brand,
.app-header .brand {
  gap: 9px;
  font-size: 19px;
  font-weight: 750;
}

.brand-mark,
.app-header .brand-mark {
  width: 34px;
  height: 37px;
}

.app-header .brand small {
  padding: 3px 7px;
  border-color: rgba(147,197,253,.24);
  background: rgba(37,99,235,.12);
  color: #93c5fd;
  font-size: 9px;
}

.desktop-nav {
  gap: clamp(15px, 1.8vw, 26px);
  font-size: 13px;
  font-weight: 550;
}

.header-actions {
  gap: 14px;
  font-size: 13px;
}

.desktop-nav a,
.sign-in,
.app-header .desktop-nav a {
  padding: 7px 0;
  white-space: nowrap;
}

.app-header .desktop-nav a[aria-current="page"]::after {
  bottom: -6px;
}

.header-actions .button,
.button-small {
  min-height: 40px;
  padding-inline: 16px;
}

.mobile-navigation {
  right: 0;
  width: min(310px, calc(100vw - 32px));
  min-width: 0;
  padding: 9px;
}

/* ---------- Buttons / links ---------- */
.button,
.calculate-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: #2563eb;
  box-shadow: 0 10px 22px -13px rgba(37,99,235,.68);
  font-size: 14px;
  font-weight: 700;
}

.button:hover,
.calculate-button:hover {
  background: #1d4ed8;
  box-shadow: 0 16px 28px -16px rgba(37,99,235,.72);
}

.button-secondary,
.button-lime {
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.035);
  color: #334155;
}

.button-secondary:hover,
.button-lime:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.text-link,
.formula-link,
.source-link,
.result-action,
.light-link {
  border-bottom-color: transparent;
  color: #2563eb;
}

.text-link:hover,
.formula-link:hover,
.source-link:hover,
.result-action:hover,
.light-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-color: #bfdbfe;
  text-underline-offset: 3px;
}

/* ---------- App/public heroes ---------- */
.app-hero,
.search-hero,
.pricing-hero,
.help-hero,
.guide-hero,
.workspace-hero,
.saved-result-hero,
.pilot-hero,
.admin-hero {
  padding: 62px 0 66px;
  border-bottom: 1px solid #f1f5f9;
  background-color: #fff;
  background-image:
    radial-gradient(ellipse 72% 52% at 50% -15%, rgba(59,130,246,.13), transparent 70%),
    radial-gradient(circle at 92% 4%, rgba(6,182,212,.045), transparent 22rem);
}

.app-hero .eyebrow,
.guide-hero .eyebrow,
.workspace-hero .eyebrow,
.search-hero .eyebrow {
  margin-bottom: 15px;
}

.app-hero h1,
.search-hero h1,
.guide-hero h1,
.workspace-hero h1,
.account-intro h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.app-hero p:not(.eyebrow, .search-version),
.search-hero p,
.guide-hero p,
.workspace-hero p,
.account-intro > p:last-of-type {
  margin-top: 17px;
  font-size: 16px;
  line-height: 1.72;
}

/* ---------- Homepage ---------- */
.home-page {
  background: #fff;
}

.home-page .hero {
  position: relative;
  isolation: isolate;
  padding: 96px 0 92px;
  grid-template-columns: minmax(0, .94fr) minmax(520px, 1.06fr);
  gap: clamp(50px, 6vw, 82px);
  align-items: center;
  background: transparent;
}

.home-page .hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 50% 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 76% 48% at 50% -12%, rgba(59,130,246,.16), transparent 70%),
    #fff;
  pointer-events: none;
}

.home-page .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -3%;
  top: 21%;
  width: 47%;
  height: 54%;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(59,130,246,.17), rgba(6,182,212,.085));
  filter: blur(54px);
  pointer-events: none;
}

.home-page .hero-copy { max-width: 640px; }

.home-page .market-badge {
  margin: 0 0 22px;
  padding: 7px 13px;
  border-color: #dbeafe;
  background: #eff6ff;
  box-shadow: none;
  color: #1d4ed8;
}

.home-page .hero h1 {
  max-width: 670px;
  margin: 0;
  font-size: clamp(44px, 5.1vw, 64px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.052em;
}

.home-page .hero-description {
  max-width: 610px;
  margin: 24px 0 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.7;
}

.home-page .hero-actions {
  margin-top: 30px;
  gap: 12px 20px;
}

.home-page .hero-actions .button {
  min-height: 52px;
  padding-inline: 25px;
  font-size: 15px;
}

.home-page .hero-actions .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 4px;
  border-bottom: 0;
}

.home-page .micro-trust {
  margin-top: 28px;
  gap: 13px;
  color: #94a3b8;
  font-size: 12px;
}

.home-page .calculator-card {
  position: relative;
  overflow: hidden;
  padding-top: 42px;
  border: 1px solid rgba(203,213,225,.82);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 32px 70px -34px rgba(15,23,42,.38);
}

.home-page .calculator-card::before {
  content: "tariffcalc.com/calculator";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(248,250,252,.94);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
}

.home-page .calculator-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 19px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f87171;
  box-shadow: 15px 0 0 #fbbf24, 30px 0 0 #34d399;
}

.home-page .calculator-form,
.home-page .result-panel {
  padding: 25px;
}

.home-page .result-panel {
  border-left: 1px solid #f1f5f9;
  background: #fbfdff;
}

.proof-section,
.features {
  padding: var(--ui-section-y) 0;
}

.home-section-head,
.section-heading,
.home-process-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.home-section-head h2,
.section-heading h2,
.home-process-head h2,
.home-cta h2 {
  font-size: clamp(30px, 3.6vw, 43px);
  font-weight: 850;
  letter-spacing: -.04em;
}

.home-section-eyebrow,
.section-heading > p:first-child {
  color: #2563eb;
  font-size: 12px;
  font-weight: 750;
}

.proof-grid,
.feature-grid {
  margin-top: 46px;
  gap: 22px;
}

.proof-card,
.feature-card {
  min-height: 220px;
  padding: 27px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ui-soft-shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.proof-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 24px 48px -30px rgba(15,23,42,.34);
}

.proof-mark,
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
}

.proof-card h3,
.feature-card h3 {
  margin-top: 19px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 750;
}

.proof-card p,
.feature-card p {
  margin-top: 9px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.home-process {
  position: relative;
  width: min(var(--ui-container), calc(100% - var(--ui-page-x)));
  margin: 0 auto;
  padding: 82px 56px 70px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 40% 20%, rgba(59,130,246,.085) 0, transparent 48%),
    radial-gradient(at 82% 0%, rgba(6,182,212,.06) 0, transparent 46%),
    radial-gradient(at 0% 54%, rgba(37,99,235,.055) 0, transparent 48%);
  box-shadow: none;
  color: #1e293b;
}

.home-process .home-section-eyebrow { color: #2563eb; }
.home-process-head h2 { color: #0f172a; }
.home-process-head > p:last-child { color: #64748b; }

.home-process-grid {
  position: relative;
  margin-top: 48px;
  gap: 24px;
}

.home-process-grid::before {
  content: "";
  position: absolute;
  top: 47px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, #dbeafe, #60a5fa, #dbeafe);
}

.home-process-step {
  position: relative;
  z-index: 1;
  min-height: 230px;
  padding: 28px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--ui-soft-shadow);
  text-align: center;
}

.home-process-number {
  width: 54px;
  height: 54px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 22px -17px rgba(37,99,235,.62);
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.home-process-step h3 { color: #0f172a; font-size: 18px; }
.home-process-step p { color: #64748b; font-size: 14px; }

.home-cta { padding: 0 0 88px; background: #fff; }

.home-cta-inner {
  max-width: 1160px;
  margin-inline: auto;
  padding: 64px clamp(28px, 6vw, 76px);
  border: 1px solid #1e3a8a;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 18%, rgba(6,182,212,.19), transparent 29%),
    radial-gradient(circle at 18% 0%, rgba(59,130,246,.23), transparent 34%),
    #0f172a;
  box-shadow: 0 32px 65px -42px rgba(15,23,42,.9);
  text-align: center;
}

.home-cta-inner > p:not(.home-section-eyebrow) {
  max-width: 720px;
  margin: 16px auto 0;
}

.home-cta-actions { justify-content: center; }

/* ---------- Shared cards / surfaces ---------- */
.calculator-card,
.app-card,
.feature-card,
.pricing-card,
.faq-stack article,
.source-link-list a,
.data-version-card,
.workspace-user-card,
.search-form,
.help-card,
.support-option,
.intake-card,
.fee-tool-form,
.fee-tool-result,
.account-card,
.operation-card,
.maintenance-card,
.standalone-status-card,
.editorial-card,
.correction-form,
.correction-process,
.comparison-report,
.schedule-history-admin,
.data-control-card,
.deletion-request-card,
.data-rights-admin-card,
.pilot-config-card,
.pilot-closed-card,
.pilot-form,
.calculation-feedback-card,
.workspace-product-form,
.workspace-products {
  border-color: #e2e8f0;
  border-radius: var(--ui-card-radius);
  background: #fff;
  box-shadow: var(--ui-soft-shadow);
}

.app-card,
.help-card,
.support-option,
.editorial-card,
.pricing-card {
  padding: 26px;
}

.app-card h2,
.app-card h3,
.help-card h2,
.help-card h3,
.editorial-card h2,
.editorial-card h3 {
  color: #0f172a;
}

.app-card > p:not(.step-label, .eyebrow),
.help-card p,
.editorial-card p {
  color: #64748b;
}

/* ---------- Forms ---------- */
.field,
.field-stack { gap: 7px; }

.field label,
.field-label,
.field-stack label,
.workspace-page .app-card > form > label,
.workspace-page .app-card > form > fieldset > legend {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.control,
.input,
select.input,
textarea,
.workspace-page .app-card > form > label > input[type="text"],
.workspace-page .app-card > form > label > select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: var(--ui-control-radius);
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15,23,42,.02);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.control {
  padding-inline: 13px;
}

.control input,
.control select {
  min-width: 0;
  height: 46px;
  color: #0f172a;
  font-size: 14px;
}

.control input::placeholder,
textarea::placeholder { color: #94a3b8; }

.control:hover,
.input:hover,
textarea:hover { border-color: #cbd5e1; }

.control:focus-within,
.input:focus,
select.input:focus,
textarea:focus,
.workspace-page .app-card > form > label > input[type="text"]:focus,
.workspace-page .app-card > form > label > select:focus {
  border-color: #3b82f6;
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.14);
}

.control.textarea-control textarea,
.control > textarea {
  min-height: 120px;
  padding: 13px 14px;
}

.field-help,
.field-hint,
.report-disclaimer {
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.field-error { color: #be123c; }

.form-grid,
.two-column-grid,
.data-control-grid,
.comparison-warning-grid {
  gap: 16px;
}

.form-heading,
.result-heading,
.source-title,
.results-heading,
.workspace-section-heading,
.pricing-card-heading,
.pilot-record-heading,
.data-rights-admin-heading {
  padding-bottom: 15px;
  border-bottom: 1px solid #f1f5f9;
}

/* ---------- Notices / badges / empty states ---------- */
.notice,
.alert,
.status-banner {
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: none;
}

.notice-neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.notice-success,
.alert-success {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.notice-warning,
.alert-warning,
.warning-notice {
  border-color: #fde68a;
  background: #fffbeb;
}

.notice-critical,
.alert-error,
.warning-critical {
  border-color: #fecdd3;
  background: #fff1f2;
}

.badge,
.coverage-badge,
.sample-label,
.beta-pill,
.change-label,
.badge-default {
  min-height: 24px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
}

.result-empty,
.compact-empty {
  padding: 36px 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  text-align: center;
}

.result-empty .feature-icon,
.compact-empty .feature-icon { margin-inline: auto; }

.empty-state-actions { justify-content: center; }

/* ---------- Calculator/result ---------- */
.calculator-workspace { gap: 24px; }

.calculator-card {
  border-radius: 18px;
  box-shadow: var(--ui-raised-shadow);
}

.result-panel {
  border-left-color: #f1f5f9;
  background: #f8fafc;
}

.result-row {
  min-height: 50px;
  padding-block: 12px;
}

.result-row dd,
.calculation-breakdown dd,
.metadata-grid dd {
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.code-summary,
.measure-review,
.formula-panel,
.formula-callout,
.calculator-product-context,
.product-description-block,
.product-prefill-summary,
.data-proof,
.snapshot-verification,
.account-next-step,
.repeat-calculation-card {
  border-color: #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

/* ---------- HTS/search/source cards ---------- */
.search-form {
  padding: 14px;
  border-radius: 16px;
  box-shadow: var(--ui-raised-shadow);
}

.hts-result {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--ui-soft-shadow);
}

.hts-result:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 20px 38px -28px rgba(15,23,42,.3);
}

.hts-result-code { background: #f8fafc; }

.source-detail,
.coverage-matrix,
.validation-report,
.guide-cta,
.related-help-card {
  border-radius: 16px;
}

/* ---------- Pricing ---------- */
.pricing-grid { gap: 24px; }

.pricing-card {
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--ui-soft-shadow);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 25px 50px -34px rgba(15,23,42,.32);
}

.pricing-card-featured {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 28px 58px -34px rgba(37,99,235,.68);
}

.price-line strong {
  font-size: clamp(36px, 4vw, 44px);
  letter-spacing: -.04em;
}

/* ---------- Account / authentication ---------- */
.account-section {
  min-height: calc(100vh - 64px);
  padding: 78px 0 92px;
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 18% 10%, rgba(59,130,246,.09), transparent 28rem),
    radial-gradient(at 82% 2%, rgba(6,182,212,.05), transparent 25rem);
}

.account-shell {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
  align-items: center;
  gap: clamp(50px, 8vw, 108px);
}

.account-intro { max-width: 620px; }

.account-intro h1 {
  font-size: clamp(38px, 4.5vw, 54px);
}

.account-trust-list {
  margin-top: 28px;
  gap: 12px;
}

.account-trust-list span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #475569;
  font-size: 13px;
}

.account-card {
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 28px 58px -34px rgba(15,23,42,.4);
}

.account-card h2 {
  margin-top: 5px;
  font-size: 23px;
  font-weight: 800;
}

.account-form { gap: 16px; }

.account-form .button { width: 100%; }

.account-links {
  gap: 9px 18px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}

/* ---------- Workspace ---------- */
.workspace-hero .app-container,
.workspace-hero > .app-container {
  gap: 28px;
}

.workspace-user-card {
  padding: 18px 20px;
  border-radius: 15px;
  box-shadow: var(--ui-soft-shadow);
}

.workspace-container { gap: 26px; }

.pilot-journey-card {
  overflow: hidden;
  padding: 0;
}

.pilot-journey-heading {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.pilot-journey-steps {
  position: relative;
  padding: 22px 24px;
  gap: 10px;
  background: #f8fafc;
}

.pilot-journey-steps > div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.pilot-journey-steps > div strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
}

.pilot-journey-steps > .is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.pilot-journey-steps > .is-complete strong {
  background: #10b981;
  color: #fff;
}

.pilot-journey-steps > .is-current {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59,130,246,.07);
}

.pilot-journey-steps > .is-current strong {
  background: #2563eb;
  color: #fff;
}

.pilot-journey-action {
  padding: 20px 24px 22px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.workspace-stat-grid {
  gap: 16px;
}

.workspace-stat {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  padding: 24px;
  border-radius: 16px;
}

.workspace-stat::before {
  content: "";
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.workspace-stat span {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.workspace-stat strong {
  color: #0f172a;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 850;
  letter-spacing: -.04em;
}

.workspace-stat small {
  color: #94a3b8;
  line-height: 1.45;
}

.workspace-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr);
  gap: 24px;
}

.workspace-section-heading {
  min-height: 0;
  padding: 0 0 15px;
}

.workspace-section-heading h2,
.workspace-product-form h2,
.workspace-products h2 {
  font-size: 22px;
  font-weight: 800;
}

.workspace-heading-actions {
  gap: 8px;
}

.workspace-record-list { gap: 10px; }

.workspace-record {
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: var(--ui-soft-shadow);
}

.workspace-record:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  background: #fff;
  box-shadow: 0 18px 34px -26px rgba(15,23,42,.3);
}

.workspace-record > div:last-child { gap: 4px; }

.workspace-product-form,
.workspace-products { padding: 24px; }

.workspace-product-form form { gap: 14px; }

.workspace-product-row,
.workspace-product-list > div {
  padding-block: 14px;
}

.workspace-sidebar .app-card + .app-card { margin-top: 0; }

/* ---------- Admin / operations ---------- */
.admin-container { padding-top: 0; }

.admin-toolbar {
  margin-bottom: 24px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ui-soft-shadow);
}

.admin-toolbar h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-toolbar-actions .button {
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 9px;
  font-size: 11px;
}

.admin-toolbar-actions form { display: flex; align-items: center; }

.admin-toolbar-actions .text-button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  color: #64748b;
  font-size: 11px;
}

.admin-toolbar-actions .text-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-login {
  max-width: 560px;
  margin-inline: auto;
  padding: 30px;
}

.admin-summary-grid,
.correction-metrics,
.readiness-check-grid {
  gap: 14px;
}

.readiness-overview {
  padding: 24px;
  border-radius: 16px;
}

.readiness-check {
  min-height: 150px;
  padding: 19px;
  border-width: 1px;
  border-radius: 14px;
}

.readiness-passed { border-color: #a7f3d0; }
.readiness-warning { border-color: #fde68a; }
.readiness-failed { border-color: #fecdd3; }

.operations-grid { gap: 16px; }
.operations-grid > .app-card { padding: 24px; }

.compact-log > div,
.admin-version-row,
.correction-admin-card,
.review-fixture-card,
.pilot-application-card,
.pilot-feedback-card,
.commercial-record-card,
.data-rights-admin-card {
  border-radius: 14px;
  box-shadow: var(--ui-soft-shadow);
}

/* ---------- Tables / dense data ---------- */
.table-scroll,
.table-wrap,
.admin-table-wrap,
.compare-table-wrapper {
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ui-soft-shadow);
}

.table-scroll table,
.table-wrap table,
.admin-table,
.data-table,
.pilot-delivery-table,
.change-table table {
  min-width: 680px;
}

th,
.data-table th,
.pilot-delivery-table th,
.change-table th {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  letter-spacing: .06em;
}

td,
.data-table td,
.pilot-delivery-table td,
.change-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 12px;
  vertical-align: top;
}

tbody tr:hover td { background: #fbfdff; }

/* ---------- Guides / content / help ---------- */
.guide-layout,
.correction-layout,
.commercial-intake-layout,
.fee-tool-layout {
  gap: 34px;
}

.guide-content > section + section {
  margin-top: 38px;
  padding-top: 38px;
}

.guide-content h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 800;
}

.guide-sidebar .source-detail,
.guide-cta,
.related-help-card,
.faq-grid .app-card,
.source-detail,
.coverage-matrix,
.validation-report {
  border-radius: 16px;
  box-shadow: var(--ui-soft-shadow);
}

.faq-stack article {
  overflow: hidden;
  border-radius: 16px;
}

.faq-stack article + article { margin-top: 12px; }

/* ---------- Privacy / destructive surfaces ---------- */
.deletion-request-card {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff, #fff8f9);
}

.data-control-card {
  border-color: #dbeafe;
}

.data-rights-hold-card {
  border-radius: 14px;
}

/* ---------- Footer ---------- */
.site-footer,
.app-footer {
  border-top: 1px solid #1e293b;
  background: #0f172a;
}

.footer-inner,
.app-footer .footer-inner {
  min-height: 0;
  padding: 50px 0 32px;
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.6fr);
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: 12px 54px;
  color: #cbd5e1;
  font-size: 12px;
}

.footer-brand {
  grid-column: 1;
  grid-row: 1;
  color: #fff;
  font-size: 18px;
}

.footer-inner > p:nth-of-type(1),
.app-footer .footer-inner > p:nth-of-type(1) {
  grid-column: 1;
  grid-row: 2;
  max-width: 330px;
  text-align: left;
  color: #94a3b8;
  line-height: 1.65;
}

.footer-links {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px 22px;
}

.footer-links a {
  color: #cbd5e1;
  line-height: 1.45;
}

.footer-links a:hover { color: #93c5fd; }

.footer-inner > p:last-child,
.app-footer .footer-inner > p:last-child {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  text-align: left;
  color: #64748b;
}

/* ---------- Error / maintenance ---------- */
.error-page,
.standalone-status-page,
.maintenance-section {
  background-color: #f8fafc;
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(59,130,246,.12), transparent 72%);
}

.standalone-status-card,
.maintenance-card {
  border-radius: 18px;
  box-shadow: var(--ui-raised-shadow);
}

/* ---------- Responsive correction ---------- */
@media (max-width: 1180px) {
  :root { --ui-page-x: 40px; }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav,
  .header-actions .sign-in { display: none; }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    margin-right: 50px;
  }

  .mobile-menu {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .home-page .hero {
    grid-template-columns: minmax(0, .9fr) minmax(470px, 1.1fr);
    gap: 44px;
  }
}

@media (max-width: 980px) {
  :root { --ui-page-x: 36px; --ui-section-y: 72px; }

  .home-page .hero {
    grid-template-columns: 1fr;
    padding-top: 74px;
  }

  .home-page .hero-copy {
    max-width: 760px;
    text-align: center;
    margin-inline: auto;
  }

  .home-page .market-badge,
  .home-page .hero-actions,
  .home-page .micro-trust { justify-content: center; }

  .home-page .hero h1,
  .home-page .hero-description { margin-inline: auto; }

  .home-page .calculator-card {
    width: min(760px, 100%);
    margin-inline: auto;
  }

  .workspace-grid,
  .account-shell,
  .guide-layout,
  .correction-layout,
  .commercial-intake-layout,
  .fee-tool-layout {
    grid-template-columns: 1fr;
  }

  .account-intro {
    max-width: 760px;
    text-align: center;
    margin-inline: auto;
  }

  .account-trust-list {
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    text-align: left;
  }

  .account-card {
    width: min(520px, 100%);
    margin-inline: auto;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-toolbar-actions { justify-content: flex-start; }

  .footer-inner,
  .app-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-brand,
  .footer-inner > p:nth-of-type(1),
  .app-footer .footer-inner > p:nth-of-type(1),
  .footer-links,
  .footer-inner > p:last-child,
  .app-footer .footer-inner > p:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-links {
    margin-top: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root { --ui-page-x: 32px; --ui-section-y: 62px; }

  .site-header,
  .app-header,
  .header-inner {
    height: 62px;
    min-height: 62px;
  }

  .header-actions .button { display: none; }

  .home-page .hero,
  .app-hero,
  .search-hero,
  .pricing-hero,
  .help-hero,
  .guide-hero,
  .workspace-hero,
  .app-section {
    padding-top: 54px;
    padding-bottom: 62px;
  }

  .home-page .calculator-card {
    grid-template-columns: 1fr;
  }

  .home-page .result-panel {
    border-top: 1px solid #f1f5f9;
    border-left: 0;
  }

  .proof-grid,
  .feature-grid,
  .home-process-grid,
  .workspace-stat-grid,
  .admin-summary-grid,
  .correction-metrics,
  .readiness-check-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .home-process {
    padding: 62px 22px 48px;
    border-radius: 20px;
  }

  .home-process-grid::before { display: none; }

  .home-process-step { min-height: 0; }

  .workspace-section-heading,
  .readiness-overview,
  .pilot-journey-heading,
  .pilot-journey-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-heading-actions,
  .pilot-journey-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .workspace-record {
    grid-template-columns: 1fr;
  }

  .workspace-record > div:last-child {
    justify-items: start;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
  }

  .pilot-journey-steps {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  :root { --ui-page-x: 28px; }

  body { font-size: 14px; }

  .brand,
  .app-header .brand { font-size: 18px; }

  .app-header .brand small { display: none; }

  .home-page .hero h1 {
    font-size: clamp(38px, 11vw, 48px);
  }

  .home-page .hero-actions,
  .home-page .micro-trust {
    align-items: stretch;
    flex-direction: column;
  }

  .home-page .hero-actions .button,
  .home-page .hero-actions .text-link {
    width: 100%;
    justify-content: center;
  }

  .home-page .micro-trust i { display: none; }

  .home-page .calculator-form,
  .home-page .result-panel,
  .app-card,
  .account-card,
  .workspace-product-form,
  .workspace-products,
  .pricing-card {
    padding: 20px;
  }

  .home-page .calculator-card { border-radius: 16px; }

  .button,
  .calculate-button {
    width: auto;
    max-width: 100%;
  }

  .button-row,
  .saved-result-actions,
  .trust-actions,
  .workspace-heading-actions,
  .workspace-product-actions,
  .report-actions,
  .report-footer-actions,
  .data-request-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .button,
  .saved-result-actions .button,
  .trust-actions .button,
  .workspace-heading-actions .button,
  .report-actions .button,
  .report-footer-actions .button,
  .data-request-actions .button {
    width: 100%;
  }

  .admin-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-toolbar-actions .button,
  .admin-toolbar-actions form,
  .admin-toolbar-actions form .text-button {
    width: 100%;
  }

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

@media (prefers-reduced-motion: reduce) {
  .proof-card,
  .feature-card,
  .pricing-card,
  .workspace-record,
  .hts-result {
    transition: none !important;
    transform: none !important;
  }
}

/* Phase 40.1 mark sizing after the rounded application-icon refresh. */
.brand-mark,
.app-header .brand-mark {
  width: 36px;
  height: 38px;
  filter: drop-shadow(0 8px 16px rgba(37,99,235,.2));
}

.footer-brand img {
  width: 34px;
  height: 36px;
}

/* Phase 40.1 dense-component alignment. */
.app-hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 46px;
}

.data-version-card {
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 22px 44px -32px rgba(15,23,42,.36);
  backdrop-filter: blur(12px);
}

.data-version-card > span { color: #2563eb; font-size: 10px; }
.data-version-card strong { margin-top: 7px; color: #0f172a; font-size: 21px; font-weight: 800; }
.data-version-card small { color: #64748b; font-size: 12px; }
.data-version-card a { color: #2563eb; font-size: 12px; }

.calculation-form,
.result-summary,
.warning-card,
.evidence-card {
  padding: 26px;
}

.calculation-form > .field,
.calculation-form > .form-grid,
.calculation-form > .check-field,
.calculation-form > .calculate-button {
  margin-top: 18px;
}

.result-column { gap: 16px; }

.result-summary,
.warning-card,
.evidence-card {
  border-radius: 16px;
  box-shadow: var(--ui-soft-shadow);
}

.result-summary .result-heading h2 {
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 850;
  letter-spacing: -.045em;
}

.unit-cost-row {
  padding: 16px 18px;
  border-radius: 12px;
  background: #0f172a;
}

.warning-item {
  padding: 13px 14px;
  border-color: #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}

.warning-critical {
  border-color: #fecdd3;
  background: #fff1f2;
}

.coverage-list { gap: 9px; }
.coverage-list li { color: #475569; font-size: 13px; }
.coverage-list .svg-icon { color: #10b981; }

.data-proof {
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
}

.data-proof > .svg-icon {
  background: #dbeafe;
  color: #2563eb;
}

.metadata-grid {
  gap: 12px;
}

.metadata-grid > div {
  padding: 12px 13px;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #f8fafc;
}

.metadata-grid dt { color: #94a3b8; font-size: 9px; }
.metadata-grid dd { color: #334155; font-size: 12px; }

.status-banner {
  padding: 15px 16px;
  border-radius: 12px;
}

.coverage-matrix,
.validation-report,
.source-detail {
  padding: 24px;
}

.coverage-row {
  grid-template-columns: minmax(78px, auto) minmax(150px, 190px) minmax(0, 1fr);
  gap: 16px;
}

.coverage-row p { color: #64748b; font-size: 12px; }

.faq-grid {
  gap: 16px;
}

.faq-grid .app-card {
  min-height: 190px;
  padding: 22px;
  border-radius: 16px;
  box-shadow: var(--ui-soft-shadow);
}

.faq-grid h3 { color: #0f172a; font-size: 16px; font-weight: 750; }
.faq-grid p { color: #64748b; font-size: 12px; }

.comparison-report,
.schedule-history-admin {
  padding: 26px;
  border-radius: 16px;
}

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

.change-metric {
  min-height: 94px;
  padding: 16px;
  align-content: center;
  border-color: #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
}

.change-metric strong {
  color: #0f172a;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.printable-calculation,
.evidence-pack-sheet {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ui-soft-shadow);
}

.report-integrity-grid,
.snapshot-input-grid {
  gap: 12px;
}

.commercial-capability-grid {
  gap: 16px;
}

.check-list { gap: 10px; }
.check-list li { color: #475569; }
.check-list .svg-icon { color: #10b981; }

.intake-card {
  padding: 26px;
  border-radius: 16px;
  box-shadow: var(--ui-soft-shadow);
}

@media (max-width: 980px) {
  .app-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .data-version-card { max-width: 540px; }

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

@media (max-width: 760px) {
  .form-grid,
  .metadata-grid,
  .comparison-metrics,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .coverage-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .coverage-state { margin-bottom: 2px; }
}
