/* Lists and forms: proposals, change log and plan tables; the audit checklist. */

.page-head {
  margin-bottom: 24px;
}
.page-head p {
  margin-top: 10px;
  font-size: 17px;
}
.page-head code,
.checklist code {
  font-size: 0.8em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

/* Tables read as a ledger: quiet headers, generous rows, a hover to track the line. */
.table-wrap {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--rule) 70%, transparent);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-2);
}
.table-wrap table {
  font-size: 15px;
}
.table-wrap th {
  text-transform: none;
  letter-spacing: 0;
  font: 700 13.5px/1.3 var(--body);
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 12px 14px;
}
.table-wrap td {
  padding: 14px;
  vertical-align: top;
  line-height: 1.5;
}
.table-wrap tbody tr {
  transition: background-color 150ms;
}
.table-wrap tbody tr:hover {
  background: color-mix(in oklab, var(--accent-soft) 45%, transparent);
}
.table-wrap td:first-child,
.table-wrap td time {
  white-space: nowrap;
}
.table-wrap td a[href^="/proposals/"] {
  white-space: nowrap;
  font-weight: 750;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.table-wrap td a[href^="/proposals/"]:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.status-text {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.row-notes td {
  padding: 2px 14px 12px;
  background: transparent;
  border-top: 0;
}
.row-notes summary {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-3);
  cursor: pointer;
}
.row-notes summary:hover {
  color: var(--accent);
}

/* Phone cards for the proposals list. */
.row-card {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--rule) 70%, transparent);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-2);
  padding: 16px;
}

/* The checklist: each item is a card; a finished one turns green and steps back. */
.checklist {
  display: grid;
  gap: 12px;
}
.checklist h2 {
  margin: 30px 0 4px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  font-size: 26px;
}
.checklist h3 {
  margin: 16px 0 2px;
  font: 700 17px/1.3 var(--display);
  color: var(--ink-2);
}
.checklist .para {
  color: var(--ink-2);
}
.checklist-item {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--rule) 70%, transparent);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-1);
  padding: 16px 18px;
  transition:
    box-shadow 200ms var(--ease-out),
    transform 200ms var(--ease-out),
    background-color 200ms;
}
.checklist-item:focus-within {
  box-shadow: var(--shadow-3);
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--rule));
}
.checklist-item:has(.box.done) {
  background: color-mix(in oklab, var(--good-bg) 60%, var(--surface));
  box-shadow: none;
}
.item-label {
  font-size: 16.5px;
  line-height: 1.55;
}
.box {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -4px;
  border-radius: 7px;
  border: 2px solid var(--ink-3);
  font-size: 0;
}
.box.done {
  background: var(--good);
  border-color: var(--good);
}
.box.done::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2.5px solid var(--surface);
  border-bottom: 2.5px solid var(--surface);
  transform: translateY(-1px) rotate(-45deg);
}
.slot-ref {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  padding: 0 4px;
}
.checklist input[type="text"] {
  border-radius: 10px;
  border: 1.5px solid var(--rule);
  background: var(--surface-2);
  padding: 9px 12px;
  font: 500 16px/1.4 var(--body);
  color: var(--ink);
  transition:
    border-color 150ms,
    box-shadow 150ms,
    background-color 150ms;
}
.checklist input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.checklist input::placeholder {
  color: var(--ink-3);
}
.checklist .field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.item-actions {
  gap: 14px;
  margin-top: 12px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  cursor: pointer;
}
.check input[type="checkbox"] {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 8px;
  border: 2px solid var(--ink-3);
  background: var(--surface);
  cursor: pointer;
  transition:
    background-color 160ms,
    border-color 160ms,
    transform 160ms var(--ease-spring);
}
.check input[type="checkbox"]::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid var(--surface);
  border-bottom: 2.5px solid var(--surface);
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 220ms var(--ease-spring);
}
.check input[type="checkbox"]:checked {
  background: var(--good);
  border-color: var(--good);
  transform: scale(1.06);
}
.check input[type="checkbox"]:checked::after {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}
.item-actions .btn {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.item-actions .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.table-wrap tbody th {
  position: static;
  background: transparent;
  padding: 14px;
  white-space: nowrap;
  vertical-align: top;
  font: inherit;
}
.table-wrap tbody th a[href^="/proposals/"] {
  white-space: nowrap;
  font: 750 14.5px/1.3 var(--body);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.table-wrap tbody th a[href^="/proposals/"]:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.table-wrap td.mono {
  font-family: var(--body);
  font-size: inherit;
  white-space: nowrap;
}
.table-wrap {
  overflow-x: auto;
}

[hidden] {
  display: none !important;
}

/* Filter chips above the proposals list. */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--rule);
  background: var(--surface);
  color: var(--ink-2);
  font: 700 14.5px/1 var(--body);
  cursor: pointer;
  transition:
    background-color 160ms,
    color 160ms,
    border-color 160ms,
    transform 160ms var(--ease-spring);
}
.filter-chip span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 12.5px;
}
.filter-chip:hover {
  transform: translateY(-1px);
  border-color: var(--ink-3);
}
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.filter-chip[aria-pressed="true"] span {
  background: color-mix(in oklab, var(--bg) 22%, transparent);
  color: var(--bg);
}

/* Checklist tools: overall count, open-only switch, per-session progress. */
.checklist-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: -6px 0 6px;
}
.checklist-total {
  margin: 0;
  font-weight: 700;
  color: var(--ink-2);
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}
.switch input {
  appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(
    --ink-3
  ); /* the off track must show against the page: --rule was 1.2:1 */
  cursor: pointer;
  transition: background-color 180ms;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform 220ms var(--ease-spring);
}
.switch input:checked {
  background: var(--good);
}
.switch input:checked::after {
  transform: translateX(18px);
}
.session-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.session-progress .bar {
  flex: 1;
  max-width: 280px;
  height: 8px;
  border-radius: 4px;
  background: var(--rule);
  overflow: hidden;
}
.session-progress .bar-fill {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: var(--good);
  border-radius: 4px;
  transition: width 600ms var(--ease-out);
}
.checklist.is-open-only [data-box="done"] {
  display: none;
}

/* Links page: grouped cards. */
.link-group { margin-bottom: 26px; }
.link-group h2 { margin-bottom: 12px; }
.link-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.link-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--rule) 70%, transparent);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms var(--ease-spring), box-shadow 200ms;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); color: var(--ink); }
.link-card b { font: 720 17px/1.25 var(--display); color: var(--accent); }
.link-card span { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
