:root {
  color-scheme: light;
  font-family: system-ui, Tahoma, sans-serif;
  color: #10294b;
  background: #f2f8ff;
  line-height: 1.65;
  overflow-wrap: anywhere;
  scroll-padding-block-end: calc(var(--bottom-nav-height, 0px) + .45rem);
  --primary: #1454a3;
  --border: #cfdef0;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, .button {
  color: #fff; background: var(--primary); padding: .72rem 1.05rem;
  border: 1px solid transparent; border-radius: .9rem; cursor: pointer;
  text-decoration: none; display: inline-block; text-align: center; max-inline-size: 100%;
}
button:disabled { opacity: .63; cursor: default; }
button.secondary, .button.secondary { color: #123b6e; background: #f5faff; border-color: var(--border); }
a { color: #134c97; }
:focus-visible { outline: 3px solid #126be1; outline-offset: 4px; }
.skip { position: fixed; inset-inline-start: 1rem; top: -5rem; z-index: 3; padding: .75rem; background: #fff; }
.skip:focus { top: 1rem; }
.brand {
  display: flex; align-items: center; gap: .65rem; padding: .85rem max(1rem, calc((100vw - 680px) / 2));
  background: #fff; border-bottom: 1px solid var(--border); font-weight: 750; white-space: nowrap;
}
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 12px; color: #fff; background: #1b579f; font-size: .86rem;
}
main { max-width: 700px; margin: 0 auto; padding: 1.1rem 1rem max(7rem, calc(var(--bottom-nav-height, 0px) + 1rem)); }
h1 { font-size: clamp(1.55rem, 4.4vw, 2.1rem); line-height: 1.45; margin: 0 0 .8rem; }
h2 { font-size: 1.1rem; margin: 0 0 .55rem; }
p { margin: .45rem 0 .85rem; }
.panel, .tile {
  background: #fff; border: 1px solid var(--border); border-radius: 1.2rem; padding: 1rem;
  box-shadow: 0 4px 15px #173b7310;
}
.panel + .panel { margin-top: .8rem; }
.hero {
  min-height: 10rem; background: linear-gradient(118deg, #d4eaff, #edf6ff 70%, #dceaff);
  display: flex; flex-direction: column; justify-content: center; margin-bottom: 1rem;
}
.hero h1 { margin: 0; max-width: 19ch; }
.hero p { margin-bottom: 0; color: #324e6c; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.resume p { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.tile { text-decoration: none; color: #173558; min-height: 6.5rem; display: grid; align-content: center; justify-items: start; gap: .32rem; }
.tile:hover, .row-link:hover { background: #eaf4ff; }
.tile span:first-child { color: var(--primary); font-size: 1.25rem; line-height: 1.1; }
.list { display: grid; gap: .55rem; padding: 0; list-style: none; }
.row-link { display: flex; gap: .7rem; align-items: center; padding: .8rem; background: #fff; border: 1px solid var(--border); border-radius: .85rem; text-decoration: none; color: #173558; }
.row-link .number { min-width: 2rem; color: #2c597e; font-variant-numeric: tabular-nums; }
#tabs {
  position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: center; padding: .25rem max(.25rem, calc((100vw - 700px) / 2)) calc(.25rem + env(safe-area-inset-bottom));
}
#tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-inline-size: 0;
  min-height: 54px; text-align: center; gap: 0; font-size: clamp(.68rem, 2.9vw, .9rem); line-height: 1.25;
  text-decoration: none; color: #3a526d; border-radius: .7rem;
}
#tabs [aria-current=page] { background: #e8f3ff; color: #134c97; font-weight: 700; }
.nav-icon { font-size: 1.2rem; line-height: 1.2; }
.back { display: inline-block; margin-bottom: .65rem; }
.status { color: #485e78; }
.error { color: #951d29; }
.good { color: #17613f; }
.controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; min-inline-size: 0; }
input, select, textarea { padding: .62rem; border: 1px solid #a9bfd9; border-radius: .65rem; color: inherit; background: #fff; width: 100%; min-inline-size: 0; }
.stem { font-weight: 700; font-size: 1.2rem; text-align: left; }
.option { text-align: left; margin: 0; }
.word {
  min-inline-size: 24px; min-block-size: 24px;
  color: inherit; background: transparent; padding: .05rem .04rem; border: 0; border-radius: .15rem;
  text-decoration: underline dotted #809fc1; text-underline-offset: .2em;
}
.word:focus-visible { outline-offset: 1px; }
.practice-toolbar { justify-content: space-between; }
@media (max-width: 420px) {
  .resume { align-items: stretch; flex-direction: column; }
  .hero { min-height: 9rem; }
}

fieldset { border: 1px solid var(--border); border-radius: .65rem; min-inline-size: 0; }
.weekdays { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.weekdays label { display: flex; align-items: center; gap: .35rem; }
.weekdays input { width: 1.05rem; height: 1.05rem; }

html.large-text { font-size: 115%; }
.setting { display: flex; align-items: center; gap: .6rem; min-height: 2.25rem; }
.setting input { width: 1.1rem; height: 1.1rem; }
.privacy-summary { margin-top: .8rem; }

.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
.metrics div { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: .55rem; }
.metrics dd { margin: 0; font-weight: 700; }
meter { width: 100%; }

.hazard-video { width: 100%; aspect-ratio: 16 / 9; background: #172d44; border-radius: .7rem; }

#city-banner { position: relative; isolation: isolate; overflow: hidden; gap: .65rem; }
#city-banner .city-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
#city-banner .hero-content { background: #f2f8fff2; border-radius: .85rem; padding: .65rem .8rem; max-width: max-content; }
#city-banner .city-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
#city-banner .city-controls a, #city-banner .city-controls button, #city-banner [data-city] {
  font-size: .8rem; padding: .32rem .45rem; background: #f5faff; color: #123b6e; border-radius: .55rem;
}

.study-task { display: grid; gap: .4rem; }
.study-task button { justify-self: start; }

.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.instructor-photo { display:block; width:96px; height:96px; object-fit:cover; border-radius:16px; }
#public-profile-form label.check, [data-licence] label.check { display:flex; align-items:center; gap:.5rem; }
#public-profile-form label.check input, [data-licence] label.check input { width:auto; }
.setup-key { display:block; overflow-wrap:anywhere; user-select:all; }
.recovery-codes { padding-inline-start:1.5rem; }
.recovery-codes li { margin-block:.45rem; }
.trend-chart { display:flex; gap:.25rem; height:6rem; align-items:stretch; border-bottom:1px solid var(--border); }
.trend-bar { display:flex; justify-content:center; flex:1; min-width:0; }
.trend-bar progress { writing-mode:vertical-lr; direction:rtl; width:min(1.2rem,100%); height:100%; accent-color:#256bb1; }
.trend-range { display:flex; justify-content:space-between; gap:.5rem; margin:.35rem 0 .8rem; font-size:.85rem; }
.trend-table { overflow-x:auto; margin-top:.5rem; }
.trend-table table { border-collapse:collapse; width:100%; font-size:.9rem; }
.trend-table th,.trend-table td { padding:.35rem; border-bottom:1px solid var(--border); text-align:start; }
.trend-table th[scope=col],.trend-table td { min-inline-size:2.5rem; }
.trend-table time { white-space:nowrap; }
.announcement-entry { margin-bottom:.7rem; }
