:root {
  --bg: #ffffff;
  --text: #1e2430;
  --muted: #5c6678;
  --accent: #0f766e;        /* ティール : 基調 ( リンク ・ボタン ・強調 ) 2026-10-13 SK 決定 */
  --accent2: #b45309;       /* アンバー : 見出し線 ・記事番号 ・引用枠 ( 資産の記号 ) */
  --accent-weak: #ddf0ee;
  --border: #d6dedd;
  --box: #f3f7f7;
  --btn: #0f766e;
}
/* ダーク : OS 設定追従 ( 手動でライト指定時は除外 ) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101a19;
    --text: #e2e9e8;
    --muted: #98a8a5;
    --accent: #5cc4ba;
    --accent2: #e3a44a;
    --accent-weak: #16302d;
    --border: #2b3a38;
    --box: #15211f;
    --btn: #1d5f58;
    color-scheme: dark;
  }
}
/* ダーク : 手動指定 ( ヘッダーの切替ボタン ) */
:root[data-theme="dark"] {
  --bg: #101a19;
  --text: #e2e9e8;
  --muted: #98a8a5;
  --accent: #5cc4ba;
  --accent2: #e3a44a;
  --accent-weak: #16302d;
  --border: #2b3a38;
  --box: #15211f;
  --btn: #1d5f58;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  line-height: 1.85;
  font-size: 16px;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); }
a:hover { opacity: .85; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); padding: 24px 0; }
.site-header .wrap { display: flex; align-items: center; }
.site-title { font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; text-decoration: none; color: var(--text); }
.site-logo { height: 1.3em; width: auto; vertical-align: -0.26em; margin-right: .45em; border-radius: 22%; }
.site-sub { color: var(--muted); font-size: .8rem; margin-left: 12px; }
@media (max-width: 560px) {
  .site-title { font-size: 1.18rem; }
  .site-sub { display: none; }
}
.theme-toggle {
  margin-left: auto; cursor: pointer; font-family: inherit;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-size: .76rem; white-space: nowrap;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 22px 0 36px; font-size: .85rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.copyright { margin-top: 10px; }

/* hero */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 1.55rem; line-height: 1.5; margin: 0 0 14px; }
.benefits { padding-left: 1.2em; }
.benefits li { margin: 6px 0; }
.hero-cta { margin: 22px 0 8px; }

/* sections */
.section { margin-top: 44px; }
.section h2 { font-size: 1.2rem; border-left: 4px solid var(--accent2); padding-left: 10px; }
/* 記事カード */
.card-grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.card { margin: 0; }
.card > a {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  background: var(--box); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px 14px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card > a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); opacity: 1; }
.card-num { color: var(--accent2); font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.card h3 { margin: 0; font-size: .98rem; line-height: 1.55; }
.card p { margin: 0 0 2px; color: var(--muted); font-size: .86rem; line-height: 1.7; flex-grow: 1; }
.card-more { color: var(--accent); font-size: .84rem; font-weight: 700; }

.cta-box { background: var(--box); border: 1px solid var(--border); border-radius: 10px; padding: 20px 22px; }
.cta-box h2 { border: none; padding-left: 0; margin-top: 0; }
.note { color: var(--muted); font-size: .82rem; }
.pending { color: var(--muted); font-weight: 700; }

.button {
  display: inline-block;
  background: var(--btn);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}
.button:hover { opacity: .9; }
.button-sub { background: transparent; color: var(--accent); border: 2px solid var(--accent); }

/* article */
.article { padding-top: 28px; }
.article h1 { font-size: 1.5rem; line-height: 1.55; }
.byline { color: var(--muted); font-size: .85rem; margin-top: -6px; }
.article h2 { font-size: 1.22rem; margin-top: 2.2em; border-left: 4px solid var(--accent2); padding-left: 10px; }
.article h3 { font-size: 1.05rem; margin-top: 1.8em; }
.article em { font-style: normal; color: var(--muted); font-size: .9rem; }
.article strong { color: inherit; }
.article-foot { margin-top: 40px; font-size: .9rem; }

/* 引用 ( CTA ・注記 ) */
blockquote {
  margin: 1.6em 0;
  padding: 14px 18px;
  background: var(--accent-weak);
  border-left: 4px solid var(--accent2);
  border-radius: 6px;
}
blockquote p { margin: .4em 0; }

/* table */
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: .92rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; white-space: nowrap; }
th { background: var(--box); }

/* 診断フォーム ( /shindan/ ) */
.f-sec { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px 20px; margin: 26px 0; }
.f-sec legend { font-weight: 700; padding: 0 8px; }
.f-item { display: block; margin: 18px 0; }
.f-label { margin: 0 0 8px; font-weight: 500; }
.req { color: var(--accent2); font-size: .74rem; font-weight: 700; border: 1px solid var(--accent2); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.shindan input[type="text"], .shindan input[type="email"], .shindan select, .shindan textarea {
  display: block; width: 100%; margin-top: 8px; padding: 10px 12px; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.shindan input:focus, .shindan select:focus, .shindan textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 8px; background: var(--box); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }
.opt input { margin-top: 4px; accent-color: var(--accent); }
.hp-wrap { position: absolute; left: -9999px; top: -9999px; }
.photo-add { display: inline-block; background: var(--btn); color: #fff; font-weight: 700; border-radius: 8px; padding: 10px 22px; cursor: pointer; }
.photo-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding: 0; }
.photo-grid li { position: relative; margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.photo-size { position: absolute; left: 4px; bottom: 30px; font-size: .68rem; background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; padding: 1px 5px; }
.photo-del { display: block; width: 100%; margin-top: 2px; font: inherit; font-size: .78rem; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; padding: 3px 0; }
.photo-del:hover { color: #c0392b; border-color: #c0392b; }
.form-error { background: #fdecea; color: #b3261e; border: 1px solid #e8b4af; border-radius: 8px; padding: 12px 16px; margin: 18px 0; }
:root[data-theme="dark"] .form-error { background: #3a1f1d; color: #ffb4a9; border-color: #6e3630; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { background: #3a1f1d; color: #ffb4a9; border-color: #6e3630; } }
.progress { background: var(--box); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin: 16px 0; position: relative; }
#progress-bar { background: var(--accent); height: 20px; border-radius: 999px; width: 0; transition: width .2s; }
#progress-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; }
.submit-row { margin: 22px 0 8px; }
.submit-row .button { width: 100%; padding: 14px 22px; font-size: 1.05rem; border: none; cursor: pointer; font-family: inherit; }
.submit-row .button:disabled { opacity: .6; cursor: default; }

/* misc */
hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
code { background: var(--box); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
img { max-width: 100%; height: auto; }
