/* Sodak skin - records page */
/* ---------- Hero records ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; overflow: hidden; padding: 22px 24px 22px; }
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 75% at 0% 0%, var(--glow), transparent 72%); opacity: .3; }
:root[data-theme="dark"] .hero::before { opacity: .22; }
.hero > * { position: relative; }
.hero .t-head { margin-bottom: 4px; }
.hero-v { font-size: 104px; font-weight: 300; letter-spacing: -0.06em; line-height: 0.95; margin: 10px 0 0 -6px; white-space: nowrap; }
.hero-v .dec { font-size: 42px; letter-spacing: -0.03em; color: var(--muted); vertical-align: top; position: relative; top: 12px; margin-left: 2px; }
.hero-v .deg { font-size: 50px; color: var(--faint); vertical-align: top; position: relative; top: 6px; }
.hero-name { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin-top: 16px; }
.hero-when { color: var(--muted); margin-top: 2px; font-size: 14px; }
.hero-ctx { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }
.hero-ctx .kv b .chk { margin-left: 6px; }
.yrs { border-left: 1px solid var(--border); padding-left: 24px; display: flex; flex-direction: column; }
.yrs .label { margin-bottom: 14px; }
.yr { display: grid; grid-template-columns: 38px minmax(0, 1fr) 50px; align-items: center; gap: 10px; height: 30px; font-size: 12.5px; }
.yr .y { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.yr .v { text-align: right; font-weight: 500; }
.yr .b { height: 6px; border-radius: 6px; background: var(--track); position: relative; }
.yr .b i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; background: var(--border-strong); }
.yr.top .y { color: var(--text); font-weight: 500; }
.yr.top .b i { background: var(--hc); }
.yrs .foot { margin-top: auto; padding-top: 10px; font-size: 11px; color: var(--faint); }

/* ---------- Record groups ---------- */
.group { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.group .t-head { margin-bottom: 4px; }
.cells { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); margin: 0 -20px; flex: 1; }
.cell { padding: 16px 20px 18px; min-width: 0; box-shadow: -1px -1px 0 var(--border); display: flex; flex-direction: column; }
.cell .k { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -0.005em; }
.cell .d { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.cell .v { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-top: 12px; white-space: nowrap; display: flex; align-items: baseline; gap: 2px; }
.cell .v small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 3px; }
.cell .v .sw { width: 8px; height: 8px; border-radius: 50%; align-self: center; margin-right: 8px; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.cell .w { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cell.flag .v { color: color-mix(in srgb, var(--text) 62%, transparent); }
.quiet { background: var(--tile-quiet); }
.quiet .cell .v { font-size: 24px; }

/* ---------- Month vs normal ---------- */
.verdict { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; margin: 2px 0 4px; }
.verdict em { font-style: normal; color: var(--warm); }
.verdict em.cool { color: var(--accent); }
.verdict-sub { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.deltas { display: flex; flex-direction: column; }
.delta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 0; }
.delta + .delta { border-top: 1px solid var(--border); }
.delta .k { font-size: 12.5px; color: var(--muted); }
.delta .v { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; white-space: nowrap; }
.delta .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap; justify-self: end; grid-row: span 2; }
.pill.warm { color: var(--warm); background: var(--warm-soft); }
.pill.cool { color: var(--accent); background: var(--accent-soft); }
.pill.flat { color: var(--muted); background: var(--track); }

.chart-tile { display: flex; flex-direction: column; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend i { width: 12px; height: 2px; border-radius: 2px; background: var(--warm); }
.legend i.lo { background: var(--accent); }
.legend i.band { height: 10px; border-radius: 3px; background: var(--band); box-shadow: inset 0 0 0 1px var(--border); }
#mchart { flex: 1; min-height: 330px; margin: 6px -6px -8px -4px; }

.cmp-tile { display: flex; flex-direction: column; }
.cmp { display: flex; flex-direction: column; flex: 1; }
.cmp .crow { flex: 1; min-height: 44px; height: auto; }
.crow { display: grid; grid-template-columns: 74px 52px minmax(0, 1fr) 64px 58px; align-items: center; gap: 14px; height: 44px; }
.crow + .crow { border-top: 1px solid var(--border); }
.crow .y { font-weight: 500; font-size: 14px; }
.crow .y small { display: block; font-weight: 400; color: var(--faint); font-size: 11px; margin-top: -2px; }
.crow .lo, .crow .num { text-align: right; font-size: 13px; color: var(--muted); }
.crow .num { color: var(--text); }
.crow .num small { color: var(--faint); font-size: 11px; margin-left: 2px; }
.crow .avg { font-size: 15px; font-weight: 500; text-align: right; }
.crow.cur .y { color: var(--accent); }
.rbar { position: relative; height: 6px; border-radius: 6px; background: var(--track); }
.rbar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.rbar b { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--tile-solid); border: 2px solid var(--text); transform: translate(-50%, -50%); }
.rbar .norm { position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 1px dashed var(--faint); }
.cmp-h { display: grid; grid-template-columns: 74px 52px minmax(0, 1fr) 64px 58px; gap: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--faint); padding-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.cmp-h span:nth-child(2), .cmp-h span:nth-child(4), .cmp-h span:nth-child(5) { text-align: right; }
.cmp-h span:nth-child(3) { display: flex; justify-content: space-between; text-transform: none; letter-spacing: 0; }

.ext { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -20px -20px; }
.ext .cell { padding: 16px 20px 18px; }
.ext .cell .v { font-size: 26px; margin-top: 8px; }

/* ---------- Year table ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -20px -20px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 0 14px; height: 52px; text-align: right; white-space: nowrap; border-top: 1px solid var(--border); }
th { height: 38px; font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); border-top: 0; }
th:first-child, td:first-child { text-align: left; padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td { font-size: 14px; }
td.yr-c { font-weight: 500; font-size: 15px; }
td.yr-c .cov { margin-left: 8px; font-weight: 400; }
td.rng { width: 34%; min-width: 200px; text-align: left; }
th.rng { text-align: left; }
td .m { color: var(--muted); }
td b { font-weight: 600; }
.star { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; color: var(--tile-solid); width: 15px; height: 15px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; }
.cov { display: inline-flex; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--track); color: var(--muted); }
.tbl-note { font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.tbl-note > span { display: inline-flex; align-items: center; gap: 6px; }
.tbl-note .star { flex: none; }
.cmp-tile.norain .crow, .cmp-tile.norain .cmp-h { grid-template-columns: 74px 52px minmax(0, 1fr) 58px; }
.cmp-tile.norain .cmp-h span:nth-child(4) { text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr) 180px; gap: 20px; }
  .hero-v { font-size: 88px; }
  .cells.c5 { --cols: 3 !important; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px 16px; }
  .hero-v { font-size: 84px; }
  .hero-v .dec { font-size: 34px; top: 10px; }
  .hero-v .deg { font-size: 40px; }
  .hero-name { font-size: 17px; margin-top: 12px; }
  .yrs { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
  .cells, .cells.c5 { --cols: 2 !important; margin: 0 -16px; }
  .cells > .cell:last-child:nth-child(odd) { grid-column: span 2; }
  .cell { padding: 14px 16px 16px; }
  .cell .v { font-size: 25px; margin-top: 10px; }
  .cell .k { font-size: 13px; }
  .cell .w { font-size: 11.5px; }
  .quiet .cell .v { font-size: 22px; }
  .verdict { font-size: 19px; }
  #mchart { min-height: 280px; }
  .legend { gap: 8px 14px; }
  .crow, .cmp-h { grid-template-columns: 52px 40px minmax(0, 1fr) 46px; gap: 10px; }
  .crow .rain, .cmp-h span:nth-child(4) { display: none; }
  .cmp-h span:nth-child(3) em:nth-child(2) { display: none; }
  .crow .avg { font-size: 14px; }
  .ext { margin: 0 -16px -16px; }
  .ext .cell .v { font-size: 22px; }
  .tbl-wrap { margin: 0 -16px -16px; }
  th:first-child, td:first-child { padding-left: 16px; }
  .cmp-tile.norain .crow, .cmp-tile.norain .cmp-h { grid-template-columns: 52px 40px minmax(0, 1fr) 46px; }
  .cmp-tile.norain .cmp-h span:nth-child(4) { display: block; }
}
