/* /static_assets/assets/site.css */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f4f8;
  --border: #d9e1ea;
  --text: #1f2a37;
  --text-soft: #516173;
  --heading: #142033;
  --link: #1f5da8;
  --link-hover: #17477f;
  --accent: #dce9f8;
  --category: #eef5ff;
  --shadow: 0 6px 20px rgba(18, 34, 58, 0.06);
  --radius: 14px;
  --content-width: 880px;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

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

p {
  margin: 0 0 1.1em;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.45;
  margin: 0 0 0.8em;
}

h1 {
  font-size: 2rem;
  line-height: 1.35;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.1rem;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.site-main {
  width: min(100% - 32px, var(--content-width));
  margin: 28px auto 56px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.site-header__inner {
  width: min(100% - 32px, var(--content-width));
  margin: 0 auto;
  padding: 22px 0 18px;
}

.site-header__brand {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.site-header__brand a {
  color: var(--heading);
  text-decoration: none;
}

.site-header__tagline {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav__link:hover {
  background: var(--accent);
  text-decoration: none;
}

.site-nav__link.is-current {
  background: var(--accent);
  border-color: #bfd2ea;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 48px;
}

.site-footer__inner {
  width: min(100% - 32px, var(--content-width));
  margin: 0 auto;
  padding: 28px 0 36px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.site-footer__site-name {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--heading);
}

.site-footer__note {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 999;
  background: #fff;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
}

.top-hero,
.page-header,
.article-page,
.article-card,
.home-guide__item,
.archive-month,
.related-articles {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.top-hero {
  margin-bottom: 24px;
}

.top-hero__inner {
  padding: 28px 24px;
}

.top-hero__eyebrow {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.top-hero__lead {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 1rem;
}

.top-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.top-hero__links a,
.text-link,
.back-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-decoration: none;
}

.top-hero__links a:hover,
.text-link:hover,
.back-links a:hover {
  background: var(--accent);
  text-decoration: none;
}

.content-section {
  margin-bottom: 24px;
}

.content-section > h2 {
  margin-bottom: 14px;
}

.article-list {
  display: grid;
  gap: 16px;
}

.article-card {
  padding: 18px 18px 16px;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.article-card__title {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.article-card__title a {
  color: var(--heading);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.article-card__excerpt {
  color: var(--text-soft);
  font-size: 0.96rem;
}

.article-card__date {
  color: var(--text-soft);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--category);
  color: var(--link-hover);
  font-size: 0.84rem;
  font-weight: 600;
}

.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.tag-link:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.home-guide {
  display: grid;
  gap: 16px;
}

.home-guide__item {
  padding: 20px 18px;
}

.page-header {
  padding: 22px 20px 18px;
  margin-bottom: 20px;
}

.page-header__meta {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.page-header__lead {
  color: var(--text-soft);
  max-width: 760px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.breadcrumb__item {
  color: var(--text-soft);
}

.breadcrumb__separator {
  color: #8a97a8;
}

.article-page {
  padding: 24px 22px;
}

.article-header {
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.article-body {
  display: grid;
  gap: 18px;
}

.article-body__section {
  padding-top: 6px;
}

.article-body__section h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.article-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.source-link {
  margin-bottom: 20px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.source-link__label {
  margin-right: 6px;
  font-weight: 600;
  color: var(--text);
}

.source-link__title {
  display: inline-block;
  margin-left: 8px;
  color: var(--text-soft);
}

.related-articles {
  padding: 18px 18px 14px;
  margin: 20px 0;
}

.compact-list {
  display: grid;
  gap: 10px;
  padding-left: 1.1em;
}

.compact-list__item {
  color: var(--text);
}

.compact-list__link {
  margin-right: 10px;
  color: var(--heading);
}

.compact-list__date {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.back-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-cloud__item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tag-cloud__item:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.tag-cloud__name {
  color: var(--heading);
}

.tag-cloud__count {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.archive-list {
  display: grid;
  gap: 18px;
}

.archive-month {
  padding: 18px 18px 14px;
}

.date-list {
  display: grid;
  gap: 10px;
  padding-left: 1.1em;
}

.date-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.date-list__item span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
}

@media (min-width: 768px) {
  .home-guide {
    grid-template-columns: 1fr 1fr;
  }

  .article-card {
    padding: 20px 20px 18px;
  }

  .article-page {
    padding: 28px 28px;
  }

  .top-hero__inner {
    padding: 34px 30px;
  }

  .page-header {
    padding: 26px 24px 20px;
  }
}

@media (max-width: 767px) {
  html {
    font-size: 15px;
  }

  .site-main,
  .site-header__inner,
  .site-footer__inner {
    width: min(100% - 20px, var(--content-width));
  }

  .article-page,
  .article-card,
  .page-header,
  .top-hero__inner,
  .home-guide__item,
  .archive-month,
  .related-articles {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top-hero__links,
  .back-links,
  .site-nav {
    gap: 10px;
  }
}