:root {
  --navy: #1b3766;
  --navy-dark: #142b52;
  --page: #dfe5ee;
  --surface: #ffffff;
  --detail-bg: #eef2f8;
  --text: #111418;
  --text-2: #2b2f36;
  --muted: #6b7280;
  --divider: #e3e7ee;
  --plate: #fdf1dc;
  --pill: #cfd7e6;
  --red: #d81b4f;
  --blue: #1e6fd9;
  --orange: #f08a24;
  --green: #2ead5b;
  --slate: #8a97ab;
  --dot: #f2a93b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: currentColor;
}

.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 24px rgba(20, 43, 82, 0.12);
}

.app--detail {
  background: var(--detail-bg);
  padding-bottom: 32px;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 8px;
  background: var(--navy);
  color: #fff;
}

.appbar__title {
  position: absolute;
  left: 104px;
  right: 104px;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.appbar__actions {
  display: flex;
  margin-left: auto;
}

[hidden] {
  display: none !important;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.icon-btn svg {
  width: 26px;
  height: 26px;
}

.refreshed {
  margin: 0;
  padding: 12px 12px 4px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--divider);
}

.case-list {
  list-style: none;
  margin: 0;
  padding: 8px 8px 96px;
}

.case-list li + li {
  margin-top: 12px;
}

.case-card {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 4px;
  column-gap: 12px;
  padding: 10px 12px 10px 18px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  border-left: 6px solid var(--slate);
  transition: box-shadow 0.15s ease;
}

.case-card:hover,
.case-card:focus-visible {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.case-card__number {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.case-card__date {
  justify-self: end;
  font-size: 15px;
  color: var(--muted);
}

.case-card__status {
  font-size: 17px;
  color: var(--text-2);
}

.case-card__new {
  justify-self: end;
  align-self: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

.case-card__change {
  font-size: 15px;
  color: var(--muted);
}

.case-card__form {
  justify-self: end;
  font-size: 15px;
  color: var(--muted);
}

.is-red { border-left-color: var(--red); }
.is-blue { border-left-color: var(--blue); }
.is-orange { border-left-color: var(--orange); }
.is-green { border-left-color: var(--green); }
.is-slate { border-left-color: var(--slate); }

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  padding: 8px 0 12px;
  background: #f6f7f9;
  border-top: 1px solid var(--divider);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #6a6f78;
}

.tab svg {
  width: 28px;
  height: 28px;
}

.tab--active {
  color: var(--navy);
  font-weight: 700;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 8px;
  color: var(--text);
}

.page-title {
  margin: 12px 24px 24px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.card {
  margin: 0 24px 24px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--surface);
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.case-head__number {
  font-size: 19px;
  font-weight: 700;
}

.case-head__copy svg {
  width: 18px;
  height: 18px;
}

.case-head__meta {
  font-size: 16px;
  color: var(--muted);
  word-spacing: 4px;
}

.case-head__desc {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--muted);
}

.plate {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--plate);
}

.plate__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
}

.plate__text {
  flex: 1;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text-2);
}

.plate__btn {
  flex: none;
  padding: 12px 18px;
  border-radius: 24px;
  background: #2a4a85;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status__updated {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.status__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 12px;
  font-size: 19px;
  font-weight: 700;
}

.square {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: var(--slate);
}

.square.is-red { background: var(--red); }
.square.is-blue { background: var(--blue); }
.square.is-orange { background: var(--orange); }
.square.is-green { background: var(--green); }
.square.is-slate { background: var(--slate); }

.status__text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-2);
}

.status__link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: 18px;
  font-weight: 700;
}

.status__link svg {
  width: 22px;
  height: 22px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 24px 16px;
}

.history-head__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 24px;
  background: var(--pill);
  font-size: 17px;
  font-weight: 700;
}

.pill svg {
  width: 20px;
  height: 20px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  position: relative;
  padding: 0 0 20px 24px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item .square {
  position: absolute;
  top: 5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 2px;
  left: 4px;
  border-left: 1px dotted #7d8593;
}

.timeline__date {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.timeline__title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.timeline__text {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.35;
  color: var(--text-2);
}

@media (max-width: 380px) {
  .case-card__number { font-size: 19px; }
  .case-card__status { font-size: 16px; }
  .page-title { margin-left: 16px; margin-right: 16px; font-size: 34px; }
  .card { margin-left: 16px; margin-right: 16px; padding: 16px; }
  .history-head { margin-left: 16px; margin-right: 16px; }
  .plate { flex-wrap: wrap; }
}

.track-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 24px 16px;
}

.track-head__title {
  flex: 1;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.track-head__pro {
  padding: 4px 10px;
  border-radius: 10px;
  background: #dcdfe5;
  color: #555b66;
  font-size: 14px;
}

.track-head svg {
  width: 26px;
  height: 26px;
}

.track {
  margin: 0 24px 24px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--surface);
}

.track summary {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}

.track summary::-webkit-details-marker {
  display: none;
}

.track__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--plate);
  color: var(--dot);
}

.track__icon svg {
  width: 28px;
  height: 28px;
}

.track--ok .track__icon {
  background: #e3f5ea;
  color: var(--green);
}

.track__head {
  flex: 1;
  min-width: 0;
}

.track__title {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.track__sub {
  display: block;
  overflow: hidden;
  font-size: 16px;
  color: var(--text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track[open] .track__sub {
  white-space: normal;
}

.track__chevron svg {
  width: 26px;
  height: 26px;
  transition: transform 0.15s ease;
}

.track[open] .track__chevron svg {
  transform: rotate(180deg);
}

.track__body {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-2);
}

.section-label {
  margin: 14px 24px 10px;
  font-size: 19px;
  color: var(--muted);
}

.latest {
  display: block;
  margin: 0 24px;
  padding: 26px 16px;
  border-radius: 4px;
  background: #0bab55;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 3px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hist {
  margin: 0 24px;
}

.hist summary {
  display: inline-block;
  min-width: 184px;
  padding: 14px 16px;
  border-radius: 4px;
  background: #3f5f99;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1.5px;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hist summary::-webkit-details-marker {
  display: none;
}

.hist__less,
.hist[open] .hist__more {
  display: none;
}

.hist[open] .hist__less {
  display: inline;
}

.hist__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.hist__list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 18px;
}

.tf {
  margin: 36px 24px 0;
}

.tf__title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 400;
  color: var(--muted);
}

.tf__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
}

.tf__row:last-of-type {
  border-bottom: 0;
}

.tf__label {
  max-width: 200px;
  font-size: 18px;
  line-height: 1.2;
}

.tf__value {
  font-size: 20px;
  font-weight: 700;
}

.wide-btn {
  display: block;
  margin: 12px 0 96px;
  padding: 16px;
  border-radius: 4px;
  background: #3f5f99;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.news {
  list-style: none;
  margin: 0;
  padding: 8px 8px 96px;
}

.news li + li {
  margin-top: 14px;
}

.news-card {
  padding: 12px 12px 10px;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.news-card__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #1c3a6b;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 16px;
}

.news-card__time {
  font-size: 15px;
  color: var(--muted);
}

.res {
  padding: 4px 12px 110px;
}

.res__label {
  margin: 12px 0 6px;
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
}

.res__btn {
  display: block;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 4px;
  background: #3f5f99;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.icon-btn--close svg {
  width: 34px;
  height: 34px;
}

.app--quiz {
  display: flex;
  flex-direction: column;
}

.quiz {
  counter-reset: score;
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.quiz input[data-correct]:checked {
  counter-increment: score;
}

.quiz__screen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  visibility: hidden;
  flex-direction: column;
  padding: 16px 24px 24px;
}

.quiz:has(#s0:checked) #q0,
.quiz:has(#s1:checked) #q1,
.quiz:has(#s2:checked) #q2,
.quiz:has(#s3:checked) #q3,
.quiz:has(#s4:checked) #q4,
.quiz:has(#s5:checked) #q5,
.quiz:has(#s6:checked) #q6 {
  position: static;
  display: flex;
  flex: 1;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  visibility: visible;
}

.quiz__intro {
  margin: auto 0;
  text-align: center;
}

.quiz__intro h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
}

.quiz__intro p {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.quiz__btn {
  display: block;
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: #3f5f99;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.quiz__hint {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}

.q__pills {
  display: flex;
  justify-content: space-between;
}

.qpill {
  width: 122px;
  padding: 12px 0;
  border-radius: 8px;
  background: #2b3a55;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

@property --t {
  syntax: "<integer>";
  initial-value: 30;
  inherits: false;
}

@keyframes countdown {
  from { --t: 30; }
  to { --t: 0; }
}

.qpill--timer {
  counter-reset: t var(--t);
  color: #4ade80;
}

.qpill--timer::after {
  content: counter(t) "s";
}

.quiz:has(#s1:checked) #q1 .qpill--timer,
.quiz:has(#s2:checked) #q2 .qpill--timer,
.quiz:has(#s3:checked) #q3 .qpill--timer,
.quiz:has(#s4:checked) #q4 .qpill--timer,
.quiz:has(#s5:checked) #q5 .qpill--timer {
  animation: countdown 30s linear forwards;
}

.q:has(.ans input:checked) .qpill--timer {
  visibility: hidden;
}

.q:has(input[data-correct]:checked) .qpill--count {
  background: #0a9a17;
}

.q:has(.ans input:checked:not([data-correct])) .qpill--count {
  background: #ef5050;
}

.q__title {
  margin: 20px 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.q__answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ans {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #46536b;
  color: #eef1f6;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.ans:has(input:focus-visible) {
  outline: 3px solid #9db4e0;
}

.q:has(.ans input:checked) .ans {
  pointer-events: none;
}

.ans__letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #2c3a52;
  font-size: 22px;
}

.ans__text {
  flex: 1;
}

.ans__radio {
  flex: none;
  width: 30px;
  height: 30px;
  border: 2px solid #b8bfcb;
  border-radius: 50%;
}

.q:has(.ans input:checked) .ans:has(input[data-correct]) .ans__letter {
  color: #16a34a;
}

.q:has(.ans input:checked) .ans:has(input[data-correct]) .ans__radio {
  border-color: #14821f;
  background: #14821f;
  box-shadow: inset 0 0 0 5px #46536b;
}

.ans:has(input:checked:not([data-correct])) .ans__letter {
  color: #ef4444;
}

.ans:has(input:checked:not([data-correct])) .ans__radio {
  background: #b8bfcb;
  box-shadow: inset 0 0 0 4px #46536b;
}

.quiz__next {
  margin-top: auto;
}

.q__answers {
  margin-bottom: 32px;
}

.quiz__result {
  text-align: center;
}

.quiz__result h2 {
  margin: 24px 0 8px;
  font-size: 30px;
  font-weight: 700;
}

.score {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  color: var(--navy);
}

.score__n::before {
  content: counter(score);
}

.score-label {
  margin: 0 0 24px;
  font-size: 18px;
  color: var(--muted);
}

.review {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.review li {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}

.review__q {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.review__a {
  margin: 4px 0 0;
  font-size: 16px;
  color: #14821f;
}

.quiz__link {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.app--flow {
  display: flex;
  flex-direction: column;
  padding: 0 24px 32px;
  background: #f0f1f4;
}

.flow__top {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  margin-left: -12px;
  color: #26282c;
}

.steps {
  position: absolute;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.steps span {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: #d4d7dd;
}

.steps .on {
  background: #3b6db3;
}

.flow__title {
  margin: 12px 0 12px;
  font-family: "Rubik", "Roboto", sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: #26282c;
}

.flow__sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #6b6f76;
}

.flow__h2 {
  margin: 20px 0;
  font-family: "Rubik", "Roboto", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #26282c;
}

.type {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  font-size: 20px;
  font-weight: 700;
  color: #26282c;
}

.type__icon svg {
  width: 40px;
  height: 40px;
  fill: initial;
}

.type__chevron {
  margin-left: auto;
  color: #5b5f66;
}

.type__chevron svg {
  width: 24px;
  height: 24px;
}

.flow__form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
  font-size: 17px;
  color: #26282c;
}

.field-label svg {
  width: 24px;
  height: 24px;
}

.input,
.select {
  width: 100%;
  padding: 20px 24px;
  border: 1px solid #d3d6dc;
  border-radius: 18px;
  background: var(--surface);
  color: #26282c;
  font: inherit;
  font-size: 20px;
}

.input {
  text-transform: uppercase;
}

.input::placeholder {
  color: #a9acb2;
}

.input:focus,
.select:focus {
  outline: 2px solid #3b6db3;
  outline-offset: -1px;
}

.select-wrap {
  position: relative;
}

.select {
  padding-right: 56px;
  appearance: none;
  -webkit-appearance: none;
}

.select:invalid {
  color: #a9acb2;
}

.select option {
  color: #26282c;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  pointer-events: none;
}

.chip {
  align-self: flex-start;
  margin-top: 16px;
  padding: 8px 14px;
  border-radius: 18px;
  background: #dcdee3;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.why {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  background: #e3e4e9;
}

.why h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.why p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #6b6f76;
}

.why svg {
  flex: none;
  width: 72px;
  height: 56px;
  fill: initial;
}

.flow__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-top: 32px;
}

.flow__alt {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 500;
  color: #8a8d93;
}

.btn-primary {
  display: block;
  width: 100%;
  max-width: 330px;
  padding: 16px;
  border: 0;
  border-radius: 24px;
  background: #2c4a80;
  color: #fff;
  font: inherit;
  font-size: 18px;
  letter-spacing: 1px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 380px) {
  .app--flow { padding-left: 16px; padding-right: 16px; }
  .flow__title { font-size: 36px; }
  .track-head, .track { margin-left: 16px; margin-right: 16px; }
  .latest, .hist, .tf { margin-left: 16px; margin-right: 16px; }
  .quiz__screen { padding-left: 16px; padding-right: 16px; }
  .qpill { width: 100px; }
}
