:root {
  --ink: #0c4a6e;
  --ink-strong: #082f49;
  --muted: #075985;
  --muted2: #0369a1;
  --card: rgba(255, 255, 255, 0.9);
  --border: rgba(125, 211, 252, 0.55);
  --primary: #0284c7;
  --primary-ink: #fff;
  --soft: #e0f2fe;
  --shadow: 0 16px 40px rgba(7, 89, 133, 0.08);
  --radius: 20px;
  --font: "Source Sans 3", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink-strong);
  background: #f0f9ff;
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 10% -5%, #bae6fd 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, #a5f3fc 0%, transparent 50%),
    linear-gradient(180deg, #e0f2fe, #f0f9ff 45%, #fafaf9);
}

.wrap {
  width: min(740px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.4rem 0 3.5rem;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}
.lang-sep {
  color: #7dd3fc;
  font-size: 0.85rem;
  user-select: none;
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.65rem;
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted2);
  cursor: pointer;
  border-radius: 10px;
  opacity: 0.75;
  -webkit-tap-highlight-color: rgba(2, 132, 199, 0.15);
  touch-action: manipulation;
}
.lang-btn:hover {
  opacity: 1;
  background: rgba(224, 242, 254, 0.7);
  color: var(--ink-strong);
}
.lang-btn.active {
  opacity: 1;
  color: var(--primary);
}

h1 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(2.3rem, 7vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}
.lede {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 50ch;
}

.notice {
  margin: 0 0 1.3rem;
  display: inline-block;
  padding: 0.55rem 0.85rem;
  background: rgba(224, 242, 254, 0.75);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  max-width: 48ch;
}

.progress-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1.2rem;
  position: sticky;
  top: 0.6rem;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.progress-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted2);
}
.progress-text {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
}

.bar {
  height: 12px;
  background: #e0f2fe;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #bae6fd;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn.ghost {
  background: #fff;
  border: 1px solid #7dd3fc;
  color: var(--ink-strong);
}
.btn.ghost:hover { background: var(--soft); }

.sections { display: grid; gap: 1rem; }

.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem 0.55rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
}
.section-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted2);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0 0.55rem 0.7rem;
}
.list li {
  border-top: 1px solid #e0f2fe;
}
.list label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  border-radius: 12px;
}
.list label:hover { background: rgba(224, 242, 254, 0.55); }
.list input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  cursor: pointer;
}
.item-title {
  margin: 0;
  font-weight: 600;
  color: var(--ink-strong);
}
.item-note {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
label.done .item-title {
  text-decoration: line-through;
  color: var(--muted2);
  opacity: 0.85;
}
label.done .item-note { opacity: 0.7; }

.foot {
  margin-top: 2.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot p { margin: 0.2rem 0; }
.foot-credit { font-size: 0.85rem; opacity: 0.9; }
.foot-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.foot-credit a:hover { opacity: 1; }
.foot-note { font-size: 0.8rem; max-width: 48ch; margin-inline: auto !important; }

.mode-switch {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.mode-btn {
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.mode-btn:hover { background: rgba(224, 242, 254, 0.7); color: var(--ink-strong); }
.mode-btn.active {
  background: #fff;
  color: var(--ink-strong);
  box-shadow: 0 4px 14px rgba(7, 89, 133, 0.12);
  border: 1px solid #7dd3fc;
}

.progress-done {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}
.mode-btn:focus-visible,
.btn:focus-visible,
.lang-btn:focus-visible,
.list input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (max-width: 420px) {
  .wrap { width: min(740px, calc(100% - 1.25rem)); padding-top: 1.6rem; }
  .mode-btn { padding: 0.75rem 0.7rem; font-size: 1rem; }
  .progress-card { top: 0.4rem; }
  .hero-top { align-items: flex-start; }
  .lede { max-width: none; }
}

.mode-switch { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) {
  .mode-switch { grid-template-columns: repeat(3, 1fr); }
  .mode-btn { font-size: 0.92rem; padding: 0.7rem 0.4rem; }
}
@media (max-width: 380px) {
  .mode-switch { grid-template-columns: repeat(2, 1fr); }
}
