*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --plum: #6f3d7a;
  --deep-plum: #27004a;
  --lavender: #f2daff;
  --orange: #f6c68b;
  --sage: #b8d9c2;
  --blue: #aed6ea;
  --blush: #f7d7dc;
  --moon: #fffbff;
  --ink: #1c1b1f;
  --muted: #62576a;
  --line: #d9c9dc;
  --surface: #fff8fb;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--moon);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--moon);
  color: var(--deep-plum);
  box-shadow: 0 8px 24px rgba(39, 0, 74, 0.18);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

a {
  color: var(--plum);
  font-weight: 750;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 201, 220, 0.8);
  background: rgba(255, 251, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep-plum);
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--plum);
}

.articles-index,
.article {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.articles-index header,
.article article > header {
  padding: 48px 0 28px;
}

.kicker,
.meta,
.breadcrumbs {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
}

.kicker {
  color: var(--plum);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  color: var(--deep-plum);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
}

h2 {
  margin: 42px 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

h3 {
  margin: 22px 0 8px;
  font-size: 1.2rem;
}

.lede {
  color: var(--muted);
  font-size: 1.13rem;
}

.byline {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.article-list {
  list-style: none;
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 16px 0 0;
}

.article-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.article-list h3 {
  margin: 0;
}

.article-list p {
  margin: 8px 0 0;
  color: var(--muted);
}

.article-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 0;
  margin: 1.5rem 0;
}

.article-grid li {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.article-grid a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-grid .topic {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.article-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.article-grid p {
  margin: 0;
  font-size: 0.95rem;
}

.page-foot,
.article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.breadcrumbs {
  margin-bottom: 22px;
}

article section p,
article section li {
  color: var(--muted);
}

article ul,
article ol {
  padding-left: 24px;
}

article li {
  margin: 8px 0;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--plum);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.96rem;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: var(--lavender);
  color: var(--deep-plum);
}

.hero-image {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: 18px 0;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--deep-plum);
  color: white;
  text-decoration: none;
}

.faq-section {
  margin-top: 48px;
  padding-top: 8px;
}

.faq-item {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.faq-item h3 {
  margin-top: 0;
}

.faq-item p {
  margin-bottom: 0;
}

.footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.footer a {
  text-decoration: none;
}

.footer-note {
  margin-top: 6px;
}

.contact-list {
  display: grid;
  gap: 16px;
}

.contact-list section {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.contact-list h2 {
  margin-top: 0;
}

.note-list {
  padding-left: 22px;
}

.note-list li {
  margin: 8px 0;
}

.search-form {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}

.search-form input {
  flex: 1;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.search-form button {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--deep-plum);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.search-results {
  list-style: none;
  display: grid;
  gap: 14px;
  padding: 0;
}

.search-results li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-results h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.search-results p {
  margin: 0;
  color: var(--muted);
}

.error-wrap {
  max-width: 580px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.error-wrap .code {
  margin: 0;
  color: var(--plum);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.error-wrap h1 {
  font-size: 1.5rem;
}

.error-wrap .sub {
  color: var(--muted);
}

.error-links {
  display: grid;
  gap: 0.6rem;
  max-width: 360px;
  margin: 2rem auto;
  text-align: left;
}

.error-links a {
  display: block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    justify-content: stretch;
    font-size: 0.84rem;
  }

  .nav-links a {
    white-space: normal;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    width: 100%;
  }

  .articles-index,
  .article {
    width: calc(100% - 32px);
    max-width: 860px;
    overflow-x: hidden;
    padding-top: 24px;
  }

  h1 {
    max-width: 100%;
    font-size: 2rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  h2,
  h3,
  .breadcrumbs,
  .meta {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .lede,
  .article p,
  .articles-index p,
  .article a,
  .articles-index a {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .comparison-table {
    table-layout: fixed;
    font-size: 0.84rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px 7px;
    overflow-wrap: anywhere;
  }
}
