:root {
  --ink: #121814;
  --muted: #616b66;
  --paper: #fafbfa;
  --line: #dce1de;
  --accent: #2459df;
  --white: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(940px, calc(100% - 48px)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); }
.nav-shell { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 4px; color: var(--white); background: var(--ink); font: 700 12px/1 ui-monospace, monospace; }
.contact-link { text-decoration: none; font-size: 14px; }
.contact-link:hover { color: var(--accent); }
h1, h2, p { margin-top: 0; }
.intro { padding: 52px 0 32px; }
h1 { margin-bottom: 18px; font-size: clamp(34px, 5.2vw, 54px); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; }
.intro-copy { max-width: 670px; margin-bottom: 10px; font-size: 18px; color: #354139; }
.forecast-note { margin: 0; color: var(--muted); font-size: 13px; }
.explorer { overflow: hidden; border: 1px solid #cdd5cf; border-radius: 9px; background: var(--white); box-shadow: 0 14px 40px rgba(18, 24, 20, .045); }
.explorer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.explorer-header h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.demo-label { color: var(--muted); font-size: 12px; }
.explorer-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f7f9f7; }
.segmented, .day-control { display: flex; gap: 3px; }
.segmented button, .day-control button { min-height: 38px; border: 1px solid transparent; border-radius: 5px; padding: 0 12px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 550; cursor: pointer; }
.segmented button:hover, .day-control button:hover { color: var(--ink); background: var(--white); }
.segmented button[aria-selected="true"] { color: var(--ink); border-color: var(--line); background: var(--white); box-shadow: 0 1px 2px rgba(18, 24, 20, .05); }
.day-control button { min-width: 42px; padding: 0 8px; }
.day-control button.is-active { color: var(--white); background: var(--ink); }
.matrix-scroll { overflow-x: auto; padding: 16px; outline: none; }
.matrix-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.schedule-matrix { display: grid; grid-template-columns: 92px repeat(6, minmax(76px, 1fr)); gap: 4px; min-width: 572px; opacity: 1; transition: opacity 120ms ease; }
.schedule-matrix.is-updating { opacity: .45; }
.matrix-corner, .matrix-hour, .matrix-label { display: flex; align-items: center; min-height: 26px; color: var(--muted); font-size: 12px; font-weight: 550; }
.matrix-hour { justify-content: center; text-align: center; }
.matrix-label { padding-right: 8px; color: #354139; }
.matrix-cell { position: relative; min-height: 42px; border: 1px solid transparent; border-radius: 4px; padding: 4px; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform 140ms ease, border-color 140ms ease; }
.matrix-cell:hover, .matrix-cell:focus-visible { z-index: 1; border-color: currentColor; outline: none; transform: translateY(-1px); }
.matrix-cell[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.matrix-cell.available { color: #174a31; background: #d8eee1; }
.matrix-cell.not-offered { color: #6e3025; background: #f1d9d0; }
.matrix-cell.unknown { color: #5b625d; background: repeating-linear-gradient(135deg, #f4f5f4 0 5px, #e4e7e5 5px 10px); }
.matrix-cell.price-low { color: #173253; background: #e6eef9; }
.matrix-cell.price-mid { color: #163e6e; background: #bfd3ee; }
.matrix-cell.price-high { color: #fff; background: #426ea8; }
.matrix-cell.window-short { color: #50351d; background: #f1dfc5; }
.matrix-cell.window-mid { color: #264638; background: #cfe4d8; }
.matrix-cell.window-long { color: #fff; background: #3f725c; }
.explorer-detail { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; min-height: 72px; padding: 12px 22px; background: var(--ink); color: var(--white); }
.detail-title { display: block; margin-bottom: 3px; font-size: 14px; }
.detail-copy, .detail-window { color: #cbd2cd; font-size: 13px; }
.detail-window { text-align: right; }
.boundary { margin: 0; padding: 10px 22px; color: var(--muted); background: #f7f9f7; font-size: 12px; }
.study-link { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 0; margin-top: 14px; text-decoration: none; }
.study-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.study-link h2 { margin-bottom: 7px; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.study-copy { max-width: 570px; margin-bottom: 5px; font-size: 16px; color: #354139; }
.study-note { margin: 0; font-size: 12px; color: var(--muted); }
.study-action { flex-shrink: 0; color: var(--accent); font-size: 14px; font-weight: 600; }
.study-action span { display: inline-block; margin-left: 4px; transition: transform 140ms ease; }
.study-link:hover .study-action span { transform: translate(2px, -2px); }
.study-link:hover h2 { color: var(--accent); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-inner a { text-decoration: none; }
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .nav-shell { min-height: 64px; }
  .intro { padding: 36px 0 26px; }
  .intro-copy { font-size: 16px; }
  .explorer-header { padding: 16px; flex-wrap: wrap; gap: 5px 16px; }
  .explorer-controls { align-items: stretch; flex-direction: column; padding: 10px; gap: 8px; }
  .segmented button, .day-control button { flex: 1; padding: 0 8px; min-height: 42px; }
  .explorer-detail { grid-template-columns: 1fr; gap: 3px; padding: 12px 16px; }
  .detail-window { text-align: left; }
  .boundary { padding: 10px 16px; }
  .study-link { align-items: flex-start; flex-direction: column; gap: 16px; padding: 26px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
