/* ===== SC 午前対策サイト スタイル ===== */
:root {
  --bg: #0f1420;
  --bg-soft: #161d2e;
  --card: #1b2334;
  --card-hover: #222c42;
  --border: #2a3450;
  --text: #e8ecf5;
  --text-muted: #9aa6c0;
  --text-dim: #6b7694;
  --accent: #5b8cff;
  --accent-2: #37d0b3;
  --sec: #ff6b7a;      /* セキュリティ系 */
  --sec-soft: rgba(255,107,122,.16);
  --net: #ffb84d;      /* ネットワーク */
  --other: #7c8bb0;    /* その他 */
  --star: #ffd24d;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== ヘッダー / ナビ ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,20,32,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand { font-weight: 800; letter-spacing: .02em; font-size: 15px; white-space: nowrap; }
.brand .tag { color: var(--accent-2); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  padding: 6px 11px; border-radius: 999px; transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a.active { color: #fff; background: var(--accent); }
.nav-toggle { display: none; }

/* ===== ヒーロー ===== */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 24px;
}
.hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 0 0 8px; letter-spacing: .01em; }
.hero .sub { color: var(--text-muted); font-size: 16px; margin: 0 0 24px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; color: var(--text-muted);
}
.chip b { color: var(--text); font-size: 15px; }
.chip.accent { border-color: var(--accent); color: var(--accent); }

/* ===== セクション ===== */
section { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px; scroll-margin-top: 70px; }
.section-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.section-h h2 { font-size: 24px; margin: 0; }
.section-h .num { color: var(--accent-2); font-weight: 800; font-size: 14px; }
.section-lead { color: var(--text-muted); margin: 0 0 22px; max-width: 70ch; }
.divider { border: none; border-top: 1px solid var(--border); max-width: var(--maxw); margin: 0 auto; }

/* ===== テーブル ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); color: var(--text-muted); font-weight: 700; font-size: 12.5px; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge.pass { background: rgba(55,208,179,.15); color: var(--accent-2); }

/* ===== 出題比重バー ===== */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 180px 1fr 46px; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; color: var(--text-muted); text-align: right; }
.bar-track { background: var(--bg-soft); border-radius: 999px; height: 22px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; border-radius: 999px;
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.bar-fill.sec { background: linear-gradient(90deg, #ff6b7a, #ff9460); }
.bar-fill.net { background: linear-gradient(90deg, #ffb84d, #ffd27a); }
.bar-fill.other { background: linear-gradient(90deg, #6d7ba6, #9aa6c0); }
.bar-val { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0 0; font-size: 12.5px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.dot.sec { background: var(--sec); } .dot.net { background: var(--net); } .dot.other { background: var(--other); }

/* ===== カード ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; transition: .18s; position: relative;
}
.card:hover { background: var(--card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.card.sec-accent { border-left: 3px solid var(--sec); }
.card.net-accent { border-left: 3px solid var(--net); }
.card.other-accent { border-left: 3px solid var(--other); }
.card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card .count { font-size: 12px; color: var(--text-dim); font-weight: 700; margin-left: auto; white-space: nowrap; }
.stars { color: var(--star); font-size: 12px; letter-spacing: 1px; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 13.5px; }
.card ul li { margin: 3px 0; }
.card .tag-row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; color: var(--text-dim); }

/* ===== ロードマップ（タイムライン） ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.phase { position: relative; margin-bottom: 20px; }
.phase::before {
  content: ""; position: absolute; left: -26px; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.phase h3 { margin: 0 0 4px; font-size: 16px; }
.phase .dur { color: var(--accent-2); font-size: 12.5px; font-weight: 700; }
.phase p, .phase ul { color: var(--text-muted); font-size: 14px; margin: 6px 0 0; }
.phase ul { padding-left: 18px; }

/* ===== コールアウト ===== */
.callout {
  background: var(--sec-soft); border: 1px solid rgba(255,107,122,.3);
  border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; font-size: 14px;
}
.callout b { color: var(--sec); }
.callout.info { background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.3); }
.callout.info b { color: var(--accent); }

/* ===== リソース ===== */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.res {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; transition: .16s;
}
.res:hover { border-color: var(--accent); background: var(--card-hover); text-decoration: none; transform: translateY(-2px); }
.res .k { font-size: 12px; color: var(--text-dim); }
.res .v { font-size: 15px; color: var(--text); font-weight: 700; margin-top: 2px; }
.res .u { font-size: 12px; color: var(--accent); margin-top: 6px; word-break: break-all; }

/* ===== フッター ===== */
footer { border-top: 1px solid var(--border); margin-top: 20px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 48px; color: var(--text-dim); font-size: 12.5px; }
.footer-inner p { margin: 4px 0; }

/* ===== 用語集 ===== */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.gloss-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.gloss-group h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.gloss-group h3 .pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); margin-left: auto; }
.gloss-group dl { margin: 0; }
.gloss-group dt { font-weight: 700; font-size: 13.5px; color: var(--text); margin-top: 11px; }
.gloss-group dt:first-of-type { margin-top: 0; }
.gloss-group dd { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.gloss-group.sec-accent { border-left: 3px solid var(--sec); }
.gloss-group.net-accent { border-left: 3px solid var(--net); }

/* ===== FAQ ===== */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 700; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.faq summary::after { content: "＋"; margin-left: auto; color: var(--text-dim); font-size: 16px; }
.faq details[open] summary::after { content: "－"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .ans { padding: 12px 0 16px 32px; color: var(--text-muted); font-size: 14px; line-height: 1.75; }
.faq .ans b { color: var(--text); }

/* ===== レスポンシブ ===== */
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 52px; left: 0; right: 0; flex-direction: column;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px; border-radius: 8px; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: var(--card); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
  .bar-row { grid-template-columns: 120px 1fr 40px; gap: 8px; }
  .bar-label { font-size: 11.5px; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fc; --bg-soft: #eceff7; --card: #ffffff; --card-hover: #f7f9ff;
    --border: #dde3f0; --text: #1a2234; --text-muted: #51607e; --text-dim: #8491ad;
    --shadow: 0 8px 24px rgba(30,50,90,.12);
  }
  .topbar { background: rgba(245,247,252,.85); }
}
