:root {
  --brand-primary: #1e3a8a;
  --brand-primary-hover: #1d4ed8;
  --brand-accent: #0d9488;
  --link-color: #1d4ed8;
  --link-hover: #1e40af;
  --text-dark: #0f172a;
  --gray-mid: #475569;
  --gray-light: #e5e7eb;
  --surface-bg: #f8fafc;
  --surface-card: #ffffff;
  --surface-card2: #f1f5f9;
  --surface-border: #e5e7eb;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --site-header-h: 64px;
  --site-sticky-offset: calc(var(--site-header-h) + 1rem);
}

html.dark {
  --brand-primary: #2563eb;
  --brand-primary-hover: #3b82f6;
  --text-dark: #f9fafb;
  --gray-mid: #dbe7fb;
  --gray-light: #334155;
  --link-color: #93c5fd;
  --link-hover: #bfdbfe;
  --surface-bg: #0b1220;
  --surface-card: #0f172a;
  --surface-card2: #111827;
  --surface-border: #334155;
  --text-primary: #f9fafb;
  --text-secondary: #dbe7fb;
  --shadow-soft: 0 12px 32px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

html {
  scroll-padding-top: calc(var(--site-header-h) + 0.75rem);
}

body.consent-modal-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--surface-bg);
  line-height: 1.75;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-lg {
  width: 2.6rem;
  height: 2.6rem;
}

.text-brand-primary {
  color: #1e3a8a;
}

.text-brand-primaryHover {
  color: #1d4ed8;
}

.text-brand-accent {
  color: #0d9488;
}

.text-brand-gray {
  color: #64748b;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(1.9rem, 6vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
}

h3,
.h3-like {
  font-size: clamp(1.125rem, 2.1vw, 1.25rem);
}

p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

ul,
ol {
  color: var(--text-secondary);
}

.editorial-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.65rem;
}

.editorial-list li {
  padding-left: 0.25rem;
  margin-bottom: 0.45rem;
}

.editorial-block>.editorial-list {
  margin-left: 1.65rem;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.max-6 {
  max-width: 72rem;
}

.max-5 {
  max-width: 64rem;
}

.max-3 {
  max-width: 48rem;
}

.section {
  padding: 2.5rem 0;
}

.section-lg {
  padding: 2.5rem 0 3.5rem;
}

.section-block {
  padding-top: 1.8rem;
}

.narrow {
  max-width: 760px;
}

.space-y>p {
  margin-bottom: 1rem;
}

.section-shell {
  padding: 2.5rem 0;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-lead {
  margin: 0;
}

.with-divider {
  border-top: 1px solid var(--surface-border);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.7rem;
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html.dark .eyebrow {
  color: #93c5fd;
}

.lead {
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.small,
.small-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.small-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--surface-border);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
}

html.dark .site-header {
  background: rgba(11, 18, 32, 0.92);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.35rem;
  background: var(--brand-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brand-icon .icon {
  width: 1rem;
  height: 1rem;
  color: #ffffff;
}

.brand-wordmark {
  font-size: 1.12rem;
  line-height: 1;
  font-weight: 700;
}

.brand-wordmark-dark {
  display: none;
}

html.dark .brand-wordmark-light {
  display: none;
}

html.dark .brand-wordmark-dark {
  display: inline;
}

.brand-wordmark-light .brand-grade {
  color: #0f172a;
  font-weight: 500;
}

.brand-wordmark-dark .brand-grade {
  color: #f9fafb;
  font-weight: 500;
}

.brand-grade {
  font-weight: 500;
}

.brand-precision {
  color: var(--brand-primary);
  font-weight: 700;
}

html.dark .brand-precision {
  color: #93c5fd;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--brand-primary);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.28rem 0.34rem;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.theme-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  width: 2.8rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-card2);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.2rem;
}

.theme-icon {
  width: 0.66rem;
  height: 0.66rem;
  display: inline-flex;
  color: var(--text-secondary);
  z-index: 1;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.11rem;
  left: 0.12rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: #ffffff;
  transition: transform 0.2s ease;
}

.theme-toggle-input:checked+.theme-toggle-track .theme-toggle-thumb {
  transform: translateX(1.31rem);
}

.theme-toggle-input:checked+.theme-toggle-track .theme-icon-moon,
.theme-toggle-input:not(:checked)+.theme-toggle-track .theme-icon-sun {
  color: var(--brand-primary);
}

.theme-toggle-input:focus-visible+.theme-toggle-track {
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.3);
}

html.dark .theme-toggle-thumb {
  background: #0f172a;
  border-color: #475569;
}

html.dark .theme-toggle-track {
  border-color: #475569;
}

.page-main {
  padding-bottom: 2rem;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.preview-stack {
  display: grid;
  gap: 0.8rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.section-head a {
  text-decoration: none;
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:focus-visible,
.theme-toggle:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.3);
}

.btn-primary,
.btn.primary {
  background: var(--brand-primary);
  color: #fff;
}

.btn-primary:hover,
.btn.primary:hover {
  background: var(--brand-primary-hover);
  color: #fff;
}

.btn-secondary,
.btn.secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--surface-border);
}

.btn-secondary:hover,
.btn.secondary:hover {
  background: var(--surface-card2);
}

html.dark .btn-secondary,
html.dark .btn.secondary {
  border-color: #475569;
  color: #f8fafc;
}

html.dark .btn-secondary:hover,
html.dark .btn.secondary:hover {
  background: #162135;
  border-color: #64748b;
}

.learn-parent-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  margin: 1.5rem 0 0;
  padding: 1.2rem;
  border: 1px solid rgba(30, 58, 138, 0.18);
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.learn-parent-cta::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand-primary);
}

.learn-parent-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.learn-parent-cta p {
  margin-bottom: 0.45rem;
}

.learn-parent-cta p:last-child {
  margin-bottom: 0;
}

.learn-parent-cta-eyebrow {
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.learn-parent-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  min-width: min(100%, 20rem);
}

html.dark .learn-parent-cta {
  background: linear-gradient(180deg, #111c31 0%, #0f1d38 100%);
  border-color: #334155;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

html.dark .learn-parent-cta::before {
  background: #93c5fd;
}

html.dark .learn-parent-cta-eyebrow {
  color: #93c5fd;
}

.btn.tertiary {
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  text-decoration: underline;
  padding-inline: 0;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-2xl);
  padding: 1rem;
}

.module-card {
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.inset-card {
  background: var(--surface-card2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-2xl);
  padding: 1rem;
}

.card-hover {
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

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

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

.list-rows {
  display: grid;
  grid-template-columns: 1fr;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--surface-border);
}

.list-row-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.list-row-icon {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

html.dark .list-row-icon {
  color: #93c5fd;
  border-color: #475569;
  background: #0f1d38;
}

.list-row-title {
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
}

.list-row-desc {
  margin: 0;
  font-size: 0.95rem;
}

.list-row-cta {
  flex: 0 0 auto;
}

.input-group {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.input-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.input-field,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  color: var(--text-primary);
  font: inherit;
  padding: 0.75rem 1rem;
}

html.dark .input-field,
html.dark input,
html.dark textarea,
html.dark select {
  border-color: #475569;
}

.static-field {
  pointer-events: none;
  color: var(--text-primary);
}

.form-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.form-field span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.row-block {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  background: var(--surface-card2);
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.row-item {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 0.6rem;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

.toggle-row span {
  color: var(--text-primary);
}

.tool-header {
  margin-bottom: 1rem;
}

.tool-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tool-title h1 {
  margin: 0;
}

.tool-title-icon {
  color: var(--brand-primary);
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  margin-top: 0.12rem;
}

@media (max-width: 640px) {
  .tool-page .tool-title {
    display: block;
  }

  .tool-page .tool-title-icon {
    display: none;
  }

  .learn-parent-cta {
    grid-template-columns: 1fr;
  }

  .learn-parent-cta-actions {
    justify-content: flex-start;
  }
}
