:root {
  --paper: oklch(97% 0.01 84);
  --paper-2: oklch(95% 0.012 84);
  --paper-3: oklch(93.8% 0.014 82);
  --surface: oklch(99% 0.004 84);
  --ink: oklch(22% 0.012 58);
  --ink-2: oklch(38% 0.012 58);
  --ink-3: oklch(52% 0.011 60);
  --ink-4: oklch(64% 0.01 64);
  --rule: oklch(89% 0.01 75);
  --rule-soft: oklch(93% 0.008 75);
  --rule-strong: oklch(84% 0.014 75);
  --todo: oklch(56% 0.01 70);
  --prog: oklch(49% 0.11 245);
  --ai: oklch(47% 0.13 285);
  --coach: oklch(55% 0.115 70);
  --coach-deep: oklch(39% 0.11 65);
  --ach: oklch(48% 0.105 155);
  --warn: oklch(56% 0.14 30);
  --indigo: oklch(45% 0.16 282);
  --side-w: 208px;
  --panel-w: minmax(440px, 540px);
  --topbar-h: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

button,
a {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 10px;
  border: 1px solid var(--indigo);
  border-radius: 7px;
  background: var(--surface);
  color: var(--indigo);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-140%);
}

.skip-link:focus-visible {
  outline: 3px solid oklch(70% 0.14 285);
  outline-offset: 2px;
  transform: translateY(0);
}

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--panel-w);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  height: 100vh;
  max-height: 100vh;
}

.app[data-detail-state="closed"] {
  grid-template-columns: var(--side-w) minmax(0, 1fr);
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border-right: 1px solid var(--rule);
}

.brand-mark {
  display: grid;
  flex: none;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(160deg, oklch(46% 0.16 282), oklch(54% 0.14 255));
  color: white;
  font-family: ui-serif, Georgia, serif;
  font-size: 17px;
}

.brand-name {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-name em {
  color: var(--ink-3);
  font-style: normal;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 22px;
  color: var(--ink-3);
}

.crumb-team {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.dot,
.pip,
.crumb-team .dot {
  display: inline-block;
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
}

.crumb-team .dot {
  background: oklch(60% 0.13 145);
}

.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topright {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.logout-form,
.session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-btn {
  min-height: 32px;
  padding: 5px 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 240px;
  max-width: 28vw;
  height: 32px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-4);
}

.search span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbd,
.side-label,
.eyebrow,
.lab,
.col-head .title,
.dt-from,
.section h3,
.ref,
.fsub,
.fact,
.crit-meta,
.memo .label,
.ev-count,
.week-strip {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  letter-spacing: 0;
}

.kbd {
  margin-left: auto;
  font-size: 10px;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
}

.iconbtn[aria-hidden="true"] {
  cursor: default;
}

.menu-btn {
  display: none;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: oklch(64% 0.1 50);
  color: white;
  font-weight: 650;
}

.error-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    var(--paper);
}

.error-panel {
  width: min(100%, 520px);
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(60, 48, 34, 0.12);
}

.error-panel h1 {
  margin: 14px 0 8px;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

.error-panel p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    var(--paper);
}

.auth-panel {
  width: min(100%, 520px);
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(60, 48, 34, 0.12);
}

.auth-panel .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 29px;
}

.auth-panel h1 {
  margin: 14px 0 8px;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-panel p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.auth-panel a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  text-decoration: none;
}

.auth-panel a.btn:visited {
  color: white;
}

.auth-panel .auth-guidance {
  margin-top: 10px;
}

.auth-panel > .focus-act {
  margin-top: 18px;
}

.error-meta {
  display: flex;
  margin: 18px 0;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-4);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.error-meta span {
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  background: var(--paper);
  overflow-wrap: anywhere;
}

.empty-state {
  overflow-wrap: anywhere;
}

.side {
  min-width: 0;
  padding: 14px 10px;
  overflow: auto;
  border-right: 1px solid var(--rule);
  background: var(--paper-3);
}

.side-label,
.eyebrow {
  color: var(--ink-4);
  font-size: 10.5px;
  text-transform: uppercase;
}

.side-label {
  padding: 4px 8px;
}

.side-item {
  display: flex;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--ink-2);
  text-decoration: none;
}

.side-item.active {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule);
  color: var(--ink);
}

.inquiry-pin {
  margin-top: 24px;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}

.inquiry-pin .lab {
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
}

.inquiry-pin h5 {
  margin: 6px 0;
  font-size: 18px;
  font-weight: 650;
}

.inquiry-pin p {
  color: var(--ink-3);
  font-size: 12px;
}

.main {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.pagehead {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 28px 13px;
  border-bottom: 1px solid var(--rule-soft);
}

.lead {
  min-width: 0;
}

.pagehead h1 {
  margin: 5px 0 8px;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

.sub {
  max-width: 680px;
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
}

.view-btn {
  min-width: 56px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 620;
}

.view-btn.active {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule), 0 1px 5px rgba(80, 60, 30, 0.08);
  color: var(--ink);
}

.board-tools {
  display: flex;
  justify-content: flex-end;
  margin: -2px 28px 10px;
}

.pilot-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin: 12px 28px 14px;
  padding: 14px 16px;
  border: 1px solid oklch(84% 0.045 205);
  border-radius: 8px;
  background: oklch(98% 0.018 205);
}

.guide-copy {
  min-width: 0;
}

.pilot-guide h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.pilot-guide p {
  max-width: 820px;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.guide-next {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.guide-next .focus-act {
  min-height: 30px;
}

.guide-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid oklch(78% 0.04 205);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.guide-dismiss:hover,
.guide-dismiss:focus-visible {
  color: var(--prog);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 9px;
  color: var(--ink-3);
  font-size: 12px;
}

.progress-token-signal {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.progress-token-signal b {
  color: var(--ink);
}

.week-strip {
  height: max-content;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-3);
}

.focus {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 28px 14px;
  padding: 12px 14px;
  border: 1px solid oklch(88% 0.03 285);
  border-radius: 8px;
  background: oklch(98% 0.012 285);
}

.focus-text {
  min-width: 0;
}

.focus .text {
  color: var(--ink-2);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.mvm-line {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 12px;
}

.focus-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid oklch(82% 0.055 285);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ai);
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}

.focus-act:visited {
  color: var(--ai);
}

.focus-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-weight: 620;
  white-space: nowrap;
}

.board {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 0 24px;
  overflow: auto;
}

.app[data-board-view="list"] .board,
.app[data-board-view="kanban"] .milestone-list {
  display: none;
}

.columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(224px, 1fr));
  gap: 14px;
  min-width: 0;
  padding: 0 28px;
  align-items: start;
}

.col {
  min-width: 0;
}

.col-head {
  display: grid;
  grid-template-rows: 20px 18px;
  min-height: 48px;
  padding: 0 3px 10px;
  align-items: start;
}

.col-head .title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.milestone-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 28px 28px;
  overflow: auto;
}

.list-group + .list-group {
  margin-top: 16px;
}

.list-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 34%);
  gap: 18px;
  align-items: baseline;
  padding: 0 3px 8px;
}

.list-group-head .title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.list-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(80, 60, 30, 0.035);
  color: inherit;
  text-decoration: none;
}

.list-card > * {
  min-width: 0;
}

.list-title {
  margin: 2px 0 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.list-next {
  max-width: 76ch;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
}

.list-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.list-empty {
  padding: 12px 13px;
  border: 1px dashed var(--rule-strong);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 12.5px;
}

.sw {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.sw.todo {
  background: var(--todo);
}

.sw.in_progress {
  background: var(--prog);
}

.sw.ai_review {
  background: var(--ai);
}

.sw.coach_review {
  background: var(--coach);
}

.sw.achieved {
  background: var(--ach);
}

.count {
  margin-left: auto;
}

.ro {
  padding: 1px 5px;
  border: 1px solid oklch(86% 0.05 75);
  border-radius: 3px;
  background: oklch(95% 0.03 75);
  color: var(--coach-deep);
  font-size: 9.5px;
  text-transform: none;
}

.desc {
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-4);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 162px;
  padding: 12px 13px;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(80, 60, 30, 0.035), 0 8px 18px -18px rgba(80, 60, 30, 0.34);
  color: inherit;
  text-decoration: none;
}

.card:focus-visible,
.list-card:focus-visible,
.btn:focus-visible,
.view-btn:focus-visible,
.iconbtn:focus-visible,
.focus-act:focus-visible,
.side-item:focus-visible,
.dt-back:focus-visible,
.fact:focus-visible,
.file-remove:focus-visible,
.file-picker input:focus-visible {
  outline: 3px solid oklch(70% 0.14 285);
  outline-offset: 2px;
}

.card > * {
  min-width: 0;
}

.selected {
  border-color: var(--indigo);
  background: linear-gradient(180deg, oklch(98% 0.012 285), var(--surface) 60%);
  box-shadow: 0 14px 26px -18px rgba(60, 40, 140, 0.42);
}

.selected::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--indigo);
  content: "";
}

.c-eyebrow {
  display: flex;
  gap: 8px;
  color: var(--ink-4);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 9.5px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sect {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due {
  flex: none;
  margin-left: auto;
}

.c-title {
  min-height: 40px;
  margin: 0;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 680;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.c-move,
.lock-block,
.approved {
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
}

.lab {
  color: var(--ink-4);
  font-size: 9px;
  text-transform: uppercase;
}

.txt,
.lock-text {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.c-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--rule);
}

.ev-dots {
  display: flex;
  gap: 3px;
}

.ev-dots span {
  width: 5px;
  height: 5px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--rule);
}

.ev-dots .f.in_progress {
  border-color: var(--prog);
  background: var(--prog);
}

.ev-dots .f.ai_review {
  border-color: var(--ai);
  background: var(--ai);
}

.ev-dots .f.achieved {
  border-color: var(--ach);
  background: var(--ach);
}

.ev-count {
  color: var(--ink-3);
  font-size: 10px;
}

.locked {
  border-style: dashed;
  background: var(--paper);
  cursor: not-allowed;
}

.lock-block {
  display: flex;
  gap: 9px;
}

.lock-ring {
  flex: none;
}

.approved {
  display: flex;
  gap: 7px;
  color: oklch(40% 0.1 155);
}

.col-empty {
  min-height: 162px;
  padding: 14px;
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 12.5px;
}

.col-empty .head {
  color: var(--ink-2);
  font-weight: 650;
}

.detail {
  position: relative;
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--rule);
  background: var(--surface);
}

.dt-back {
  display: none;
}

.dt-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: var(--paper-2);
  box-shadow: 0 1px 4px rgba(80, 60, 30, 0.1);
  color: var(--ink);
  font-size: 23px;
  font-weight: 520;
  line-height: 1;
  text-decoration: none;
}

.dt-close:visited {
  color: var(--ink);
}

.dt-close:hover {
  border-color: var(--ink-4);
  background: var(--surface);
}

.dt-close:focus-visible {
  outline: 3px solid oklch(70% 0.14 285);
  outline-offset: 2px;
}

.dt-head {
  flex: none;
  padding: 22px 58px 18px 30px;
  border-bottom: 1px solid var(--rule);
}

.dt-from {
  display: flex;
  gap: 8px;
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
}

.dt-title {
  max-width: 16ch;
  margin: 7px 0 8px;
  font-size: 24px;
  font-weight: 680;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.dt-sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.42;
}

.dt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: baseline;
  margin-top: 11px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.meta-sep {
  color: var(--ink-4);
}

.dt-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 30px 28px;
}

.section {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.section h3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 18px;
  margin: 0 0 11px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

.section h3 > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-right {
  min-width: max-content;
  color: var(--ink-4);
  text-align: right;
}

.prose {
  color: var(--ink-2);
  font-size: 13px;
}

.section-intro {
  max-width: 56ch;
  margin: -2px 0 12px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.42;
}

.evidence-map,
.files {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.file,
.artifact-link {
  color: inherit;
  text-decoration: none;
}

.evidence-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12.5px;
}

.evidence-row.done {
  border-color: oklch(88% 0.026 155);
  box-shadow: inset 2px 0 0 oklch(70% 0.09 155);
}

.evidence-row.miss {
  border-color: oklch(88% 0.028 35);
  box-shadow: inset 2px 0 0 oklch(70% 0.1 35);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  min-width: 72px;
  padding: 3px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.evidence-row.done .status-dot {
  border-color: oklch(84% 0.042 155);
  background: oklch(98% 0.012 155);
  color: oklch(38% 0.105 155);
}

.evidence-row.miss .status-dot {
  border-color: oklch(84% 0.044 35);
  background: oklch(98% 0.012 35);
  color: oklch(44% 0.12 35);
}

.evidence-copy {
  min-width: 0;
}

.evidence-copy .label {
  overflow-wrap: anywhere;
  font-weight: 560;
}

.hint {
  color: var(--ink-3);
  font-size: 11px;
}

.ref,
.fsub,
.fact,
.crit-meta {
  color: var(--ink-4);
  font-size: 10px;
}

.file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 12.5px;
}

.ftype {
  padding: 5px 3px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-2);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 9px;
  text-align: center;
}

.fname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.file-action {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.file-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.file-remove:hover {
  color: var(--warn);
}

.memo {
  overflow: hidden;
  border: 1px solid oklch(88% 0.035 285);
  border-radius: 8px;
}

.memo-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  background: oklch(98% 0.012 285);
}

.memo-glyph {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--ai);
  color: white;
  font-weight: 700;
}

.memo .label {
  color: var(--ink-4);
  font-size: 10px;
  text-transform: uppercase;
}

.memo .title {
  font-weight: 650;
}

.memo-formative,
.memo-summary,
.memo-next {
  padding: 11px 13px;
  border-top: 1px solid var(--rule-soft);
  font-size: 12.75px;
}

.criteria {
  border-top: 1px solid var(--rule-soft);
}

.crit {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12.5px;
}

.crit-glyph {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 10px;
}

.crit-glyph.meets,
.crit-glyph.ok {
  background: var(--ach);
}

.crit-glyph.partial {
  background: var(--coach);
}

.crit-glyph.missing {
  background: var(--warn);
}

.authoritative {
  color: var(--coach-deep);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-note {
  padding: 11px 12px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: var(--surface);
}

.comment-note.coach_decision {
  border-color: oklch(86% 0.05 75);
  background: oklch(97% 0.024 75);
}

.comment-note.private_note {
  border-color: oklch(82% 0.038 205);
  background: oklch(97% 0.018 205);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  align-items: center;
  margin-bottom: 6px;
  color: var(--ink-4);
  font-size: 10.5px;
}

.comment-author {
  color: var(--ink-2);
  font-weight: 700;
}

.comment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 10px;
  font-weight: 650;
}

.comment-badge.authoritative {
  border-color: oklch(84% 0.052 75);
  background: oklch(95% 0.03 75);
}

.comment-badge.private {
  border-color: oklch(80% 0.044 205);
  background: oklch(94% 0.026 205);
  color: var(--ink-2);
}

.comment-body {
  color: var(--ink-2);
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: var(--paper);
}

.private-note-form {
  background: oklch(98% 0.012 205);
}

.dt-sticky-wrap {
  position: static;
  flex: none;
  padding: 12px 30px 18px;
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

.dt-note {
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 12px;
}

.dt-sticky {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dt-sticky > form {
  min-width: 0;
}

.btn {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 650;
}

.btn.primary {
  border-color: var(--indigo);
  background: var(--indigo);
  color: white;
}

.btn.wide {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workflow-form,
.auth-form,
.coach-action-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.auth-form {
  margin-top: 18px;
}

.draft-form {
  padding: 12px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: var(--paper);
}

.field-label {
  display: block;
  padding-left: 1px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 650;
}

.evidence-editor,
.field-input,
.comment-editor,
.coach-action-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.evidence-editor,
.comment-editor,
.coach-action-form textarea {
  resize: vertical;
}

.field-input {
  padding: 10px 12px;
}

.evidence-editor {
  min-height: 140px;
  padding: 11px 12px;
}

.comment-editor {
  min-height: 84px;
  padding: 9px 10px;
}

.draft-form .evidence-editor {
  display: block;
  margin: 0;
  background: var(--surface);
}

.coach-action-form textarea {
  min-height: 74px;
  padding: 9px 10px;
}

.evidence-editor:focus-visible,
.field-input:focus-visible,
.comment-editor:focus-visible,
.coach-action-form textarea:focus-visible {
  outline: 3px solid oklch(70% 0.14 285);
  outline-offset: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.form-help,
.empty-copy {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.form-status {
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 12px;
}

.form-status[data-status-kind="error"] {
  border-color: oklch(82% 0.08 35);
  background: oklch(98% 0.018 35);
  color: oklch(42% 0.12 35);
}

.readonly-submission {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12.75px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.upload-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
}

.upload-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.file-picker {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--ink-3);
  font-size: 12px;
}

.file-picker input {
  min-width: 0;
  max-width: 100%;
  font: inherit;
}

.memo-state {
  padding: 12px 13px;
  border: 1px solid oklch(88% 0.035 285);
  border-radius: 8px;
  background: oklch(98% 0.012 285);
  color: var(--ink-2);
}

.memo-updated {
  margin-top: 7px;
  color: var(--ink-4);
  font-size: 11.5px;
}

.coach-page {
  max-width: 1180px;
  margin: 40px auto;
  padding: 0 20px;
}

.coach-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.coach-hero h1 {
  margin: 5px 0 8px;
  font-size: 30px;
  line-height: 1.1;
}

.coach-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-3);
}

.queue-card {
  margin: 14px 0;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}

.queue-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}

.queue-head h2 {
  margin: 5px 0 5px;
  font-size: 22px;
}

.queue-head p {
  margin: 0;
  color: var(--ink-3);
}

.queue-status {
  display: grid;
  flex: none;
  gap: 3px;
  height: max-content;
  padding: 7px 10px;
  border: 1px solid oklch(86% 0.035 155);
  border-radius: 8px;
  background: oklch(98% 0.012 155);
  color: oklch(38% 0.105 155);
  font-weight: 650;
}

.queue-status span:last-child {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 520;
}

.queue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.queue-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: var(--paper);
}

.queue-panel h3 {
  margin: 0 0 9px;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
}

.queue-panel p {
  margin: 0;
}

.queue-files {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.file.compact {
  min-height: 38px;
  padding: 6px 8px;
  background: var(--surface);
}

.artifact-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.artifact-page {
  max-width: 840px;
  margin: 0 auto;
  padding: 32px 22px;
}

.artifact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.artifact-head h1 {
  margin: 5px 0 0;
  font-size: 26px;
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.artifact-panel {
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}

.artifact-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.artifact-meta div {
  padding: 10px;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  background: var(--paper-2);
}

.artifact-meta dt {
  color: var(--ink-4);
  font-size: 11px;
  text-transform: uppercase;
}

.artifact-meta dd {
  margin: 3px 0 0;
  color: var(--ink-2);
}

.artifact-note h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.artifact-note p {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-3);
}

.coach-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.empty-queue {
  color: var(--ink-3);
}

@media (max-width: 1299px) {
  :root {
    --side-w: 190px;
    --panel-w: minmax(400px, 460px);
  }

  .columns {
    grid-template-columns: repeat(5, 260px);
  }
}

@media (max-width: 1099px) {
  .app {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  }

  .app[data-detail-state="closed"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand {
    padding: 0 14px;
    border-right: 0;
  }

  .menu-btn {
    display: inline-flex;
  }

  .side {
    display: none;
  }

  .main {
    grid-column: 1;
    grid-row: 2;
  }

  .detail {
    grid-column: 2;
    grid-row: 2;
  }

  .pagehead {
    padding-right: 22px;
    padding-left: 22px;
  }

  .focus {
    margin-right: 22px;
    margin-left: 22px;
  }

  .columns {
    padding: 0 22px;
  }

  .milestone-list {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 799px) {
  :root {
    --topbar-h: 52px;
  }

  .app {
    display: block;
    height: auto;
    max-height: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    height: var(--topbar-h);
  }

  .brand {
    min-width: 0;
    padding: 0 12px;
  }

  .brand-name {
    max-width: 170px;
  }

  .search,
  .notif-btn,
  .topnav {
    display: none;
  }

  .topright {
    flex: none;
    padding: 0 12px;
  }

  .pagehead {
    display: block;
    padding: 16px 16px 8px;
  }

  .pagehead h1 {
    font-size: 24px;
    line-height: 1.12;
  }

  .week-strip {
    display: inline-block;
    margin-top: 12px;
  }

  .view-switch {
    width: min(190px, 58vw);
  }

  .board-tools {
    justify-content: flex-start;
    margin: 10px 16px 0;
  }

  .pilot-guide {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 10px 16px 8px;
    padding: 12px 14px;
  }

  .pilot-guide h2 {
    font-size: 15px;
  }

  .guide-next {
    display: block;
  }

  .guide-next .focus-act {
    margin-top: 8px;
  }

  .focus {
    display: block;
    margin: 10px 16px 8px;
    padding: 12px 14px;
  }

  .focus-act {
    display: inline-block;
    margin-top: 8px;
  }

  .focus-state {
    display: inline-flex;
    margin-top: 8px;
  }

  .board {
    min-height: auto;
    padding: 14px 0 24px;
    overflow: visible;
  }

  .columns {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 16px;
  }

  .milestone-list {
    min-height: auto;
    padding: 14px 16px 24px;
    overflow: visible;
  }

  .list-group-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .list-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    align-items: start;
  }

  .list-progress {
    justify-content: flex-start;
  }

  .desc {
    display: none;
  }

  .detail {
    width: auto;
    overflow: visible;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .dt-back {
    display: inline-flex;
    margin: 12px 18px;
    color: var(--ai);
    text-decoration: none;
  }

  .dt-close {
    display: none;
  }

  .dt-head {
    padding: 8px 18px 16px;
  }

  .dt-title {
    font-size: 24px;
  }

  .dt-body {
    padding: 0 18px 28px;
  }

  .dt-sticky-wrap {
    position: static;
    padding: 12px 18px 18px;
  }

  .dt-sticky {
    grid-template-columns: 1fr;
  }

  .memo-head {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .memo-readiness,
  .crit-meta,
  .ref {
    grid-column: 2;
  }

  .crit {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .evidence-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .status-dot {
    justify-self: start;
  }

  .evidence-row .ref {
    grid-column: 1;
    justify-self: start;
  }

  .file {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .fact {
    grid-column: 2;
  }

  .file-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .file-action {
    justify-content: flex-start;
  }

  .form-row,
  .upload-strip,
  .coach-hero,
  .queue-head,
  .queue-grid,
  .coach-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .coach-page {
    margin: 22px auto;
    padding: 0 16px;
  }

  .coach-hero h1 {
    font-size: 25px;
  }

  .queue-card {
    padding: 14px;
  }

  .queue-status {
    justify-self: start;
  }

  .error-panel,
  .auth-panel {
    padding: 22px;
  }

  .error-panel h1,
  .auth-panel h1 {
    font-size: 24px;
  }
}
