:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #0f172a;
  --text-soft: #475569;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --border: #e2e8f0;
  --radius: 12px;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  flex-wrap: nowrap;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }
.main-nav {
  display: flex;
  gap: 14px;
  margin-left: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}
.main-nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--accent); }
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.search {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  width: 150px;
  outline: none;
  transition: border-color 0.15s;
}
.search:focus { border-color: var(--accent); }
.subscribe-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.subscribe-btn:hover { background: #1d4ed8; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 64px;
}

/* ---------- Hero Carousel ---------- */
.hero-carousel {
  position: relative;
  margin-bottom: 48px;
}
.hero-track {
  display: grid;
}
.hero-track > .slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}
.hero-track > .slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.hero {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}
.carousel-arrow {
  position: absolute;
  top: 180px;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-arrow:hover { background: #fff; }
.carousel-dots {
  position: absolute;
  top: 336px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}
.hero-body { padding: 24px 28px 28px; }
.tag-feature {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero-body h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 10px 0 12px;
  letter-spacing: -0.01em;
}
.hero-body p { color: var(--text-soft); margin-bottom: 16px; }
.read-more {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.section-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.card .kicker { display: block; padding: 14px 16px 0; }
.card h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 6px 16px 8px;
}
.card p {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 16px 16px;
}
.card .read-more {
  display: inline-block;
  margin: 0 16px 22px;
}

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.widget-title {
  font-size: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.trending { list-style: none; counter-reset: t; }
.trending li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.trending li:last-child { border-bottom: none; }
.trending .rank {
  font-weight: 800;
  color: var(--accent);
  min-width: 18px;
}
.trending a { text-decoration: none; color: var(--text); font-size: 14px; }
.trending a:hover { color: var(--accent); }

.cat-list { list-style: none; }
.cat-list li { padding: 7px 0; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}
.cat-list a span {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
}

/* ---------- Tag cloud ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud .tag {
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tag-cloud .tag:hover {
  background: var(--accent);
  color: #fff;
}

.newsletter p { color: var(--text-soft); font-size: 14px; margin-bottom: 12px; }
.newsletter form { display: flex; flex-direction: column; gap: 8px; }
.newsletter input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}
.newsletter input:focus { border-color: var(--accent); }
.newsletter button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  color: var(--text-soft);
  font-size: 14px;
}
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--text-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Article ---------- */
.article { max-width: 760px; }
.breadcrumb {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.article-title {
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 8px 0 16px;
}
.article-meta {
  display: flex;
  gap: 16px;
  color: var(--text-soft);
  font-size: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-hero {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.article-body { font-size: 17px; }
.article-body p { margin-bottom: 20px; }
.article-body h2 {
  font-size: 24px;
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.article-body ul {
  margin: 0 0 20px 22px;
}
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
}
.article-tags { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.article-tags .tag {
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}
.related { list-style: none; }
.related li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.related li:last-child { border-bottom: none; }
.related a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.related a:hover { color: var(--accent); }

/* ---------- Category ---------- */
.cat-header {
  margin-bottom: 28px;
}
.cat-header h1 {
  font-size: 32px;
  letter-spacing: -0.01em;
}
.cat-header p {
  color: var(--text-soft);
  margin-top: 6px;
}
.cat-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.cat-filters a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  padding: 7px 16px;
  border-radius: 999px;
  transition: all 0.15s;
}
.cat-filters a:hover,
.cat-filters a.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- News / External article ---------- */
.news-grid .card h3 { margin-bottom: 6px; }
.card-source a { color: var(--accent); text-decoration: none; }
.card-source a:hover { text-decoration: underline; }

.article-excerpt,
.article-summary {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 22px;
}
.article-excerpt h2,
.article-summary h2 {
  font-size: 16px;
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}
.article-excerpt p,
.article-summary p { color: var(--text-soft); font-size: 15px; }
.article-summary p.summary-model { font-size: 12px; color: var(--text-soft); margin-top: 10px; }

.source-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}
.source-box-head {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  letter-spacing: 0.04em;
}
.source-box-body { padding: 18px 20px; }
.source-box-body dl { margin: 0 0 16px; }
.source-box-body dt {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 8px;
}
.source-box-body dd { font-size: 15px; word-break: break-all; }
.source-read {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
}
.source-read:hover { background: #1d4ed8; }

/* ---------- 回遊率向上（記事ページ導線） ---------- */
.related-section { margin-top: 48px; }
.prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.prev-next a {
  flex: 1 1 240px;
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.prev-next a:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.prev-next .prev { text-align: left; }
.prev-next .next { text-align: right; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.more-link { text-align: center; margin-top: 28px; }
.more-link a {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 26px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.more-link a:hover { background: var(--accent); color: #fff; }

/* ---------- Static Pages (About/Contact/Privacy) ---------- */
.static-page { max-width: 780px; padding-bottom: 60px; }
.static-page .lead { font-size: 16px; color: var(--text-soft); margin-bottom: 32px; }
.static-page h1 { font-size: 32px; margin-bottom: 4px; }
.static-page h2 { font-size: 20px; margin: 36px 0 12px; }
.static-page p, .static-page li { font-size: 15px; line-height: 1.8; color: var(--text); }
.static-page ul { padding-left: 20px; }
.static-page ul li { margin-bottom: 8px; }
.static-page section { margin-bottom: 8px; }

/* Contact form */
.contact-form { max-width: 580px; }
.contact-form label { display: block; font-weight: 700; font-size: 14px; margin: 16px 0 4px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 15px; box-sizing: border-box; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button { margin-top: 16px; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 11px 26px; font-size: 15px; font-weight: 700; cursor: pointer; }
.contact-form button:hover { background: #1d4ed8; }
.form-msg { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.form-msg.success { background: #eaf7ef; border: 1px solid #bce6c9; color: #176b36; }
.form-msg.error { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header-inner { gap: 12px; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 12px; }
  .search { width: 120px; }
}
@media (max-width: 980px) {
  .subscribe-btn { display: none; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .search { width: 130px; }
  .hero-img { height: 220px; }
  .hero-body h1 { font-size: 24px; }
  .carousel-arrow { top: 110px; width: 34px; height: 34px; font-size: 18px; }
  .carousel-arrow.prev { left: 8px; }
  .carousel-arrow.next { right: 8px; }
  .carousel-dots { top: 196px; }
  .carousel-dot { width: 8px; height: 8px; }
}
