:root {
  --ink: #343a40;
  --ink-deep: #282d32;
  --muted: #68717d;
  --line: #e3e5e8;
  --soft: #f7f7f8;
  --brand: #ed698e;
  --brand-dark: #cf476f;
  --brand-soft: #fff2f6;
  --white: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0, #fbfbfc 100%);
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(237, 105, 142, .42);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1220px;
  margin: auto;
  padding: 0 28px;
}

.site-header::before {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: var(--brand);
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 148px;
  height: auto;
}

.brand-help {
  padding-left: 15px;
  border-left: 1px solid var(--line);
  color: #555e68;
  font-size: 15px;
  font-weight: 650;
}

.back-link {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}

.back-link:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.hero,
.compact-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 14%, rgba(237, 105, 142, .32), transparent 27%),
    linear-gradient(135deg, var(--ink-deep), #41484f);
}

.hero::before,
.compact-hero::before {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  bottom: -295px;
  border: 44px solid rgba(255, 255, 255, .055);
  border-radius: 50%;
  content: "";
}

.hero::after,
.compact-hero::after {
  position: absolute;
  width: 270px;
  height: 270px;
  right: 7%;
  top: -210px;
  border: 40px solid rgba(237, 105, 142, .18);
  border-radius: 50%;
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: auto;
  padding: 86px 28px 94px;
}

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

.hero .eyebrow,
.compact-hero .eyebrow { color: #ffafc5; }

.hero h1 {
  margin: 0 0 34px;
  font-size: clamp(42px, 7vw, 66px);
  line-height: 1;
  letter-spacing: -.045em;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  height: 66px;
  padding: 0 18px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(10, 13, 18, .30);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 18px 60px rgba(10, 13, 18, .3), 0 0 0 4px rgba(237, 105, 142, .17);
}

.search-box svg {
  width: 22px;
  fill: none;
  stroke: var(--brand-dark);
  stroke-width: 2;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 17px;
}

.search-box input::placeholder { color: #8d949c; }

.search-box kbd {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
}

.content-shell,
.narrow-shell {
  max-width: 1180px;
  margin: auto;
  padding: 72px 28px 100px;
}

.narrow-shell { max-width: 880px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading h2,
.search-results h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -.03em;
}

.section-heading > span {
  color: var(--muted);
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 35px rgba(52, 58, 64, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.category-card:hover {
  border-color: #f1b7c7;
  box-shadow: 0 16px 40px rgba(52, 58, 64, .075);
  transform: translateY(-2px);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 850;
}

.category-card h3 {
  margin: 1px 0 4px;
  font-size: 20px;
}

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

.category-card ul {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.category-card li a {
  display: flex;
  justify-content: space-between;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease, padding .15s ease;
}

.category-card li:last-child a { border: 0; }

.category-card li a span { color: var(--brand); }

.category-card li a:hover {
  padding-left: 5px;
  color: var(--brand-dark);
}

.compact-hero > div {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: auto;
  padding: 56px 28px;
}

.compact-hero h1 {
  margin: 0 0 24px;
  font-size: 38px;
}

.compact-hero .search-box { height: 58px; }

.result-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.result-list a {
  display: block;
  padding: 24px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding .16s ease, background .16s ease;
}

.result-list a:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--brand-soft);
}

.result-list a > span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result-list h3 {
  margin: 7px 0;
  font-size: 20px;
}

.result-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.article-shell {
  max-width: 900px;
  margin: auto;
  padding: 30px 28px 100px;
}

.breadcrumbs {
  display: flex;
  gap: 9px;
  margin: 10px 0 58px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-dark); }
.breadcrumbs span { color: var(--brand); }

.article-page > header { max-width: 760px; }

.article-page h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.article-summary {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.article-meta {
  margin-top: 20px;
  color: #899098;
  font-size: 12px;
}

.article-content {
  max-width: 760px;
  margin-top: 52px;
  font-size: 17px;
  line-height: 1.75;
}

.article-content h2 {
  margin: 48px 0 14px;
  font-size: 30px;
  letter-spacing: -.03em;
}

.article-content h3 {
  margin: 38px 0 12px;
  font-size: 23px;
}

.article-content p { margin: 0 0 20px; }

.article-content a {
  color: var(--brand-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 4px 24px;
  border-left: 4px solid var(--brand);
  color: #4d555e;
}

.article-content pre {
  overflow: auto;
  padding: 20px;
  border-radius: 12px;
  color: #f5f5f5;
  background: var(--ink-deep);
}

.article-content code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .88em;
}

.article-content :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.article-content figure { margin: 32px 0; }

.article-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.layout-wide-left { grid-template-columns: 2fr 1fr; }
.layout-wide-right { grid-template-columns: 1fr 2fr; }

.article-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.article-content th,
.article-content td {
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-content tr:last-child > * { border-bottom: 0; }
.article-content tr > *:last-child { border-right: 0; }

.article-content th {
  color: var(--ink);
  background: var(--brand-soft);
}

.related {
  max-width: 760px;
  margin-top: 70px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.related h2 { margin: 0 0 16px; }

.related > a {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.related > a span { color: var(--brand); }
.related > a:hover { color: var(--brand-dark); }

.empty-state,
.not-found {
  padding: 80px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state > span,
.not-found > span {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 58px;
  border-radius: 18px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 20px;
  font-weight: 850;
}

.empty-state h2,
.not-found h1 { color: var(--ink); }

.not-found { padding: 130px 20px; }

.button {
  display: inline-block;
  margin-top: 14px;
  padding: 13px 20px;
  border-radius: 9px;
  color: var(--white);
  background: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}

.button:hover {
  background: #b93c61;
  transform: translateY(-1px);
}

footer {
  display: flex;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

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

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

@media (max-width: 720px) {
  .site-header {
    height: 72px;
    padding: 0 18px;
  }

  .brand-logo { width: 132px; }
  .brand-help, .back-link { display: none; }
  .hero-inner { padding: 62px 20px 70px; }
  .search-box { height: 58px; }
  .content-shell, .narrow-shell { padding: 50px 18px 75px; }
  .category-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .section-heading > span { display: block; margin-top: 10px; }
  .article-shell { padding: 22px 20px 70px; }
  .breadcrumbs { margin-bottom: 42px; }
  .article-content { font-size: 16px; }
  .article-layout, .layout-wide-left, .layout-wide-right { grid-template-columns: 1fr; }
  footer { margin: 0 18px; padding: 24px 0; }
}
