:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #20242b;
  background: #f5f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #f5f6f8;
  --card: #fff;
  --ink: #20242b;
  --muted: #737b87;
  --line: #e4e7eb;
  --soft: #f0f2f5;
  --accent: #176b5b;
  --accent-soft: #e5f4ef;
  --danger: #b42318;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #318c7b;
  outline-offset: 2px;
}
.shell {
  width: min(1100px, 100% - 36px);
  margin: 0 auto;
  padding: 42px 0 50px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin: 0;
}
.subtitle {
  color: var(--muted);
  margin: 10px 0 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 2px 7px #1d27320a;
}
.button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 15px;
  font-weight: 650;
  white-space: nowrap;
}
.button.primary {
  background: var(--ink);
  color: white;
}
.button.primary:hover {
  background: #3a424c;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.summary {
  padding: 21px 22px;
  margin-bottom: 15px;
}
.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.big-number {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.04em;
  margin-top: 3px;
}
.summary-stats {
  display: flex;
  gap: clamp(14px, 4vw, 38px);
}
.summary-stats div {
  display: grid;
  gap: 2px;
}
.summary-stats strong {
  font-size: 19px;
}
.summary-stats span {
  font-size: 11px;
  color: var(--muted);
}
.progress-track {
  height: 7px;
  background: #eceff2;
  border-radius: 20px;
  overflow: hidden;
  margin: 17px 0 11px;
}
.progress-track div {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 20px;
  transition: width 0.25s;
}
.summary-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
  padding: 5px;
}
.toolbar {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 29px;
}
.search-wrap {
  flex: 1;
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 10px;
}
.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 0;
  color: var(--ink);
}
.search-icon {
  font-size: 21px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 9px;
}
.filters label {
  display: grid;
  gap: 3px;
}
.filters label span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.filters select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 8px 25px 8px 9px;
  color: var(--ink);
  max-width: 180px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 13px;
}
.section-heading h2 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.025em;
}
.section-heading p {
  margin: 3px 0 0;
  font-size: 12px;
}
.roadmap {
  display: grid;
  gap: 11px;
}
.week {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.week-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  cursor: pointer;
  list-style: none;
}
.week-head::-webkit-details-marker {
  display: none;
}
.week-head:before {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 17px;
}
.week[open] .week-head:before {
  content: "−";
}
.week-title {
  min-width: 0;
  flex: 1;
}
.week-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 730;
}
.week-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.week-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.week-progress {
  width: 65px;
  height: 4px;
  background: var(--soft);
  border-radius: 8px;
  overflow: hidden;
}
.week-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.items {
  border-top: 1px solid var(--line);
  padding: 8px 13px 13px;
}
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 5px;
  border-bottom: 1px solid #f0f1f3;
}
.item:last-child {
  border-bottom: 0;
}
.item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.item-mark {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.item-name {
  font-weight: 620;
  line-height: 1.4;
}
.item-name a {
  color: var(--ink);
  text-decoration: none;
}
.item-name a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.pill {
  font-size: 10px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 5px;
  padding: 2px 6px;
}
.pill.stretch {
  background: #fff1d6;
  color: #875a11;
}
.item-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}
.item-controls select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  padding: 6px 7px;
  color: var(--ink);
  font-size: 11px;
  max-width: 112px;
}
.rev-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.rev-check input {
  accent-color: var(--accent);
}
.notes {
  grid-column: 1/-1;
  width: 100%;
  min-height: 35px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
}
.notes:disabled {
  background: var(--soft);
  color: var(--muted);
}
.item.solved .item-name {
  color: var(--muted);
}
.item.solved .item-name a {
  text-decoration: line-through;
  text-decoration-color: #aab0b8;
}
.empty,
.loading {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 11px;
}
.dialog {
  width: min(410px, calc(100% - 30px));
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 80px #0003;
}
.dialog::backdrop {
  background: #11182766;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.icon-button {
  border: 0;
  background: var(--soft);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 21px;
  color: var(--muted);
}
.dialog form > p.muted {
  font-size: 12px;
  margin: 12px 0 18px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.dialog input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--card);
  color: var(--ink);
  margin-bottom: 7px;
}
.full {
  width: 100%;
  margin-top: 8px;
}
.error {
  color: var(--danger);
  font-size: 12px;
  min-height: 17px;
  margin: 2px 0;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  background: #20242b;
  color: white;
  padding: 10px 15px;
  border-radius: 9px;
  box-shadow: 0 5px 20px #0002;
  transition: all 0.2s;
  z-index: 10;
  font-size: 12px;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.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;
}
@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 620px);
    padding-top: 24px;
  }
  .hero {
    align-items: flex-start;
  }
  .hero .button {
    padding: 9px 10px;
    font-size: 12px;
  }
  .summary-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .summary-stats {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  .filters select {
    max-width: none;
    width: 100%;
    font-size: 11px;
    padding-right: 4px;
  }
  .week-progress {
    display: none;
  }
  .item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .item-controls {
    padding-left: 25px;
    flex-wrap: wrap;
  }
  .notes {
    margin-left: 25px;
    width: calc(100% - 25px);
  }
  footer {
    flex-direction: column;
  }
  .week-head {
    padding: 13px;
  }
  .week-count {
    font-size: 10px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    background: #111418;
    color: #e8ebef;
    --bg: #111418;
    --card: #191d23;
    --ink: #e8ebef;
    --muted: #9aa3ad;
    --line: #2c323a;
    --soft: #222831;
    --accent: #65c7ad;
    --accent-soft: #1c3731;
  }
  .progress-track {
    background: #2c323a;
  }
  .item {
    border-color: #242a31;
  }
  .pill.stretch {
    background: #44351b;
    color: #f3c873;
  }
  .button.primary {
    background: #e8ebef;
    color: #171a1f;
  }
  .button.primary:hover {
    background: white;
  }
  .toast {
    background: #e8ebef;
    color: #171a1f;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.item-main {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.item-mark {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.item-name .open-link {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.item-name .open-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.item.solved .item-label {
  text-decoration: line-through;
  text-decoration-color: #aab0b8;
}
