:root {
  --navy-950: #081b3d;
  --navy-900: #0a1f44;
  --navy-700: #304461;
  --slate-600: #52627a;
  --slate-500: #6d7b8d;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --line: #d9e1e8;
  --line-soft: #e9edf1;
  --emerald-800: #006d5e;
  --emerald-700: #007c6b;
  --emerald-600: #008b78;
  --emerald-500: #10a48b;
  --emerald-100: #def3ed;
  --emerald-50: #eef8f5;
  --surface: #ffffff;
  --surface-warm: #fdfcf9;
  --shadow-card:
    0 14px 36px rgba(13, 34, 65, 0.07),
    0 2px 8px rgba(13, 34, 65, 0.05);
  --font-sans:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--surface);
  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: #bdebe1;
  color: var(--navy-950);
}

:focus-visible {
  outline: 3px solid rgba(0, 139, 120, 0.33);
  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.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;
}

.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;
  }
}
