/* bitwire.news - content first. No fonts, images or libraries are fetched. */
:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --panel: #13181d;
  --panel-hover: #181f24;
  --line: #293138;
  --text: #edf2f1;
  --muted: #a4afb6;
  --quiet: #8a979f;
  --accent: #7ce3c0;
  --accent-soft: #1b302c;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-padding-top: 80px; }
body { margin: 0; color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body.reader-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible { outline: none; }
::selection { background: #346e5b; color: white; }
svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.shell { width: min(1360px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; transform: translateY(-160%); z-index: 50; padding: 10px 16px; background: var(--accent); color: var(--bg); border-radius: 4px; }
.skip-link:focus { transform: none; }
.site-header { height: 61px; flex-shrink: 0; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; position: relative; }
.brand { display: inline-flex; align-items: baseline; font-size: 25px; font-weight: 730; letter-spacing: -1.25px; line-height: 1; white-space: nowrap; }
.brand-dot { color: var(--accent); }
.brand-suffix { font-weight: 450; color: #ced8d6; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.searchbox { position: relative; }
.search-panel { display: flex; align-items: center; gap: 9px; height: 34px; width: 230px; margin: 0; background: #12171b; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; }
.search-panel:focus-within { border-color: var(--accent); }
.search-icon { width: 16px; height: 16px; color: var(--quiet); }
.search-panel input { color: var(--text); background: transparent; border: 0; padding: 0; width: 100%; min-width: 0; height: 100%; font-size: 12px; }
.search-panel input::placeholder { color: var(--quiet); opacity: 1; }
.search-panel input::-webkit-search-cancel-button { display: none; }
.icon-button { padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-button:hover { background: #26312f; color: var(--accent); }
.clear-search { width: 24px; height: 28px; margin-right: -6px; }
.clear-search svg { width: 15px; height: 15px; }
.search-toggle { display: none; }
.languages { display: flex; align-items: center; gap: 2px; }
.languages button { font: 11px var(--mono); padding: 7px 9px; min-height: 32px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--quiet); }
.languages button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: #2d4840; }
.languages button:hover { color: var(--text); }
.main { flex: 1; padding-bottom: 26px; }
.main:focus { outline: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; }
.filters { display: flex; align-items: center; gap: 5px; margin-left: -9px; }
.filter { padding: 8px 11px; min-height: 34px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 500; white-space: nowrap; }
.filter[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: #2d4840; }
.filter:hover { color: var(--text); }
.feed-context { display: flex; align-items: center; gap: 11px; white-space: nowrap; color: var(--quiet); font: 10px var(--mono); }
.context-separator { color: #536269; }
.demo-label { border: 1px solid #3b4548; border-radius: 3px; padding: 4px 6px; color: #a2adae; font: 9px var(--mono); letter-spacing: .02em; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { min-width: 0; display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transition: background .15s ease, border-color .15s ease; position: relative; }
.card--lead { background: #14201f; border-color: #345249; }
.card--lead::before { content: ""; position: absolute; top: -1px; left: 22px; width: 31px; height: 2px; background: var(--accent); }
.card:hover { border-color: #58796c; background: var(--panel-hover); }
.card--lead:hover { background: #182925; }
.story-link { display: flex; flex-direction: column; width: 100%; min-height: 242px; padding: 20px 22px 16px; border-radius: inherit; }
.story-link:focus-visible { outline-offset: 3px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 10px var(--mono); line-height: 1.5; }
.category { color: var(--accent); text-transform: uppercase; letter-spacing: .075em; font-size: 10px; }
.card-meta time { color: var(--quiet); font-variant-numeric: tabular-nums; }
.card h2 { margin: 16px 0 11px; font-size: clamp(20px, 1.65vw, 23px); line-height: 1.24; letter-spacing: -.65px; font-weight: 650; overflow-wrap: break-word; text-wrap: pretty; }
.card--lead h2 { color: #f4fbf8; }
.card-summary { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; text-wrap: pretty; }
.card-foot { margin-top: auto; padding-top: 21px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--quiet); font-size: 10px; }
.arrow { width: 19px; height: 19px; color: #8faaa0; }
.card:hover .arrow, .story-link:focus-visible .arrow { color: var(--accent); }
.empty-state { padding: 65px 12px 75px; text-align: center; color: var(--muted); }
.empty-state p { font-size: 22px; font-weight: 600; color: var(--text); margin: 0 0 10px; }
.empty-state > span { font-size: 14px; }
.empty-state button { display: block; margin: 22px auto 0; color: var(--accent); background: var(--accent-soft); border: 1px solid #355146; border-radius: 5px; padding: 9px 14px; font-size: 12px; }
.site-footer { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 11px; padding-block: 18px; }
.site-footer p { display: flex; align-items: center; gap: 5px; margin: 0; flex-wrap: wrap; line-height: 1.7; }
.footer-name { color: var(--muted); font-weight: 600; }
.footer-dot { margin-inline: 7px; }
.site-footer nav { display: flex; gap: 22px; align-items: center; }
.site-footer a:hover { color: var(--accent); }
.reader { padding: 0; color: var(--text); background: #13191d; border: 1px solid #3e4e4a; border-radius: 10px; width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 24px 100px #0008; }
.reader::backdrop { background: #06090cdb; }
.reader-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 9px 18px 9px 28px; border-bottom: 1px solid var(--line); background: #13191d; }
.reader-brand { font-size: 14px; font-weight: 650; letter-spacing: -.5px; }
.reader-brand span { color: var(--accent); }
.reader-content { padding: 29px 32px 30px; }
.reader-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--quiet); font: 11px var(--mono); margin-bottom: 17px; }
.reader h2 { font-size: clamp(26px, 4vw, 34px); line-height: 1.17; font-weight: 650; letter-spacing: -1px; margin: 0 0 20px; overflow-wrap: break-word; }
.reader-summary { color: #d2dcda; font-size: 17px; line-height: 1.65; margin-bottom: 24px; }
.reader-body p { color: var(--muted); font-size: 15px; line-height: 1.85; margin: 0 0 18px; }
.reader-note { color: var(--quiet); font-size: 11px; line-height: 1.7; padding-top: 19px; margin: 24px 0 0; border-top: 1px solid var(--line); }
.reader-note strong { color: var(--accent); font-weight: 500; }
.legal-address { font-style: normal; font-size: 16px; line-height: 1.9; color: #ccd7d3; }
.legal-address a { color: var(--accent); }
.legal-source { display: inline-block; color: var(--muted); font-size: 12px; margin-top: 28px; }
.legal-source:hover { color: var(--accent); }
.noscript { padding: 15px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (min-width: 1600px) {
  .shell { width: min(1440px, calc(100% - 96px)); }
  .story-link { min-height: 240px; }
}
@media (max-width: 1040px) {
  .shell { width: calc(100% - 40px); }
  .feed-context { gap: 8px; }
  .feed-context time, .context-separator { display: none; }
  .story-link { padding-inline: 19px; }
  .card h2 { font-size: 21px; }
  .news-grid { gap: 12px; }
}
@media (max-width: 850px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card h2 { font-size: 22px; }
  .card:last-child { grid-column: auto; }
  .card-summary { font-size: 13px; }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 28px); }
  .site-header { height: 57px; }
  .brand { font-size: 23px; letter-spacing: -1.1px; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 9px; }
  .languages { gap: 0; }
  .languages button { font-size: 10px; padding: 7px 8px; }
  .searchbox { position: static; }
  .search-toggle { display: inline-flex; }
  .search-panel { display: none; position: absolute; right: 0; top: calc(100% + 7px); width: min(100%, 360px); height: 43px; z-index: 12; background: #1b2428; box-shadow: 0 12px 25px #0009; }
  .searchbox.is-open .search-panel { display: flex; }
  .searchbox.has-query .search-toggle { color: var(--accent); background: var(--accent-soft); }
  .search-panel input { font-size: 16px; }
  .toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0 12px; }
  .filters { gap: 2px; margin-left: -4px; overflow-x: auto; scrollbar-width: none; padding: 3px 4px 4px; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { padding: 7px 10px; min-height: 34px; font-size: 12px; }
  .feed-context { padding: 5px 0 0; gap: 8px; font-size: 9px; }
  .feed-context time, .context-separator { display: inline; }
  .demo-label { margin-left: auto; font-size: 8px; padding: 3px 5px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .story-link { padding: 17px 18px 14px; min-height: 0; }
  .card h2 { margin: 13px 0 9px; font-size: 22px; line-height: 1.23; }
  .card-summary { font-size: 13px; line-height: 1.6; }
  .card-foot { padding-top: 17px; }
  .card-meta { font-size: 10px; }
  .main { padding-bottom: 22px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 17px 23px; font-size: 10px; }
  .site-footer nav { gap: 20px; }
  .footer-dot { margin-inline: 3px; }
  .reader { max-height: calc(100dvh - 24px); width: calc(100% - 24px); border-radius: 8px; }
  .reader-bar { padding: 8px 12px 8px 20px; }
  .reader-content { padding: 23px 21px; }
  .reader h2 { font-size: 28px; }
  .reader-summary { font-size: 16px; }
  .reader-body p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  html, body { background: white; color: #111; }
  .site-header, .toolbar, .site-footer, .reader-bar, .skip-link { display: none !important; }
  .shell { width: 100%; }
  .news-grid { display: block; }
  .card { break-inside: avoid; background: white; border: 1px solid #aaa; margin-bottom: 14px; }
  .card *, .reader * { color: #222 !important; }
  .story-link { min-height: 0; }
  .card-foot .arrow { display: none; }
  body.reader-open { overflow: visible; }
  body.reader-open .main { display: none; }
  .reader[open] { position: static; max-height: none; width: 100%; background: white; border: 0; box-shadow: none; }
}
