@font-face { font-family: "Roche Sans"; src: url(assets/fonts/RocheSans-Regular.otf); font-weight: 400; }
@font-face { font-family: "Roche Sans"; src: url(assets/fonts/RocheSansMedium-Medium.ttf); font-weight: 500; }
@font-face { font-family: "Roche Sans"; src: url(assets/fonts/RocheSans-Bold.ttf); font-weight: 700; }
:root {
  --blue: #0b41cd; --blue-accent: #1482fa; --ink: #1d1d1f; --muted: #5f6b7a;
  --line: #e3e7ee; --control: #7d8799; --bg: #f5f7fb; --card: #fff;
  --old: #0b41cd; --new: #8fc1ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Roche Sans", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
header { background: linear-gradient(180deg, #fff, #f8faff); border-bottom: 1px solid var(--line); }
.bar { max-width: 520px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.bar svg { --logo-color: var(--blue); height: 26px; width: auto; flex: none; }
.bar h1 { font-size: 17px; font-weight: 700; margin: 0; }
.bar p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
main { max-width: 520px; margin: 0 auto; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
label { display: block; font-size: 15px; font-weight: 500; text-align: center; margin-bottom: 10px; }
input { display: block; width: 160px; margin: 0 auto; font: inherit; font-size: 34px; font-weight: 700;
        text-align: center; padding: 10px; border: 2px solid var(--control); border-radius: 12px;
        font-variant-numeric: tabular-nums; color: var(--ink); }
input:focus { outline: none; border-color: var(--blue); }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
.result { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.total-label { text-align: center; font-size: 14px; color: var(--muted); }
.total { text-align: center; font-size: 64px; font-weight: 700; color: var(--blue); line-height: 1.1;
         font-variant-numeric: tabular-nums; }
.rows { margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; }
.rows li { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows b { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.note { margin-top: 14px; border-radius: 10px; padding: 11px 13px; font-size: 14px; line-height: 1.4; }
.note.info { background: #eef3ff; color: #1b3a8a; }
details { margin-top: 16px; }
summary { cursor: pointer; color: var(--blue); font-weight: 500; font-size: 15px; }
.plates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.plate h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 6px; text-align: center; }
.grid { display: grid; grid-template-columns: 14px repeat(8, 1fr); gap: 2px; font-size: 10px; }
.grid span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.grid .w { background: #fff; border: 1px solid var(--line); }
.grid .o { background: var(--old); color: #fff; }
.grid .n { background: var(--new); color: #0a2a7a; }
.grid .r { background: repeating-linear-gradient(45deg, var(--control), var(--control) 1.5px, #fff 1.5px, #fff 5px); border: 1px solid var(--control); }
.grid .ax { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rules { font-size: 14px; line-height: 1.5; margin-top: 10px; }
.rules h4 { font-size: 14px; font-weight: 700; margin: 14px 0 4px; }
.rules h4:first-child { margin-top: 4px; }
.rules ol { margin: 0; padding-left: 22px; }
.rules li { margin: 3px 0; }
.rules .src { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.worked { margin-top: 12px; background: var(--bg); border-radius: 10px; padding: 10px 13px; }
.worked ol { margin: 6px 0 0; padding-left: 20px; font-variant-numeric: tabular-nums; }
footer { max-width: 520px; margin: 0 auto; padding: 4px 20px 30px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
[hidden] { display: none !important; }
.dot.old, .legend i.old { background: var(--old); }
.dot.new, .legend i.new { background: var(--new); }
.legend i.reserved { background: repeating-linear-gradient(45deg, var(--control), var(--control) 1.5px, #fff 1.5px, #fff 4px); border: 1px solid var(--control); }
.legend i.free { border: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
