/* The roadmap board, in Dogberry's block language: blocks not strokes, two colours
   to a surface (the brand purple and white), state by inversion, bold uppercase labels. */
:root {
  --ground: #4c208c;
  --block: #331463;
  --block-2: #26104a;
  --ink: #ffffff;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--ink); }
[hidden] { display: none !important; }

.label, .btn, .tab, .col-head {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Buttons: a white block with purple words; under the pointer or focus, inverted. */
.btn {
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--block-2); color: var(--ink); outline: none; }
.btn.quiet { background: var(--block); color: var(--ink); }
.btn.quiet:hover, .btn.quiet:focus-visible { background: var(--ink); color: var(--ground); }
.btn:disabled { cursor: default; opacity: 0.6; }

/* Fields: a white block, purple words, no border; focus cuts a 4px line in the ground's colour. */
.field {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 12px 14px;
}
.field::placeholder { color: #6f5a99; }
.field:focus { outline: none; box-shadow: inset 0 0 0 4px var(--block-2); }
textarea.field { resize: vertical; min-height: 96px; }

/* Sign-in */
.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.signin-box { width: min(420px, 100%); display: grid; gap: 16px; text-align: center; }
.signin h1 { margin: 0; font-size: clamp(28px, 6vw, 40px); font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.signin p { margin: 0; }
.signin form { display: grid; gap: 8px; }

/* Head */
.head {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
}
.brand { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 18px; align-self: center; margin-right: auto; }
.tabs { display: flex; gap: 0; }
.tab {
  border: 0; border-radius: 0; cursor: pointer;
  background: var(--block); color: var(--ink);
  padding: 10px 16px; font-size: 13px;
}
.tab[aria-selected="true"], .tab:hover, .tab:focus-visible { background: var(--ink); color: var(--ground); outline: none; }
.who { align-self: center; font-size: 13px; }

/* Board */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 12px;
  padding: 0 16px 32px;
  align-items: start;
}
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .board { grid-template-columns: 1fr; } }

.col { background: var(--block-2); min-height: 120px; display: flex; flex-direction: column; }
.col.drop { background: var(--block); }
.col-head { padding: 14px 16px 4px; font-size: 15px; display: flex; justify-content: space-between; }
.col-sub { padding: 0 16px 10px; font-size: 13px; }
.col-cards { display: grid; gap: 8px; padding: 0 8px 8px; }

.card {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: var(--block);
  color: var(--ink);
  padding: 14px 16px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.card:hover, .card:focus-visible, .card.open { background: var(--ink); color: var(--ground); outline: none; }
.card.dragging { opacity: 0.4; }
.card.drop-before { box-shadow: inset 0 4px 0 var(--ink); }
.card-title { font-weight: 800; font-size: 16px; line-height: 1.3; }
.card-why { font-size: 14px; margin-top: 4px; }
.card-latest { font-size: 13px; margin-top: 8px; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.chip { background: var(--ground); color: var(--ink); padding: 2px 8px; }
.card:hover .chip, .card:focus-visible .chip, .card.open .chip { background: var(--block); }
.more { margin: 0 8px 8px; }

/* Architecture */
.pages { padding: 0 16px 32px; display: grid; gap: 12px; max-width: 900px; }
.page-block { background: var(--block); padding: 20px 24px; }
.page-block h2 { margin: 0 0 8px; font-size: 22px; }

/* Card detail: a sheet from the right; the whole window on a phone */
.sheet-back { position: fixed; inset: 0; background: rgba(15, 5, 30, 0.55); }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(640px, 100%);
  background: var(--block-2);
  overflow-y: auto;
  padding: 20px 24px 40px;
  display: grid; gap: 18px; align-content: start;
  animation: pour 280ms var(--ease);
}
@keyframes pour { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } * { transition: none !important; } }
@media (max-width: 620px) { .sheet { padding: 16px; } }
.sheet-top { display: flex; gap: 8px; align-items: start; }
.sheet-top h2 { margin: 0; font-size: 24px; line-height: 1.2; flex: 1; }
.section { display: grid; gap: 8px; }
.section > .label { font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prose { font-size: 15px; }
.prose :first-child { margin-top: 0; }
.prose :last-child { margin-bottom: 0; }
.prose pre, .prose code { background: var(--block); }
.prose pre { padding: 10px; overflow-x: auto; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { padding: 4px 8px; background: var(--block); }
.history { display: grid; gap: 6px; font-size: 14px; }
.history div span { font-weight: 800; }
.tick { display: flex; gap: 10px; align-items: center; background: var(--block); padding: 10px 14px; cursor: pointer; }
.tick input { width: 18px; height: 18px; accent-color: var(--ink); }
.comment { background: var(--block); padding: 12px 14px; }
.comment-who { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 8px; }
.comment-body { white-space: pre-wrap; margin-top: 4px; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; font-size: 12px; }
.note { font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--ink); color: var(--ground); padding: 10px 18px; font-weight: 800;
}

/* The lore's icons: the lantern over Now, the oatcakes over the backlog, a bill on each card. */
.icon-box { display: inline-flex; flex: none; }
.icon { width: 1.15em; height: 1.15em; display: block; }
.col-name { display: inline-flex; align-items: center; gap: 8px; }
.card-title { display: flex; gap: 8px; align-items: flex-start; }
.card-title .icon-box { margin-top: 0.1em; }
.card-title .icon { width: 1em; height: 1em; }
/* The column under the lantern is lit: a lighter block than the others. */
.col-now { background: #5d2ba6; }
.col-now .card { background: #4a1f8a; }
.col-now .card:hover, .col-now .card:focus-visible, .col-now .card.open { background: var(--ink); }
