/* content-base.css v1.0.0 */
/* リセット・デザイントークン・タイポグラフィ・共通レイアウト */

/* === Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Design Tokens === */
:root {
  /* Base */
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F8F7F4;

  /* Text */
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #5A5A5A;
  --color-text-tertiary: #737373;

  /* Brand (Gold) */
  --color-gold: #D4A017;
  --color-gold-light: #F5E6B8;
  --color-gold-dark: #A07C00;

  /* Accent */
  --color-accent: #2563EB;
  --color-accent-hover: #1D4ED8;
  --color-success: #16A34A;
  --color-warning: #EA580C;

  /* Border & Shadow */
  --color-border: #E5E5E5;
  --color-border-gold: #E8D48B;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

  /* Typography */
  --font-heading: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --leading-tight: 1.3;
  --leading-normal: 1.8;
  --leading-relaxed: 2.0;

  /* Spacing */
  --space-section: 64px;
  --space-section-mobile: 40px;
  --container-article: 720px;
  --container-landing: 960px;
  --container-padding: 24px;
  --container-padding-mobile: 16px;
}

/* === Base Styles === */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Focus === */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* === Skip Navigation === */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #FFFFFF;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
  text-decoration: none;
}

.skip-nav:focus {
  top: 0;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: 16px;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 3px solid var(--color-gold);
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}

li {
  margin-bottom: 6px;
}

img {
  max-width: 100%;
  height: auto;
}

/* === Layout === */
.container {
  max-width: var(--container-article);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container--wide {
  max-width: var(--container-landing);
}

/* === Article Layout (2-column with TOC) === */
.article-layout {
  max-width: var(--container-article);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.article-toc {
  text-align: left;
}

/* === Section === */
.section {
  padding: var(--space-section) 0;
}

.section--alt {
  background: var(--color-surface-alt);
}

/* === Hero: Article Type === */
.article-header {
  padding: 40px 0 32px;
  border-bottom: 2px solid var(--color-gold);
  margin-bottom: var(--space-section-mobile);
}

.article-header h1 {
  margin-bottom: 12px;
}

.article-meta {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-bottom: 16px;
}

.article-lead {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* === Hero: Landing Page Type === */
.hero {
  background: var(--color-surface-alt);
  padding: 80px 0;
  text-align: center;
  border-bottom: 2px solid var(--color-gold);
  margin-bottom: var(--space-section);
}

.hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: 16px;
  border-left: none;
  padding-left: 0;
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

/* === Breadcrumb === */
.breadcrumb {
  padding: 16px 0;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: var(--color-text-tertiary);
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--color-text-tertiary);
}

.breadcrumb a {
  color: var(--color-text-secondary);
}

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

/* === CTA Band === */
.cta-band {
  background: var(--color-surface-alt);
  border-top: 2px solid var(--color-border-gold);
  border-bottom: 2px solid var(--color-border-gold);
  padding: 48px 0;
  text-align: center;
}

.cta-band h2 {
  border-left: none;
  padding-left: 0;
  text-align: center;
  margin-bottom: 24px;
}

/* === Responsive === */

/* Desktop (1024px+): TOC card style removed, show as plain list */
@media (min-width: 1024px) {
  .article-toc .toc {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
  }

  .article-toc .toc summary::after {
    display: none;
  }

  .article-content {
    min-width: 0;
  }
}

/* Medium desktop (1024-1279px): TOC inline above content */
@media (min-width: 1024px) and (max-width: 1279px) {
  .article-toc {
    margin-bottom: 24px;
  }
}

/* Wide desktop (1280px+): TOC fixed to left edge */
@media (min-width: 1280px) {
  .article-layout {
    position: relative;
  }

  .article-toc {
    position: fixed;
    top: 80px;
    left: 24px;
    width: 180px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

@media (max-width: 1023px) {
  .article-toc {
    margin-bottom: 24px;
  }

  .article-toc:has(details:not([open])) {
    margin-bottom: 8px;
  }
}

@media (max-width: 767px) {
  :root {
    --space-section: 40px;
    --container-padding: 16px;
  }

  h1 {
    font-size: var(--text-2xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .article-header {
    padding: 24px 0;
  }
}
