/* やさい相場ナビ 紹介ページ。外部のフォント・ライブラリは使わない（外部送信を増やさない） */
:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #fcfcfb;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --line: #e2e0d9;
  --grid: #ebe9e3;
  --accent: #2f7d4f;        /* 葉物の緑。ボタン・リンク */
  --accent-ink: #ffffff;
  --series-1: #2a78d6;      /* 東京都（画面と同じ） */
  --series-2: #eb6834;      /* 大阪市 */
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #93928b;
    --line: #2e2e2b;
    --grid: #2a2a27;
    --accent: #5fb383;
    --accent-ink: #0b0b0b;
    --series-1: #3987e5;
    --series-2: #d95926;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1a1a19;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #93928b;
  --line: #2e2e2b;
  --grid: #2a2a27;
  --accent: #5fb383;
  --accent-ink: #0b0b0b;
  --series-1: #3987e5;
  --series-2: #d95926;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--accent); }
nav.site a { color: var(--text-2); text-decoration: none; font-size: 14px; margin-left: 16px; }
nav.site a:hover { color: var(--text); }

.hero { padding: 56px 0 32px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.3; margin: 0 0 16px; letter-spacing: .01em; }
.hero p.lead { font-size: clamp(16px, 2.6vw, 19px); color: var(--text-2); margin: 0 0 28px; max-width: 40em; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-weight: 700; padding: 12px 22px; border-radius: 999px; font-size: 16px;
}
.button:hover { filter: brightness(1.06); }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; }

section { padding: 32px 0; }
section h2 { font-size: 22px; margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid .card h3 { margin: 0 0 6px; font-size: 16px; }
.grid .card p { margin: 0; color: var(--text-2); font-size: 15px; }

/* グラフ */
.chart-card h3 { margin: 0; font-size: 17px; }
.chart-card .sub { color: var(--text-2); font-size: 14px; margin: 2px 0 12px; }
.legend { display: flex; gap: 16px; font-size: 14px; color: var(--text-2); margin-bottom: 4px; flex-wrap: wrap; }
.legend .key { display: inline-block; width: 16px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart .end-label { font-size: 12px; fill: var(--text-2); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--line); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); white-space: nowrap; transform: translate(-50%, -110%);
}
.tooltip .swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.source { color: var(--muted); font-size: 12px; margin-top: 8px; }
details.table-view { margin-top: 8px; font-size: 14px; }
details.table-view summary { cursor: pointer; color: var(--text-2); }
details.table-view .scroll { max-height: 240px; overflow: auto; margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: right; padding: 4px 8px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
dl.facts dt { color: var(--text-2); font-weight: 600; }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 8px; } }

/* 規約などの文書 */
article.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 32px 0; }
article.doc h1 { font-size: 26px; margin-top: 0; }
article.doc h2 { font-size: 18px; margin-top: 28px; }
article.doc table { font-size: 14px; }
article.doc th, article.doc td { text-align: left; vertical-align: top; }
article.doc th:first-child, article.doc td:first-child { min-width: 7em; }
article.doc .scroll table { min-width: 560px; }
article.doc .scroll { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }
footer.site nav a { color: var(--text-2); margin-right: 16px; }
footer.site p { margin: 8px 0 0; }
