:root {
  --bg: #0e0e14; --panel: #1a1a26; --border: #33334a; --text: #e8e8f0; --muted: #9a9ab0;
  --accent: #7c5cff; --red: #ef4444; --green: #34d399;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Hiragino Sans", sans-serif; }
header { text-align: center; padding: 1.6rem 1rem 1.2rem; background: linear-gradient(135deg, #2a1f5c, #1a1a3a); }
header h1 { margin: 0 0 .3rem; font-size: 1.6rem; }
header p { margin: 0; color: var(--muted); font-size: .85rem; }
/* ニュース一覧 ⇄ 注目度判定 の切り替えタブ（aws-news-dashboard/web/style.css と同じ） */
.app-switch { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: .8rem; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: rgba(0, 0, 0, .25); }
.app-switch a { padding: .3rem .9rem; border-radius: 999px; color: var(--muted); font-size: .8rem; text-decoration: none; }
.app-switch a:hover { color: var(--text); background: rgba(124, 92, 255, .2); }
.app-switch a[aria-current="page"] { background: var(--accent); color: #fff; font-weight: bold; }
.app-switch a:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
main { max-width: 980px; margin: 1.2rem auto; padding: 0 1rem; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: end; }
.controls label { display: flex; flex-direction: column; gap: .4rem; font-size: .8rem; color: var(--muted); }
.controls input[type=number], .controls input[type=text], .controls input[type=date], .controls select {
  background: #252536; border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: .5rem;
  color-scheme: dark;
}
.slider { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.slider input { flex: 1; accent-color: var(--accent); }
.sort { display: flex; gap: .4rem; }
.sort select { flex: 1; min-width: 0; }
.note { grid-column: 1 / 4; margin: 0; font-size: .75rem; color: var(--muted); text-align: right; }

/* 注目度・重要度の定義（ヘッダーの下）。要点は常に表示し、詳細は <details> で折りたたむ */
.defs { margin-bottom: 1rem; font-size: .8rem; line-height: 1.6; }
.defs-main { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.2rem; margin: 0; }
.defs dt { font-weight: bold; margin-bottom: .1rem; }
.defs dd { margin: 0; color: var(--muted); }
.defs b { color: var(--text); }
.defs details { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.defs summary { cursor: pointer; color: #b9a8ff; font-size: .78rem; }
.defs summary:focus-visible, .defs a:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
.defs-detail { color: var(--muted); font-size: .78rem; }
.defs-detail p { margin: .5rem 0 0; }
.defs-detail ul { margin: .2rem 0 0; padding-left: 1.2rem; }
.defs .en { color: #c8c8e0; font-style: italic; overflow-wrap: anywhere; }
.defs a { color: #b9a8ff; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin: 1rem 0; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; text-align: center; padding: .7rem .3rem; }
.stat b { display: block; font-size: 1.4rem; }
.stat span { font-size: .72rem; color: var(--muted); }
.red { color: var(--red); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.card { background: linear-gradient(180deg, #1c1a30, #15151f); border: 1px solid #3a3360; border-radius: 10px; padding: .9rem; display: flex; flex-direction: column; }
.card-head { display: flex; gap: .4rem; align-items: center; font-size: .72rem; }
.rank { color: var(--muted); margin-right: .2rem; }
.badge { padding: .1rem .45rem; border-radius: 4px; font-weight: bold; border: 1px solid transparent; }
.level.HIGH { background: var(--red); color: #fff; }
.level.MED { background: #e0a526; color: #1a1a1a; }
.level.LOW { background: #555; color: #eee; }
.category { border-color: currentColor; }
.category.security { color: #f87171; } .category.cost { color: #4ade80; } .category.performance { color: #facc15; }
.category.newService { color: var(--green); } .category.breaking { color: #fb923c; } .category.other { color: #a3a3a3; }
.hot { margin-left: auto; background: #4a1d1d; color: #fca5a5; padding: .1rem .45rem; border-radius: 4px; }
.card h2 { font-size: .95rem; margin: .6rem 0 .4rem; line-height: 1.4; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.summary { font-size: .78rem; color: var(--muted); margin: 0 0 .4rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.services { font-size: .7rem; color: #8b8bd0; margin: 0 0 .6rem; }
.meter { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--muted); margin-top: auto; }
.bar { flex: 1; height: 6px; background: #2a2a3a; border-radius: 3px; overflow: hidden; }
.fill { height: 100%; background: var(--red); }
.pct { color: var(--red); font-weight: bold; }
.latency { text-align: right; font-size: .7rem; color: var(--green); margin: .3rem 0 0; }
.empty { grid-column: 1 / 3; text-align: center; color: var(--muted); padding: 2rem; }

@media (max-width: 720px) {
  .controls, .cards, .defs-main { grid-template-columns: 1fr; }
  .note { grid-column: 1; text-align: left; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
