:root {
  --paper: #eef2f0;
  --sheet: #ffffff;
  --ink: #14232b;
  --ink-soft: #4a5b63;
  --line: #c9d3cf;
  --marker: #ffd84a;
  --done: #1f8a70;
  --focus: #0b5fff;
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

a { color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--ink); color: var(--paper);
}
.bar .wrap { display: flex; align-items: center; gap: 1rem; padding-top: .55rem; padding-bottom: .55rem; }
.bar .name { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.bar .meter { flex: 1; height: .5rem; background: #2c3f48; border-radius: 1rem; overflow: hidden; }
.bar .meter i { display: block; height: 100%; width: 0; background: var(--marker); transition: width .3s ease; }
.bar .pct { font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.bar .lang { font-size: .9rem; }

/* hero */
.hero { padding: 3rem 0 2rem; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.3rem, 7vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.hero p { max-width: 34rem; margin: 0 0 1rem; color: var(--ink-soft); }

/* redaction bars: the look of everything still locked */
.redacted { display: block; height: 1.05em; background: var(--ink); border-radius: 2px; margin: .45em 0; }
.hero .redacted { height: clamp(1.6rem, 5vw, 2.6rem); margin: .35rem 0; transition: opacity .35s ease, transform .35s ease; transform-origin: left; }
.hero .redacted.open { opacity: .12; transform: scaleX(.55); }

section { padding: 1.5rem 0; }
h2 { font-family: var(--display); font-size: 1.55rem; letter-spacing: -.02em; margin: 0 0 .6rem; }
.note { color: var(--ink-soft); font-size: .95rem; margin: .3rem 0 0; }

/* story position */
.story { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.story input[type=range] { width: 100%; accent-color: var(--ink); margin: .8rem 0 .2rem; }
.story output { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.story output mark { background: var(--marker); color: var(--ink); padding: 0 .25em; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.filters select, .plan input, button {
  font: inherit; color: var(--ink);
  background: var(--sheet); border: 1px solid var(--ink); border-radius: 6px;
  padding: .45rem .7rem;
}
button { cursor: pointer; font-weight: 600; }
button.primary { background: var(--ink); color: var(--paper); }
button:hover { box-shadow: 3px 3px 0 var(--marker); }

/* list */
.group h3 { font-size: 1rem; margin: 1.4rem 0 .3rem; color: var(--ink-soft); font-weight: 600; }
ul.items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
ul.items li { border-bottom: 1px solid var(--line); }
ul.items label { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; padding: .7rem .2rem; cursor: pointer; }
ul.items input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--done); }
ul.items .t { font-weight: 600; }
ul.items .h { display: block; color: var(--ink-soft); font-size: .92rem; }
ul.items .m { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
ul.items li.done .t { text-decoration: line-through; color: var(--ink-soft); }
.locked { margin-top: 1.5rem; }
.locked .redacted:nth-child(3n) { width: 62%; }
.locked .redacted:nth-child(3n+1) { width: 84%; }
.locked .redacted:nth-child(3n+2) { width: 47%; }
.empty { padding: 1rem 0; color: var(--ink-soft); }

/* planner */
.plan { background: var(--marker); border-radius: 10px; padding: 1.25rem; }
.plan .row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.plan input { width: 6rem; }
.plan ol { margin: 1rem 0 0; padding-left: 1.3rem; }
.plan li { margin: .25rem 0; }

/* share */
.share canvas { width: 100%; max-width: 22rem; height: auto; border-radius: 10px; display: block; margin: .8rem 0; border: 1px solid var(--line); }
.share .row { display: flex; flex-wrap: wrap; gap: .5rem; }

footer { padding: 2.5rem 0 3rem; color: var(--ink-soft); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 2rem; }
footer p { margin: .3rem 0; max-width: 40rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
