/* News-like high-contrast theme (light) */
:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;
  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --shadow2: 0 6px 18px rgba(15,23,42,.08);

  --topbar:#0b1220;
  --topbarText:#e7eefc;
  --accent:#2563eb;      /* blue */
  --accent2:#f97316;     /* orange */
  --new:#ef4444;         /* red */
  --chip:#eef2ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-height:1.55;
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:linear-gradient(90deg, #0b1220, #0b1220 60%, #0e1b33);
  color:var(--topbarText);
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:14px 18px;
  display:grid;
  grid-template-columns: 220px 1fr 320px;
  gap:12px;
  align-items:center;
}
.brand{
  font-weight:800;
  letter-spacing:.02em;
  font-size:14px;
  opacity:.95;
}
.title{
  font-weight:850;
  font-size:18px;
  letter-spacing:.01em;
}
.meta{
  font-size:12px;
  color:rgba(231,238,252,.85);
  text-align:right;
}

/* Layout */
.container{
  max-width:1180px;
  margin:0 auto;
  padding:18px 16px 28px;
}
.controls{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow2);
  padding:14px;
}
.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

/* Tabs */
.tabs{
  display:flex;
  gap:8px;
  align-items:center;
}
.tab{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  font-weight:750;
  font-size:13px;
  cursor:pointer;
  transition:.15s ease;
}
.tab:hover{transform:translateY(-1px); box-shadow:var(--shadow2)}
.tab.active{
  background:rgba(37,99,235,.10);
  border-color:rgba(37,99,235,.35);
  color:#0b2a6f;
}

/* Audience segment */
.seg{
  display:flex;
  background:#f1f5f9;
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
}
.segbtn{
  appearance:none;
  border:0;
  padding:10px 12px;
  cursor:pointer;
  background:transparent;
  color:var(--muted);
  font-weight:750;
  font-size:13px;
  transition:.15s ease;
}
.segbtn.active{
  background:#fff;
  color:var(--text);
  box-shadow:var(--shadow2);
}

/* Search */
.search{
  flex:1;
  min-width:240px;
  display:flex;
  justify-content:flex-end;
}
.search input{
  width:min(420px, 100%);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
}
.search input:focus{
  border-color:rgba(37,99,235,.45);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

/* Chips */
.chips{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--chip);
  color:#1e293b;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}
.chip:hover{transform:translateY(-1px)}
.chip.active{
  background:rgba(37,99,235,.12);
  border-color:rgba(37,99,235,.35);
  color:#0b2a6f;
}

/* List */
.list{
  margin-top:14px;
  display:grid;
  gap:12px;
}

/* Card */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 14px 12px;
  box-shadow:var(--shadow2);
  transition:.15s ease;
}
.card:hover{transform:translateY(-2px); box-shadow:var(--shadow)}
.card a{
  color:var(--text);
  text-decoration:none;
}
.card a:hover{text-decoration:underline}

/* Card row (meta) */
.row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.small{
  font-size:12px;
  color:var(--muted);
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:850;
  letter-spacing:.02em;
  border:1px solid transparent;
}
.badge-law{
  background:rgba(37,99,235,.12);
  color:#0b2a6f;
  border-color:rgba(37,99,235,.22);
}
.badge-news{
  background:rgba(249,115,22,.14);
  color:#7c2d12;
  border-color:rgba(249,115,22,.22);
}
.newbadge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:#fff;
  background:var(--new);
}

/* Tags in card */
.tags{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tag{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:750;
  color:#334155;
  background:#f1f5f9;
  border:1px solid var(--line);
}

/* Pager */
.pager{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.pager button{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-weight:750;
  cursor:pointer;
}
.pager button:hover{box-shadow:var(--shadow2)}
.pager button:disabled{
  opacity:.5;
  cursor:not-allowed;
  box-shadow:none;
}
#pageInfo{color:var(--muted); font-size:13px}

/* Footer */
.footer{
  margin-top:18px;
  padding:14px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
}
.footer ul{margin:8px 0 0 18px; padding:0}
.note{margin-top:8px}

/* Responsive */
@media (max-width:920px){
  .topbar{grid-template-columns:1fr; text-align:left}
  .meta{text-align:left}
  .filters{gap:8px}
  .search{justify-content:flex-start}
  .search input{width:100%}
}

.badge-pc{ background:#7c3aed; color:#fff; }
