:root {
  --bg-deep: #FFFFFF;
  --bg-mid: #F7F9FC;
  --bg-card: #FFFFFF;
  --gold: #C9A961;
  --gold-bright: #B89651;
  --cream: #FFFFFF;
  --text: #0F2A5C;
  --text-muted: #4B5876;
  --text-subtle: #8A92A5;
  --border: rgba(201,169,97,0.2);
  --border-strong: rgba(201,169,97,0.4);
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}
/* === Dark mode override (HQ task #4 systematic fix 2026-05-29) === */
@media (prefers-color-scheme: dark) {
 :root:not([data-theme="light"]) {
  --bg-deep: #0A1530;
  --bg-mid: #0F1F45;
  --bg-card: #142855;
  --bg-card-deep: #0F1F45;
  --bg-card-hover: #1A2E60;
  --bg-input: #1A2E60;
  --bg-input-subtle: #122150;
  --text: #F0F4F9;
  --text-muted: #B0BBD0;
  --text-subtle: #7A8AA8;
  --border: rgba(240, 244, 249, 0.12);
  --border-strong: rgba(240, 244, 249, 0.22);
  --assistant-bubble: #142855;
 }
}
:root[data-theme="dark"] {
 --bg-deep: #0A1530;
 --bg-mid: #0F1F45;
 --bg-card: #142855;
 --bg-card-deep: #0F1F45;
 --bg-card-hover: #1A2E60;
 --bg-input: #1A2E60;
 --bg-input-subtle: #122150;
 --text: #F0F4F9;
 --text-muted: #B0BBD0;
 --text-subtle: #7A8AA8;
 --border: rgba(240, 244, 249, 0.12);
 --border-strong: rgba(240, 244, 249, 0.22);
 --assistant-bubble: #142855;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse at top, rgba(201,169,97,0.05) 0%, transparent 50%);
}
.nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: #0F2A5C;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--gold);
}
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.nav-cta {
  padding: 10px 22px; background: var(--gold); color: var(--bg-deep);
  border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 14px;
}
.nav-cta:hover { background: var(--gold-bright); }
.container { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.article-meta {
  padding: 32px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
/* === Article cover image (top of article header) === */
.cover-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  margin: 0 0 28px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0F2A5C 0%, #1a3a72 60%, #C9A961 100%);
  box-shadow: 0 8px 32px rgba(15, 42, 92, 0.18);
}
.cover-image img,
.cover-image object,
.cover-image svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cover-image .cover-ribbon {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 42, 92, 0.72);
  border: 1px solid rgba(201, 169, 97, 0.45);
  border-radius: 999px;
  color: #C9A961;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
@media (max-width: 600px) {
  .cover-image { margin-bottom: 20px; border-radius: 10px; }
  .cover-image .cover-ribbon { top: 12px; left: 12px; padding: 4px 10px; font-size: 10px; }
}
.crumb { font-size: 12px; color: var(--text-subtle); letter-spacing: 0.16em; margin-bottom: 16px; }
.crumb a { color: var(--text-muted); text-decoration: none; }
.crumb a:hover { color: var(--gold); }
h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.4;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.lead {
  font-size: 17px; color: var(--text-muted); line-height: 1.9;
  margin-bottom: 24px;
}
.byline {
  display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-subtle);
}
.byline img { width: 28px; height: 28px; border-radius: 50%; }
article { padding-bottom: 80px; }
article h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
article h3 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  font-weight: 700;
  margin: 32px 0 12px;
}
article p { margin-bottom: 18px; color: var(--text); }
article ul, article ol { padding-left: 24px; margin-bottom: 18px; }
article li { margin-bottom: 8px; color: var(--text); }
article strong { color: var(--gold-bright); font-weight: 700; }
article em { color: var(--text); font-style: normal; font-weight: 500; }
article code {
  background: rgba(201,169,97,0.1); padding: 2px 6px; border-radius: 4px;
  font-size: 14px; color: var(--gold-bright);
}
article blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(201,169,97,0.06);
  padding: 16px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text);
  border-radius: 0 8px 8px 0;
}
article blockquote .author {
  display: block; margin-top: 8px; font-style: normal;
  color: var(--text-muted); font-size: 13px;
}
article table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  background: var(--bg-card); border-radius: 8px; overflow: hidden;
}
article th, article td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
article th { background: rgba(201,169,97,0.1); color: var(--gold); font-weight: 700; }
article hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-mid));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}
.cta-card h3 {
  font-family: var(--serif); color: var(--gold);
  font-size: 22px; margin-bottom: 12px;
}
.cta-card p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }
.cta-btn {
  display: inline-block; padding: 14px 32px;
  background: var(--gold); color: var(--bg-deep);
  border-radius: 100px; text-decoration: none; font-weight: 700;
  font-size: 15px; letter-spacing: 0.04em;
}
.cta-btn:hover { background: var(--gold-bright); }
.related {
  margin: 40px 0;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.related h3 {
  font-family: var(--serif); color: var(--gold);
  font-size: 16px; letter-spacing: 0.12em; margin-bottom: 16px;
}
.related a {
  display: block; padding: 12px 0;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.related a:last-child { border-bottom: none; }
.related a:hover { color: var(--gold); }
.disclaimer {
  font-size: 11px; color: var(--text-subtle); padding: 16px;
  background: rgba(201,169,97,0.04);
  border-radius: 8px; margin-top: 32px;
  border: 1px solid var(--border);
}
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center; font-size: 12px; color: var(--text-subtle);
  margin-top: 80px;
}
footer.site-footer a { color: var(--text-muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--gold); }
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  article h2 { font-size: 22px; }
  article h3 { font-size: 18px; }
  .container { padding: 0 16px; }
}
