/* Design language: "Chalk & Oxblood" (option 9, chosen 5 Sep 2026).
   Editorial feel: Archivo black headings, IBM Plex Sans body, hairline borders, square corners,
   one dark oxblood accent. No shadows; structure comes from type and hairlines. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --paper:   #FCFCFB;   /* app background */
  --card:    #FCFCFB;   /* blocks are the same chalk, defined by hairlines not fill */
  --side:    #F3F3F1;   /* sidebar */
  --hair:    #DCDCD8;   /* borders */
  --tint:    #F1F1EE;   /* hover, alternating rows */
  --ink:     #0F0F0F;   /* headings */
  --body:    #2A2A2A;   /* body text */
  --muted:   #6B6B68;   /* secondary text */
  --accent:  #6B1F2A;   /* oxblood */
  --accent-deep: #521520;
  --accent-soft: #F3E4E6;
  --ok:      #1E6E42;
  --ok-soft: #DCEFE3;
  --warn:    #8F5A0F;
  --warn-soft: #F7E9CC;
  --serif: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif; /* headings */
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 4px;
  --shadow: none;
  /* Notion's two shadow recipes: a resting block, and a floating popover or dialog. */
  --sh-card: rgba(15,15,15,.06) 0 0 0 1px, rgba(15,15,15,.05) 0 2px 4px;
  --sh-pop: rgba(15,15,15,.05) 0 0 0 1px, rgba(15,15,15,.1) 0 3px 6px, rgba(15,15,15,.2) 0 9px 24px;
  --hover: rgba(55,53,47,.06);
  --press: rgba(55,53,47,.12);
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--body);
  font-family: var(--sans); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 900; margin: 0; letter-spacing: -0.04em; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 18px; letter-spacing: -0.03em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex: none; background: var(--side);
  border-right: 1px solid var(--hair); padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; left: 0; bottom: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand .mark { width: 28px; height: 28px; border-radius: var(--r); background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.brand b { font-family: var(--serif); font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: -0.03em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r);
  color: var(--body); font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--hover); }
.nav a:active { background: var(--press); }
.nav a.on { background: var(--hover); color: var(--ink); font-weight: 600; }
.nav a .badge { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--accent-deep);
  background: var(--accent-soft); padding: 1px 7px; border-radius: 99px; }
.nav .ico { width: 18px; text-align: center; color: var(--muted); }
.side .newdeal { margin-top: 10px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600; }

.main { flex: 1; min-width: 0; margin-left: 248px; padding: 40px 48px 80px; max-width: 1080px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.head .date { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.head p { margin: 8px 0 0; font-size: 16px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r);
  font: 500 14px var(--sans); border: 1px solid var(--hair); background: var(--card); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { background: var(--press); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.small { padding: 5px 10px; font-size: 13px; }

/* ---------- sections and cards ---------- */
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head .count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.card { background: #fff; border: 0; border-radius: var(--r); box-shadow: var(--sh-card); }

/* today list */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: start;
  padding: 16px 20px; border-top: 1px solid var(--hair); }
.todo li:first-child { border-top: 0; }
.todo li:hover { background: var(--hover); }
.check { width: 20px; height: 20px; margin-top: 2px; border: 1.5px solid var(--hair); border-radius: var(--r); background: #fff; }
.todo .what { font-size: 15px; color: var(--ink); font-weight: 500; }
.todo .who { font-size: 14px; color: var(--muted); margin-top: 2px; }
.todo .who b { color: var(--body); font-weight: 500; }
.todo .when { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.todo .when.late { color: var(--accent-deep); }

/* pipeline strip */
.stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stage { padding: 14px 16px; }
.stage .name { font-size: 13px; font-weight: 500; color: var(--muted); }
.stage .n { font-family: var(--serif); font-size: 28px; font-weight: 900; letter-spacing: -0.04em; color: var(--ink); line-height: 1.1; margin: 6px 0 2px; }
.stage .val { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.stage.hot { box-shadow: var(--sh-card), inset 0 4px 0 var(--accent); }

/* attention lists */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 14px 20px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rows li:first-child { border-top: 0; }
.rows .t { font-weight: 500; color: var(--ink); font-size: 15px; }
.rows .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pill { font: 500 12px var(--sans); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill.warn { background: var(--warn-soft); color: #7A5A05; }
.pill.miss { background: var(--accent-soft); color: var(--accent-deep); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.chips { display: flex; gap: 5px; flex: none; }
.chip { font: 500 11px var(--mono); padding: 2px 7px; border-radius: var(--r); border: 1px solid var(--hair); color: var(--muted); }
.chip.miss { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }

/* ---------- phone ---------- */
@media (max-width: 800px) {
  .app { flex-direction: column; }
  .side { width: auto; top: auto; bottom: 0; left: 0; right: 0; z-index: 2;
    flex-direction: row; padding: 6px 8px; border-right: 0; border-top: 1px solid var(--hair); }
  .brand, .side .newdeal, .side .me, .nav .badge { display: none; }
  .nav { display: contents; }
  .nav a { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; }
  .main { margin-left: 0; padding: 24px 18px 96px; }
  h1 { font-size: 26px; }
  .head { flex-direction: column; align-items: stretch; gap: 14px; }
  .stages { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1fr; }
}

/* ---------- shared: quick capture box (the "one box" from Claude / ChatGPT) ---------- */
.capture { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 13px 14px 13px 18px; margin-bottom: 36px; box-shadow: var(--sh-card); border: 0; transition: box-shadow 120ms var(--ease); }
.capture:focus-within { box-shadow: var(--sh-pop); }
.capture input { flex: 1; border: 0; background: transparent; font: 400 15px var(--sans); color: var(--ink); outline: 0; }
.capture input::placeholder { color: var(--muted); }
.capture .hint { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--hair); border-radius: var(--r); padding: 2px 6px; }

/* ---------- shared: quiet tables (Notion-style, no vertical lines) ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
  padding: 10px 14px; border-bottom: 1px solid var(--hair); }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--hover); cursor: pointer; }
.tbl .r { text-align: right; }
.tbl .t { font-weight: 500; color: var(--ink); }
.tbl .s { color: var(--muted); font-size: 13px; }
.tbl .num { font-size: 13px; white-space: nowrap; }
.group { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep);
  padding: 22px 14px 8px; }
.group:first-child { padding-top: 6px; }
.you { color: var(--accent-deep); font-weight: 500; }

/* filters: a segmented pill row */
.filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filters a { font: 500 13px var(--sans); padding: 6px 12px; border-radius: 99px; color: var(--muted); border: 1px solid transparent; }
.filters a:hover { background: var(--hover); }
.filters a.on { background: var(--ink); color: #fff; }

/* ---------- milestone track: 8 dots ---------- */
.track { display: flex; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--hair); background: var(--card); flex: none; }
.dot.on { background: var(--accent); border-color: var(--accent); }
.dot.dead { background: var(--muted); border-color: var(--muted); }
.lnk { width: 14px; height: 1.5px; background: var(--hair); flex: none; }
.lnk.on { background: var(--accent); }
.track.big .dot { width: 14px; height: 14px; }
.track.big .lnk { width: 62px; }
.ms-labels { display: flex; gap: 0; font: 500 10px var(--mono); color: var(--muted); letter-spacing: .04em; margin-top: 8px; }
.ms-labels span { width: 76px; }
.ms-labels span.on { color: var(--ink); }

/* status pills */
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.stall { background: var(--warn-soft); color: #7A5A05; }
.pill.done { background: var(--tint); color: var(--muted); }
.pill.dead { background: #ECE9E3; color: var(--muted); text-decoration: line-through; }

/* ---------- detail pages (Notion-style: title, properties, then body) ---------- */
.crumb { font: 500 13px var(--sans); color: var(--muted); margin-bottom: 14px; }
.crumb a:hover { color: var(--ink); }
.props { display: grid; grid-template-columns: 140px 1fr; row-gap: 8px; column-gap: 16px; margin: 20px 0 32px; font-size: 14px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; color: var(--ink); }
.props dd .edit { color: var(--muted); font-size: 12px; margin-left: 8px; opacity: 0; }
.props dd:hover .edit { opacity: 1; }
.next { display: flex; gap: 14px; align-items: flex-start; background: var(--accent-soft); border: 1px solid transparent; border-left: 4px solid var(--accent);
  border-radius: var(--r); padding: 16px 18px; margin-bottom: 32px; }
.next .lbl { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); }
.next .what { font-size: 16px; color: var(--ink); font-weight: 500; margin-top: 3px; }
.next .when { margin-left: auto; font: 500 12px var(--mono); color: var(--accent-deep); white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 96px 20px 1fr; gap: 12px; padding: 12px 0; }
.timeline .d { font: 500 12px var(--mono); color: var(--muted); padding-top: 3px; }
.timeline .k { font-size: 12px; color: var(--muted); padding-top: 3px; }
.timeline .n { font-size: 15px; color: var(--body); }
.timeline .n b { color: var(--ink); font-weight: 500; }
.req { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 32px; }
.req .card { padding: 12px 14px; }
.req .k { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.req .v { font-size: 14px; color: var(--ink); margin-top: 4px; }
.req .card.miss { border-color: var(--accent); }
.req .card.miss .v { color: var(--accent-deep); }
.money-big { font-family: var(--serif); font-weight: 900; font-size: 36px; color: var(--ink); line-height: 1.1; }
.card.pad { padding: 18px 20px; }

@media (max-width: 800px) {
  .props { grid-template-columns: 110px 1fr; }
  .req { grid-template-columns: 1fr 1fr; }
  .tbl .hide-m { display: none; }
  .track.big .lnk { width: 22px; }
  .ms-labels { display: none; }
  .card:has(.tbl) { overflow-x: auto; }
  .tbl td, .tbl th { padding-left: 10px; padding-right: 10px; }
}

/* ---------- blocks: drag handle on hover, drag-to-reorder sections ---------- */
.section, .todo li, .rows li { position: relative; }
.handle { position: absolute; left: -22px; top: 4px; width: 16px; color: var(--muted); opacity: 0; cursor: grab;
  font-size: 14px; line-height: 1; letter-spacing: -2px; user-select: none; }
.section:hover > .handle, .todo li:hover > .handle, .rows li:hover > .handle { opacity: .7; }
.todo li > .handle, .rows li > .handle { left: 2px; top: 50%; transform: translateY(-50%); }
.section.dragging { opacity: .4; }
.section.over { box-shadow: 0 -4px 0 var(--accent); }
.todo li:hover .check { border-color: var(--accent); }

/* ---------- forms and dialogs (native <dialog>, no library) ---------- */
dialog { border: 0; border-radius: 6px; padding: 0; width: min(560px, 92vw); background: #fff; color: var(--body); box-shadow: var(--sh-pop); }
dialog[open] { animation: dlg-in 180ms var(--ease); }
dialog::backdrop { background: rgba(15,15,15,.45); animation: fade-in 180ms ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
dialog form { padding: 22px 24px; }
dialog h2 { margin-bottom: 16px; }
.f { display: grid; gap: 4px; margin-bottom: 12px; }
.f label { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.f input, .f select, .f textarea { font: 400 15px var(--sans); color: var(--ink); background: rgba(242,241,238,.6); border: 0; box-shadow: rgba(15,15,15,.1) 0 0 0 1px inset; transition: box-shadow 120ms var(--ease), background 120ms var(--ease);
  border-radius: var(--r); padding: 9px 11px; width: 100%; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 0; background: #fff; box-shadow: var(--accent) 0 0 0 1.5px inset, var(--accent-soft) 0 0 0 3px; }
.f textarea { min-height: 70px; resize: vertical; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.err { color: var(--accent); font-size: 13px; margin-top: 8px; min-height: 1em; }
.capture form { display: contents; }
.capture .chips { gap: 4px; }
.capture .chip { cursor: pointer; }
.capture .chip.on { border-color: var(--ink); color: var(--ink); background: var(--tint); }
.todo li.done { opacity: .45; }
.todo li.done .what { text-decoration: line-through; }
.check { cursor: pointer; }
.check.on { background: var(--accent); border-color: var(--accent); }
.empty { padding: 28px 20px; color: var(--muted); font-size: 14px; text-align: center; }
.props dd.editable { cursor: text; }
.props dd.editable:hover { background: var(--hover); border-radius: var(--r); }
.props dd input, .props dd textarea, .req textarea, .what input, .when input, h1 input { font: inherit; width: 100%; border: 0; border-radius: var(--r); padding: 4px 8px; background: #fff; box-shadow: var(--sh-pop); outline: 0; }
.req .card { cursor: text; }

.stage.pick { cursor: pointer; }
.stage.pick:hover { border-color: var(--ink); }
.ms-labels span { cursor: pointer; }
.ms-labels span:hover { color: var(--accent); }
.stat { font-size: 12px; color: var(--muted); }
@media (max-width: 800px) { .f-row { grid-template-columns: 1fr; } }


/* The tab currently being shaped with Thomas: a saffron bar and tag so it reads as "live work". */
.nav a.dev { box-shadow: inset 3px 0 0 var(--warn); background: var(--warn-soft); }
.nav a.dev:hover, .nav a.dev.on { background: #F3E2BE; }
.nav a .tag { margin-left: auto; font: 500 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.nav a .badge:not([hidden]) + .tag { margin-left: 6px; }
@media (max-width: 800px) { .nav a .tag { display: none; } }
