:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #14181f;
  --muted: #5f6b7a;
  --line: #e3e6eb;
  --accent: #c8102e;
  --accent-ink: #a30d25;
  --accent-soft: #fdecee;
  --ok: #17724a;
  --ok-soft: #e7f5ee;
  --mark: #fff0a8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,24,31,.05), 0 4px 16px rgba(20,24,31,.05);
  --shadow-lg: 0 2px 4px rgba(20,24,31,.06), 0 12px 32px rgba(20,24,31,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 3px; }
[hidden] { display: none !important; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 800; }
.brand-sub { color: var(--accent); margin-left: -4px; }

.search-wrap { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.search-input {
  width: 100%; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }

.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  max-height: 70vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.result-group { padding: 8px; border-bottom: 1px solid var(--line); }
.result-group:last-child { border-bottom: 0; }
.result-group h4 { margin: 0; padding: 6px 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.result-item { display: block; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; border-radius: 8px; }
.result-item:hover, .result-item:focus { background: var(--bg); outline: none; }
.result-item strong { display: block; font-size: 15px; }
.result-item span { display: block; font-size: 13px; color: var(--muted); }
.result-empty { padding: 16px; color: var(--muted); }

/* Tabs */
.tabs-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  position: relative; background: none; border: 0; padding: 10px 16px 12px;
  font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }

/* Layout */
main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; }
.panel-head { margin-bottom: 20px; }
.panel-head h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; line-height: 1.2; }
.panel-head p { margin: 0; color: var(--muted); }

/* Hero */
.hero { margin-bottom: 28px; }
.hero h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.15; letter-spacing: -.025em; max-width: 24ch; }
.hero p { margin: 0 0 24px; color: var(--muted); max-width: 60ch; font-size: 17px; }
.glance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.glance > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.glance strong { font-size: 30px; line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.glance span { font-size: 13.5px; line-height: 1.35; color: var(--muted); }

/* FAQ cards */
.myth-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.myth {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s;
}
.myth:hover { box-shadow: var(--shadow-lg); }
.myth.open { border-color: #c9ced6; }
.myth-head { width: 100%; text-align: left; background: none; border: 0; padding: 20px 22px; display: block; position: relative; }
.myth-q { margin: 0 0 8px; padding-right: 28px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
.myth-a { margin: 0; color: var(--ink); font-size: 15.5px; }
.short {
  display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  vertical-align: 1px;
}
.myth-more { position: absolute; top: 20px; right: 20px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.myth-more::before, .myth-more::after { content: ""; position: absolute; left: 6px; top: 11px; width: 12px; height: 2px; background: var(--muted); border-radius: 1px; transition: transform .2s; }
.myth-more::after { transform: rotate(90deg); }
.myth.open .myth-more::after { transform: rotate(0); }
.myth-body { display: none; padding: 0 22px 20px; border-top: 1px solid var(--line); margin: 0; padding-top: 16px; }
.myth.open .myth-body { display: block; }
.myth-body p { margin: 0 0 12px; color: var(--muted); }
.quote {
  margin: 0 0 10px; padding: 12px 16px;
  background: var(--bg); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  font-size: 15px;
}
.quote cite { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-style: normal; font-weight: 600; }
.more-link { margin: 28px 0 0; color: var(--muted); }

/* Toolbars */
.toolbar { display: grid; gap: 14px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 14px; font-weight: 500; transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar-actions { display: flex; align-items: center; gap: 16px; }
.spacer { flex: 1; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.count { font-size: 14px; color: var(--muted); }

/* Rules */
.rule-list { display: block; }
.rule-cat { margin: 28px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.rule-cat:first-child { margin-top: 0; }
.rule {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 8px; box-shadow: var(--shadow);
}
.rule.flash { outline: 3px solid var(--accent); }
.rule-q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 14px 18px; display: flex; justify-content: space-between; gap: 16px;
  font-weight: 600;
}
.rule-q::after { content: "+"; flex: none; font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--muted); }
.rule.open .rule-q::after { content: "\2212"; }
.rule-a { display: none; padding: 0 18px 16px; color: #2c333d; }
.rule.open .rule-a { display: block; }
.rule-a p, .rule-a ul, .rule-a ol { margin: 0 0 10px; }
.rule-a ul, .rule-a ol { padding-left: 22px; }
.rule-a li { margin-bottom: 4px; }
.rule-a .src { font-size: 13px; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Table */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.card-table th, .card-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.card-table th { background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.card-table tbody tr:hover { background: #fafbfc; }
.card-table tr:last-child td { border-bottom: 0; }
.card-table td:nth-child(1) { color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.card-table td:nth-child(2) { font-weight: 600; }
.card-table td:nth-child(3), .card-table td:nth-child(4) { white-space: nowrap; }

/* Sources */
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 720px; }
.source-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.source-list strong { display: block; }
.source-list span { font-size: 13px; color: var(--muted); }
.btn {
  padding: 9px 18px; border-radius: 999px; background: var(--ink); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--accent); }

.footer { max-width: 1120px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Responsive */
@media (max-width: 860px) {
  .glance { grid-template-columns: repeat(2, 1fr); }
  .myth-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 620px) {
  .header-inner { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .search-wrap { max-width: none; flex-basis: 100%; order: 3; }
  .tabs-inner { padding: 0 8px; }
  main { padding: 24px 14px 40px; }
  .brand { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }
