/* Dual Occupancy build: eucalyptus accent on a cool paper ground; Plex for reading, tabular figures for counts. */
:root {
  --bg: #f3f4f1; --surface: #fff; --ink: #1d2420; --muted: #5f6a64; --line: #d9ddd7;
  --accent: #2f6b55; --accent-ink: #fff; --accent-soft: #e2eee8;
  --wait: #a86a12; --wait-soft: #f7ecd9; --late: #b23a2a; --late-soft: #f8e3df;
  --ok: #2f7a3e; --ok-soft: #e1f0e3; --done: #4d6b8a;
  --shadow: 0 1px 2px rgba(29,36,32,.06), 0 4px 14px rgba(29,36,32,.06);
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --surface: #1c221f; --ink: #e6ebe7; --muted: #9aa69f; --line: #2f3833;
    --accent: #6fbf9c; --accent-ink: #0f1a15; --accent-soft: #1f3329;
    --wait: #e2a84f; --wait-soft: #3a2d17; --late: #ec7d6c; --late-soft: #3d221e;
    --ok: #7fcf8d; --ok-soft: #1d3322; --done: #8fb0d3; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
code { font-family: var(--f-mono); font-size: .92em; }

/* Top bar */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); font-weight: 600; }
.bar nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.bar nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--ink); background: var(--bg); }
.bar nav a[aria-current] { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.who a { color: var(--ink); font-size: 14px; }
@media (max-width: 700px) {
  .bar { gap: 6px 12px; }
  .who { margin-left: auto; }
  .bar nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -6px; }
  .bar nav a { white-space: nowrap; }
}

.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 64px; display: grid; gap: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.head p { margin: 6px 0 0; max-width: 70ch; }
.crumb { margin: 0; }
.flash { background: var(--ok-soft); border: 1px solid var(--ok); border-radius: 8px; padding: 10px 14px; }
.err { color: var(--late); background: var(--late-soft); border-radius: 8px; padding: 10px 14px; margin: 0; }
.notice-box { background: var(--wait-soft); border-color: var(--wait) !important; }

/* Controls */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--late); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: grid; gap: 4px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .row select, .row input:not([type=checkbox]):not([type=radio]):not([type=file]) { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
.field input[type=file] { padding: 6px; }
.field.inline { display: flex; align-items: center; gap: 8px; }
.field.inline select, .field.inline input { width: auto; }
.check { display: flex; gap: 8px; align-items: center; }
textarea { resize: vertical; }
textarea.output { width: 100%; font-family: var(--f-mono); font-size: 13px; line-height: 1.55; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); }
input.copy { width: 100%; font-family: var(--f-mono); font-size: 13px; padding: 10px; border: 2px solid var(--accent); border-radius: 8px; background: var(--bg); }
.stack { display: grid; gap: 14px; align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row.tight { gap: 6px; align-items: center; flex-wrap: nowrap; }
.row.tight select, .row.tight input { width: auto; padding: 5px 6px; }
.wrap-row .grow { flex: 1 1 320px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid3 .span2 { grid-column: span 2; }
@media (max-width: 640px) { .grid3 { grid-template-columns: minmax(0, 1fr); } .grid3 .span2 { grid-column: auto; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; }
.panel.danger { border-color: var(--late-soft); }
.taskgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.col-main, .col-side { min-width: 0; display: grid; gap: 20px; align-content: start; }
.col-side.panel { gap: 6px; }
@media (max-width: 900px) { .taskgrid { grid-template-columns: minmax(0, 1fr); } }

/* Summary strip */
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.summary.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary div { background: var(--surface); padding: 12px 14px; }
.summary b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary span { font-size: 13px; color: var(--muted); }
.summary .late b { color: var(--late); }
.summary .okc b { color: var(--ok); }
.summary .midc b { color: var(--wait); }
@media (max-width: 640px) { .summary, .summary.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.filters label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.filters select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 8px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: minmax(0, 1fr); } }
.lane { display: grid; gap: 10px; min-width: 0; }
.lane h2 { font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; border-bottom: 2px solid var(--lane, var(--line)); }
.lane h2 small { font-family: var(--f-mono); font-size: 13px; color: var(--muted); font-weight: 400; }
.lane[data-s="todo"] { --lane: var(--muted); }
.lane[data-s="doing"] { --lane: var(--accent); }
.lane[data-s="waiting"] { --lane: var(--wait); }
.lane[data-s="done"] { --lane: var(--done); }
.empty { font-size: 13px; color: var(--muted); margin: 4px 2px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); display: grid; gap: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.card:hover { border-color: var(--muted); }
.card.high { border-left: 4px solid var(--late); }
.card .t { font-weight: 600; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.chip { border-radius: 999px; padding: 2px 8px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; font-size: 12px; }
.chip.who { background: transparent; border: 1px solid var(--line); }
.chip.hi { background: var(--late-soft); }
.due { font-family: var(--f-mono); color: var(--muted); }
.due.late { color: var(--late); font-weight: 500; }
.count { color: var(--muted); }
.lane[data-s="done"] .card { opacity: .75; }
.lane[data-s="done"] .card .t { text-decoration: line-through; text-decoration-color: var(--muted); }

/* Conversation */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.thread li { display: grid; gap: 4px; }
.thread li.event { font-size: 13px; padding-left: 12px; border-left: 2px solid var(--line); }
.thread li.event .by strong { font-weight: 500; }
.prose { overflow-wrap: anywhere; }
.thumb img { max-width: min(100%, 420px); max-height: 320px; border: 1px solid var(--line); border-radius: 8px; display: block; margin-top: 6px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; overflow-wrap: anywhere; }

/* Tables */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
tr.off { opacity: .55; }
td.num { font-family: var(--f-display); font-weight: 700; font-variant-numeric: tabular-nums; width: 3em; }
.roles { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.roles dt { font-weight: 600; } .roles dd { margin: 0; color: var(--muted); }
.invite { border: 2px solid var(--accent); }

/* User tests */
.testrow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.testrow:hover { border-color: var(--muted); }
.tally { display: flex; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ok { color: var(--ok); } .mid { color: var(--wait); } .bad { color: var(--late); }
.outcome { border-radius: 999px; padding: 2px 8px; font-size: 12px; margin-right: 6px; }
.outcome.passed { background: var(--ok-soft); } .outcome.struggled { background: var(--wait-soft); } .outcome.failed { background: var(--late-soft); }

/* SEO */
.scorehead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; min-width: 0; }
.scorehead > div:last-child { min-width: 0; flex: 1; }
.score { width: 84px; height: 84px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 6px solid var(--line); flex: none; }
.score b { font-family: var(--f-display); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.score span { font-size: 11px; color: var(--muted); }
.score.sgood { border-color: var(--ok); } .score.smid { border-color: var(--wait); } .score.sbad { border-color: var(--late); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.checks li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 12px; background: var(--surface); overflow-wrap: anywhere; }
.checks .lvl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.checks .fail .lvl { color: var(--late); } .checks .warn .lvl { color: var(--wait); } .checks .pass .lvl { color: var(--ok); } .checks .info .lvl { color: var(--muted); }
@media (max-width: 520px) { .checks li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Mock-ups */
.frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; margin-inline: auto; max-width: 100%; }
.frame.phone { width: 390px; } .frame.desktop { width: 100%; }
.frame iframe { display: block; width: 100%; height: 780px; border: 0; }
.mockimg { max-width: 100%; max-height: 900px; border: 1px solid var(--line); border-radius: 12px; justify-self: center; }

/* Sign-in */
.auth { max-width: 420px; width: 100%; margin: 6vh auto 0; display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.auth h1 span { color: var(--accent); font-weight: 600; font-size: .8em; }
