*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f4f7fa;
  color: #0f1f2c;
  font: 16px/1.5 "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

button, input, select {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
  flex: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid #2e5b7a;
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
}

.glass {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.on-image {
  color: #f8fafc;
  text-shadow: 0 2px 24px rgba(15, 31, 44, 0.45);
}

.rise {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    transform: scale(0.6);
  }
  to {
    transform: scale(1);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.hero {
  position: relative;
  isolation: isolate;
  height: 68vh;
  min-height: 440px;
  max-height: 760px;
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15, 31, 44, 0.55) 0%, rgba(15, 31, 44, 0.15) 38%, rgba(15, 31, 44, 0.25) 62%, #f4f7fa 100%);
}
.hero__side {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 31, 44, 0.5) 0%, rgba(15, 31, 44, 0.2) 45%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 82%);
}
.hero__inner {
  max-width: 768px;
  height: 100%;
  margin: 0 auto;
  padding: 24px 20px 160px;
  display: flex;
  flex-direction: column;
}
.hero__brand {
  font: 500 0.875rem "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.02em;
}
.hero__text {
  margin-top: auto;
}
.hero__kicker {
  font: 500 0.75rem "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.9;
  margin: 0;
}
.hero h1 {
  margin-top: 12px;
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.95;
}
.hero__lead {
  margin: 16px 0 0;
  max-width: 28rem;
  opacity: 0.95;
}

.wrap {
  position: relative;
  z-index: 10;
  max-width: 768px;
  margin: -128px auto 0;
  padding: 0 16px;
}

.panel {
  border: 1px solid rgba(220, 229, 236, 0.7);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #2e5b7a;
  color: #f8fafc;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  background: rgb(14.7535014006%, 29.1862745098%, 39.1288515406%);
}
.btn--soft {
  background: #cfdde8;
  color: #0f1f2c;
}
.btn--soft:hover {
  background: rgb(74.415907208%, 81.8779342723%, 87.7409555371%);
}
.btn--outline {
  background: #ffffff;
  color: #0f1f2c;
  border-color: #dce5ec;
}
.btn--outline:hover {
  background: #edf1f5;
}
.btn--ghost {
  background: transparent;
  color: #0f1f2c;
}
.btn--ghost:hover {
  background: #edf1f5;
}
.btn--danger {
  background: #c8412f;
}
.btn--danger:hover {
  background: rgb(68.7147733587%, 22.3323013416%, 16.1479717393%);
}
.btn--icon {
  width: 44px;
  padding: 0;
}
.btn--sm {
  height: 36px;
  padding: 0 12px;
}

.toolbar {
  position: relative;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toolbar__list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.toolbar__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #5d7183;
}
.toolbar select {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 40px 0 14px;
  border: 1px solid #cfdae4;
  border-radius: 12px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d7183' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
}
.toolbar select:focus-visible {
  outline-offset: 1px;
}
.toolbar__btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar__btns > .btn:not(.btn--icon) {
  flex: 1;
}

.menu {
  position: relative;
}
.menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  width: 208px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #dce5ec;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
  animation: fadeIn 0.15s ease;
}
.menu__list button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: none;
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.menu__list button svg {
  width: 16px;
  height: 16px;
}
.menu__list button:hover:not(:disabled) {
  background: #edf1f5;
}
.menu__list button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.menu__list button.danger {
  color: #c8412f;
}
.menu__list hr {
  border: 0;
  border-top: 1px solid #dce5ec;
  margin: 4px 0;
}

.status {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-top: 16px;
}
.status__top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 0 4px;
}
.status__row p {
  margin: 0;
  font-size: 0.875rem;
  color: #5d7183;
}
.status__row strong {
  font: 600 1rem "Space Grotesk", system-ui, sans-serif;
  color: #0f1f2c;
  font-variant-numeric: tabular-nums;
}
.status__pct {
  font: 600 0.875rem "Space Grotesk", system-ui, sans-serif;
  color: #2e5b7a;
  font-variant-numeric: tabular-nums;
}
.status .done {
  margin-left: 4px;
  color: #2e5b7a;
  font-weight: 500;
}

.search {
  position: relative;
  flex: 1;
}
.search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #5d7183;
  pointer-events: none;
}
.search__icon svg {
  width: 16px;
  height: 16px;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #edf1f5;
  font-size: 1rem;
}
.search input::-webkit-search-cancel-button {
  display: none;
}
.search input:focus {
  background: #ffffff;
  border-color: #cfdae4;
  outline: 2px solid #2e5b7a;
  outline-offset: 1px;
}
.search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #5d7183;
  cursor: pointer;
}
.search__clear svg {
  width: 16px;
  height: 16px;
}
.search__clear:hover {
  background: #cfdde8;
  color: #0f1f2c;
}

.progress {
  height: 8px;
  margin-top: 8px;
  border-radius: 99px;
  background: #cfdde8;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e5b7a, #4f8bb0);
  transition: width 0.5s ease-out;
}

.categories {
  margin-top: 24px;
}

.cat {
  margin-bottom: 20px;
  break-inside: avoid;
  background: #ffffff;
  border: 1px solid rgba(220, 229, 236, 0.7);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.06), 0 8px 24px -12px rgba(15, 31, 44, 0.18);
}
.is-first .cat {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.cat__head:hover {
  background: rgba(237, 241, 245, 0.5);
}
.cat__head:focus-visible {
  outline-offset: -2px;
}
.cat__title {
  margin: 0;
  font: inherit;
  letter-spacing: normal;
}
.cat__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #cfdde8;
  color: #2e5b7a;
  transition: background 0.2s, color 0.2s;
}
.cat.is-complete .cat__icon {
  background: #2e5b7a;
  color: #f8fafc;
}
.cat__main {
  flex: 1;
  min-width: 0;
}
.cat__name {
  display: block;
  font: 600 17px/1.2 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.cat__bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #cfdde8;
  overflow: hidden;
}
.cat__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e5b7a, #4f8bb0);
  transition: width 0.5s;
}
.cat__count {
  font-size: 0.75rem;
  font-weight: 500;
  color: #5d7183;
  font-variant-numeric: tabular-nums;
}
.cat__chev {
  color: #5d7183;
  transition: transform 0.2s;
}
.cat__chev.is-closed {
  transform: rotate(-90deg);
}
.cat__body {
  padding: 0 8px 12px;
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.item__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.15s;
}
.item__row:hover {
  background: #edf1f5;
}
.item.is-checked .item__row {
  background: rgba(237, 241, 245, 0.6);
}
.item__label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}
.item__label input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.item__name {
  font-size: 15px;
  line-height: 1.35;
  transition: color 0.15s;
}
.item.is-checked .item__name {
  color: #5d7183;
  text-decoration: line-through;
  text-decoration-color: rgba(46, 91, 122, 0.4);
}

.box {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #cfdae4;
  border-radius: 6px;
  background: #ffffff;
  color: transparent;
  transition: all 0.15s;
}
.box svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.is-checked .box {
  background: #2e5b7a;
  border-color: #2e5b7a;
  color: #f8fafc;
}
.is-checked .box svg {
  animation: pop 0.2s ease-out;
}
input:focus-visible + .box {
  outline: 2px solid #2e5b7a;
  outline-offset: 2px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #5d7183;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn:hover, .icon-btn.is-active {
  background: #cfdde8;
  color: #2e5b7a;
}
.icon-btn--del:hover {
  background: rgba(200, 65, 47, 0.1);
  color: #c8412f;
}

@media (hover: hover) and (min-width: 640px) {
  .icon-btn--del {
    opacity: 0;
  }
  .item:hover .icon-btn--del, .icon-btn--del:focus-visible {
    opacity: 1;
  }
}
.tip {
  margin: 4px 12px 8px;
  padding: 8px 12px;
  border-left: 2px solid #2e5b7a;
  border-radius: 8px;
  background: #e3ebf2;
  color: #26445a;
  font-size: 0.875rem;
  line-height: 1.6;
  animation: fadeIn 0.2s ease;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin-top: 4px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #5d7183;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.add-btn svg {
  width: 16px;
  height: 16px;
}
.add-btn:hover {
  background: #edf1f5;
  color: #2e5b7a;
}

.add {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 0 4px;
}
.add input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cfdae4;
  border-radius: 12px;
  background: #ffffff;
}
.add input:focus {
  border-color: #2e5b7a;
  outline: 2px solid #2e5b7a;
  outline-offset: 1px;
}
.add__btns {
  display: flex;
  gap: 8px;
}
.add__btns .btn {
  flex: 1;
  height: 40px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  border: 1px dashed #dce5ec;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.empty > span {
  color: #5d7183;
}
.empty > span svg {
  width: 32px;
  height: 32px;
}
.empty p {
  margin: 0;
  font-size: 0.875rem;
  color: #5d7183;
}
.empty__title {
  font: 600 1rem "Space Grotesk", system-ui, sans-serif !important;
  color: #0f1f2c !important;
}

.clear-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.footer {
  position: relative;
  isolation: isolate;
  margin-top: 64px;
  overflow: hidden;
}
.footer img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.footer__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #f4f7fa 0%, rgba(244, 247, 250, 0.2) 25%, rgba(15, 31, 44, 0.6) 50%, rgba(15, 31, 44, 0.7) 100%);
}
.footer__inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 160px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__title {
  margin: 0;
  font: 600 1.5rem "Space Grotesk", system-ui, sans-serif;
}
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  color: #0f1f2c;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.footer__link svg {
  width: 16px;
  height: 16px;
}
.footer__link:hover {
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
}
.footer__small {
  margin: 0;
  font-size: 0.75rem;
}
.footer__small a {
  color: inherit;
  font-weight: 600;
}
.footer__small + .footer__small {
  margin-top: -12px;
}
.footer__cookie {
  margin-top: -8px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

#main:focus {
  outline: none;
}

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
  animation: rise 0.3s ease;
}
.consent p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: #5d7183;
}
.consent .consent__title {
  margin: 0;
  font: 600 1rem "Space Grotesk", system-ui, sans-serif;
  color: #0f1f2c;
}
.consent__btns {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.consent__btns .btn {
  flex: 1;
}

.dialog {
  width: min(440px, 100vw - 32px);
  padding: 24px;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  background: #ffffff;
  color: #0f1f2c;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
}
.dialog::backdrop {
  background: rgba(15, 31, 44, 0.5);
}
.dialog h2 {
  font-size: 1.125rem;
  font-weight: 600;
}
.dialog p {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: #5d7183;
}
.dialog input {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  padding: 0 12px;
  border: 1px solid #cfdae4;
  border-radius: 12px;
}
.dialog input:focus {
  border-color: #2e5b7a;
  outline: 2px solid #2e5b7a;
  outline-offset: 1px;
}
.dialog__btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.dialog__btns .btn--ghost {
  border-color: #dce5ec;
}

.toasts {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(360px, 100vw - 32px);
}

.toast {
  padding: 12px 16px;
  border: 1px solid #dce5ec;
  border-radius: 12px;
  background: #ffffff;
  color: #0f1f2c;
  font-size: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 31, 44, 0.08), 0 24px 48px -20px rgba(15, 31, 44, 0.35);
  animation: rise 0.25s ease;
  transition: opacity 0.3s;
}
.toast--err {
  border-color: rgba(200, 65, 47, 0.4);
  color: #c8412f;
}
.toast.is-out {
  opacity: 0;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 4.5rem;
  }
  .hero__lead {
    font-size: 1.125rem;
  }
  .wrap {
    padding: 0 20px;
  }
  .panel {
    padding: 16px;
  }
  .toolbar {
    flex-direction: row;
    align-items: center;
  }
  .toolbar__label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }
  .toolbar__btns > .btn:not(.btn--icon) {
    flex: none;
  }
  .add {
    flex-direction: row;
  }
  .add__btns .btn {
    flex: none;
  }
  .footer__inner {
    padding-top: 224px;
  }
  .consent__btns {
    justify-content: flex-end;
  }
  .consent__btns .btn {
    flex: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
