:root {
  --ink: #14213d;
  --muted: #60708d;
  --paper: #ffffff;
  --canvas: #f4f7fb;
  --line: #dce4ef;
  --blue: #2f2aa8;
  --blue-dark: #201b78;
  --blue-soft: #eeefff;
  --orange: #e96130;
  --orange-dark: #bd3f16;
  --orange-soft: #fff0e9;
  --green: #19734a;
  --shadow: 0 16px 42px rgba(31, 45, 78, 0.09);
  --radius: 18px;
  --content: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--orange-dark); }

:focus-visible {
  outline: 3px solid rgba(233, 97, 48, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: .65rem 1rem;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 10px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  color: #fff;
  background: rgba(32, 27, 120, 0.97);
  box-shadow: 0 8px 28px rgba(24, 21, 80, 0.2);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(calc(100% - 36px), var(--content));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  flex: 0 0 auto;
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover { color: #fff; }

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--orange), #ff895f);
  box-shadow: 0 7px 18px rgba(233, 97, 48, .32);
  font-size: .88rem;
  font-weight: 900;
  letter-spacing: -.02em;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: .65rem .72rem;
  border-radius: 9px;
  color: rgba(255,255,255,.86);
  font-size: .87rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  color: #fff;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
}

.hero {
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(233, 97, 48, .34), transparent 25rem),
    linear-gradient(135deg, #272188 0%, #342cb6 58%, #5147c9 100%);
}

.hero-inner {
  width: min(calc(100% - 36px), var(--content));
  min-height: 270px;
  margin: 0 auto;
  padding: 4.25rem 0 3.7rem;
  display: grid;
  align-items: center;
}

.hero-kicker {
  margin: 0 0 .8rem;
  color: #ffcbb8;
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 760px;
  margin: 1.2rem 0 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 2vw, 1.23rem);
}

.page-shell {
  width: min(calc(100% - 36px), var(--content));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.breadcrumbs {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .85rem;
}

.breadcrumbs ol {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: .35rem;
  color: #a1acc0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.article-card,
.side-card,
.comments-card,
.dynamic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.article-card { padding: clamp(1.35rem, 4vw, 3.25rem); }

.article-content {
  overflow-wrap: anywhere;
  color: #293650;
}

.article-content > :first-child { margin-top: 0; }
.article-content > :last-child { margin-bottom: 0; }

.article-content p,
.article-content > div { margin: 0 0 1.15rem; }

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 2.2rem 0 .8rem;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.article-content h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.article-content h3 { font-size: 1.3rem; }
.article-content strong, .article-content b { color: var(--ink); }

.article-content img {
  display: block;
  margin: 1.5rem auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 33, 61, .1);
}

.article-content table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .94rem;
}

.table-scroll { overflow-x: auto; }
.error-kicker { color: var(--orange); font-size: .8rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }

.article-content th,
.article-content td,
.data-table th,
.data-table td {
  padding: .8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-content th,
.data-table th { background: var(--blue-soft); }

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--orange);
  background: var(--orange-soft);
}

.article-content iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 14px;
}

.side-stack {
  display: grid;
  gap: 1.1rem;
  position: sticky;
  top: 98px;
}

.side-card { padding: 1.25rem; }
.side-card h2 {
  margin: 0 0 .9rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

.link-list,
.popular-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li,
.popular-list li { border-top: 1px solid var(--line); }
.link-list li:first-child,
.popular-list li:first-child { border-top: 0; }

.link-list a,
.popular-list a {
  display: block;
  padding: .62rem 0;
  color: #34425e;
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.link-list a:hover,
.popular-list a:hover { color: var(--orange-dark); }

.popular-card { border-top: 4px solid var(--orange); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin: 2rem 0;
}

.category-tile {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #f4f5ff);
  font-weight: 760;
  line-height: 1.25;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-tile::before {
  content: "";
  width: 30px;
  height: 4px;
  margin-bottom: auto;
  border-radius: 999px;
  background: var(--orange);
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: #b8b5ed;
  color: var(--blue-dark);
  box-shadow: 0 12px 24px rgba(32, 27, 120, .1);
}

.promo-card {
  margin: 1.5rem 0;
  padding: 1.15rem;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid #ffd3c3;
  border-radius: 15px;
  background: var(--orange-soft);
}

.promo-card img {
  width: 110px;
  height: 110px;
  margin: 0;
  object-fit: cover;
  box-shadow: none;
}

.promo-label {
  margin: 0 0 .25rem;
  color: var(--orange-dark);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.promo-card h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
.promo-card p { margin: 0 0 .7rem; font-size: .92rem; }

.button,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.15rem;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--orange);
  font: inherit;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button[type="submit"]:hover { color: #fff; background: var(--orange-dark); }

.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; gap: .35rem; }
.form-row label { font-weight: 720; }
.form-row small { color: var(--muted); }

input, textarea, select {
  width: 100%;
  padding: .78rem .85rem;
  border: 1px solid #bec9d9;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea { min-height: 170px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }

.notice {
  margin: 1rem 0;
  padding: .85rem 1rem;
  border-radius: 11px;
  font-size: .94rem;
}
.notice-success { color: #0e603b; background: #e6f6ee; border: 1px solid #b5e3cc; }
.notice-error { color: #932c2c; background: #fff0f0; border: 1px solid #f2c0c0; }

.comments-card,
.dynamic-card { margin-top: 1.5rem; padding: clamp(1.2rem, 3vw, 2rem); }
.comments-card h2,
.dynamic-card h2 { margin-top: 0; }

.comment {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.comment:first-of-type { border-top: 0; }
.comment-meta { margin: 0 0 .45rem; color: var(--muted); font-size: .83rem; }
.comment-body { margin: 0; white-space: pre-wrap; }
.comment-reply { margin: .8rem 0 0 1rem; padding-left: 1rem; border-left: 3px solid var(--blue); }

.pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination a { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.metric { padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: #f8faff; }
.metric-label { color: var(--muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; }
.metric-value { display: block; margin-top: .25rem; font-size: 1.25rem; font-weight: 850; }

.site-footer {
  color: rgba(255,255,255,.78);
  background: #151342;
}

.footer-inner {
  width: min(calc(100% - 36px), var(--content));
  margin: 0 auto;
  padding: 2.6rem 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2,
.site-footer h3 { margin: 0 0 .7rem; color: #fff; font-size: 1rem; }
.site-footer p { margin: 0; font-size: .9rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: rgba(255,255,255,.82); font-size: .9rem; text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-bottom {
  width: min(calc(100% - 36px), var(--content));
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,.13);
  font-size: .82rem;
}

@media (max-width: 1020px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 18px;
    right: 18px;
    padding: .7rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: var(--blue-dark);
    box-shadow: var(--shadow);
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; }
  .site-nav a { padding: .8rem; }
  .content-grid { grid-template-columns: 1fr; }
  .side-stack { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .header-inner { width: min(calc(100% - 24px), var(--content)); min-height: 68px; }
  .brand-text { max-width: 205px; font-size: .88rem; }
  .hero-inner { width: min(calc(100% - 28px), var(--content)); min-height: 220px; padding: 3.2rem 0 2.8rem; }
  .page-shell { width: min(calc(100% - 24px), var(--content)); padding-top: 1.4rem; }
  .article-card { border-radius: 14px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-stack, .footer-inner, .metric-grid { grid-template-columns: 1fr; }
  .promo-card { grid-template-columns: 1fr; }
  .promo-card img { width: 100%; height: 170px; }
  .article-content iframe { min-height: 220px; }
}

@media print {
  .site-header, .side-stack, .site-footer, .comments-card { display: none !important; }
  body { color: #000; background: #fff; }
  .page-shell { width: 100%; padding: 0; }
  .content-grid { display: block; }
  .article-card { border: 0; box-shadow: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
}
