:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: #243a33;
  background: #fff;
  font-synthesis: none;
  --accent: #24775f;
  --muted: #64726c;
  --border: #e5ebe7;
  --plot-height: 160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.75; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, summary, a, [tabindex] { -webkit-tap-highlight-color: transparent; }
:is(select, input, button, summary, a, [tabindex]):focus-visible {
  outline: 3px solid #79b9a4;
  outline-offset: 4px;
}

.container { width: min(100% - 40px, 760px); margin: 0 auto; padding-bottom: 48px; }
.header { padding: 40px 0 30px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
h1 { margin: 10px 0 8px; font-size: clamp(27px, 7vw, 40px); line-height: 1.4; letter-spacing: -.045em; font-weight: 700; }
.year { display: inline-block; margin-top: 18px; padding: 5px 10px; border-radius: 6px; background: #f4f7f5; color: #52665b; font-size: 11px; font-weight: 500; }

.card { min-width: 0; margin-bottom: 18px; padding: 22px 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
h2 { margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: -.025em; font-weight: 700; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label { display: flex; flex-direction: column; gap: 9px; color: #3e5148; font-size: 12px; font-weight: 600; }
select, input { min-width: 0; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #dbe3dd; border-radius: 9px; background: #fff; color: #2b4137; font-size: 16px; line-height: 1.5; transition: border-color .15s; }
select { padding-right: 8px; }
select:hover, input:hover { border-color: #9fb8aa; }
input::placeholder { color: #8a958e; opacity: 1; }
.filter-label { width: 144px; flex-shrink: 0; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.filter-label select { min-height: 44px; padding: 9px 10px; background: #f8faf8; font-size: 16px; }
.stat { margin-top: 24px; }
.stat-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.stat > div { display: flex; align-items: baseline; gap: 6px; }
.stat strong { font-size: 40px; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat > div > span { color: var(--muted); font-size: 12px; }
.muted { margin: 20px 0 4px; color: var(--muted); font-size: 13px; }
.muted:empty { display: none; }

.histogram { position: relative; margin-top: 12px; }
.chart-container { margin: 0 20px; }
.chart-grid { position: relative; display: grid; grid-template-columns: 12px repeat(209, minmax(0, 1fr)) 12px; width: 100%; height: calc(var(--plot-height) + 56px); }
.chart-grid::before { content: ""; position: absolute; inset: 30px 0 26px; border-bottom: 1px solid #dbe4dd; background: linear-gradient(#edf1ee 1px, transparent 1px) 0 0 / 100% 50%; pointer-events: none; }
.chart-item { position: relative; min-width: 0; }
.bar-trigger { position: absolute; inset: 30px 0 26px; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; cursor: pointer; }
.bar-trigger:focus-visible { z-index: 2; outline-offset: 0; }
.bar { position: absolute; bottom: 0; left: 0; width: 100%; height: var(--bar-height); background: #80b8a5; pointer-events: none; }
.bar.empty { background: transparent; }
.bar-trigger:is(:hover, :focus) .bar:not(.empty) { background: var(--accent); }
.bar-count { position: absolute; bottom: calc(var(--bar-height) + 7px); left: 50%; z-index: 3; padding: 2px 7px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: #304f40; font-size: 11px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; }
.bar-trigger:is(:hover, :focus) .bar-count { opacity: 1; }
.chart-item.below .bar-count { left: 0; transform: none; }
.chart-item.above .bar-count { right: 0; left: auto; transform: none; }
.bar-label { position: absolute; bottom: 0; left: 0; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; line-height: 20px; white-space: nowrap; transform: translateX(-50%); }
.chart-item:is(.below, .above) .bar-label { left: 50%; }
.chart-y-axis { position: absolute; top: 30px; bottom: auto; left: -8px; display: flex; flex-direction: column; justify-content: space-between; width: 23px; height: var(--plot-height); color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; line-height: 1; text-align: right; }
.chart-y-axis span { transform: translateY(-50%); }
.chart-y-axis span:last-child { transform: translateY(50%); }
.chart-axis-title { margin-top: 10px; color: var(--muted); font-size: 10px; text-align: center; }

.post-card { background: #fbfcfb; }
.fields { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
.score-field { position: relative; }
.score-field input { padding-right: 42px; font-variant-numeric: tabular-nums; }
.score-field > span { position: absolute; top: 50%; right: 15px; color: var(--muted); font-size: 13px; font-weight: 400; transform: translateY(-50%); pointer-events: none; }
.turnstile { margin-top: 20px; }
.turnstile:empty { margin-top: 0; }
.turnstile iframe { max-width: 100%; }
.submit { width: 100%; min-height: 52px; margin-top: 20px; padding: 13px 18px; border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .03em; cursor: pointer; transition: background .15s; }
.submit:hover:not(:disabled) { background: #1d614e; }
.submit:active:not(:disabled) { background: #174d3e; }
.submit:disabled { background: #e7ede8; color: #68796e; cursor: not-allowed; }
.form-status { min-height: 1.75em; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.form-status:empty { display: none; }
.form-status.error { color: #aa3838; }
.form-status.success { color: #21664e; }

.about { margin-top: 30px; padding: 0 2px; }
.about h2 { color: #51665a; font-size: 12px; font-weight: 600; }
.about p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
details { margin: 14px 0; color: var(--muted); font-size: 11px; }
summary { width: fit-content; padding: 5px 0; color: #526c5c; cursor: pointer; }
.source { margin-top: 14px !important; }

@media (min-width: 600px) {
  :root { --plot-height: 190px; }
  .container { padding-bottom: 64px; }
  .header { padding: 64px 0 36px; }
  .year { font-size: 12px; }
  .card { padding: 30px 32px; margin-bottom: 22px; border-radius: 18px; }
  h2 { font-size: 20px; }
  .filter-label { width: 172px; font-size: 11px; }
  .filter-label select { font-size: 14px; }
  .stat { margin-top: 20px; }
  .stat strong { font-size: 44px; }
  .histogram { margin-top: 16px; }
  .chart-y-axis, .bar-label, .chart-axis-title { font-size: 11px; }
  .fields { grid-template-columns: 1fr 1fr; gap: 20px; }
  label { font-size: 13px; }
  .submit { margin-top: 24px; }
  .form-status { font-size: 12px; }
  .about { margin-top: 34px; padding: 0 4px; }
  .about p, details { font-size: 12px; }
}

@media (max-width: 359px) {
  .container { width: calc(100% - 24px); }
  .card { padding: 20px 16px; }
  .section-head { gap: 8px; }
  .filter-label { width: 132px; }
  h2 { font-size: 16px; }
}

@media (max-width: 759px) {
  .chart-item[data-start="200"] .bar-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
