/* ナナチャレMEDIA（/media/）の共通スタイル。build.mjs が生成する記事・一覧が参照する。
   LP（index.html）のトークンと揃えてあるので、サービス面と読みもの面で見た目が割れない。 */

:root {
  --black: #111111;
  --white: #FFFFFF;
  --bg-subtle: #F6F6F6;
  --bg-subtle-strong: #EEEEEE;
  --border: #E4E4E4;
  --text-main: #111111;
  --text-sub: #555555;
  --text-muted: #9A9A9A;
  --line-green: #06C755;
  --brand: #F1621A;
  --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* --- header / footer --- */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
header.site .wrap { display: flex; align-items: center; gap: 14px; }
header.site .brand { flex-shrink: 0; }
header.site .brand img { height: 26px; width: auto; }
.site-nav {
  display: flex; gap: 14px; flex: 1;
  font-size: 0.78rem; font-weight: 700; color: var(--text-sub);
}
.site-nav a { text-decoration: none; padding: 4px 0; }
.site-nav a.active { color: var(--brand); }
.nav-cta {
  flex-shrink: 0;
  background: var(--line-green); color: var(--white);
  font-size: 0.72rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px 0; text-align: center; margin-top: 48px;
}
footer.site .links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 14px;
}
footer.site .links a { text-decoration: none; }
footer.site .copyright { font-size: 0.7rem; color: var(--text-muted); }

/* --- media index --- */

.media-hero { padding: 48px 0 32px 0; border-bottom: 1px solid var(--border); }
.media-hero .badge {
  display: inline-block; background: var(--brand); color: var(--white);
  font-size: 0.7rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.media-hero h1 {
  font-size: 1.6rem; font-weight: 900; letter-spacing: -0.5px;
  line-height: 1.45; margin-bottom: 12px;
}
.media-hero p { font-size: 0.88rem; color: var(--text-sub); }

.media-list { padding: 36px 0 8px 0; }
.list-title {
  font-size: 1.05rem; font-weight: 800; margin: 28px 0 14px 0;
  padding-bottom: 8px; border-bottom: 2px solid var(--black);
}
.list-title:first-child { margin-top: 0; }
.posts { display: flex; flex-direction: column; gap: 12px; }
.post {
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--border); border-radius: 16px;
  padding: 18px; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post:hover { border-color: var(--black); transform: translateY(-1px); }
.post-cat { font-size: 0.7rem; font-weight: 700; color: var(--brand); }
.post-title { font-size: 1rem; font-weight: 800; line-height: 1.5; }
.post-desc { font-size: 0.8rem; color: var(--text-sub); line-height: 1.7; }
.post-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* --- article --- */

.article { padding: 28px 0 0 0; }
.crumbs { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text-main); }

.cat {
  display: inline-block; background: var(--bg-subtle); border: 1px solid var(--border);
  font-size: 0.7rem; font-weight: 700; color: var(--text-main);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.article h1 {
  font-size: 1.65rem; font-weight: 900; line-height: 1.45;
  letter-spacing: -0.5px; margin-bottom: 12px;
}
.article .meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 20px; }
.article .lead {
  font-size: 0.9rem; color: var(--text-sub); line-height: 1.9;
  background: var(--bg-subtle); border-radius: 14px; padding: 16px 18px;
  margin-bottom: 24px;
}

.toc {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 32px;
}
.toc-title { font-size: 0.75rem; font-weight: 800; margin-bottom: 8px; color: var(--text-main); }
.toc ol { padding-left: 20px; }
.toc li { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 5px; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--brand); }

.body h2 {
  font-size: 1.2rem; font-weight: 800; line-height: 1.5;
  margin: 40px 0 14px 0; padding-left: 14px;
  border-left: 5px solid var(--brand);
  scroll-margin-top: 70px;
}
.body h3 { font-size: 1rem; font-weight: 800; margin: 28px 0 10px 0; }
.body p { font-size: 0.92rem; line-height: 2; color: var(--text-main); margin-bottom: 18px; }
.body ul, .body ol { margin: 0 0 18px 0; padding-left: 24px; }
.body li { font-size: 0.92rem; line-height: 1.95; color: var(--text-main); margin-bottom: 6px; }
.body strong { font-weight: 800; background: linear-gradient(transparent 62%, rgba(241,98,26,0.22) 62%); }
.body a { color: var(--brand); text-underline-offset: 3px; }
.body code {
  background: var(--bg-subtle-strong); border-radius: 5px;
  padding: 2px 6px; font-size: 0.85em;
}
.body blockquote {
  border-left: 3px solid var(--border); padding: 4px 0 4px 16px;
  color: var(--text-sub); font-size: 0.88rem; line-height: 1.9;
  margin: 0 0 18px 0;
}
.body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.body .box {
  background: var(--bg-subtle); border-radius: 14px;
  padding: 18px 20px; margin: 0 0 22px 0;
}
.body .box-title { font-size: 0.85rem; font-weight: 800; margin-bottom: 8px; }
.body .box p:last-child, .body .box ul:last-child, .body .box ol:last-child { margin-bottom: 0; }
.body .box p, .body .box li { font-size: 0.85rem; line-height: 1.9; color: var(--text-sub); }

/* --- CTA --- */

.cta {
  background: var(--black); color: var(--white);
  border-radius: 20px; padding: 28px 24px;
  margin: 36px 0; text-align: center;
}
.cta-label {
  display: inline-block; background: var(--brand); color: var(--white);
  font-size: 0.68rem; font-weight: 700; padding: 5px 12px;
  border-radius: 999px; margin-bottom: 12px;
}
.cta-title { font-size: 1.1rem; font-weight: 800; line-height: 1.55; margin-bottom: 10px; }
.cta-text {
  font-size: 0.82rem; color: rgba(255,255,255,0.72);
  line-height: 1.85; margin-bottom: 20px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; max-width: 340px;
  padding: 15px 24px; border-radius: 14px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
}
.btn-primary { background: var(--line-green); color: var(--white); }
.btn:active { opacity: 0.75; }

/* --- related / disclaimer --- */

.related { margin-top: 40px; }
.related h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; text-decoration: none;
}
.card:hover { border-color: var(--black); }
.card-cat { font-size: 0.68rem; font-weight: 700; color: var(--brand); }
.card-title { font-size: 0.88rem; font-weight: 700; line-height: 1.55; }

.disclaimer {
  font-size: 0.7rem; color: var(--text-muted); line-height: 1.8;
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .media-hero h1 { font-size: 2rem; }
  .article h1 { font-size: 2rem; }
  .body p, .body li { font-size: 0.98rem; }
}
