:root {
  --bg: #f6f7fb;
  --bg-elevated: rgba(255, 255, 255, 0.84);
  --surface: #ffffff;
  --surface-2: #edf1f7;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #7c3aed;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --radius-sm: 16px;
  --container: 1180px;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Newsreader", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "JetBrains Mono-f953c794b93d5540", "JetBrains Mono-f953c794b93d5540 fallback: Arial", sans-serif;
}

html[data-theme="dark"] {
  --bg: #07111f;
  --bg-elevated: rgba(13, 24, 40, 0.76);
  --surface: #0d1828;
  --surface-2: #14233a;
  --text: #e5eefb;
  --muted: #b3c3db;
  --muted-2: #8ca1bf;
  --line: rgba(203, 217, 237, 0.12);
  --primary: #6ea8fe;
  --primary-strong: #93c5fd;
  --accent: #a78bfa;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 82%, #ffffff 18%));
  line-height: 1.65;
  font-optical-sizing: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  transform: translateY(-200%);
  transition: transform 180ms ease;
}

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

img {
  max-width: 100%;
  display: block;
}

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

svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.narrow {
  width: min(calc(100% - 2rem), 820px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent 28%);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 0.5rem 0;
}

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

.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
  font-weight: 700;
}

.brand-logo {
  width: 3rem;
  height: 3rem;
  display: block;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  justify-self: center;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.main-nav a.is-active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.search-shell {
  position: relative;
  width: min(320px, 30vw);
  min-width: 200px;
}

.search-label {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  display: inline-flex;
}

.search-input {
  width: 100%;
  padding: 0.52rem 0.95rem 0.52rem 2.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.search-input::placeholder {
  color: var(--muted-2);
}

.search-input:focus {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.6rem);
  inset-inline: 0;
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-results[hidden] {
  display: none;
}

.search-results.is-visible {
  display: block;
}

.search-hit,
.search-empty {
  display: block;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
}

.search-hit:first-child,
.search-empty:first-child {
  border-top: 0;
}

.search-hit strong {
  display: block;
  margin-bottom: 0.18rem;
}

.search-hit span {
  display: block;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.search-hit p,
.search-empty {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.search-hit:hover {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.theme-toggle {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.theme-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: inline-flex;
}

.hero,
.page-header,
.section {
  padding: 2rem 0 1rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: stretch;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 5.1rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.08;
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 62ch;
  font-weight: 500;
}

.hero-copy,
.page-copy {
  color: var(--muted);
  max-width: 65ch;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.metric-card,
.card,
.single-card,
.taxonomy-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff 8%), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  overflow: hidden;
}

.metric-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.metric-card strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.metric-card-media {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 82%, #dbe7fb 18%), color-mix(in srgb, var(--surface) 86%, #eef4ff 14%));
}

.metric-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metric-card-copy {
  padding: 1.15rem 1.25rem 1.2rem;
}

.cta-row,
.tag-row,
.share-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.tag-row {
  margin-top: 0rem;
  margin-bottom: 0.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
}

.button:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.section-muted {
  background: color-mix(in srgb, var(--surface-2) 44%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.4rem;
}

.section-heading>p {
  max-width: 40ch;
  color: var(--muted);
  margin: 0;
}

.card-grid,
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.card-body,
.single-card {
  padding: 1.35rem;
}

.article-card .card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card h3 {
  margin-bottom: 0.6rem;
}

.article-card p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.article-card .text-link {
  margin-top: auto;
  align-self: flex-end;
  justify-content: flex-end;
  font-size: 1rem;
}

.meta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.meta-pill {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  color: var(--muted);
  font-size: 0.86rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary);
  font-weight: 600;
}

.inline-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
}

.single-card.prose h2,
.single-card.prose h3 {
  margin-top: 1.8rem;
}

.single-card.prose p,
.single-card.prose li {
  color: var(--muted);
}

.single-card.prose ul,
.single-card.prose ol {
  padding-left: 1.2rem;
}

.taxonomy-block {
  margin-top: 1.2rem;
}

.taxonomy-block strong {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.taxonomy-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  align-items: center;
}

.taxonomy-card span {
  color: var(--muted);
}

.pagination {
  margin-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
}

.site-footer {
  padding-top: 4rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.footer-brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.footer-list li+li {
  margin-top: 0.55rem;
}

.footer-list a:hover,
.social-row a:hover {
  color: var(--text);
}

.social-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 1rem;
}

.social-row a {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
  padding: 1rem 0 2rem;
  font-size: 0.92rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.4rem;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.form-field label {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.form-field.is-required label::after {
  content: " *";
  color: #dc2626;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.contact-form.was-validated .form-field input:invalid,
.contact-form.was-validated .form-field textarea:invalid,
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.field-error {
  color: #b91c1c;
  font-size: 0.84rem;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.form-status {
  display: none;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.form-status.is-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.contact-form button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 1040px) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }

  .hero-grid,
  .footer-grid,
  .card-grid,
  .taxonomy-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {

  .hero,
  .page-header,
  .section {
    padding: 2rem 0 1rem 0;
  }

  h1 {
    max-width: 100%;
  }

  .search-shell {
    width: 100%;
    min-width: 0;
  }

  .header-actions {
    width: 100%;
  }

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