:root {
  --bg: #f1f1f4; --card: #ffffff; --text: #0f1419; --muted: #6b7280; --line: #e5e5ea;
  --accent: #2481cc; --accent-soft: #e8f2fb; --up: #16a34a; --down: #e5484d;
  --high: #e5484d; --high-soft: #fdecec; --medium: #d97706; --medium-soft: #fdf3e3;
  --header: #17212b; --header-text: #f5f5f5;
}
:root[data-theme="dark"] {
  --bg: #0e1621; --card: #17212b; --text: #f5f5f5; --muted: #8b9bab; --line: #243241;
  --accent: #6ab3f3; --accent-soft: #1d3346; --high-soft: #3a1d22; --medium-soft: #3a2c16;
  --header: #17212b; --header-text: #f5f5f5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }


/* header */
header { background: var(--header); color: var(--header-text); position: sticky; top: 0; z-index: 10; }
.bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; white-space: nowrap; }
.logo svg { color: #6ab3f3; }
.logo small { font-weight: 500; color: #8b9bab; }
nav.cats { display: flex; gap: 18px; font-size: 14.5px; color: #c9d4de; overflow-x: auto; scrollbar-width: none; }
nav.cats a:hover, nav.cats a.on { color: #fff; }
.tools { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.lang { display: flex; border: 1px solid #2f4153; border-radius: 8px; overflow: hidden; }
.lang a { padding: 3px 9px; color: #8b9bab; } .lang a.on { background: #2f4153; color: #fff; }
.icon-btn { background: none; border: 1px solid #2f4153; color: #c9d4de; border-radius: 8px; width: 32px; height: 28px; cursor: pointer; }
.ticker { border-top: 1px solid #243241; font-size: 13.5px; color: #c9d4de; }
.ticker .wrap { display: flex; gap: 22px; height: 34px; align-items: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.ticker b { color: #fff; font-weight: 600; margin-right: 4px; }
.up { color: var(--up); } .down { color: var(--down); }

/* layout */
main { padding: 24px 0 40px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .tools .hide-m { display: none; } }
.card { background: var(--card); border-radius: 14px; border: 1px solid var(--line); }
h2.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--high); box-shadow: 0 0 0 4px var(--high-soft); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.b-high { background: var(--high-soft); color: var(--high); }
.b-medium { background: var(--medium-soft); color: var(--medium); }
.b-cat { background: var(--accent-soft); color: var(--accent); }
.coin { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

/* home */
.lead { padding: 22px; margin-bottom: 24px; border-left: 4px solid var(--high); }
.lead h1 { font-size: 27px; line-height: 1.25; margin: 10px 0 8px; }
.lead p { margin: 0 0 12px; color: var(--muted); font-size: 16.5px; }
.react { display: flex; gap: 14px; font-size: 13.5px; }
.react span { background: var(--bg); padding: 3px 8px; border-radius: 6px; }
.feed .item { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); }
.feed .item:first-child { border-top: 0; }
.feed time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.feed h3 { margin: 6px 0 4px; font-size: 17.5px; line-height: 1.35; }
.feed h3:hover { color: var(--accent); }
.feed p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.day { padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border-top: 1px solid var(--line); }

/* sidebar */
aside > .card { padding: 18px; margin-bottom: 16px; }
.cta { background: linear-gradient(135deg, #2481cc, #17212b); color: #fff; border: 0; }
.cta h4 { margin: 0 0 6px; font-size: 18px; } .cta p { margin: 0 0 14px; font-size: 14px; color: #dbe7f2; }
.btn { display: inline-block; background: #fff; color: #17212b; font-weight: 600; padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.coins { display: flex; flex-wrap: wrap; gap: 6px; }
.coins a { padding: 5px 10px; border-radius: 8px; background: var(--bg); font-size: 13.5px; font-weight: 600; }
.coins a:hover { color: var(--accent); }
ol.toplist { margin: 0; padding-left: 18px; font-size: 14.5px; } ol.toplist li { margin-bottom: 10px; }

/* article */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; } .crumbs a { color: var(--accent); }
article.card { padding: 28px 32px; }
@media (max-width: 600px) { article.card { padding: 20px 18px; } }
article h1 { font-size: 32px; line-height: 1.22; margin: 12px 0 12px; }
.excerpt { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0 0 18px; }
.byline { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.body p { margin: 0 0 16px; font-size: 17.5px; line-height: 1.65; }
.why { background: var(--accent-soft); border-radius: 12px; padding: 16px 18px; margin: 22px 0; }
.why b { display: block; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.why p { margin: 0; font-size: 16.5px; }
.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
@media (max-width: 700px) { .boxes { grid-template-columns: 1fr; } }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.box h5 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.box a { color: var(--accent); font-weight: 600; }
table.r { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.r td, table.r th { padding: 4px 0; text-align: right; } table.r th { color: var(--muted); font-weight: 500; font-size: 13px; }
table.r td:first-child, table.r th:first-child { text-align: left; font-weight: 600; }
.note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }
.inline-cta { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px dashed var(--accent); border-radius: 12px; padding: 14px 16px; margin-top: 22px; }
.inline-cta p { margin: 0; font-size: 15px; }

footer { background: var(--header); color: #8b9bab; font-size: 13.5px; padding: 28px 0; }
footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
footer a { color: #c9d4de; display: block; margin-bottom: 6px; }
[hidden] { display: none !important; }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; height: auto; padding: 10px 16px 0; gap: 10px 16px; }
  nav.cats { order: 3; gap: 6px; padding-bottom: 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; width: calc(100% + 32px); }
  nav.cats a { flex: none; padding: 5px 11px; border-radius: 16px; background: #22303e; font-size: 13.5px; }
  nav.cats a.on { background: #2481cc; }
  aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  aside > .card { margin-bottom: 0; }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 12px; }
  .bar { padding: 8px 12px 0; }
  nav.cats { margin: 0 -12px; padding-left: 12px; padding-right: 12px; width: calc(100% + 24px); }
  .logo { font-size: 17px; } .logo svg { width: 22px; height: 22px; }
  .ticker .wrap { gap: 16px; height: 30px; font-size: 12.5px; }
  main { padding: 14px 0 80px; }
  .grid { gap: 18px; }
  .lead { padding: 16px; margin-bottom: 18px; border-radius: 12px; }
  .lead h1 { font-size: 21px; }
  .lead p { font-size: 15px; }
  .react { flex-wrap: wrap; gap: 6px; }
  .feed .item { grid-template-columns: 1fr; gap: 4px; padding: 14px; }
  .feed time { padding: 0; font-size: 12.5px; }
  .feed h3 { font-size: 16.5px; margin-top: 4px; }
  .feed p { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .day { padding: 8px 14px; }
  .meta { gap: 6px; font-size: 12.5px; }
  aside { grid-template-columns: 1fr; gap: 12px; }
  aside > .card { padding: 16px; }
  article.card { padding: 18px 14px; border-radius: 12px; }
  article h1 { font-size: 24px; }
  .excerpt { font-size: 16.5px; }
  .body p { font-size: 16.5px; line-height: 1.6; }
  .why { padding: 14px; margin: 18px 0; }
  .boxes { gap: 10px; }
  .inline-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .inline-cta .btn { text-align: center; }
  footer .cols { flex-direction: column; gap: 16px; }
}

/* ---------- theme additions (not in the mockup) ---------- */
:root:not([data-theme]) { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; clip: auto; width: auto; height: auto; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.feed a.item { color: inherit; }
.archive-head { margin: 0 0 16px; }
.archive-head h1 { font-size: 28px; line-height: 1.25; margin: 0 0 6px; }
.archive-head p { margin: 0; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pager a { color: var(--accent); font-weight: 600; }
.empty { padding: 28px 18px; color: var(--muted); text-align: center; }
.body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.body ul, .body ol { margin: 0 0 16px; padding-left: 22px; font-size: 17.5px; }
.body li { margin-bottom: 6px; }
.body h2 { font-size: 22px; margin: 26px 0 10px; }
.page-card { padding: 28px 32px; }
.coin-head { display: flex; align-items: center; gap: 12px; }
.coin-head .coin { font-size: 15px; padding: 4px 10px; }
@media (max-width: 600px) {
  .archive-head h1 { font-size: 22px; }
  .page-card { padding: 18px 14px; }
  .body ul, .body ol { font-size: 16.5px; }
}

/* ---------- cookie consent ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin-left: auto;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 16px 18px; font-size: 14.5px; }
.consent p { margin: 0 0 12px; line-height: 1.5; }
.consent p a { color: var(--accent); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
.consent .btn { cursor: pointer; font: inherit; font-weight: 600; border: 1px solid var(--accent); }
.consent .btn.solid { background: var(--accent); color: #fff; }
.consent .btn.ghost { background: transparent; color: var(--accent); }
@media (max-width: 600px) {
  .consent { left: 10px; right: 10px; bottom: 10px; padding: 14px; }
  .consent-actions .btn { flex: 1; text-align: center; }
}
