/* ============================================================
   legal.css — Shared styles for Atode legal pages
   (terms.html / privacy.html)

   Design tokens match AtodePalette light theme:
     --color-primary:       #FFFFFF
     --color-surface:       #F2F2F2
     --color-text:          #333333
     --color-supplementary: #808080
     --color-accent:        #4CAF82  (green)
     font: Kiwi Maru
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg:           #ffffff;
  --surface:      #f2f2f2;
  --surface-2:    #e8e8e8;
  --border:       #e0e0e0;
  --text:         #333333;
  --text-muted:   #808080;
  --accent:       #4caf82;
  --accent-hover: #3a9e71;
  --accent-dim:   rgba(76, 175, 130, 0.12);
  --link:         #2e8b5a;
  --font:         'Kiwi Maru', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  --radius:       8px;
  --max-width:    760px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
}

/* ---------- Layout ---------- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- Header ---------- */
.site-header {
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.site-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 13px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Language Switcher ---------- */
.lang-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
}

.lang-btn {
  padding: 5px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}

/* ---------- Page Title ---------- */
.page-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

/* ---------- Language Sections ---------- */
.lang-section { display: block; }
.lang-section.hidden { display: none; }

/* ---------- Article Content ---------- */
article h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin: 32px 0 10px;
  scroll-margin-top: 24px;
}

article p {
  margin-bottom: 14px;
  color: var(--text);
}

article ul, article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

article li {
  margin-bottom: 6px;
  list-style-type: disc;
}

article strong {
  color: var(--text);
  font-weight: 500;
}

article em {
  color: var(--text-muted);
  font-style: italic;
}

article a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ---------- Table of Contents (terms.html) ---------- */
.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
}

.toc-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.toc ol {
  padding-left: 18px;
  column-count: 2;
  column-gap: 24px;
}

.toc li {
  font-size: 13px;
  margin-bottom: 5px;
  list-style-type: decimal;
  break-inside: avoid;
}

.toc a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ---------- Contact Block (terms.html) ---------- */
.contact-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 40px;
}

.contact-block h3 {
  margin-top: 0;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ---------- Privacy Notice Box (privacy.html) ---------- */
.notice-box {
  background: var(--accent-dim);
  border: 1px solid rgba(76, 175, 130, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text);
}

/* ---------- Service List (privacy.html) ---------- */
.service-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
}

.service-item strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 14px;
}

.service-item p {
  font-size: 14px;
  margin-bottom: 8px;
}

.service-item a {
  font-size: 13px;
  color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body { font-size: 14px; }
  .page-wrapper { padding: 28px 16px 56px; }
  .page-title { font-size: 18px; }
  .toc ol { column-count: 1; }
}
