/* /site-watch/ のページだけの見た目。色は kj.css の変数だけを使う */
.sw-main { padding-block: 8px 72px; display: flex; flex-direction: column; gap: 40px; max-width: calc(var(--kj-width-text) + 32px + 160px); }
.sw-head { display: flex; flex-direction: column; gap: 12px; }
.sw-head .kj-lead { margin: 0; }
.sw-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-section { display: flex; flex-direction: column; gap: 16px; }
.sw-section > h2, .sw-section > h3 { margin: 0; }
.sw-h3 { font-size: 1.25rem; font-weight: 800; margin: 8px 0 0; }
.sw-p, .sw-note { margin: 0; line-height: 1.8; }
.sw-note { color: var(--color-text-muted); }
.sw-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 数字のタイル */
.sw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sw-stat { border: 3px solid var(--kj-ink); border-radius: 12px; padding: 16px; background: var(--color-surface); min-height: 132px; display: flex; flex-direction: column; gap: 6px; }
.sw-stat__label { font-weight: 700; color: var(--color-text-muted); margin: 0; }
.sw-stat__num { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 0; }
.sw-stat__unit { font-size: 1rem; font-weight: 700; margin-left: 4px; }
.sw-stat__sub { margin: 0; color: var(--color-text-muted); }
.sw-stat--text .sw-stat__num { font-size: clamp(1.25rem, 3.4vw, 1.5rem); line-height: 1.4; }

/* 毎日の件数（縦棒） */
.sw-daily { position: relative; height: 240px; display: flex; flex-direction: column; }
.sw-daily__plot { flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--color-border); position: relative; margin-right: 3.5em; }
.sw-daily__grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--kj-divider); pointer-events: none; }
.sw-daily__gridlabel { position: absolute; left: 100%; top: -0.7em; font-size: 0.875rem; color: var(--color-text-muted); padding-left: 6px; }
.sw-daily__col { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; border: 0; padding: 0; background: none; min-width: 0; }
.sw-daily__bar { width: 100%; background: var(--color-accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.sw-daily__col:hover .sw-daily__bar, .sw-daily__col:focus-visible .sw-daily__bar { background: var(--kj-accent-hover); }
.sw-daily__axis { margin-right: 3.5em; display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--color-text-muted); padding-top: 4px; }
.sw-tip { position: absolute; pointer-events: none; background: var(--kj-inverse); color: var(--kj-on-inverse); padding: 6px 10px; border-radius: 8px; font-size: 1rem; white-space: nowrap; transform: translate(-50%, -100%); z-index: 2; }

/* 横棒 */
.sw-bars { display: flex; flex-direction: column; gap: 6px; }
.sw-bar { display: grid; grid-template-columns: minmax(8em, 13em) 1fr 4.5em; gap: 12px; align-items: center; }
.sw-bar__label { overflow-wrap: anywhere; }
.sw-bar__track { height: 20px; }
.sw-bar__fill { height: 100%; background: var(--color-accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.sw-bar__val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 560px) {
	.sw-bar { grid-template-columns: 1fr 4.5em; gap: 4px 12px; }
	.sw-bar__label { grid-column: 1 / -1; }
}

/* 表 */
.sw-table-wrap { overflow-x: auto; }
.sw-table-wrap:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.sw-table--wide { min-width: 680px; }
.sw-table td.nowrap { white-space: nowrap; }
.sw-table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.sw-table th, .sw-table td { border-bottom: 1px solid var(--kj-divider); padding: 8px 10px; text-align: left; vertical-align: top; }
.sw-table th { font-weight: 800; border-bottom: 2px solid var(--color-border); }
.sw-table td.num, .sw-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-table code { overflow-wrap: anywhere; }
.sw-table-toggle summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

.sw-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.sw-dl > * + * { margin-top: 0; }
.sw-dl dt { font-weight: 800; }
.sw-dl dd { margin: 0; }
@media (max-width: 560px) { .sw-dl { grid-template-columns: 1fr; } .sw-dl dd { margin-bottom: 8px; } }

.sw-error[hidden] { display: none; }
.sw-error p { margin: 0 0 8px; }

/* スケルトン */
.sk { display: block; background: var(--color-surface-strong); border-radius: 4px; animation: sk-pulse 1.6s ease-in-out infinite; }
.sk-label { height: 1rem; width: 60%; }
.sk-short { width: 40%; }
.sk-num { height: 2.75rem; width: 50%; margin-block: 6px; }
.sk-chart { height: 100%; }
.sk-bars { height: 200px; }
.sk-table { height: 320px; }
@keyframes sk-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
