/* ------------------------------------------------------------
   The super individual's task list
   Palette and typography echo a warm paper-and-marker aesthetic.
   ------------------------------------------------------------ */
:root {
  --bg: #FAF9F5;
  --ink: #141413;
  --muted: #5E5D59;
  --faint: #8A8983;
  --rule: #E6E4DC;
  --card: rgba(255, 255, 255, 0.94);
  --border: rgba(20, 20, 19, 0.10);
  --c-neutral: #BDBAAE;
  --c-aug: #918BD6;
  --c-auto: #6A9BCC;
  --c-new: #F0AC54;
  --c-green: #217D5D;
  --serif: "Source Serif 4", "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --header-h: 56px;
  --maxw: 1240px;
  --prose: 660px;
  --card-w: 400px;
  --tile: 36px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 400; margin: 0; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  background: rgba(250, 249, 245, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 14px;
  transition: transform 0.3s ease;
}
body.in-scrolly .site-header { transform: translateY(-100%); }
.brand { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header nav { display: flex; gap: 20px; margin-left: auto; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: #fff; margin-left: auto; }
.site-header nav + .lang-toggle { margin-left: 0; }
.lang-toggle button {
  border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 4px 11px; border-radius: 999px; color: var(--muted); cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: #F2F0E9; }
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--primary:hover { background: #2b2b29; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px 24px 40px;
  min-height: calc(100vh - var(--header-h));
}
.hero__mosaic {
  aspect-ratio: 5 / 4; width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 45%, transparent 100%);
}
.hero__mosaic svg { width: 100%; height: 100%; display: block; }
.hero__text h1 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; letter-spacing: -0.012em; margin-bottom: 24px; }
.hero__text p { margin: 0 0 16px; font-size: 18px; color: #2c2c2a; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ---------- prose ---------- */
.prose { max-width: var(--prose); margin: 0 auto; padding: 72px 24px; }
.prose h2 { font-size: 30px; line-height: 1.25; margin-bottom: 24px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 20px; }
.prose strong { font-weight: 600; }

/* ---------- scrolly section ---------- */
.scrolly { position: relative; }
.graphic {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 16px;
}
.graphic__paper {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 60%, transparent 100%);
}
.graphic__title {
  position: relative; font-family: var(--sans); font-weight: 700; font-size: 13px;
  letter-spacing: 0.01em; margin: 0 0 8px; text-align: center;
}
.field-outer { position: relative; }
.field-wrap { transform-origin: top left; }
.field { position: relative; }

.field__caption {
  position: absolute; font-family: var(--sans); font-size: 11px; font-weight: 600;
  color: var(--muted); white-space: nowrap; letter-spacing: 0.02em; line-height: 1;
  transition: opacity 0.5s;
}
html[lang="en"] .field__caption { text-transform: uppercase; letter-spacing: 0.07em; font-size: 10.5px; }
.field__caption.is-hidden { opacity: 0; }

.task {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  cursor: default; outline: none;
  transition: opacity 0.55s ease;
  transition-delay: var(--d, 0ms);
}
.task__sq {
  position: relative; width: var(--tile); height: var(--tile);
  background: var(--c-neutral); border-radius: 3px;
  filter: url(#mk-marker);
  mix-blend-mode: multiply;
  isolation: isolate;
  transition: background-color 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), outline-color 0.3s;
  transition-delay: var(--d, 0ms);
}
.task__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--share, 100%);
  background: var(--c-neutral);
  border-radius: 3px 0 0 3px;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.task__label {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.2; color: var(--muted);
  text-align: center; margin-top: 6px; width: 100%; padding: 0 2px;
  overflow-wrap: break-word;
}
html[lang="en"] .task__label { font-size: 12.5px; -webkit-hyphens: auto; hyphens: auto; }
.task[data-cat="aug"] .task__sq { background: var(--c-aug); }
.task[data-cat="auto"] .task__sq { background: var(--c-auto); }
.task[data-cat="new"] .task__sq { background: var(--c-new); }
.task[data-cat="maybe"] .task__sq { background: var(--c-aug); outline: 1.5px dashed rgba(20, 20, 19, 0.45); outline-offset: 2px; }
.task.is-hidden, .task.is-out { opacity: 0; pointer-events: none; }
.task.is-hidden .task__sq, .task.is-out .task__sq { transform: scale(0.35); }
.task.is-dim { opacity: 0.28; }
.task.is-big { z-index: 2; }
.task.is-big .task__sq { transform: scale(1.32); }
.task.is-big .task__sq::before, .task.is-big .task__sq::after {
  content: ""; position: absolute; inset: 0; border-radius: 3px; background: inherit; z-index: -1;
}
.task.is-big .task__sq::before { transform: translate(-5px, -4px); opacity: 0.5; }
.task.is-big .task__sq::after { transform: translate(-10px, -8px); opacity: 0.28; }
.task:hover .task__sq, .task:focus-visible .task__sq { outline: 2px solid rgba(20, 20, 19, 0.35); outline-offset: 2px; }
.task:hover .task__label, .task:focus-visible .task__label { color: var(--ink); }

.legend {
  position: relative; list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 18px; padding: 0; margin: 10px 0 0;
  font-family: var(--sans); font-size: 12px; color: var(--muted);
}
.legend__item { display: flex; align-items: center; gap: 6px; }
.legend__item i { width: 12px; height: 12px; border-radius: 2px; background: var(--c-neutral); flex: none; }
.legend__item[data-cat="aug"] i { background: var(--c-aug); }
.legend__item[data-cat="auto"] i { background: var(--c-auto); }
.legend__item[data-cat="new"] i { background: var(--c-new); }
.legend__item[data-cat="maybe"] i { background: linear-gradient(90deg, var(--c-neutral) 50%, var(--c-aug) 50%); outline: 1px dashed rgba(20, 20, 19, 0.45); outline-offset: 1px; }
.legend__item--maybe { display: none; }
.graphic[data-step="8"] .legend__item--maybe { display: flex; }

.tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 12px; line-height: 1.45;
  padding: 8px 11px; border-radius: 6px; max-width: 250px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.tip[hidden] { display: none; }
.tip b { display: block; font-size: 13px; margin-bottom: 3px; }
.tip span { display: block; color: rgba(255, 255, 255, 0.78); }

.scrolly__beats {
  position: relative; z-index: 2;
  margin-top: -100vh;
  pointer-events: none;
}
.beat {
  min-height: 100vh;
  display: flex; align-items: flex-end;
  padding: 0 24px 8vh 24px;
}
.beat__card {
  pointer-events: auto;
  width: min(var(--card-w), 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(20, 20, 19, 0.08), 0 1px 2px rgba(20, 20, 19, 0.06);
  padding: 18px 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity 0.3s;
  opacity: 0.92;
}
.beat.is-active .beat__card { opacity: 1; }
.beat__card h3 { font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1.3; margin-bottom: 8px; }
.beat__card p { margin: 0; font-size: 16px; line-height: 1.5; }
.beat__card .beat__note { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* ---------- after: stats + table ---------- */
.stats {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px;
  width: min(1000px, calc(100vw - 48px));
  margin: 0 0 32px 50%; transform: translateX(-50%);
  font-family: var(--sans);
}
.stat { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 12px 12px 10px; min-width: 0; }
.stat b { display: block; font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 6px; }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.3; display: flex; align-items: flex-start; gap: 6px; }
.stat i, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c-neutral); flex: none; margin-top: 3px; }
.stat[data-cat=""] i { visibility: hidden; }
[data-cat="aug"] > span > i, .dot[data-cat="aug"] { background: var(--c-aug); }
[data-cat="auto"] > span > i, .dot[data-cat="auto"] { background: var(--c-auto); }
[data-cat="new"] > span > i, .dot[data-cat="new"] { background: var(--c-new); }
[data-cat="out"] > span > i, .dot[data-cat="out"] { background: transparent; border: 1px dashed var(--faint); }
.dot { margin-right: 6px; vertical-align: middle; margin-top: 0; }

.table-details { margin-top: 12px; font-family: var(--sans); font-size: 14px; }
.table-details summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.table-details summary:hover { color: var(--ink); }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table-wrap th { font-weight: 600; font-size: 12px; color: var(--muted); }
.table-wrap td.t-phase { color: var(--muted); white-space: nowrap; font-size: 12.5px; padding-top: 10px; }
.table-wrap tr.is-replaced td.t-task { text-decoration: line-through; color: var(--faint); }
.table-wrap td.t-dev { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- comments ---------- */
.comments { background: #F3F1EA; border-top: 1px solid var(--rule); padding: 72px 24px 80px; }
.comments__inner { max-width: var(--prose); margin: 0 auto; }
.comments h2 { font-size: 30px; margin-bottom: 10px; letter-spacing: -0.01em; }
.comments__lead { margin: 0 0 28px; color: var(--muted); }

.cform { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; font-family: var(--sans); }
.cform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); position: relative; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.cform input[type="text"], .cform select, .cform textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px;
  background: #FAF9F5; outline: none; width: 100%;
}
.cform input[type="text"]:focus, .cform select:focus, .cform textarea:focus { border-color: var(--ink); background: #fff; }
.cform textarea { resize: vertical; min-height: 110px; font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.cform__stance { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cform__stance legend { float: left; font-size: 13px; color: var(--muted); margin-right: 6px; padding: 0; }
.chip {
  flex-direction: row !important; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; font-size: 13px; color: var(--ink) !important; background: #FAF9F5;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chip:has(input:checked) { background: var(--ink); color: #fff !important; border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--c-auto); outline-offset: 2px; }
.cform__count { align-self: flex-end; font-size: 12px; color: var(--faint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cform__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cform__status { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.2em; flex: 1; }
.cform__status.is-error { color: #B3261E; }
.cform__status.is-ok { color: var(--c-green); }

.comments__head { margin: 36px 0 12px; font-family: var(--sans); }
.comments__head h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.comments__notice {
  font-family: var(--sans); font-size: 13px; line-height: 1.45; color: #8a5a00;
  background: #FFF4DB; border: 1px solid #F3DFA8; padding: 10px 12px; border-radius: 6px; margin: 0 0 12px;
}
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.clist__empty { font-family: var(--sans); font-size: 14px; color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.comment {
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px;
  display: grid; grid-template-columns: 36px 1fr; gap: 12px;
}
.comment.is-new { animation: pop 0.5s ease; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.comment__avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 600; font-size: 14px; color: #fff;
}
.comment__meta { font-family: var(--sans); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 6px; }
.comment__name { font-weight: 600; color: var(--ink); }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: #FAF9F5; line-height: 1.5; }
.tag--agree { background: #E6F3EC; color: #217D5D; border-color: #C9E5D6; }
.tag--partly { background: #FFF4DB; color: #8a5a00; border-color: #F3DFA8; }
.tag--disagree { background: #FBE7E5; color: #B3261E; border-color: #F2C9C5; }
.comment__time { margin-left: auto; color: var(--faint); font-size: 12px; }
.comment__body { margin: 0; font-size: 16px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.comments__admin { font: 500 13px/1.5 var(--sans); color: var(--c-green); margin: 0 0 12px; }
.comment.is-hidden { background: #FAF9F5; border-style: dashed; }
.tag--hidden { background: #FFF4DB; color: #8a5a00; border-color: #F3DFA8; }
.comment__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.comment__actions button { font: 500 12px/1.4 var(--sans); padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.comment__actions button:hover { background: #F3F1EA; }
.comment__actions button:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; }
.comment__actions button:disabled { opacity: .5; cursor: wait; }
.comment__actions .comment__delete { color: #B3261E; }

/* ---------- footer ---------- */
.site-footer { max-width: var(--prose); margin: 0 auto; padding: 40px 24px 56px; font-family: var(--sans); font-size: 13px; color: var(--muted); line-height: 1.55; }
.site-footer p { margin: 0 0 8px; }

/* ---------- responsive ---------- */
@media (min-width: 1100px) {
  :root { --card-w: 300px; }
}
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  :root { --card-w: 100%; }
  body { font-size: 17px; }
  .site-header { padding: 0 16px; gap: 12px; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 32px; min-height: 0; }
  .hero__mosaic { aspect-ratio: 16 / 9; order: -1; }
  .hero__text p { font-size: 17px; }
  .prose { padding: 48px 16px; }
  .prose h2, .comments h2 { font-size: 26px; }

  .graphic { height: 56vh; padding: 10px 8px; z-index: 3; background: var(--bg); box-shadow: 0 8px 20px -12px rgba(20, 20, 19, 0.18); }
  .graphic__title { margin-bottom: 8px; }
  .task__label { display: none; }
  .field__caption { font-size: 9px; }
  html[lang="en"] .field__caption { font-size: 8.5px; letter-spacing: 0.05em; }
  .legend { font-size: 10.5px; gap: 4px 12px; margin-top: 10px; }
  .legend__item i { width: 10px; height: 10px; }
  .scrolly__beats { margin-top: 0; }
  .beat { min-height: 60vh; padding: 12px 16px 8vh; align-items: flex-start; }
  .beat__card { padding: 16px; }
  .beat__card p { font-size: 15.5px; }

  .stats { grid-template-columns: repeat(2, 1fr); width: 100%; margin-left: 0; transform: none; }
  .cform__row { grid-template-columns: 1fr; }
  .comments { padding: 48px 16px 64px; }
  .comment { padding: 14px; grid-template-columns: 32px 1fr; gap: 10px; }
  .comment__avatar { width: 32px; height: 32px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .task, .task__sq, .task__fill, .field__caption, .beat__card { transition: none !important; }
  .comment.is-new { animation: none; }
}

/* Shared Markdown styles for the editor preview and posted comments. */
.comment > div { min-width: 0; }
.cform__help { margin: 8px 0; font: 12px/1.6 var(--sans); color: var(--muted); }
.cform__preview { border: 1px solid var(--border); border-radius: 8px; margin: 12px 0; background: #fff; }
.cform__preview summary { cursor: pointer; padding: 12px; font: 500 13px/1.5 var(--sans); }
.cform__preview .markdown-body { padding: 0 14px 14px; }
.markdown-body { white-space: normal; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body pre, .markdown-body blockquote { margin: 0 0 .75em; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font: 600 1.05em/1.4 var(--sans); margin: 1em 0 .5em; color: var(--ink); }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; }
.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body li + li { margin-top: .2em; }
.markdown-body blockquote { border-left: 3px solid var(--border); padding: .25em 0 .25em 1em; color: var(--muted); }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: #F3F1EA; border-radius: 3px; padding: .1em .3em; }
.markdown-body pre { max-width: 100%; overflow-x: auto; background: #F3F1EA; border-radius: 6px; padding: 12px; white-space: pre; overflow-wrap: normal; }
.markdown-body pre code { padding: 0; background: none; }
.markdown-body a { color: #245D8A; text-decoration: underline; text-underline-offset: 2px; }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 .75em; font-size: .9em; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.markdown-body th { background: #F3F1EA; }
.markdown-body hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
