:root {
  --bg: #07111f;
  --bg-soft: #08121f;
  --card: #0e1a2b;
  --card-2: #122238;
  --gold: #d7b56d;
  --cream: #f7f2e7;
  --muted: #aab3c2;
  --border: rgba(215, 181, 109, 0.22);
  --success: #20c997;
  --danger: #ffb4a8;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(215, 181, 109, 0.16), transparent 34rem),
    linear-gradient(180deg, var(--bg) 0%, #091523 46%, #f5efe4 46%, #f7f2e7 100%);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 940px;
  font-size: clamp(2.05rem, 5.8vw, 4.35rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
}

h3 {
  font-size: 1.1rem;
}

input,
select,
button {
  font: inherit;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

input[type="date"],
input[type="number"],
select {
  width: 100%;
  min-height: 52px;
  line-height: 1.2;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid rgba(7, 17, 31, 0.12);
  text-align: left;
  vertical-align: top;
}

th {
  color: #213047;
  background: #f0e5d3;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: #07111f;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(7, 17, 31, 0.96);
  border-bottom: 1px solid rgba(215, 181, 109, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.site-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.brand-logo {
  width: auto;
  height: 36px;
  display: block;
  object-fit: contain;
}

.brand-footer .brand-logo {
  height: 34px;
}

.primary-nav {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(8, 18, 31, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.primary-nav.is-open {
  display: grid;
  gap: 0.25rem;
}

.primary-nav a {
  padding: 0.78rem 0.92rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--cream);
  background: rgba(215, 181, 109, 0.1);
}

.menu-toggle {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
}

.hero,
.page-hero {
  display: grid;
  gap: 2rem;
}

.hero {
  display: block;
  padding: clamp(2rem, 4.5vw, 3.6rem) 0 clamp(1.6rem, 3vw, 2.4rem);
}

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

.hero h1 {
  max-width: 920px;
}

.page-hero {
  padding: clamp(0.95rem, 2vw, 1.6rem) 0 clamp(0.9rem, 1.8vw, 1.25rem);
}

.page-hero h1 {
  max-width: 960px;
  margin-bottom: 0.8rem;
}

.hero-subtitle,
.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.28rem);
}

.hero-subtitle {
  max-width: 900px;
  margin-top: 0.9rem;
}

.page-hero p {
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-hero .eyebrow {
  margin-bottom: 0.55rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.25rem 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
}

.button-primary {
  background: var(--gold);
  color: #07111f;
  box-shadow: 0 12px 34px rgba(215, 181, 109, 0.18);
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
}

.hero-note {
  max-width: 880px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-mini-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.hero-mini-points span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(215, 181, 109, 0.22);
  border-radius: 999px;
  color: #d8e0ec;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-panel,
.calculator,
.tool-card,
.trust-bar,
.feature-grid > div,
.related-card,
.guide-link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 26, 43, 0.98), rgba(12, 24, 39, 0.96));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.4rem;
}

.panel-label {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-panel strong {
  display: block;
  color: var(--cream);
  font-size: 1.6rem;
}

.hero-panel p,
.metric-row span {
  color: var(--muted);
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

.metric-row strong {
  color: var(--success);
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: clamp(0.8rem, 1.4vw, 1rem) 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--gold);
}

.trust-bar {
  display: grid;
  gap: 0.4rem;
  margin: clamp(0.8rem, 1.5vw, 1.15rem) 0;
  padding: 1rem;
  color: var(--muted);
}

.trust-bar strong {
  color: var(--cream);
}

.content-section,
.split-section {
  margin: clamp(1rem, 2vw, 1.65rem) 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(7, 17, 31, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: #152033;
  box-shadow: 0 20px 55px rgba(7, 17, 31, 0.09);
}

.content-section + .content-section {
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

.content-section p,
.split-section p {
  color: #49566a;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.3rem;
}

.section-heading .eyebrow,
.content-section .eyebrow,
.split-section .eyebrow {
  color: #8b6a22;
}

.card-grid,
.feature-grid,
.related-grid {
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.25rem);
  min-width: 0;
}

.tool-card,
.related-card,
.guide-link {
  display: grid;
  gap: 0.5rem;
  padding: 1.1rem;
  background: #0e1a2b;
  color: var(--cream);
  transition: transform 160ms ease, border-color 160ms ease;
}

.tool-card:hover,
.related-card:hover,
.guide-link:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 181, 109, 0.52);
}

.tool-card span,
.related-card span,
.guide-link span {
  color: var(--gold);
  font-weight: 900;
}

.tool-card p,
.related-card p,
.guide-link small {
  margin: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  gap: 1.4rem;
  min-width: 0;
  background: linear-gradient(145deg, #102139, #07111f);
  color: var(--cream);
}

.split-section p {
  color: var(--muted);
}

.feature-grid > div {
  padding: 1.1rem;
  background: #0e1a2b;
  color: var(--cream);
}

.feature-grid p {
  color: var(--muted);
}

.guide-list {
  display: grid;
  gap: 0.8rem;
}

.calculator {
  margin: 1rem 0 clamp(1.4rem, 3vw, 2rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  color: var(--cream);
  box-shadow: 0 24px 70px rgba(7, 17, 31, 0.24);
  min-width: 0;
  max-width: 100%;
}

.form-grid {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field label,
.calculator label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.calculator input,
.calculator select {
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(215, 181, 109, 0.28);
  border-radius: 16px;
  background: #07111f;
  color: #f7f2e7;
  outline: none;
}

.calculator input:focus,
.calculator select:focus {
  border-color: #d7b56d;
  box-shadow: 0 0 0 4px rgba(215, 181, 109, 0.14);
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem !important;
  margin: 1rem 0;
}

.check-row input {
  width: 20px;
  min-height: 20px;
}

.calculator .button {
  width: 100%;
  margin-top: 0.2rem;
}

.result-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(32, 201, 151, 0.28);
  border-radius: 18px;
  background: rgba(32, 201, 151, 0.08);
  min-width: 0;
  max-width: 100%;
}

.result-neutral,
.calculator-disclaimer {
  margin: 0;
  color: var(--muted);
}

.calculator-disclaimer {
  margin-top: 0.9rem;
  font-size: 0.9rem;
}

.result-grid {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  max-width: 100%;
}

.result-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(247, 242, 231, 0.08);
  min-width: 0;
  max-width: 100%;
}

.result-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.result-item span {
  color: var(--muted);
}

.result-item strong {
  color: var(--success);
  text-align: right;
}

.result-warning {
  margin-top: 0.8rem;
  color: var(--danger);
  font-size: 0.92rem;
}

.text-link {
  color: var(--gold);
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

details {
  border: 1px solid rgba(7, 17, 31, 0.11);
  border-radius: 16px;
  background: #fffaf1;
  box-shadow: 0 10px 30px rgba(7, 17, 31, 0.05);
  padding: 0.95rem 1rem;
}

summary {
  font-weight: 900;
}

details p {
  padding: 0.7rem 0 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(7, 17, 31, 0.1);
  border-radius: 16px;
  background: #fffaf1;
}

.site-footer {
  padding: clamp(2.2rem, 5vw, 3.5rem) 0 1.6rem;
  background: #f7f2e7;
  color: #07111f;
}

.footer-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(150px, 0.7fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 24px;
  background: #07111f;
  color: #f7f2e7;
  box-shadow: 0 24px 60px rgba(7, 17, 31, 0.16);
}

.brand-footer {
  margin-bottom: 1rem;
  color: var(--cream);
}

.footer-logo {
  height: 34px;
  margin-bottom: 1rem;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0;
}

.site-footer p,
.site-footer a:not(.brand) {
  color: #d8e0ec;
}

.site-footer .copyright {
  margin: 1.15rem 0 0;
  color: #314057;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 1;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 0.35rem 0;
  padding: 0.18rem 0;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--gold);
}

.copyright {
  margin: 1.15rem 0 0;
  color: #314057;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 1;
}

.review-note {
  max-width: 780px;
  margin: 0 0 clamp(0.9rem, 1.7vw, 1.25rem);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(215, 181, 109, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.page-shell,
.site-header-inner,
.content-section,
.hero,
.page-hero,
.footer-card,
.calculator,
.hero-panel,
.tool-card,
.related-card,
.reference-card,
.faq-list details,
.review-note,
.trust-bar {
  max-width: 100%;
}

@media (min-width: 720px) {
  .card-grid,
  .feature-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .split-section {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    align-items: start;
  }

  .calculator .button {
    width: auto;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    min-height: 62px;
  }

  .brand-logo {
    height: 29px;
    max-width: 210px;
  }

  .brand-footer .brand-logo {
    height: 30px;
  }

  h1 {
    font-size: clamp(2rem, 9.5vw, 2.85rem);
    line-height: 1.08;
  }

  .hero {
    padding: 1.45rem 0 1.6rem;
  }

  .page-hero {
    padding: 0.85rem 0 1rem;
  }

  .breadcrumb {
    margin-top: 0.7rem;
  }

  .hero-actions {
    margin: 1rem 0 0.8rem;
  }

  .hero-mini-points {
    gap: 0.45rem;
  }

  .hero-mini-points span {
    width: 100%;
    justify-content: center;
  }

  .page-hero p {
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .calculator,
  .content-section,
  .hero-panel,
  .review-note,
  .footer-card {
    border-radius: 18px;
  }

  .calculator,
  .content-section {
    padding: 1rem;
  }

  .content-section + .content-section {
    margin-top: 0.95rem;
  }

  .faq-list details {
    padding: 0.85rem 0.9rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 560px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calculator .button {
    width: 100%;
    justify-content: center;
  }

  .calculator input,
  .calculator select {
    font-size: 16px;
    min-height: 54px;
  }

  .menu-toggle {
    min-height: 42px;
    padding: 0.48rem 0.82rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 980px) {
  .site-header-inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: none;
  }

  .primary-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .primary-nav a {
    font-size: 0.94rem;
  }

  .brand-logo {
    height: 38px;
  }

  .card-grid,
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-card {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(150px, 0.7fr));
  }
}

@media (max-width: 760px) {
  .footer-card {
    grid-template-columns: 1fr;
  }
}
