:root {
  --brand-red: #ed1b35;
  --brand-red-dark: #b90022;
  --brand-gold: #ffb000;
  --ink: #202124;
  --muted: #676b73;
  --surface: #ffffff;
  --canvas: #f4f4f4;
  --line: #e5e7eb;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, Arial, Helvetica, sans-serif; line-height: 1.72; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.site-shell { width: min(100% - 28px, 1180px); max-width: 1180px; margin-inline: auto; }
.skip-link { position: fixed; left: 14px; top: -80px; z-index: 100; padding: 10px 14px; background: #fff; color: var(--brand-red); font-weight: 800; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 4px 18px rgba(20, 20, 24, 0.09); }
.brand-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--brand-red); font-size: clamp(1.8rem, 5vw, 2.55rem); font-weight: 950; letter-spacing: -0.06em; }
.brand span { color: #16181d; }
.menu-toggle { min-width: 44px; min-height: 44px; border: 1px solid #f4a2ae; border-radius: 8px; background: #fff; color: var(--brand-red); font-size: 1.2rem; cursor: pointer; }
.category-strip { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: thin; background: var(--brand-red); }
.category-strip a { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 15px; color: #fff; font-size: 0.88rem; font-weight: 850; white-space: nowrap; }
.category-strip a:hover, .category-strip a[aria-current="page"] { background: var(--brand-red-dark); }
.breadcrumb { display: flex; gap: 8px; align-items: center; margin: 18px 0; color: var(--muted); font-size: 0.9rem; }
.breadcrumb a { color: var(--brand-red); font-weight: 800; }

.category-hero { position: relative; overflow: hidden; background: linear-gradient(125deg, #8c0018, var(--brand-red) 56%, #ff9d00); color: #fff; }
.category-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: 5%; top: -90px; border: 34px solid rgba(255, 255, 255, 0.11); border-radius: 50%; }
.category-hero .site-shell { position: relative; z-index: 2; padding-block: clamp(42px, 8vw, 88px); }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--brand-gold); font-size: 0.75rem; font-weight: 950; letter-spacing: 0.13em; text-transform: uppercase; }
.category-hero h1 { max-width: 880px; margin: 0; font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: 1.04; letter-spacing: -0.045em; }
.category-hero p:last-child { max-width: 760px; margin: 18px 0 0; color: #fff7f3; font-size: clamp(1rem, 2vw, 1.18rem); }

.category-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-block: 15px; }
.category-shortcut { position: relative; min-width: 0; min-height: 76px; display: grid; place-items: center; align-content: center; gap: 1px; padding: 8px 4px; border: 1px solid #ffd0d7; border-radius: 9px; background: #fff; text-align: center; }
.category-shortcut > span { color: var(--brand-red); font-size: 1.1rem; line-height: 1; }
.category-shortcut strong { max-width: 100%; overflow: hidden; font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.category-shortcut small { position: absolute; top: 4px; right: 5px; color: #a6a8ad; font-size: 0.58rem; }
.category-shortcut.is-active { background: #fff0f2; border-color: var(--brand-red); }

.content-shell { display: grid; gap: 22px; padding-block: 12px 100px; }
.page-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); background: #fff; }
.page-toc strong { color: var(--brand-red); }
.page-toc a { padding: 4px 9px; background: #f3f4f6; font-size: 0.82rem; font-weight: 750; }
.anchor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.anchor-card, .related-card { min-width: 0; min-height: 112px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; border: 1px solid var(--line); background: #fff; }
.anchor-card small, .related-card small { color: var(--brand-red); font-weight: 900; }
.anchor-card strong, .related-card strong { margin: 3px 0; overflow-wrap: anywhere; }
.anchor-card span, .related-card span { color: var(--muted); font-size: 0.82rem; }
.content-section, .faq-section, .related-section, .responsible-note { margin-top: 16px; padding: clamp(22px, 4.6vw, 42px); border: 1px solid var(--line); background: #fff; }
.content-section h2, .faq-section h2, .related-section h2, .responsible-note h2 { margin: 0 0 13px; color: #17191e; font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.2; }
.content-section p { color: #454851; }
.provider-section {
  position: relative;
  overflow: hidden;
  border-left: 6px solid var(--brand-red);
  box-shadow: 0 12px 30px rgba(24, 24, 28, 0.06);
}
.provider-section::after {
  content: "LIVE";
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff0f2;
  color: var(--brand-red);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}
.provider-section .check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.check-list { margin: 18px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin-top: 9px; padding-left: 25px; color: #383b43; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-red); font-weight: 950; }
.responsible-note { color: #fff; background: linear-gradient(125deg, #1a1c22, #2d1118); border-color: #5d2730; }
.responsible-note h2, .responsible-note p { color: #fff; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item button { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 850; text-align: left; cursor: pointer; }
.faq-answer { display: none; padding: 0 0 15px; color: var(--muted); }
.faq-item.is-open .faq-answer { display: block; }
.related-grid { display: grid; gap: 10px; }
.reading-aside { display: none; padding: 20px; border-top: 5px solid var(--brand-red); background: #fff; }
.reading-aside strong { display: block; margin-bottom: 9px; color: var(--brand-red); }
.reading-aside a { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; font-weight: 750; }
.reading-aside hr { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.reading-aside p { color: var(--muted); font-size: 0.9rem; }

.site-footer { background: #14161b; color: #e9e9e9; }
.site-footer .site-shell { display: grid; gap: 8px; padding-block: 30px 94px; }
.site-footer strong { color: #fff; font-size: 1.6rem; }
.site-footer p { max-width: 760px; margin: 0; color: #b9bbc2; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); min-height: calc(68px + var(--safe-bottom)); padding-bottom: var(--safe-bottom); border-top: 1px solid #ead4d8; background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(16px); }
.bottom-nav a { min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #5d6068; font-size: 0.7rem; }
.bottom-nav span { color: var(--brand-red); font-size: 1rem; }
.back-to-top { position: fixed; right: 14px; bottom: calc(82px + var(--safe-bottom)); z-index: 46; width: 46px; min-height: 46px; border: 0; border-radius: 50%; background: var(--brand-red); color: #fff; font-size: 1.1rem; opacity: 0; pointer-events: none; transform: translateY(8px); transition: 160ms ease; cursor: pointer; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

@media (min-width: 700px) {
  .category-shortcuts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .anchor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .menu-toggle, .bottom-nav { display: none; }
  .brand-row { min-height: 84px; }
  .category-strip { justify-content: center; }
  .content-shell { grid-template-columns: minmax(0, 1fr) 290px; padding-bottom: 70px; }
  .reading-aside { display: block; position: sticky; top: 152px; }
  .site-footer .site-shell { padding-bottom: 34px; }
  .back-to-top { bottom: 22px; }
}

@media (max-width: 420px) {
  .site-shell { width: min(100% - 20px, 1180px); }
  .category-strip a { padding-inline: 12px; }
  .category-hero::after { right: -120px; }
  .content-section, .faq-section, .related-section, .responsible-note { padding: 21px 18px; }
  .provider-section { border-left-width: 4px; }
  .provider-section::after { position: static; display: inline-block; margin: 0 0 12px; }
  .provider-section .check-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
