/* Styled after studiochintala.com: Helvetica, #2E2F32 ink, hairline-ruled Project Index. */
:root {
  --bg: #FFFFFF;
  --ink: #2E2F32;
  --muted: #6E7076;
  --rule: #7A7A7A;
  --line: #D9DADC;
  --fill: #F2F2F3;
  --track: #F1F1F2;
  --hover: #FAFAFA;
  --bad: #B0322A;
  --bad-soft: #FBEAE8;
  --hl: #D6F55A;
  --hl-soft: #F3FBD3;
  --on-hl: #1B1C1E;
  --ok: #1E8A4C;
  --ok-soft: #E2F4E8;
  --f: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151617; --ink: #E6E7E9; --muted: #9B9DA3; --rule: #55575C; --line: #34363A; --fill: #222326;
    --track: #222326; --hover: #1C1D1F; --bad: #E58178; --bad-soft: #3A1E1C; --hl: #CDEF4F; --hl-soft: #2B3315; --on-hl: #151617; --ok: #4CC17E; --ok-soft: #17301F; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151617; --ink: #E6E7E9; --muted: #9B9DA3; --rule: #55575C; --line: #34363A; --fill: #222326;
  --track: #222326; --hover: #1C1D1F; --bad: #E58178; --bad-soft: #3A1E1C; --hl: #CDEF4F; --hl-soft: #2B3315; --on-hl: #151617; --ok: #4CC17E; --ok-soft: #17301F; color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; transition: background-color .2s ease, color .2s ease; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
p, h1, h2, h3, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.page { padding-block: env(safe-area-inset-top, 0px) 72px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); animation: fadeIn .5s ease both; }
@media (min-width: 992px) { .page { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.nav { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -0.5px; }
.nav-here { margin-left: auto; font-size: 14px; }
.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { display: grid; place-items: center; width: 32px; height: 28px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; cursor: pointer; }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--hl); color: var(--on-hl); }
@media (max-width: 480px) { .nav-here { display: none; } .theme { margin-left: auto; } }

.hero { padding-block: 40px; display: grid; gap: 16px; }
h1 { font-weight: 800; font-size: clamp(30px, 4.6vw, 48px); line-height: 1; letter-spacing: -0.035em; max-width: 18ch; text-wrap: balance; }
.lede { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 60ch; }

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fig { --p: 0%; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 24px; border-radius: 999px;
  background: linear-gradient(90deg, var(--ok-soft) var(--p), var(--fill) var(--p)); }
.num { font-weight: 800; font-size: clamp(26px, 3.2vw, 36px); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num small { font-size: .5em; font-weight: 400; letter-spacing: -0.01em; color: var(--muted); }
.cap { font-size: 13px; line-height: 1.25; color: var(--muted); }
.mark { display: inline-block; padding-bottom: 5px; background: linear-gradient(var(--hl), var(--hl)) 0 100% / 100% 5px no-repeat; border-radius: 2px; }
.fig.on { background: var(--hl-soft); }
.fig.bad { background: var(--bad-soft); }
.fig.bad .num { color: var(--bad); }
.track { display: block; height: 4px; background: var(--track); border-radius: 999px; overflow: hidden; }
.track span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; }
@media (max-width: 900px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .fig { padding: 12px 18px; gap: 10px; } }

/* The index */
.index { margin-top: 48px; }
.thead, .item { display: grid; grid-template-columns: 24px 64px minmax(0, 1fr) 120px 120px; column-gap: 16px; align-items: start; }
.thead { background: var(--fill); border-radius: 999px; padding: 10px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.group { margin-top: 32px; }
.thead + .group { margin-top: 12px; }
.ghead { align-items: center; display: grid; grid-template-columns: 24px 64px minmax(0, 1fr) 120px 120px; column-gap: 16px; align-items: baseline; border: 1px solid var(--line); border-radius: 999px; padding-block: 10px; margin-bottom: 6px; font-weight: 400; }
.gcode { grid-column: 2; justify-self: start; align-self: center; min-width: 28px; height: 28px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; }
.gname { font-weight: 700; font-size: 19px; letter-spacing: -0.04em; line-height: 1.15; }
.gcount { grid-column: 5; justify-self: start; width: 104px; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.gcount:empty { display: none; }

.item { padding-block: 16px; border-top: .5px solid var(--rule); font-size: 13px; }
.items > .item:first-child { border-top: 0; }
.item:hover { background: var(--hover); }
.item::before { content: ""; width: 16px; height: 16px; margin-top: 1px; border: 1px solid var(--rule); border-radius: 4px; }
.item[data-status="done"]::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.code { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.main { min-width: 0; }
.title { font-size: 14px; }
.detail { margin-top: 2px; color: var(--muted); max-width: 72ch; }
.main .remark { margin-top: 10px; padding: 8px 12px; background: var(--hl-soft); border-radius: 12px; max-width: 70ch; width: fit-content; }
.item[data-status="done"] .title { color: var(--muted); text-decoration-color: var(--ok); text-decoration: line-through; text-decoration-thickness: 1px; }
.done-on { grid-column: 4; justify-self: start; width: 104px; text-align: center; margin-top: -2px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.done-on:empty { display: none; }

.status { grid-column: 5; justify-self: start; width: 104px; margin-top: -2px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 8px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; flex: none; }
.status::after { content: "To do"; }
.item[data-status="doing"] .status { color: var(--on-hl); background: var(--hl); border-color: transparent; font-weight: 700; }
.item[data-status="doing"] .status::before { background: currentColor; }
.item[data-status="doing"] .status::after { content: "In progress"; }
.item[data-status="blocked"] .status { color: var(--bad); background: var(--bad-soft); border-color: transparent; font-weight: 700; }
.item[data-status="blocked"] .status::before { background: currentColor; }
.item[data-status="blocked"] .status::after { content: "Blocked"; }
.item[data-status="done"] .status { color: var(--ok); background: var(--ok-soft); border-color: transparent; font-weight: 700; }
.item[data-status="done"] .status::before { background: currentColor; }
.item[data-status="done"] .status::after { content: "Done"; }

@media (max-width: 720px) {
  .thead { display: none; }
  .item { grid-template-columns: 24px max-content max-content minmax(0, 1fr); column-gap: 8px; row-gap: 10px; }
  .item::before { grid-row: 1; }
  .code { display: none; }
  .main { grid-column: 2 / -1; grid-row: 1; padding-left: 4px; }
  .status { grid-column: 2; grid-row: 2; margin-left: 4px; }
  .done-on { grid-column: 3; grid-row: 2; }
  .done-on::before { content: "Done "; }
  .status, .done-on { width: auto; margin-top: 0; }
  .ghead .gcount { grid-column: 3; width: auto; }
  .ghead { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; padding: 6px; }
  .gcode { grid-column: 1; }
  .gname { grid-column: 2; font-size: 17px; }
  .gcount { grid-column: 3; }
}

/* Progress log: a disclosure that opens a vertical timeline */
.log { margin-top: 72px; border-top: .5px solid var(--ink); }
.log > summary { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; cursor: pointer; list-style: none; }
.log > summary::-webkit-details-marker { display: none; }
.log-t { font-weight: 800; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.035em; line-height: 1.05; text-decoration: underline 4px transparent; text-underline-offset: .25em; }
.log > summary:hover .log-t { text-decoration-color: var(--ink); }
.chev-pill { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 999px; display: grid; place-items: center; flex: none; }
.log > summary:hover .chev-pill { background: var(--hl); border-color: var(--hl); }
.log > summary:hover .chev { border-color: var(--on-hl); }
.chev { width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.log[open] .chev { transform: translateY(2px) rotate(-135deg); }

.tl { position: relative; margin-top: 24px; padding-left: 36px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--ink); }
.tl > li { position: relative; padding-bottom: 28px; }
.tl time { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl > li.ms { width: fit-content; max-width: 100%; padding: 12px 26px 13px; margin-bottom: 24px; border-radius: 999px; background: var(--fill); }
.ms::before { content: ""; position: absolute; left: -36px; top: calc(50% - 6.5px); width: 13px; height: 13px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--bg); }
.tl > li.ms.planned { background: transparent; border: 1px dashed var(--rule); }
.ms.planned::before { left: -37px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px var(--bg); }
.ms.planned > time::before { content: "Planned for "; }
.ms h3 { margin-top: 2px; font-weight: 700; font-size: 20px; letter-spacing: -0.04em; line-height: 1.15; max-width: 40ch; }
.ms p { margin-top: 4px; color: var(--muted); max-width: 62ch; }

.ups > details > summary { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.ups > details > summary::after { content: ""; width: 5px; height: 5px; border-right: 1.2px solid currentColor; border-bottom: 1.2px solid currentColor; transform: translateY(-1px) rotate(45deg); }
.ups > details[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.ups > details > summary::-webkit-details-marker { display: none; }
.ups > details > summary:hover { color: var(--on-hl); background: var(--hl); border-color: var(--hl); }
.ups > details > summary::before { content: ""; position: absolute; left: -33px; top: 0; width: 5px; height: 23px; background: radial-gradient(circle, var(--muted) 2px, transparent 2.5px) 0 0 / 5px 9px repeat-y; }
.ups > details[open] > summary::before { display: none; }
.ups ul { display: grid; gap: 18px; margin-top: 16px; }
.ups ul > li { position: relative; font-size: 14px; max-width: 62ch; }
.ups ul > li::before { content: ""; position: absolute; left: -33px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--bg); }
.ups ul > li.remark::before { background: var(--hl); box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px var(--bg); }
.ups ul > li.done::before { background: var(--ok); }
.ups ul > li.plan::before { border-radius: 0; transform: rotate(45deg); background: var(--ink); }
.ups ul > li.blocked::before { background: var(--bad); }
.ups ul > li p { margin-top: 8px; padding: 8px 12px; background: var(--hl-soft); border-radius: 12px; font-size: 13px; width: fit-content; }

.titleblock { margin-top: 72px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-top: .5px solid var(--ink); padding-top: 16px; }
.tb-v { font-size: 16px; font-weight: 700; }
.tb-k { margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.tb-k-first { margin: 0 0 2px; }
@media (max-width: 640px) { .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; } }

@media (prefers-reduced-motion: reduce) { .page { animation: none; } body, .chev { transition: none; } }
