:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #1d2433;
  --muted: #667085;
  --line: #dce4f0;
  --primary: #2563eb;
  --primary-soft: #e5efff;
  --green: #17865f;
  --yellow: #f3b61f;
  --pink: #d9578f;
  --shadow: 0 20px 45px rgba(40, 63, 104, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 38%, #ffffff 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #19a7ce);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link,
.submit-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link {
  padding: 0 14px;
  color: var(--muted);
}

.nav-link:hover {
  color: var(--primary);
}

.submit-link,
.ghost-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(50, 72, 108, 0.08);
}

.submit-link:hover,
.ghost-button:hover {
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
  width: min(1180px, 100%);
  margin: 64px auto 28px;
  gap: 24px;
}

.hero-copy {
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 255, 0.95)),
    url("data:image/svg+xml,%3Csvg width='720' height='360' viewBox='0 0 720 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23b7c9e9' stroke-width='1'%3E%3Cpath d='M48 72h144v72H48zM248 40h184v96H248zM488 82h140v64H488zM96 220h180v68H96zM344 196h116v92H344zM512 212h128v60H512z'/%3E%3Cpath d='M192 108h56M432 88h56M276 254h68M460 242h52M150 144v76M570 146v66'/%3E%3C/g%3E%3Cg fill='%232563eb' fill-opacity='.12'%3E%3Ccircle cx='192' cy='108' r='8'/%3E%3Ccircle cx='248' cy='108' r='8'/%3E%3Ccircle cx='432' cy='88' r='8'/%3E%3Ccircle cx='488' cy='88' r='8'/%3E%3Ccircle cx='276' cy='254' r='8'/%3E%3Ccircle cx='344' cy='254' r='8'/%3E%3Ccircle cx='460' cy='242' r='8'/%3E%3Ccircle cx='512' cy='242' r='8'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: min(58%, 520px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.search-panel {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  width: min(680px, 100%);
  margin-top: 32px;
  padding: 12px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 35px rgba(42, 74, 126, 0.1);
}

.search-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--primary);
}

.search-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.search-panel input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), #ffffff),
    repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0 12px, transparent 12px 24px);
  box-shadow: var(--shadow);
}

.card-kicker {
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.hero-card h2 {
  margin: 0;
  font-size: 28px;
}

.hero-card p {
  min-height: 72px;
  margin: 10px 0 22px;
  color: var(--muted);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stats-band div {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.stats-band div:last-child {
  border-right: 0;
}

.stats-band strong {
  display: block;
  font-size: 26px;
}

.stats-band span {
  color: var(--muted);
  font-size: 14px;
}

.ad-strip,
.content-shell,
.article-teaser,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.ad-strip {
  margin-top: 24px;
}

.article-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f3f8ff);
}

.article-teaser h2 {
  margin: 0;
  font-size: 28px;
}

.article-teaser p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.ad-slot {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 18px;
  border: 1px dashed #9fb4d7;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(229, 239, 255, 0.78), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(37, 99, 235, 0.04) 12px 24px);
  color: #315170;
  text-align: center;
}

.ad-slot span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.ad-slot strong {
  margin-top: 4px;
  font-size: 18px;
}

.ad-slot small {
  margin-top: 4px;
  color: var(--muted);
}

.content-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.sidebar,
.tool-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.sidebar {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.sidebar-heading,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sidebar-heading {
  margin-bottom: 14px;
  font-weight: 800;
}

.sidebar-heading button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.category-button:hover,
.category-button.is-active {
  border-color: rgba(37, 99, 235, 0.18);
  background: var(--primary-soft);
  color: var(--primary);
}

.category-button span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.ad-slot-side {
  min-height: 250px;
  margin-top: 18px;
}

.tool-section {
  padding: 24px;
}

.section-head {
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 30px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.sort-control select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.active-filter {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.tool-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 238px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 32px rgba(49, 75, 118, 0.12);
}

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
}

.tool-category {
  max-width: 116px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f5fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #315170;
  font-size: 12px;
  font-weight: 700;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--text);
  font-weight: 800;
}

.tool-link:hover {
  background: var(--primary);
  color: #ffffff;
}

.ad-slot-inline {
  margin-top: 18px;
}

.empty-state {
  margin: 24px 0 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 44px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--primary);
  font-weight: 800;
}

.article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
}

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

.articles-hero {
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  box-shadow: var(--shadow);
}

.articles-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.articles-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.article-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.article-category-pills a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.article-group {
  margin-top: 28px;
  padding-top: 8px;
}

.article-group > .section-head {
  margin-bottom: 14px;
}

.article-group > .section-head > span {
  color: var(--muted);
  font-weight: 800;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 248px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.article-card > span,
.article-meta span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.article-card h3 {
  margin: 14px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.article-card h3 a:hover,
.article-card-footer a:hover,
.breadcrumb a:hover {
  color: var(--primary);
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-card-footer a {
  color: var(--primary);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.article-page {
  max-width: 860px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.article-page h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.article-page h2 {
  margin: 34px 0 12px;
  font-size: 24px;
}

.article-page p {
  margin: 0 0 16px;
  color: #344054;
  font-size: 17px;
  line-height: 1.85;
}

.article-page .article-summary {
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f5f8ff;
  color: var(--text);
}

.article-related {
  max-width: 860px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.article-related h2 {
  margin: 0 0 8px;
}

.article-related p {
  margin: 0 0 16px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
    .content-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 42px;
  }

  .hero-copy {
    padding: 34px;
    background-size: 70%;
  }

  .hero-card {
    min-height: auto;
  }

  .sidebar {
    position: static;
  }

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

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

@media (max-width: 680px) {
  .site-header {
    padding: 18px;
  }

  .topbar,
    .section-head,
    .article-topbar,
    .article-teaser,
    .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-link,
  .submit-link {
    min-height: 36px;
    padding: 0 10px;
    font-size: 14px;
  }

  .hero {
    width: 100%;
    margin-top: 30px;
  }

  .hero-copy {
    padding: 24px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 255, 0.96));
  }

  .hero-text {
    font-size: 15px;
  }

  .stats-band,
  .ad-strip,
    .content-shell,
    .article-teaser,
    .articles-page,
    .article-shell,
    .article-topbar,
    .site-footer {
    width: calc(100% - 36px);
  }

  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-band div:last-child {
    border-bottom: 0;
  }

  .category-list,
  .tool-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .tool-section {
    padding: 18px;
  }

  .articles-hero,
  .article-page {
    padding: 24px;
  }
}
