:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --ink: #151512;
  --muted: #5c625c;
  --line: #d9ddd2;
  --surface: #ffffff;
  --accent: #e64a2e;
  --accent-dark: #ba321c;
  --olive: #52613b;
  --sky: #dbe9f0;
  --shadow: 0 16px 45px rgba(21, 21, 18, 0.1);
}

:root.dark {
  color-scheme: dark;
  --bg: #10120f;
  --ink: #f3f2ea;
  --muted: #b6bba9;
  --line: #33382d;
  --surface: #181b16;
  --accent: #ff6547;
  --accent-dark: #ff8a73;
  --olive: #c5d796;
  --sky: #26343a;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(21, 21, 18, 0.08);
  background: rgba(247, 247, 242, 0.92);
  backdrop-filter: blur(14px);
}

:root.dark .site-header {
  background: rgba(16, 18, 15, 0.92);
}

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

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

.brand,
.nav-links,
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-tools {
  gap: 0.6rem;
}

.brand {
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  color: var(--muted);
  font-weight: 650;
}

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

.nav-cta {
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink) !important;
}

.language-label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.language-select,
.theme-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.language-select {
  min-width: 8.4rem;
  padding: 0 0.55rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  cursor: pointer;
}

.hero {
  min-height: calc(100dvh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 4rem;
  padding: 4rem 0 5rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.2rem;
}

.hero-text,
.page-head p,
.footer p,
.card p,
.split-section li,
.guide-steps p {
  color: var(--muted);
}

.hero-text {
  max-width: 620px;
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 1.1rem;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: white;
}

:root.dark .secondary {
  background: var(--surface);
}

.hero-panel,
.card,
.guide-steps article,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.25rem;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-top span {
  color: var(--muted);
}

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

.category-grid a {
  min-height: 88px;
  display: grid;
  align-content: end;
  gap: 0.25rem;
  border-radius: 6px;
  padding: 0.9rem;
  background: var(--sky);
  color: #1b323c;
  font-weight: 800;
}

.category-grid small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.category-grid a:nth-child(2n) {
  background: #e7ead8;
  color: var(--olive);
}

:root.dark .category-grid a:nth-child(2n) {
  background: #27301f;
}

.section,
.split-section,
.page {
  padding: 4.5rem 0;
}

.compact-section {
  padding-top: 3rem;
}

.section-head {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

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

.card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem;
}

.card span {
  width: fit-content;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: #edf1e2;
  color: var(--olive);
  font-size: 0.78rem;
  font-weight: 800;
}

:root.dark .card span {
  background: #22281d;
}

.card strong {
  margin-top: auto;
}

.card a {
  color: var(--accent-dark);
  font-weight: 800;
}

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

.home-articles {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}

.article-card span,
.article-meta span {
  width: fit-content;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: #edf1e2;
  color: var(--olive);
  font-size: 0.78rem;
  font-weight: 800;
}

:root.dark .article-card span,
:root.dark .article-meta span {
  background: #22281d;
}

.article-card h2,
.article-card h3 {
  margin-bottom: 0;
}

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

.article-card p {
  color: var(--muted);
}

.article-card small {
  margin-top: auto;
  color: var(--accent-dark);
  font-weight: 800;
}

.article-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}

.article-body {
  max-width: 820px;
}

.article-intro {
  color: var(--muted);
  font-size: 1.2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 2rem;
}

.article-body section {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.article-body section p,
.article-cta p {
  color: var(--muted);
}

.article-cta,
.related-articles {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.25rem;
}

.related-articles {
  height: fit-content;
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.8rem;
}

.related-articles h2 {
  font-size: 1.35rem;
}

.related-articles a {
  display: grid;
  gap: 0.25rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.related-articles span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 3rem;
  border-top: 1px solid var(--line);
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  min-height: 54px;
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  background: white;
}

:root.dark .check-list li {
  background: var(--surface);
}

.page-head {
  max-width: 780px;
  margin-bottom: 2rem;
}

.page-head .button {
  margin-top: 1rem;
}

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef1e7;
  font-size: 0.85rem;
}

:root.dark th {
  background: #22281d;
}

td a {
  color: var(--accent-dark);
  font-weight: 800;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.guide-steps article {
  padding: 1.25rem;
}

.guide-steps span {
  color: var(--accent-dark);
  font-weight: 900;
}

.seo-head {
  padding-top: 2rem;
}

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

.seo-block,
.faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 1.25rem;
}

:root.dark .seo-block,
:root.dark .faq {
  background: var(--surface);
}

.seo-block h2,
.faq h2 {
  font-size: 1.45rem;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.keyword-cloud a,
.keyword-cloud span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.85rem;
  background: #fbfcf7;
  color: var(--muted);
  font-weight: 750;
}

:root.dark .keyword-cloud a,
:root.dark .keyword-cloud span {
  background: #22281d;
}

.keyword-cloud.large a {
  min-height: 48px;
  background: white;
  color: var(--ink);
}

:root.dark .keyword-cloud.large a {
  background: var(--surface);
}

.faq {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

details {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 850;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer a {
  min-height: 44px;
  color: var(--accent-dark);
  font-weight: 800;
}

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

  .nav-tools {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero,
  .split-section,
  .cards,
  .page-cards,
  .guide-steps,
  .seo-grid,
  .article-grid,
  .home-articles,
  .article-page {
    grid-template-columns: 1fr;
  }

  .related-articles {
    position: static;
  }

  .hero {
    min-height: auto;
    gap: 2rem;
    padding-top: 3rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
