/* =========================================================
   セキュリティ事故速報 〜不正アクセスニュース〜
   共通スタイルシート
   ※ 色は :root にまとめてあります。色を変えたいときはここだけ直せばOKです。
   ========================================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ベース色（ダークなサイバー系） */
  --bg:        #0a0d14;
  --bg-2:      #0e1420;
  --card:      #111926;
  --card-2:    #16203046;
  --line:      #1e2c42;
  --line-2:    #2a3d5c;
  --text:      #dde5f0;
  --text-sub:  #8aa0bd;
  --text-dim:  #5f7490;

  /* アクセント色 */
  --accent:    #00d4ff;  /* シアン：リンク・見出し */
  --alert:     #ff3b5c;  /* レッド：速報・重大 */
  --warn:      #ffb000;  /* アンバー：注意 */
  --ok:        #2fe38a;  /* グリーン：解決済み */
  --purple:    #a970ff;

  --radius: 12px;
  --maxw: 1180px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景のうっすらグリッド */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.028) 1px, transparent 1px);
  background-size: 54px 54px;
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,13,20,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  font-family: 'Share Tech Mono', monospace;
  font-size: .68rem; letter-spacing: 2px;
  color: #fff; background: var(--alert);
  padding: 4px 9px; border-radius: 4px;
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.55} }
.logo-text { font-weight: 700; font-size: 1.02rem; color: var(--text); letter-spacing: .5px; }
.logo-text small { display: block; font-size: .66rem; color: var(--text-sub); font-weight: 400; letter-spacing: 1px; }
.header-nav { margin-left: auto; display: flex; gap: 18px; font-size: .84rem; }
.header-nav a { color: var(--text-sub); }
.header-nav a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 680px) { .header-nav { width: 100%; margin-left: 0; gap: 14px; font-size: .78rem; } }

/* ---------- ヒーロー ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Share Tech Mono', monospace; font-size: .74rem; letter-spacing: 2px;
  color: var(--alert); border: 1px solid rgba(255,59,92,.4);
  border-radius: 30px; padding: 5px 16px; margin-bottom: 18px;
}
.hero .tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--alert); animation: blink 1.5s infinite; }
.hero h1 {
  font-size: clamp(1.7rem, 4.6vw, 2.9rem); font-weight: 700; letter-spacing: 1px;
  background: linear-gradient(95deg, #fff 10%, var(--accent) 60%, var(--purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1.35; margin-bottom: 14px;
}
.hero p { color: var(--text-sub); max-width: 760px; margin: 0 auto; font-size: .96rem; }
.hero .updated { margin-top: 14px; font-family: 'Share Tech Mono', monospace; font-size: .78rem; color: var(--text-sub); }

/* ---------- 統計ダッシュボード ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0 44px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; text-align: center;
}
.stat .num { font-family: 'Share Tech Mono', monospace; font-size: 1.9rem; line-height: 1.2; color: var(--accent); }
.stat.is-alert .num { color: var(--alert); }
.stat.is-ok .num { color: var(--ok); }
.stat.is-warn .num { color: var(--warn); }
.stat .label { font-size: .76rem; color: var(--text-sub); margin-top: 4px; }

/* ---------- セクション見出し ---------- */
.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.sec-head h2 {
  font-size: 1.25rem; font-weight: 700; letter-spacing: .5px;
  padding-left: 12px; border-left: 4px solid var(--alert);
}
.sec-head .note { font-size: .8rem; color: var(--text-sub); }

/* ---------- トップ記事（大カード） ---------- */
.top-picks { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 48px; }
@media (max-width: 900px) { .top-picks { grid-template-columns: 1fr; } }
.pick {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; transition: .2s; position: relative; overflow: hidden;
}
.pick::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--alert); }
.pick:hover { border-color: var(--line-2); transform: translateY(-3px); text-decoration: none; }
.pick .date { font-family: 'Share Tech Mono', monospace; font-size: .76rem; color: var(--text-sub); }
.pick h3 { font-size: 1.06rem; font-weight: 700; color: var(--text); margin: 8px 0 10px; line-height: 1.55; }
.pick p { font-size: .85rem; color: var(--text-sub); line-height: 1.75; }
.top-picks .pick:first-child h3 { font-size: 1.3rem; }

/* ---------- バッジ ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 500;
  padding: 3px 10px; border-radius: 20px; border: 1px solid currentColor; white-space: nowrap;
}
.b-ransomware { color: #ff6a8b; }
.b-unauthorized { color: #4fc3ff; }
.b-phishing { color: #ffb000; }
.b-vulnerability { color: #a970ff; }
.b-insider { color: #ff9a5c; }
.b-misconfig { color: #7ed6a5; }
.b-supplychain { color: #65d0d8; }

.status { display: inline-block; font-size: .7rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.s-resolved { background: rgba(47,227,138,.14); color: var(--ok); }
.s-investigating { background: rgba(255,176,0,.14); color: var(--warn); }
.s-ongoing { background: rgba(255,59,92,.14); color: var(--alert); }

.sev { font-family: 'Share Tech Mono', monospace; font-size: .7rem; color: var(--text-sub); }

/* ---------- フィルター ---------- */
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: .76rem; color: var(--text-sub); min-width: 60px; }
.chip {
  font-size: .78rem; padding: 5px 13px; border-radius: 20px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--text-sub); transition: .15s;
  font-family: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #05111a; font-weight: 700; }
.chip.on.alert { background: var(--alert); border-color: var(--alert); color: #fff; }
#q {
  flex: 1; min-width: 200px; background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--text); padding: 8px 14px; border-radius: 20px; font-size: .85rem; font-family: inherit;
}
#q:focus { outline: none; border-color: var(--accent); }
.hit-count { font-size: .78rem; color: var(--text-sub); margin-bottom: 12px; font-family: 'Share Tech Mono', monospace; }

/* ---------- 一覧（1件1行のコンパクト表示） ---------- */
.list { display: flex; flex-direction: column; gap: 6px; }
.item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 170px 150px 172px;
  gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 16px; transition: .12s;
}
.item:hover { border-color: var(--line-2); background: #131d2c; }

.item .col-date {
  font-family: 'Share Tech Mono', monospace; font-size: .82rem; color: var(--text-sub);
  line-height: 1.2; white-space: nowrap;
}
.item .col-date em { display: block; font-style: normal; font-size: .62rem; opacity: .55; }

.item .col-title {
  font-size: .94rem; font-weight: 500; color: var(--text); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.item .col-title:hover { color: var(--accent); text-decoration: none; }

.item .col-org {
  font-size: .78rem; color: var(--text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.item .col-scale {
  font-size: .74rem; color: var(--warn); font-family: 'Share Tech Mono', monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.item .col-badges { display: flex; gap: 5px; justify-content: flex-end; white-space: nowrap; }

@media (max-width: 1000px) {
  .item { grid-template-columns: 54px minmax(0, 1fr) 160px; }
  .item .col-scale { display: none; }
  .item .col-badges { grid-column: 3; }
}
@media (max-width: 760px) {
  .item { grid-template-columns: 50px minmax(0, 1fr); gap: 4px 12px; padding: 10px 14px; }
  .item .col-title { white-space: normal; font-size: .9rem; }
  .item .col-org { grid-column: 2; }
  .item .col-badges { grid-column: 2; justify-content: flex-start; }
}

/* ---------- ページ送り ---------- */
.pagenav { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 10px; }
.pbtn {
  min-width: 36px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text-sub);
  font-size: .82rem; font-family: inherit; transition: .12s;
}
.pbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pbtn.on { background: var(--accent); border-color: var(--accent); color: #05111a; font-weight: 700; }
.pbtn:disabled { opacity: .3; cursor: default; }
.pgap { color: var(--text-sub); padding: 6px 2px; font-size: .82rem; }

/* ---------- カテゴリ一覧（TOP下部） ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; transition: .15s; text-align: left; width: 100%;
  font-family: inherit; color: var(--text);
}
.cat-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cat-card .n { font-family: 'Share Tech Mono', monospace; font-size: 1.4rem; color: var(--accent); }
.cat-card .t { font-weight: 600; font-size: .94rem; margin: 2px 0 4px; }
.cat-card .d { font-size: .76rem; color: var(--text-sub); line-height: 1.7; }

/* ---------- 記事ページ ---------- */
.breadcrumb { font-size: .78rem; color: var(--text-sub); padding: 18px 0; }
.breadcrumb a { color: var(--text-sub); }
.breadcrumb a:hover { color: var(--accent); }

.article-head { padding: 10px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.article-head .pubdate { font-family: 'Share Tech Mono', monospace; font-size: .8rem; color: var(--text-sub); }
.article-head h1 { font-size: clamp(1.4rem, 3.6vw, 2.05rem); font-weight: 700; line-height: 1.5; margin-bottom: 14px; }
.article-head .org-line { font-size: .88rem; color: var(--text-sub); }

.lead-box {
  background: linear-gradient(180deg, #16202f, #121a27);
  border: 1px solid var(--line-2); border-left: 4px solid var(--alert);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 34px;
}
.lead-box .t { font-size: .74rem; letter-spacing: 2px; color: var(--alert); font-family: 'Share Tech Mono', monospace; margin-bottom: 8px; }
.lead-box p { font-size: .96rem; line-height: 1.95; }

article h2 {
  font-size: 1.2rem; font-weight: 700; margin: 42px 0 16px;
  padding-left: 12px; border-left: 4px solid var(--accent);
}
article h3 { font-size: 1.02rem; font-weight: 700; margin: 28px 0 10px; color: var(--accent); }
article p { margin-bottom: 16px; font-size: .95rem; }

.fact-table { width: 100%; border-collapse: collapse; margin: 18px 0 30px; font-size: .9rem; }
.fact-table th, .fact-table td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; vertical-align: top; }
.fact-table th { background: #16202f; color: var(--text-sub); font-weight: 500; width: 34%; white-space: nowrap; }
@media (max-width: 620px) { .fact-table th, .fact-table td { display: block; width: 100%; } .fact-table th { border-bottom: none; } }

/* タイムライン */
.timeline { list-style: none; position: relative; padding-left: 26px; margin: 18px 0 30px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 18px 0; }
.timeline li::before {
  content: ''; position: absolute; left: -24px; top: 9px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.timeline .tl-date { font-family: 'Share Tech Mono', monospace; font-size: .8rem; color: var(--accent); display: block; }
.timeline .tl-text { font-size: .92rem; }

/* 解決までの道のり */
.resolution {
  background: linear-gradient(180deg, rgba(47,227,138,.06), rgba(47,227,138,.02));
  border: 1px solid rgba(47,227,138,.3); border-radius: var(--radius);
  padding: 24px 24px 8px; margin: 40px 0;
}
.resolution > .r-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.resolution > .r-head .ic { font-size: 1.2rem; }
.resolution > .r-head h2 { margin: 0; border-left-color: var(--ok); font-size: 1.15rem; }
.resolution .r-sum { font-size: .94rem; margin-bottom: 20px; }
.resolution .timeline::before { background: rgba(47,227,138,.4); }
.resolution .timeline li::before { border-color: var(--ok); }
.resolution .timeline .tl-date { color: var(--ok); }
.resolution h3 { color: var(--ok); }

.points { list-style: none; margin: 10px 0 24px; }
.points li { position: relative; padding: 7px 0 7px 26px; font-size: .92rem; border-bottom: 1px dashed var(--line); }
.points li:last-child { border-bottom: none; }
.points li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }

.lessons { list-style: none; margin: 10px 0 24px; }
.lessons li { position: relative; padding: 9px 0 9px 30px; font-size: .93rem; border-bottom: 1px dashed var(--line); }
.lessons li:last-child { border-bottom: none; }
.lessons li::before {
  content: counter(li); counter-increment: li; position: absolute; left: 0; top: 11px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #1a1000;
  font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.lessons { counter-reset: li; }

.sources { list-style: none; font-size: .86rem; }
.sources li { padding: 7px 0; border-bottom: 1px dashed var(--line); word-break: break-all; }
.sources li:last-child { border-bottom: none; }

.disclaimer {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; font-size: .8rem; color: var(--text-sub); line-height: 1.8; margin: 30px 0;
}

/* 関連記事 */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 40px; }
.rel-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; transition: .15s;
}
.rel-card:hover { border-color: var(--line-2); text-decoration: none; transform: translateY(-2px); }
.rel-card .d { font-family: 'Share Tech Mono', monospace; font-size: .72rem; color: var(--text-sub); }
.rel-card .t { font-size: .88rem; color: var(--text); font-weight: 600; line-height: 1.6; margin-top: 5px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 50px; font-size: .86rem; flex-wrap: wrap; }
.pager a { max-width: 46%; }
@media (max-width: 620px) { .pager a { max-width: 100%; } }

/* CTA */
.cta {
  background: linear-gradient(135deg, #14203a, #101725);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px; margin: 40px 0; text-align: center;
}
.cta h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.cta p { font-size: .87rem; color: var(--text-sub); margin-bottom: 14px; }
.cta .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 9px 20px; border-radius: 22px; font-size: .84rem;
  border: 1px solid var(--accent); color: var(--accent); transition: .15s;
}
.btn:hover { background: var(--accent); color: #05111a; text-decoration: none; }

/* フッター */
footer {
  border-top: 1px solid var(--line); margin-top: 50px; padding: 34px 0 44px;
  font-size: .82rem; color: var(--text-sub);
}
footer .fnav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
footer .sig { margin-top: 12px; font-size: .78rem; line-height: 1.8; }

/* 解決ポイントのうち「残った課題」は注意マークで表示 */
.points li.caution::before { content: '⚠'; color: var(--warn); }
.points li.caution { color: var(--text-sub); }

/* スマホではヘッダーを固定しない（画面を占有しすぎるため） */
@media (max-width: 680px) {
  .site-header { position: static; }
  .header-nav { gap: 10px 14px; font-size: .74rem; }
  .hero { padding: 34px 0 20px; }
}

/* 追加分類のバッジ色 */
.b-loss { color: #c0a8ff; }
.b-ddos { color: #ff8fb0; }
