@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 500; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'); }

:root {
  --page: #fff; --frozen: #F1F4F4; --ink: #14191B; --sec: #525C61; --hair: #DCE2E3; --rule: #B9C2C5; --edge: #7B878C;
  --petrol: #0D6560; --petrol-h: #0A4F4B; --tint: #E3F0EE; --err: #A4262C;
  --h1: #D5EBE7; --h2: #AFD8D1; --h3: #84C1B8; --h4: #58A59C; --h5: #257870; --h6: #145F58; --h7: #08403B;
  --r: 4px; --stick: 0px;
  --sans: 'Barlow', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --cond: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.45 var(--sans); font-variant-numeric: tabular-nums; }
a { color: var(--petrol); text-underline-offset: 2px; }
a:hover { color: var(--petrol-h); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--cond); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec { color: var(--sec); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.top { border-bottom: 1px solid var(--hair); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font: 600 22px/1 var(--cond); letter-spacing: -0.01em; }
.mark svg { display: block; }
.top nav { display: flex; gap: 6px; align-items: center; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 0 10px; height: 44px; display: inline-flex; align-items: center; border-radius: var(--r); }
.top nav a:hover { background: var(--frozen); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--edge); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn:hover { background: var(--frozen); color: var(--ink); }
.btn.pri { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn.pri:hover { background: var(--petrol-h); border-color: var(--petrol-h); color: #fff; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--petrol); padding: 0 10px; }
.btn.quiet:hover { background: var(--tint); color: var(--petrol-h); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { flex: none; }

label.f { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.hint { font-size: 13px; color: var(--sec); }
input[type=text], select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--edge); border-radius: var(--r); background: #fff; padding: 9px 11px; }
textarea { min-height: 72px; resize: vertical; }
select { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314191B' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--petrol); outline-offset: 0; border-color: var(--petrol); }

.seg { display: inline-flex; border: 1px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.seg button { min-height: 42px; padding: 0 14px; border: 0; background: #fff; font-weight: 600; cursor: pointer; border-left: 1px solid var(--edge); }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed=true], .seg button[aria-selected=true] { background: var(--ink); color: #fff; }
.seg button:not([aria-pressed=true]):not([aria-selected=true]):hover { background: var(--frozen); }
.seg .n { font-weight: 500; opacity: .8; margin-left: 4px; }

.err { color: var(--err); font-weight: 500; }
.err:empty { display: none; }

/* timetable figures: hour heavier than minutes */
.tt { font-family: var(--cond); font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tt b { font-weight: 600; }

/* grid */
.grid { --tcol: 64px; --rh: 26px; display: grid; grid-template-columns: var(--tcol) repeat(var(--cols), minmax(0, 1fr)); user-select: none; -webkit-user-select: none; }
.grid[data-slot="60"] { --rh: 34px; }
.grid[data-slot="15"] { --rh: 18px; }
.grid .gc, .grid .dh { position: sticky; top: var(--stick); z-index: 2; background: var(--frozen); border-bottom: 1px solid var(--rule); }
.grid .dh { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 54px; padding: 4px 2px; border: 0; border-left: 1px solid var(--hair); border-bottom: 1px solid var(--rule); font: inherit; color: var(--ink); cursor: pointer; }
div.dh { cursor: default; }
.grid .dh:hover { background: #E6EBEB; }
.dh .dw { font-size: 12px; font-weight: 500; color: var(--sec); line-height: 1.1; }
.dh .dw.big { font: 600 16px/1 var(--cond); color: var(--ink); }
.dh .dn { font: 600 21px/1.05 var(--cond); }
.dh .dm { font-size: 11px; color: var(--sec); line-height: 1.1; }
.grid .th { display: flex; align-items: flex-start; justify-content: flex-end; padding: 0 9px 0 0; height: var(--rh); border: 0; background: var(--frozen); font-size: 13px; color: var(--ink); line-height: 1; cursor: pointer; }
div.th { cursor: default; }
.grid .th .tt { transform: translateY(-50%); background: var(--frozen); padding: 1px 0; }
.grid .th.lead .tt { transform: none; padding-top: 3px; }
.grid .th:not(.hr) .tt { color: var(--sec); font-size: 12px; }
.grid .c { height: var(--rh); border-left: 1px solid var(--hair); border-top: 1px solid var(--hair); background: #fff; position: relative; transition: background-color .15s var(--ease); }
.grid .c.hr { border-top-color: var(--rule); }
.grid .c.x { background: var(--frozen); }
.grid .gap { grid-column: 1 / -1; height: 10px; background: var(--frozen); border-top: 1px solid var(--rule); }
.grid.paint .c { touch-action: none; cursor: crosshair; transition: none; }
.grid.paint .c.on { background: var(--petrol); border-top-color: rgba(255,255,255,.18); }
.grid.paint .c.on + .c.on { border-left-color: rgba(255,255,255,.18); }
.grid .c[data-l="1"] { background: var(--h1); } .grid .c[data-l="2"] { background: var(--h2); } .grid .c[data-l="3"] { background: var(--h3); }
.grid .c[data-l="4"] { background: var(--h4); } .grid .c[data-l="5"] { background: var(--h5); } .grid .c[data-l="6"] { background: var(--h6); } .grid .c[data-l="7"] { background: var(--h7); }
.grid .c .k { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 500 12px/1 var(--cond); color: var(--ink); pointer-events: none; }
.grid .c[data-l="5"] .k, .grid .c[data-l="6"] .k, .grid .c[data-l="7"] .k { color: #fff; }
.grid[data-slot="15"] .c .k { display: none; }
.grid .c.sel { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1; }
.grid .c.lk::after { content: ''; position: absolute; inset: 0 -1px; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); pointer-events: none; }
.grid .c.lk.lk0::after { border-top: 3px solid var(--ink); }
.grid .c.lk.lk1::after { border-bottom: 3px solid var(--ink); }
.grid .c:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1; }
.grid .c.off { opacity: .35; }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 8px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease); z-index: 50; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

dialog { border: 1px solid var(--rule); border-radius: var(--r); padding: 0; width: min(520px, calc(100vw - 24px)); color: var(--ink); }
dialog::backdrop { background: rgba(20, 25, 27, .45); }
dialog[open] { animation: rise .18s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
dialog form { padding: 20px; }
dialog h2 { font-size: 24px; margin-bottom: 4px; }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog .fld { margin-top: 14px; }
dialog .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

footer.foot { border-top: 1px solid var(--hair); margin-top: 64px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 18px; padding-bottom: 28px; font-size: 14px; color: var(--sec); }
footer.foot a { color: var(--sec); }
footer.foot a:hover { color: var(--ink); }

@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .grid { --tcol: 52px; --rh: 28px; }
  .grid[data-slot="60"] { --rh: 36px; }
  .grid[data-slot="15"] { --rh: 20px; }
  .dh .dn { font-size: 19px; }
  .grid .th { padding-right: 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
