/*
Theme Name: EA Kensho Note
Theme URI: https://ea-kensho-note.com/
Author: EA検証ノート
Description: EA（自動売買）の検証記録サイト用の軽量テーマ。広告表記バー、自動目次、広告枠ショートコード、メタ情報の出力、ダークモードに対応。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ea-kensho-note
*/
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #5d6570;
  --line: #e2ded5;
  --accent: #0f5e4d;
  --accent-soft: #e6f1ee;
  --neg: #a63a2b;
  --pos: #0f5e4d;
  --max: 720px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2024;
    --text: #e8e6e1;
    --muted: #9aa3ad;
    --line: #2e343a;
    --accent: #6fcdb6;
    --accent-soft: #1d2f2b;
    --neg: #e58b7c;
    --pos: #6fcdb6;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: "palt";
}
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; padding-top: 16px; padding-bottom: 14px; }
.site-name { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: .04em; }
.site-nav { display: flex; gap: 18px; font-size: .88rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.pr-bar { font-size: .78rem; color: var(--muted); background: var(--accent-soft); padding: 6px 0; }
main { padding: 36px 0 72px; }
h1 { font-size: 1.65rem; line-height: 1.5; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.6; margin: 56px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
h3 { font-size: 1.05rem; margin: 36px 0 8px; }
p { margin: 0 0 1.3em; }
.lead { color: var(--muted); font-size: .95rem; }
.meta { color: var(--muted); font-size: .82rem; margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 7px; font-size: .75rem; }
.post-list { list-style: none; padding: 0; margin: 28px 0 0; }
.post-list li { border-top: 1px solid var(--line); padding: 22px 0; }
.post-list a.title { font-size: 1.1rem; font-weight: 700; line-height: 1.6; text-decoration: none; color: var(--text); }
.post-list a.title:hover { color: var(--accent); }
.post-list p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.table-scroll { overflow-x: auto; margin: 0 0 1.6em; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); font-weight: 600; white-space: nowrap; }
td:nth-child(n+2) { white-space: nowrap; }
blockquote { margin: 0 0 1.4em; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); font-size: .92rem; }
blockquote p:last-child { margin: 0; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 3px; font-size: .88em; }
strong { font-weight: 700; }
.note { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 16px 18px; font-size: .86rem; color: var(--muted); margin: 40px 0 0; line-height: 1.8; }
.offers { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 18px; margin: 40px 0 0; }
.offers h2 { margin: 0 0 10px; font-size: 1rem; border: 0; padding: 0; }
.offers ul { margin: 0; padding-left: 1.2em; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .8rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
@media (max-width: 520px) {
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.12rem; }
}

/* ---- WordPress 用の追加 ---- */
img, video { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; background: var(--surface); padding: 8px 12px; z-index: 10; }
.site-nav ul, .site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.site-footer nav ul { gap: 4px 16px; }
.breadcrumb { font-size: .78rem; color: var(--muted); margin: 0 0 18px; }
.breadcrumb a { color: var(--muted); }
.archive-title { font-size: 1.3rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .3em; }
.entry-content figure { margin: 0 0 1.6em; }
.entry-content figcaption { font-size: .8rem; color: var(--muted); text-align: center; }
.entry-content .wp-block-table, .entry-content .table-scroll { overflow-x: auto; }
.entry-content .wp-block-table table { margin: 0; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.toc { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 14px 18px; margin: 0 0 2em; font-size: .9rem; }
.toc-title { font-weight: 700; margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 2px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.ad-box { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 16px 18px; margin: 2em 0; position: relative; }
.ad-box::before { content: "広告"; position: absolute; top: -10px; left: 12px; background: var(--muted); color: var(--bg); font-size: .68rem; padding: 0 8px; border-radius: 3px; line-height: 1.7; }
.ad-box-title { font-weight: 700; margin: 0 0 6px; }
.ad-box > *:last-child { margin-bottom: 0; }
.related { margin-top: 48px; }
.related h2 { font-size: 1rem; margin: 0 0 4px; border: 0; padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { border-top: 1px solid var(--line); padding: 10px 0; font-size: .92rem; }
.related a { text-decoration: none; color: var(--text); font-weight: 600; }
.related a:hover { color: var(--accent); }
.pagination { margin: 32px 0 0; font-size: .9rem; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { border: 1px solid var(--line); border-radius: 4px; padding: 2px 11px; text-decoration: none; background: var(--surface); }
.pagination .page-numbers.current { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.search-form { display: flex; gap: 8px; margin: 16px 0; }
.search-form input[type=search] { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 1rem; }
.search-form input[type=submit] { padding: 8px 16px; border: 0; border-radius: 4px; background: var(--accent); color: var(--bg); font-size: .9rem; cursor: pointer; }
