/* 生成物（lib/portal.js）。ポータル（/）とニュース一覧（/news/）のスタイル。
   /tools/ の tool-page.css とトークンをそろえている。
   左側の色付き縦ボーダーは使わない（フリート共通のきまり）。 */
:root {
  --bg: #eaf6ff; --bg-2: #d7eefc; --fg: #16324f; --muted: #5b7a99;
  --card: #ffffff; --line: #cfe6f7; --blue: #00a0e9; --blue-d: #0077b6;
}
html[data-theme="dark"] {
  --bg: #0b1220; --bg-2: #101b2e; --fg: #e6f1ff; --muted: #9db4cf;
  --card: #131f33; --line: #24374f; --blue: #4fc3f7; --blue-d: #29b6f6;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.8; -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-d); }
html[data-theme="dark"] a { color: var(--blue); }
.wrap { max-width: 980px; margin: 0 auto; padding: 20px 16px 48px; }

.site-header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; }
.site-title { font-size: clamp(22px, 5vw, 30px); margin: 0; color: var(--blue-d); }
html[data-theme="dark"] .site-title { color: var(--blue); }
.site-title small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.updated { font-size: 13px; color: var(--muted); margin: 0 0 16px; }

.crumbs { font-size: 14px; color: var(--muted); margin: 8px 0 16px; overflow-wrap: anywhere; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.nav a {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); text-decoration: none; font-size: 14px;
}
.nav a:hover { border-color: var(--blue); }

.section-title { font-size: 18px; font-weight: 700; margin: 28px 0 4px; }
.lead { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* 画像つきのカード */
.nc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 620px) { .nc-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .nc-list { grid-template-columns: 1fr 1fr 1fr; } }
.nc {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}
.nc-thumb { background: var(--bg-2); aspect-ratio: 1200 / 630; overflow: hidden; }
.nc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.nc-meta { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 12px; color: var(--muted); }
.nc-src { overflow-wrap: anywhere; }
.nc-date { white-space: nowrap; }
.nc-fresh { margin-left: 6px; }
.nc-title { font-size: 15px; line-height: 1.6; margin: 0; }
.nc-title a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.nc-title a:hover { text-decoration: underline; }
.nc-sum { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.nc-tag {
  align-self: flex-start; margin: 2px 0 0; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: var(--bg-2);
  color: var(--blue-d); border: 1px solid var(--line);
}
html[data-theme="dark"] .nc-tag { color: var(--blue); background: #1a2942; }

/* 画像を持たない記事の行 */
.nr-list { list-style: none; padding: 0; margin: 0; }
.nr {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.nr:last-child { border-bottom: 0; }
.nr-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5.5em; }
.nr-title { flex: 1 1 16em; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.nr-title:hover { text-decoration: underline; }
.nr-src, .nr-fresh { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ひみつ道具の導線 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin: 28px 0 0;
}
.card h2 { font-size: 18px; margin: 0 0 8px; }
.card p { margin: 0 0 12px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  background: var(--blue); color: #fff; font-weight: 700; min-height: 44px;
}
.btn:hover { background: var(--blue-d); color: #fff; }
.chip-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-2); text-decoration: none; font-size: 14px;
}
html[data-theme="dark"] .chip-list a { background: #1a2942; }
.chip-list a:hover { border-color: var(--blue); }

/* 情報源の一覧 */
.src-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.src-list li { padding: 3px 0; overflow-wrap: anywhere; }

.site-footer { margin-top: 36px; font-size: 13px; color: var(--muted); text-align: center; }
.site-footer p { margin: 6px 0; }
