/* ungli: the task is a line of steps on a cream rail, the blocks wait on the dark ground at the left, and a finger
   rests above the step being read. SYNTAX's tokens, Mukta only, served from /fonts. */
@font-face { font-family: "Mukta"; font-weight: 400; font-display: swap; src: url(/fonts/mukta-400.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-weight: 600; font-display: swap; src: url(/fonts/mukta-600.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-weight: 800; font-display: swap; src: url(/fonts/mukta-800.woff2) format("woff2"); }

:root {
  /* the violet of the election ink put on the left index finger after voting, on ballot-paper ivory */
  --ground: #17111f; --deep: #231a2e; --deep-2: #34283f; --cobalt: #5b2d8e; --cobalt-2: #7b4fb3; --mist: #c9bddb;
  --sheet: #f2eee3; --paper: #fbf9f2; --line: #ddd5c3; --ink: #1c1524; --muted: #675f6e; --warm: #e3c8ff; --warm-soft: #efe6f8;
  --stain: #5b2d8e; --radius: 6px; --col: 286px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.5 "Mukta", "Noto Sans", "Segoe UI", sans-serif; display: grid; grid-template-rows: auto 1fr; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* header */
header { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding: 10px 20px; color: var(--mist); border-bottom: 1px solid var(--deep-2); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--sheet); text-decoration: none; }
.brand svg { width: 36px; height: 36px; }
.brand b { font-weight: 800; font-size: 24px; letter-spacing: .01em; }
.brand i { font-style: normal; font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.follows { color: var(--sheet); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--cobalt-2); border-radius: 999px; padding: 3px 10px; }
.follows:hover, .follows:focus-visible { background: var(--stain); outline: none; }
.lede a { color: var(--cobalt); }
header nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
header nav button { border: 0; background: none; color: var(--mist); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-radius: var(--radius); }
header nav button:hover, header nav button:focus-visible { color: var(--sheet); background: var(--deep); outline: none; }

/* three zones */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr) 380px; min-height: 0; }

/* the blocks */
.blocks { overflow: auto; padding: 18px 16px 24px; border-right: 1px solid var(--deep-2); color: var(--sheet); }
.blocks h2 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); margin: 0 0 4px; }
.blocks > p { color: var(--mist); font-size: 13px; margin: 0 0 14px; }
.part { margin-top: 16px; }
.part h3 { margin: 0; font-size: 15px; font-weight: 800; }
.part p { margin: 2px 0 8px; font-size: 12.5px; color: var(--mist); line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--deep-2); background: var(--deep); color: var(--sheet); border-radius: 999px; padding: 4px 11px; font-size: 13.5px; font-weight: 600; cursor: grab; user-select: none; }
.chip:hover, .chip:focus-visible { border-color: var(--cobalt-2); outline: none; }
.chip.used { background: var(--stain); color: var(--sheet); border-color: var(--cobalt-2); }
.chip:active { cursor: grabbing; }

/* the line of steps */
.task { overflow: auto; background: var(--sheet); display: flex; flex-direction: column; min-width: 0; }
.taskhead { padding: 22px 28px 8px; }
.taskhead input { width: 100%; border: 0; background: none; font-weight: 800; font-size: 34px; line-height: 1.15; padding: 0; }
.taskhead input:focus { outline: none; box-shadow: 0 2px 0 var(--cobalt); }
.taskhead textarea { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 8px 10px; resize: vertical; font-size: 16px; }
.taskhead textarea:focus, .col textarea:focus { outline: 2px solid var(--cobalt-2); border-color: transparent; }
.taskhead .lede { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; max-width: 70ch; }

.rail { position: relative; flex: 1; overflow-x: auto; padding: 64px 28px 28px; background-image: radial-gradient(#d2c8b4 1px, transparent 1px); background-size: 18px 18px; }
.line { display: flex; align-items: flex-start; gap: 0; min-width: max-content; }
.finger { position: absolute; top: 0; width: 30px; height: 70px; transition: left .35s cubic-bezier(.3, .7, .2, 1); pointer-events: none; z-index: 3; }
.finger svg { width: 30px; height: 70px; display: block; }
.join { width: 26px; align-self: stretch; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; padding-top: 40px; }

.col { width: var(--col); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 0 var(--line); flex: none; }
.col.code { width: 220px; background: #ebe6da; }
.col.on { border-color: var(--cobalt); box-shadow: 0 0 0 2px var(--cobalt), 0 10px 24px rgba(10, 20, 40, .12); }
.col .top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.col .no { font-weight: 800; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.kind { display: inline-flex; border-radius: 999px; background: #e6dfd0; padding: 2px; }
.kind button { border: 0; background: none; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kind button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.col .tools { margin-left: auto; display: flex; }
.col .tools button { border: 0; background: none; color: var(--muted); padding: 2px 5px; font-size: 14px; border-radius: 4px; }
.col .tools button:hover, .col .tools button:focus-visible { color: var(--ink); background: #e9e3d6; outline: none; }
.col .body { padding: 10px 12px 12px; }
.col label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.col textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 6px 8px; resize: vertical; font-size: 14px; line-height: 1.4; }
.slots { display: grid; gap: 6px; margin-top: 10px; }
.slot { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; }
.slot .k { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; }
.slot .v { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1.5px dashed #cfc5b0; border-radius: var(--radius); padding: 4px 8px; font-size: 13.5px; color: #9a927f; }
.slot .v.full { border: 0; background: var(--stain); color: var(--sheet); font-weight: 600; }
.slot .v.over { border-color: var(--cobalt); background: var(--warm-soft); color: var(--cobalt); }
.slot .v button { border: 0; background: none; padding: 0 2px; font-size: 14px; line-height: 1; color: inherit; opacity: .6; }
.slot .v button:hover { opacity: 1; }
.col .sum { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.adds { display: flex; flex-direction: column; gap: 8px; margin-left: 26px; flex: none; }
.adds button { width: 170px; border: 1.5px dashed #cfc5b0; background: none; border-radius: 10px; padding: 14px 12px; text-align: left; font-weight: 600; color: var(--muted); }
.adds button:hover, .adds button:focus-visible { border-color: var(--cobalt); color: var(--cobalt); outline: none; }

/* the reading */
.reading { overflow: auto; padding: 22px 22px 28px; color: var(--sheet); border-left: 1px solid var(--deep-2); }
.reading h2 { margin: 0; font-size: 22px; font-weight: 800; }
.reading .sub { color: var(--mist); font-size: 13.5px; margin: 4px 0 0; }
.reading .open { color: var(--warm); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 0; }
.reading .gives { font-size: 16.5px; line-height: 1.5; margin: 12px 0 0; }
.reading h3 { margin: 22px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); }
.model { background: var(--deep); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.model h4 { margin: 0; font-size: 18px; font-weight: 800; }
.model .what, .model .aside { color: var(--mist); font-size: 13px; margin: 3px 0 0; line-height: 1.45; }
.model ul { margin: 8px 0 0; padding-left: 16px; font-size: 14px; }
.model li + li { margin-top: 4px; }
.model b, .warn b { color: var(--warm); }
.warn { border-left: 3px solid var(--warm); padding: 2px 0 2px 12px; margin-top: 10px; font-size: 14px; }
.warn .from { color: var(--mist); font-size: 12.5px; }
.send { margin-top: 18px; padding: 14px; border: 1px solid var(--cobalt-2); border-radius: var(--radius); }
.send p { margin: 6px 0 12px; font-size: 14px; }
.send .btn { display: inline-block; text-decoration: none; background: var(--stain); color: var(--sheet); }
.whole { margin: 8px 0 0; padding-left: 16px; font-size: 14px; }

/* dialogs */
.veil { position: fixed; inset: 0; background: rgba(10, 20, 40, .62); display: grid; place-items: start center; padding: 7vh 16px; z-index: 20; overflow: auto; }
.box { width: min(600px, 100%); background: var(--sheet); border-radius: 10px; padding: 26px 28px; }
.box h2 { margin: 0 0 10px; font-size: 26px; font-weight: 800; }
.box h3 { margin: 20px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.box ol { padding-left: 20px; margin: 0; } .box li + li { margin-top: 6px; }
.box p { margin: 8px 0 0; color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 9px 0; }
.row .t { flex: 1; font-weight: 600; } .row .d { color: var(--muted); font-size: 13px; }
.btn { border: 0; border-radius: var(--radius); padding: 7px 14px; background: var(--ink); color: var(--sheet); font-weight: 600; font-size: 14px; }
.btn:hover, .btn:focus-visible { background: var(--cobalt); outline: none; }
.btn.q { background: none; color: var(--cobalt); padding: 4px 6px; }
.box .close { float: right; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--sheet); color: var(--ink); padding: 8px 16px; border-radius: var(--radius); font-size: 14px; z-index: 30; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
footer { display: none; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .reading { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--deep-2); }
}
@media (max-width: 760px) {
  body { display: block; }
  .app { display: block; }
  .blocks { border-right: 0; border-bottom: 1px solid var(--deep-2); max-height: 46vh; }
  .rail { padding: 64px 14px 18px; }
  .taskhead { padding: 18px 14px 6px; } .taskhead input { font-size: 26px; }
  header { padding: 10px 14px; } header nav { margin-left: 0; }
}
