:root{
  --bg:#0b0f14;
  --card:#121824;
  --card2:#0f1520;
  --text:#e7eefc;
  --muted:#a9b4c7;
  --accent:#6ee7ff;
  --warn:#ffcc66;
  --danger:#ff6b6b;
  --ok:#86efac;
  --border:rgba(231,238,252,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
html{background:var(--bg)}
body{
  margin:0;
  font-family:var(--sans);
  line-height:1.5;
  background:radial-gradient(1200px 700px at 15% 10%, rgba(110,231,255,.12), transparent 55%),
             radial-gradient(900px 600px at 85% 30%, rgba(255,204,102,.08), transparent 55%),
             var(--bg);
  color:var(--text);
  min-height:100svh;
  min-height:100dvh;
  overflow-x:hidden;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1180px; margin:0 auto; padding:24px; min-height:100svh}
img, svg, video{max-width:100%; height:auto}
.card, .source-item, .tl-item, .table, .footer{overflow-wrap:anywhere; word-break:break-word}
.table-wrap{width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch}
.table-wrap:focus-within{outline:2px solid rgba(110,231,255,.45); outline-offset:2px; border-radius:14px}
.header{
  display:flex; flex-wrap:wrap; gap:16px; align-items:flex-end; justify-content:space-between;
  margin-bottom:18px;
}
.hgroup h1{margin:0; font-size:1.35rem; letter-spacing:.2px}
.hgroup p{margin:.35rem 0 0; color:var(--muted); max-width:64ch}
.badge{
  display:inline-flex; gap:8px; align-items:center;
  padding:10px 12px; border:1px solid var(--border); border-radius:999px;
  background:rgba(18,24,36,.65); box-shadow:var(--shadow);
  font-size:.9rem; color:var(--muted);
}
.grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:18px;
}
.grid > *{min-width:0}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
}
.card{
  background:linear-gradient(180deg, rgba(18,24,36,.92), rgba(15,21,32,.92));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}
.card h2{margin:0 0 10px; font-size:1.1rem}
.card h3{margin:16px 0 8px; font-size:.98rem; color:var(--text)}
.muted{color:var(--muted)}
.kbd{
  font-family:var(--mono);
  border:1px solid var(--border);
  border-bottom-color:rgba(231,238,252,.2);
  padding:2px 6px;
  border-radius:8px;
  background:rgba(0,0,0,.25);
  font-size:.86em;
}
.controls{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between;
}
.controls .left{display:flex; flex-wrap:wrap; gap:10px; align-items:center}
input[type="search"], select{
  background:rgba(0,0,0,.22);
  border:1px solid var(--border);
  color:var(--text);
  font:inherit;
  padding:10px 12px;
  border-radius:12px;
  outline:none;
  min-width:220px;
}
select{min-width:190px}
button{
  background:rgba(110,231,255,.14);
  border:1px solid rgba(110,231,255,.28);
  color:var(--text);
  font:inherit;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
button:hover{filter:brightness(1.08)}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible{
  outline:2px solid rgba(110,231,255,.55);
  outline-offset:2px;
  border-radius:10px;
}
hr{border:none; border-top:1px solid var(--border); margin:14px 0}
.tag{
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 8px; border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.22);
  color:var(--muted);
  font-size:.82rem;
}
.tag.A{border-color:rgba(134,239,172,.35); background:rgba(134,239,172,.10); color:#c9ffe0}
.tag.B{border-color:rgba(110,231,255,.35); background:rgba(110,231,255,.08); color:#d7fbff}
.tag.C{border-color:rgba(255,204,102,.35); background:rgba(255,204,102,.08); color:#ffe6b8}
.alert{
  border:1px solid rgba(255,204,102,.25);
  background:rgba(255,204,102,.08);
  border-radius:14px;
  padding:12px;
  color:#ffe6b8;
}
.table{
  width:100%;
  min-width:640px;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(0,0,0,.12);
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
  text-align:left;
}
.table th{
  background:rgba(0,0,0,.18);
  color:var(--text);
  font-weight:650;
}
.table tr:last-child td{border-bottom:none}
.source-item{display:flex; flex-direction:column; gap:6px; padding:10px; border:1px solid var(--border); border-radius:14px; background:rgba(0,0,0,.18)}
.source-item .top{display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between}
.source-item .title{font-weight:650}
.small{font-size:.92rem}
.footnotes{margin-top:10px; font-size:.9rem; color:var(--muted)}
.fn a{font-family:var(--mono)}
.timeline{display:flex; flex-direction:column; gap:10px}
.tl-item{border:1px solid var(--border); border-radius:14px; padding:12px; background:rgba(0,0,0,.16)}
.tl-meta{display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between}
.tl-date{font-family:var(--mono); color:#d7fbff}
.tl-title{font-weight:650}
.score{font-family:var(--mono); font-size:1.05rem}
.footer{margin-top:18px; color:var(--muted); font-size:.9rem}
details{border:1px solid var(--border); border-radius:14px; padding:10px; background:rgba(0,0,0,.14)}
details summary{cursor:pointer; font-weight:650}
details > summary{list-style:none}
details > summary::-webkit-details-marker{display:none}
details[open] > summary{margin-bottom:6px}
@media (max-width: 720px){
  .container{padding:18px}
  .hgroup h1{font-size:1.2rem}
  .badge{width:100%; justify-content:center}
  .controls{flex-direction:column; align-items:stretch}
  .controls .left{width:100%}
  input[type="search"], select{min-width:0; width:100%}
  button{width:100%}
  .table{min-width:520px}
}
@media print{
  body{background:#fff; color:#000}
  a{color:#000; text-decoration:underline}
  .badge, .controls, button{display:none !important}
  .card{box-shadow:none}
}
