@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;1,6..72,300;1,6..72,400&display=swap");

@font-face { font-family: "Geist"; src: url("assets/GeistVF.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/GeistMonoVF.woff") format("woff"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #1a1a1a; --ink-2: #0e0e0e; --ink-3: #232321;
  --body: #3a3a38; --mute: #8b8276; --fade: #a09e98;
  --rule: #d4d2cc; --rule-soft: #e4e0d8; --rule-dark: #2a2a28;
  --stone: #f5f1ea; --stone-soft: #fbf8f2; --stone-deep: #ece6db;
  --clay: #c75b33; --clay-deep: #a8431f; --clay-tint: #e8b59e; --clay-wash: rgba(199,91,51,0.10);
  --green: #4f7a4a; --amber: #b58a2c; --red: #b4452c;
  --green-wash: rgba(79,122,74,0.12); --amber-wash: rgba(181,138,44,0.14); --red-wash: rgba(180,69,44,0.12);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Newsreader", Georgia, serif;
  --shadow-1: 0 1px 2px rgba(26,26,26,0.04), 0 0 0 0.5px rgba(26,26,26,0.05);
  --shadow-pop: 0 18px 48px -16px rgba(26,26,26,0.30), 0 0 0 0.5px rgba(26,26,26,0.08);
  --ease: cubic-bezier(0.2,0,0,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans); background: var(--stone); color: var(--ink);
  font-feature-settings: "ss01","cv01","cv11"; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; font-size: 15px; line-height: 1.55;
}
::selection { background: var(--clay); color: var(--stone); }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; }
:focus-visible { outline: 1.5px solid var(--clay); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
h1,h2,h3,h4 { margin: 0; }

/* ============ App chrome ============ */
.app { min-height: 100vh; }
.header { background: var(--stone-soft); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
.header-row { max-width: 1180px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { color: var(--ink); display: inline-flex; }
.studio-switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 6px 4px 10px; background: var(--stone); cursor: pointer; transition: border-color 120ms; }
.studio-switch:hover { border-color: rgba(26,26,26,0.35); }
.studio-switch .nm { font-size: 13px; font-weight: 500; }
.studio-switch .chev { color: var(--mute); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--stone-deep); color: var(--ink); font-weight: 600; letter-spacing: 0.01em; flex-shrink: 0; user-select: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.md { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.clay { background: var(--clay); color: var(--stone); }
.avatar.org { border-radius: 6px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; border: none; background: transparent; cursor: pointer; padding: 3px 4px 3px 8px; border-radius: 999px; transition: background 120ms; }
.user-btn:hover { background: var(--stone-deep); }
.user-btn .un { font-size: 13px; font-weight: 500; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow-pop); min-width: 220px; padding: 6px; z-index: 60; }
.menu .mhead { padding: 8px 10px 10px; border-bottom: 1px solid var(--rule-soft); margin-bottom: 6px; }
.menu .mhead .e { font-size: 12px; color: var(--mute); font-family: var(--font-mono); }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: none; background: transparent; text-align: left; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.menu button:hover { background: var(--stone-deep); }

/* nav */
.nav { background: var(--stone-soft); border-bottom: 1px solid var(--rule); position: sticky; top: 57px; z-index: 39; }
.nav-row { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 4px; }
.nav-link { position: relative; padding: 13px 14px; font-size: 14px; color: var(--mute); transition: color 120ms; font-weight: 450; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 500; }
.nav-link.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--clay); border-radius: 2px; }
.nav-spacer { flex: 1; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--clay); color: var(--stone); font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; vertical-align: middle; }
.nav-action { display: inline-flex; align-items: center; gap: 6px; }

/* ============ Page ============ */
.page { max-width: 1180px; margin: 0 auto; padding: 32px 28px 120px; }
.page-narrow { max-width: 920px; }
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.ph h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.022em; }
.ph .sub { font-size: 14px; color: var(--mute); margin-top: 5px; }
.ph .serif { font-family: var(--font-serif); font-style: italic; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); margin-bottom: 12px; transition: color 120ms; }
.back:hover { color: var(--clay); }

.section { margin-top: 36px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mute); }
.section-head .ct { font-size: 12px; color: var(--fade); font-family: var(--font-mono); }
.section-head .rule { flex: 1; height: 1px; background: var(--rule-soft); }

/* ============ Cards ============ */
.card { background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 10px; }
.card.flat { border-radius: 8px; }
.pad { padding: 20px; }
.pad-sm { padding: 14px 16px; }

/* stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; }
.stat { background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--mute); font-weight: 500; }
.stat .v { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; line-height: 1; }
.stat .v.tn { font-variant-numeric: tabular-nums; }
.stat .meta { font-size: 12px; color: var(--fade); margin-top: 6px; }
.stat.accent { border-left: 3px solid var(--clay); }
.stat .v.red { color: var(--red); } .stat .v.amber { color: var(--amber); } .stat .v.green { color: var(--green); }

/* ============ Status pill ============ */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.pill .dot { width: 6px; height: 6px; border-radius: 999px; }
.pill.todo { background: var(--stone-deep); color: var(--body); }
.pill.todo .dot { background: var(--fade); }
.pill.progress { background: var(--amber-wash); color: var(--amber); }
.pill.progress .dot { background: var(--amber); }
.pill.blocked { background: var(--red-wash); color: var(--red); }
.pill.blocked .dot { background: var(--red); }
.pill.done { background: var(--green-wash); color: var(--green); }
.pill.done .dot { background: var(--green); }
.pill.plain { background: transparent; border-color: var(--rule); color: var(--body); }
.pill.clay { background: var(--clay-wash); color: var(--clay-deep); }
.pill.clay .dot { background: var(--clay); }

/* tag chip */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 12px; border: 1px solid var(--rule); color: var(--body); background: var(--stone); white-space: nowrap; }

/* ============ Task / list rows ============ */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; transition: background 120ms; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--stone-deep); }
.row + .row { border-top: 1px solid var(--rule-soft); }
.row.bare + .row.bare { border-top: 1px solid var(--rule-soft); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 12.5px; color: var(--mute); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.due { font-size: 13px; color: var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.due.over { color: var(--red); font-weight: 500; }
.due.soon { color: var(--amber); }
.muted { color: var(--mute); }
.faint { color: var(--fade); }
.dotsep { color: var(--fade); }
.empty { font-size: 14px; color: var(--mute); padding: 18px 14px; }
.check { width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--rule); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 120ms; background: var(--stone-soft); }
.check:hover { border-color: var(--green); }
.check.done { background: var(--green); border-color: var(--green); color: var(--stone); }
.row.completed .title { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--fade); }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; font-size: 13.5px; font-weight: 500; border-radius: 8px; cursor: pointer; border: 1px solid transparent; background: var(--ink); color: var(--stone); transition: background 120ms, border-color 120ms; }
.btn:hover { background: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.outline { background: var(--stone-soft); color: var(--ink); border-color: var(--rule); }
.btn.outline:hover { background: var(--stone-deep); border-color: rgba(26,26,26,0.3); }
.btn.ghost { background: transparent; color: var(--body); }
.btn.ghost:hover { background: var(--stone-deep); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn.danger { background: var(--red-wash); color: var(--red); }
.btn.danger:hover { background: rgba(180,69,44,0.2); }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--rule); background: var(--stone-soft); cursor: pointer; color: var(--body); transition: background 120ms; }
.iconbtn:hover { background: var(--stone-deep); }

/* segmented */
.seg { display: inline-flex; background: var(--stone-deep); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 6px 12px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--mute); font-weight: 450; transition: all 120ms; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--stone-soft); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-1); }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--stone-soft); font-size: 13px; cursor: pointer; color: var(--body); transition: all 120ms; }
.chip:hover { border-color: rgba(26,26,26,0.3); }
.chip.active { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; opacity: 0.65; }

/* ============ Project cards ============ */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 16px; }
.proj-card { background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; cursor: pointer; transition: border-color 150ms, transform 150ms, box-shadow 150ms; display: flex; flex-direction: column; gap: 14px; }
.proj-card:hover { border-color: rgba(26,26,26,0.28); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.proj-card .pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proj-card .pc-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.proj-card .pc-client { font-size: 13px; color: var(--mute); margin-top: 3px; }
.proj-card .pc-blurb { font-size: 13px; color: var(--body); line-height: 1.5; }
.proj-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.bar { height: 5px; border-radius: 999px; background: var(--stone-deep); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--clay); border-radius: 999px; }
.avstack { display: flex; }
.avstack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--stone-soft); }
.avstack .avatar:first-child { margin-left: 0; }

/* ============ Tabs ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.tab { padding: 10px 14px; font-size: 14px; color: var(--mute); border: none; background: transparent; cursor: pointer; position: relative; font-weight: 450; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 500; }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--clay); }
.tab .n { font-variant-numeric: tabular-nums; color: var(--fade); margin-left: 5px; font-size: 12px; }

/* ============ Drawer ============ */
.scrim { position: fixed; inset: 0; background: rgba(20,18,15,0.32); z-index: 80; opacity: 0; transition: opacity 200ms var(--ease); }
.scrim.show { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 94vw); background: var(--stone-soft); border-left: 1px solid var(--rule); box-shadow: var(--shadow-pop); z-index: 81; transform: translateX(100%); transition: transform 240ms var(--ease); display: flex; flex-direction: column; }
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--rule-soft); }
.drawer-head .dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-foot { padding: 16px 22px; border-top: 1px solid var(--rule-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* form fields */
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mute); margin-bottom: 8px; }
.input, .textarea { width: 100%; border: 1px solid var(--rule); border-radius: 8px; background: var(--stone); font-family: inherit; font-size: 14px; color: var(--ink); padding: 9px 11px; transition: border-color 120ms; }
.input:focus, .textarea:focus { outline: none; border-color: var(--clay); }
.textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.input.date { font-variant-numeric: tabular-nums; }

/* owner select (avatar options) */
.owner-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.owner-opt { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 7px; border-radius: 999px; border: 1px solid var(--rule); background: var(--stone); cursor: pointer; font-size: 13px; transition: all 120ms; }
.owner-opt:hover { border-color: rgba(26,26,26,0.3); }
.owner-opt.active { border-color: var(--ink); background: var(--ink); color: var(--stone); }
.owner-opt.active .avatar { box-shadow: 0 0 0 2px var(--ink); }

/* status choices */
.status-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.status-opt { cursor: pointer; border: 1px solid transparent; }
.status-opt.sel { box-shadow: 0 0 0 1.5px var(--ink); }

/* drawer detail rows */
.dl { display: flex; flex-direction: column; gap: 2px; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); }
.dl-row:last-child { border-bottom: none; }
.dl-row .lab { font-size: 13px; color: var(--mute); }
.dl-row .val { font-size: 13.5px; color: var(--ink); text-align: right; }
.ref { font-family: var(--font-mono); font-size: 11px; color: var(--fade); }

/* ============ Confirm inbox ============ */
.confirm-card { background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.confirm-card.attn { border-color: var(--clay-tint); background: linear-gradient(0deg, var(--stone-soft), var(--stone-soft)); }
.confirm-top { display: flex; align-items: flex-start; gap: 12px; }
.confirm-top .ct-main { flex: 1; }
.confirm-top .nm { font-size: 15px; font-weight: 600; }
.confirm-top .ctx { font-size: 13px; color: var(--body); margin-top: 3px; line-height: 1.45; }
.confirm-top .mn { font-size: 12px; color: var(--mute); margin-top: 5px; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-select { position: relative; }

/* who's on what — collapsible */
.who + .who { border-top: 1px solid var(--rule-soft); }
.who-head { align-items: center; }
.who-chev { color: var(--fade); display: inline-flex; flex-shrink: 0; width: 15px; transition: transform 160ms var(--ease); }
.who-chev.open { transform: rotate(90deg); color: var(--mute); }
.who-chev.hidden { visibility: hidden; }
.who.open > .who-head { background: var(--stone-deep); }
.who-tasks { background: var(--stone); border-top: 1px solid var(--rule-soft); padding-left: 24px; }
.who-tasks .row { padding-left: 14px; }

/* billing at a glance (today) */
.seemore { font-size: 12.5px; color: var(--clay-deep); display: inline-flex; align-items: center; gap: 2px; }
.seemore:hover { text-decoration: underline; text-underline-offset: 3px; }
.bill-row { padding: 14px; align-items: stretch; }
.bill-await { font-size: 12px; font-weight: 500; color: var(--clay-deep); background: var(--clay-wash); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.billbar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--stone-deep); gap: 2px; }
.billbar i { display: block; height: 100%; border-radius: 999px; }
.billbar .s-unbilled, .bill-legend i.s-unbilled { background: var(--clay); }
.billbar .s-billed, .bill-legend i.s-billed { background: var(--mute); }
.billbar .s-paid, .bill-legend i.s-paid { background: var(--green); }
.billbar .s-empty { background: var(--stone-deep); }
.bill-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.bill-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bill-legend i { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }

/* week navigation */
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav .iconbtn { width: 28px; height: 28px; }

/* project billing rates */
.rate-list { display: flex; flex-direction: column; }
.rate-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.rate-row:last-child { border-bottom: none; }
.rate-input { display: inline-flex; align-items: center; gap: 1px; border: 1px solid var(--rule); border-radius: 8px; background: var(--stone); padding: 0 11px; height: 34px; transition: border-color 120ms; }
.rate-input:focus-within { border-color: var(--clay); }
.rate-input .pfx { color: var(--mute); font-size: 14px; }
.rate-input input { width: 46px; border: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; padding: 0; }
.rate-input input::-webkit-outer-spin-button, .rate-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rate-input .sfx { color: var(--mute); font-size: 13px; margin-left: 1px; }

/* resolution picker */
.cf-pick { display: flex; flex-direction: column; gap: 13px; padding: 13px 0 1px; border-top: 1px solid var(--rule-soft); }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-lab { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--mute); display: flex; align-items: center; gap: 9px; }
.cf-lab .req { color: var(--clay-deep); font-size: 13px; line-height: 0; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cf-chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--stone); cursor: pointer; transition: border-color 120ms, background 120ms, color 120ms; display: inline-flex; align-items: center; gap: 7px; color: var(--body); }
.cf-chip:hover { border-color: rgba(26,26,26,0.3); }
.cf-chip .ci { display: inline-flex; color: var(--mute); transition: color 120ms; }
.cf-chip.sel { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.cf-chip.sel .ci { color: var(--clay-tint); }
.cf-chip .tg { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clay-deep); }
.cf-chip .tg::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--clay); }
.cf-chip.sel .tg { color: var(--clay-tint); }
.cf-chip.sel .tg::before { background: var(--clay-tint); }
.cf-guesshint { font-size: 12px; color: var(--mute); display: inline-flex; align-items: center; gap: 6px; }
.cf-guesshint b { font-weight: 600; color: var(--body); }

/* ============ Task manager ============ */
.tm-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.13em; color: var(--mute); }
.tm-eyebrow .ic { display: inline-flex; color: var(--mute); }
.tm-eyebrow.dupe .ic { color: var(--clay); }
.tm-reason { font-size: 13.5px; color: var(--body); line-height: 1.5; }
.tm-task-text { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -0.006em; line-height: 1.4; }
.tm-task-sub { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
.tm-note { font-size: 13px; color: var(--body); }
.tm-note b { font-weight: 600; }

.tm-dupe { display: flex; gap: 12px; flex-wrap: wrap; }
.tm-dupe-card { flex: 1; min-width: 244px; border: 1px solid var(--rule); border-radius: 9px; background: var(--stone); padding: 13px 14px; display: flex; flex-direction: column; gap: 9px; }
.tm-dupe-card .t { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.tm-dupe-card .m { font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.tm-fixer { display: flex; flex-direction: column; gap: 9px; padding-top: 13px; border-top: 1px solid var(--rule-soft); }
.tm-fixer .flab { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.tm-fixer .flab .warn { width: 6px; height: 6px; border-radius: 999px; background: var(--amber); flex-shrink: 0; }
.tm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-foot { display: flex; align-items: center; gap: 10px; }

.tm-clear { text-align: center; padding: 64px 24px; border: 1px solid var(--rule); border-radius: 14px; background: var(--stone-soft); }
.tm-clear-ic { width: 56px; height: 56px; border-radius: 999px; background: var(--green-wash); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.tm-clear-t { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.tm-clear-s { font-size: 13.5px; color: var(--mute); margin-top: 7px; }

/* ============ Tables (billing) ============ */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t thead th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); padding: 14px 12px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.t tbody td { padding: 11px 12px; border-bottom: 1px solid var(--rule-soft); }
table.t tbody tr:last-child td { border-bottom: none; }
table.t .right { text-align: right; }
.money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* week grid */
.wg { width: 100%; border-collapse: separate; border-spacing: 0; }
.wg th, .wg td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--rule-soft); }
.wg th { font-size: 12px; color: var(--mute); font-weight: 500; }
.wg th.today, .wg td.today { background: var(--clay-wash); }
.wg td.proj { text-align: left; font-weight: 500; font-size: 13.5px; white-space: nowrap; padding-left: 14px; }
.wg .cell { width: 46px; height: 30px; border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; cursor: text; transition: border-color 120ms, background 120ms; }
.wg .cell:hover { border-color: var(--rule); background: var(--stone); }
.wg .cell.zero { color: var(--fade); }
.wg input.cell { background: var(--stone); border-color: var(--clay); outline: none; text-align: center; }
.wg tr.tot td { font-weight: 600; border-top: 1px solid var(--rule); }
.wg .gt { font-family: var(--font-mono); }

/* ============ Login ============ */
.login { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .login { grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); } }
.brand-panel { position: relative; display: none; flex-direction: column; justify-content: space-between; gap: 48px; overflow: hidden; background: var(--ink-2); padding: 56px 52px; color: var(--stone); }
@media (min-width: 1024px) { .brand-panel { display: flex; } }
.brand-serif { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: clamp(2rem,3.5vw,2.85rem); line-height: 1.05; letter-spacing: -0.012em; }
.brand-sub { max-width: 320px; font-size: 14px; line-height: 1.6; color: var(--mute); margin-top: 18px; }
.brand-foot { display: flex; align-items: center; border-top: 1px solid var(--rule-dark); padding-top: 20px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--mute); }
.brand-glyph { position: absolute; right: -70px; bottom: 90px; color: var(--stone); opacity: 0.05; pointer-events: none; }
.login-right { display: flex; flex-direction: column; justify-content: center; padding: 56px 28px; min-height: 100vh; }
@media (min-width: 640px) { .login-right { padding: 56px 56px; } }
.login-form { width: 100%; max-width: 400px; margin: 0 auto; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--mute); display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.eyebrow::after { content: ""; height: 1px; width: 72px; background: var(--clay); }
.login-form h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.login-form .lede { font-size: 14px; color: var(--mute); margin-bottom: 28px; }
.login-form .btn { width: 100%; height: 44px; margin-top: 8px; }
.login-foot { font-size: 13px; color: var(--mute); margin-top: 24px; }
.login-foot a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--clay); color: var(--ink); }
.mobile-lock { margin-bottom: 36px; color: var(--ink); }
@media (min-width: 1024px) { .mobile-lock { display: none; } }

/* utilities */
.flex { display: flex; } .ic { align-items: center; } .jb { justify-content: space-between; }
.wrap { flex-wrap: wrap; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; } .g16 { gap: 16px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px; } @media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.nowrap { white-space: nowrap; }
.lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }

/* ============ Explorer (ontology graph) ============ */
.xpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.xpl-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.xpl-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.legend-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--rule); background: var(--stone-soft); font-size: 13px; cursor: pointer; color: var(--body); transition: all 120ms; user-select: none; }
.legend-chip:hover { border-color: rgba(26,26,26,0.28); }
.legend-chip.off { opacity: 0.45; background: transparent; }
.legend-chip .swatch { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.legend-chip .n { font-variant-numeric: tabular-nums; color: var(--fade); font-size: 12px; }
.xpl-hint { font-size: 12.5px; color: var(--mute); display: inline-flex; align-items: center; gap: 7px; }
.xpl-hint .kbd { font-family: var(--font-mono); font-size: 11px; color: var(--body); background: var(--stone-deep); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }

.xpl-stage { display: flex; gap: 16px; align-items: stretch; }
.xpl-canvas-wrap { flex: 1; min-width: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--stone-soft); position: relative; overflow-x: auto; overflow-y: hidden; }
.xpl-canvas { position: relative; height: 600px; min-width: 760px; touch-action: none; background:
  radial-gradient(circle at 1px 1px, var(--rule-soft) 1px, transparent 0) 0 0 / 22px 22px; }
.xpl-canvas.connecting { cursor: crosshair; }
.xpl-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.xpl-grouplabel { position: absolute; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fade); pointer-events: none; }

/* nodes */
.xpl-node { position: absolute; box-sizing: border-box; background: var(--stone-soft); border: 1px solid var(--rule); border-left: 3px solid var(--nodeclr, var(--mute)); border-radius: 4px; padding: 8px 11px; cursor: pointer; transition: box-shadow 150ms var(--ease), border-color 150ms, opacity 200ms, transform 150ms var(--ease); box-shadow: var(--shadow-1); }
.xpl-node:hover { border-color: rgba(26,26,26,0.3); box-shadow: 0 4px 14px -6px rgba(26,26,26,0.25), 0 0 0 0.5px rgba(26,26,26,0.06); }
.xpl-node .nd-top { display: flex; align-items: center; gap: 7px; }
.xpl-node .nd-ic { color: var(--nodeclr, var(--mute)); flex-shrink: 0; display: inline-flex; }
.xpl-node .nd-name { font-size: 13.5px; font-weight: 500; letter-spacing: -0.006em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpl-node .nd-type { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.13em; color: var(--mute); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpl-node.dim { opacity: 0.26; }
.xpl-node.dim:hover { opacity: 0.6; }
.xpl-node.focus { background: var(--ink); border-color: var(--ink); border-left-color: var(--clay); box-shadow: var(--shadow-pop); }
.xpl-node.focus .nd-name { color: var(--stone); }
.xpl-node.focus .nd-type { color: var(--clay-tint); }
.xpl-node.focus .nd-ic { color: var(--clay-tint); }
.xpl-node.neighbor { border-color: rgba(26,26,26,0.34); box-shadow: 0 4px 14px -6px rgba(26,26,26,0.22); }
.xpl-node.cand-ok { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay-wash), var(--shadow-1); }
.xpl-node.cand-no { opacity: 0.3; }
.xpl-node.flash { animation: xplFlash 1300ms var(--ease); }
@keyframes xplFlash { 0% { box-shadow: 0 0 0 5px var(--clay-wash), var(--shadow-pop); border-left-color: var(--clay); } 100% { box-shadow: var(--shadow-1); } }

/* connector nub */
.xpl-nub { position: absolute; right: -7px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 999px; background: var(--stone-soft); border: 1.5px solid var(--clay); cursor: grab; opacity: 0; transition: opacity 120ms, transform 120ms; display: flex; align-items: center; justify-content: center; }
.xpl-nub::after { content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--clay); }
.xpl-node:hover .xpl-nub, .xpl-node.focus .xpl-nub { opacity: 1; }
.xpl-nub:hover { transform: translateY(-50%) scale(1.18); }
.xpl-nub:active { cursor: grabbing; }
.xpl-node.focus .xpl-nub { background: var(--ink); }

/* connect-mode: surface all nubs */
.xpl-canvas.connecting .xpl-nub { opacity: 1; }

/* confirm popover */
.xpl-pop { position: absolute; z-index: 30; width: 264px; background: var(--stone-soft); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 14px; }
.xpl-pop .pp-eyebrow { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--mute); display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.xpl-pop .pp-eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--clay); }
.xpl-pop .pp-stmt { font-size: 14px; line-height: 1.5; color: var(--ink); }
.xpl-pop .pp-stmt b { font-weight: 600; }
.xpl-pop .pp-verb { color: var(--clay-deep); font-style: italic; font-family: var(--font-serif); font-size: 15px; }
.xpl-pop .pp-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.xpl-pop .pp-role { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--rule); background: var(--stone); cursor: pointer; transition: all 120ms; }
.xpl-pop .pp-role.sel { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.xpl-pop .pp-actions { display: flex; gap: 8px; margin-top: 13px; }
.xpl-pop .pp-bad { font-size: 13px; color: var(--body); line-height: 1.5; }

/* detail panel */
.xpl-panel { width: 322px; flex-shrink: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--stone-soft); display: flex; flex-direction: column; max-height: 632px; }
.xpl-panel .xp-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--rule-soft); }
.xpl-panel .xp-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.13em; color: var(--mute); margin-bottom: 8px; }
.xpl-panel .xp-eyebrow .ic { color: var(--clay); display: inline-flex; }
.xpl-panel .xp-name { font-size: 18px; font-weight: 600; letter-spacing: -0.018em; line-height: 1.2; }
.xpl-panel .xp-meta { font-size: 12.5px; color: var(--mute); margin-top: 5px; line-height: 1.45; }
.xpl-panel .xp-id { font-family: var(--font-mono); font-size: 10.5px; color: var(--fade); margin-top: 7px; }
.xpl-panel .xp-body { flex: 1; overflow-y: auto; padding: 6px 18px 18px; }
.xpl-group { margin-top: 16px; }
.xpl-group .xg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.xpl-group .xg-head .t { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mute); }
.xpl-group .xg-head .c { font-size: 11px; color: var(--fade); font-variant-numeric: tabular-nums; }
.xpl-group .xg-head .rule { flex: 1; height: 1px; background: var(--rule-soft); }
.xpl-link { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; transition: background 120ms; }
.xpl-link:hover { background: var(--stone-deep); }
.xpl-link .ll-ic { width: 22px; height: 22px; border-radius: 5px; background: var(--stone-deep); display: inline-flex; align-items: center; justify-content: center; color: var(--mute); flex-shrink: 0; }
.xpl-link .ll-main { flex: 1; min-width: 0; }
.xpl-link .ll-name { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xpl-link .ll-sub { font-size: 11px; color: var(--mute); display: flex; align-items: center; gap: 5px; }
.xpl-link .ll-prov { display: inline-flex; align-items: center; gap: 3px; }
.xpl-link .ll-prov.you { color: var(--clay-deep); }
.xpl-link .ll-unlink { opacity: 0; width: 22px; height: 22px; border-radius: 5px; border: none; background: transparent; color: var(--mute); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 120ms, color 120ms; }
.xpl-link:hover .ll-unlink { opacity: 1; }
.xpl-link .ll-unlink:hover { background: var(--red-wash); color: var(--red); }
.xpl-addrow { margin-top: 9px; }
.xpl-add-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); background: transparent; border: 1px dashed var(--rule); border-radius: 7px; padding: 7px 10px; cursor: pointer; width: 100%; justify-content: center; transition: all 120ms; }
.xpl-add-btn:hover { color: var(--clay-deep); border-color: var(--clay-tint); background: var(--clay-wash); }
.xpl-picker { margin-top: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--stone); padding: 9px; }
.xpl-picker .pk-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.xpl-picker .pk-opt:hover { background: var(--stone-deep); }
.xpl-panel-empty { padding: 28px 22px; text-align: center; color: var(--mute); font-size: 13.5px; line-height: 1.55; }

.xpl-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--fade); }
.xpl-foot .mono { font-family: var(--font-mono); }
.prov-dot { width: 5px; height: 5px; border-radius: 999px; flex-shrink: 0; }
