/*
Theme Name: Social Antenna
Description: Social Antenna専用の記事自動生成向け子テーマ
Author: Social Antenna
Version: 1.0.1
Template: cocoon-master
Text Domain: social-antenna
*/

:root {
  --sa-navy: #102a43;
  --sa-blue: #1f4e79;
  --sa-teal: #087f8c;
  --sa-teal-dark: #075f68;
  --sa-teal-soft: #eaf7f7;
  --sa-line: #d9e4ea;
  --sa-muted: #627487;
  --sa-surface: #f6f9fb;
  --sa-warning: #fff7d6;
  --sa-warning-line: #ecd983;
  --sa-width: 1180px;
  --sa-radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.sa-site {
  margin: 0;
  color: var(--sa-navy);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: var(--sa-teal-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--sa-blue); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.sa-header { border-top: 4px solid var(--sa-teal); background: #fff; }
.sa-header__inner { width: min(calc(100% - 40px), var(--sa-width)); margin: 0 auto; min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.sa-brand { display: inline-flex; align-items: center; gap: 13px; color: var(--sa-navy); text-decoration: none; }
.sa-brand__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sa-teal); color: #fff; font-size: 22px; font-weight: 800; line-height: 1; }
.sa-brand__name { display: block; font-size: 25px; font-weight: 800; letter-spacing: .01em; line-height: 1.25; }
.sa-brand__tagline { display: block; color: var(--sa-muted); font-size: 12px; font-weight: 500; }
.sa-search { display: flex; width: min(350px, 34vw); border: 1px solid var(--sa-line); border-radius: 9px; overflow: hidden; background: var(--sa-surface); }
.sa-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 14px; font: inherit; color: var(--sa-navy); }
.sa-search button { border: 0; padding: 0 15px; background: var(--sa-teal); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

.sa-nav { border-top: 1px solid #edf2f5; border-bottom: 1px solid var(--sa-line); background: #fff; }
.sa-nav__inner { width: min(calc(100% - 40px), var(--sa-width)); margin: 0 auto; display: flex; align-items: stretch; justify-content: center; overflow-x: auto; scrollbar-width: thin; }
.sa-nav a { min-width: max-content; padding: 14px 21px; color: var(--sa-navy); text-decoration: none; font-size: 14px; font-weight: 700; border-bottom: 3px solid transparent; }
.sa-nav a:hover, .sa-nav a[aria-current="page"] { color: var(--sa-teal-dark); border-bottom-color: var(--sa-teal); }
.sa-nav__icon { color: var(--sa-teal); margin-right: 7px; }

.sa-breadcrumb { width: min(calc(100% - 40px), var(--sa-width)); margin: 0 auto; padding: 19px 0 15px; color: var(--sa-muted); font-size: 13px; }
.sa-breadcrumb a { color: var(--sa-muted); text-decoration: none; }
.sa-breadcrumb__sep { padding: 0 9px; color: #9aa9b6; }

.sa-layout { width: min(calc(100% - 40px), var(--sa-width)); margin: 0 auto 72px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 54px; align-items: start; }
.sa-article { min-width: 0; }
.sa-category { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 17px; padding: 5px 13px; color: var(--sa-teal-dark); background: var(--sa-teal-soft); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 700; }
.sa-title { margin: 0; font-size: clamp(30px, 4.1vw, 48px); line-height: 1.38; letter-spacing: .015em; font-weight: 800; color: var(--sa-navy); }
.sa-lead { margin: 22px 0 0; color: #475f73; font-size: 18px; line-height: 1.9; }
.sa-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 21px 0 0; padding-bottom: 25px; border-bottom: 1px solid var(--sa-line); color: var(--sa-muted); font-size: 13px; }
.sa-trust { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 32px; padding: 14px 17px; background: var(--sa-surface); border-radius: 8px; color: #53687a; font-size: 13px; }
.sa-trust__icon { color: var(--sa-teal); font-weight: 800; font-size: 18px; line-height: 1.5; }

.sa-answer { margin: 0 0 32px; padding: 25px 28px; background: var(--sa-teal-soft); border-left: 5px solid var(--sa-teal); border-radius: 5px var(--sa-radius) var(--sa-radius) 5px; }
.sa-answer h2 { margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; font-size: 21px !important; }
.sa-answer p:last-child { margin-bottom: 0; }
.sa-warning { margin: 28px 0; padding: 20px 24px; background: var(--sa-warning); border: 1px solid var(--sa-warning-line); border-radius: 9px; }
.sa-warning strong:first-child { display: block; margin-bottom: 8px; color: #725c00; }

.sa-content { color: #243f55; }
.sa-content > :first-child { margin-top: 0; }
.sa-content p { margin: 0 0 1.35em; }
.sa-content h2 { scroll-margin-top: 20px; margin: 2.5em 0 .85em; padding: 0 0 .45em; border-bottom: 3px solid var(--sa-teal); color: var(--sa-navy); font-size: 27px; line-height: 1.5; }
.sa-content h3 { scroll-margin-top: 20px; margin: 2em 0 .7em; padding-left: 13px; border-left: 4px solid #75bec3; color: var(--sa-navy); font-size: 21px; line-height: 1.55; }
.sa-content ul, .sa-content ol { margin: 0 0 1.5em; padding-left: 1.55em; }
.sa-content li { margin: .45em 0; padding-left: .25em; }
.sa-content code { padding: .12em .36em; color: #7d2730; background: #f4f1f1; border-radius: 4px; font-family: Consolas, Monaco, monospace; }
.sa-content table { width: 100%; margin: 25px 0 30px; border-collapse: collapse; font-size: 14px; }
.sa-content th { color: #fff; background: var(--sa-blue); text-align: left; }
.sa-content th, .sa-content td { padding: 12px 14px; border: 1px solid var(--sa-line); }
.sa-content tr:nth-child(even) td { background: var(--sa-surface); }
.sa-content blockquote { margin: 25px 0; padding: 16px 22px; border-left: 4px solid var(--sa-teal); background: var(--sa-surface); }

.sa-inline-toc { display: none; }
.sa-aside { position: sticky; top: 24px; }
.sa-aside__section { padding: 22px; border: 1px solid var(--sa-line); border-radius: var(--sa-radius); background: #fff; box-shadow: 0 8px 30px rgba(16,42,67,.06); }
.sa-aside__section + .sa-aside__section { margin-top: 20px; }
.sa-aside__title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--sa-navy); font-size: 16px; }
.sa-toc { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.sa-toc li { position: relative; margin: 0; padding: 9px 0 9px 30px; border-top: 1px solid #edf2f5; line-height: 1.5; counter-increment: toc; }
.sa-toc li:first-child { border-top: 0; }
.sa-toc li::before { content: counter(toc, decimal-leading-zero); position: absolute; left: 0; top: 10px; color: var(--sa-teal); font-size: 11px; font-weight: 800; }
.sa-toc a { color: #385267; text-decoration: none; font-size: 13px; }
.sa-toc a:hover { color: var(--sa-teal-dark); text-decoration: underline; }
.sa-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-keyword { padding: 5px 10px; color: #4b6579; background: var(--sa-surface); border-radius: 999px; font-size: 12px; }
.sa-about { color: #53687a; font-size: 13px; line-height: 1.7; }
.sa-about p { margin: 0; }

.sa-footer { border-top: 1px solid var(--sa-line); background: var(--sa-surface); }
.sa-footer__inner { width: min(calc(100% - 40px), var(--sa-width)); margin: 0 auto; padding: 34px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--sa-muted); font-size: 12px; }
.sa-footer a { color: var(--sa-muted); margin-left: 18px; }

.sa-list { width: min(calc(100% - 40px), 900px); margin: 36px auto 72px; }
.sa-list__title { margin-bottom: 28px; font-size: 36px; }
.sa-card { padding: 25px 0; border-top: 1px solid var(--sa-line); }
.sa-card__title { margin: 0 0 8px; font-size: 23px; line-height: 1.5; }
.sa-card__title a { color: var(--sa-navy); text-decoration: none; }
.sa-card__excerpt { margin: 0; color: var(--sa-muted); }

.toc, #toc, .pum-overlay, [id^="popmake-"] { display: none !important; }

@media (max-width: 900px) {
  .sa-header__inner { min-height: 82px; }
  .sa-brand__tagline { display: none; }
  .sa-layout { grid-template-columns: 1fr; gap: 30px; }
  .sa-aside { position: static; }
  .sa-aside__section:first-child { display: none; }
  .sa-inline-toc { display: block; margin: 28px 0; padding: 20px; border: 1px solid var(--sa-line); border-radius: 10px; }
}

@media (max-width: 640px) {
  body.sa-site { font-size: 15px; }
  .sa-header__inner { width: min(calc(100% - 28px), var(--sa-width)); min-height: 76px; }
  .sa-brand__mark { width: 38px; height: 38px; }
  .sa-brand__name { font-size: 20px; }
  .sa-search { width: auto; border: 0; background: transparent; }
  .sa-search input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .sa-search button { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 0; }
  .sa-search button::after { content: "⌕"; font-size: 23px; }
  .sa-nav__inner { justify-content: flex-start; width: 100%; padding: 0 7px; }
  .sa-nav a { padding: 12px 13px; font-size: 12px; }
  .sa-breadcrumb, .sa-layout { width: min(calc(100% - 28px), var(--sa-width)); }
  .sa-breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sa-layout { margin-bottom: 48px; }
  .sa-title { font-size: 29px; line-height: 1.45; }
  .sa-lead { font-size: 16px; }
  .sa-answer { padding: 21px 19px; }
  .sa-content h2 { font-size: 23px; }
  .sa-content h3 { font-size: 19px; }
  .sa-content table { display: block; overflow-x: auto; white-space: nowrap; }
  .sa-footer__inner { display: block; }
  .sa-footer__links { margin-top: 12px; }
  .sa-footer a { margin: 0 16px 0 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
