:root {
  color-scheme: light;
  --background: #f4f6f4;
  --white: #fff;
  --ink: #172722;
  --muted: #51645a;
  --line: #dce5df;
  --sidebar: #172b28;
  --sidebar-muted: #a9c2b5;
  --sidebar-active: #2b453d;
  --accent: #255c49;
  --accent-dark: #184536;
  --lime: #cce68b;
  --light-green: #eff5e5;
  --target: #f4f8df;
  --new: #2d5a74;
  --new-bg: #eef4f8;
  --talk: #765421;
  --talk-bg: #fbf1df;
  --offer: #5d5075;
  --offer-bg: #f3eef8;
  --won: #235d45;
  --won-bg: #e5f4eb;
  font: 100%/1.48 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
a:active { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; z-index: 4; top: .65rem; left: .65rem; padding: .62rem .85rem; background: var(--lime); color: var(--ink); transform: translateY(-160%); }
.skip:focus { transform: none; }

.shell { display: grid; grid-template-columns: 13.9rem minmax(0,1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; min-height: 100svh; align-self: start; padding: 1.15rem .85rem .85rem; background: var(--sidebar); color: var(--white); }
.sidebar :focus-visible { outline-color: var(--lime); }
.brand { display: flex; align-items: center; gap: .64rem; width: fit-content; min-height: 2.75rem; margin-left: .35rem; font-size: 1.17rem; font-weight: 730; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.brand img { flex: none; width: 2.12rem; aspect-ratio: 1; }
.brand small { padding-left: .19rem; color: var(--sidebar-muted); font-size: .7rem; font-weight: 630; letter-spacing: .015em; }
.workspace { margin: 2.1rem .47rem .43rem; color: var(--sidebar-muted); font-size: .73rem; font-weight: 650; }
.sidebar nav { display: grid; gap: .23rem; }
.sidebar nav a { position: relative; display: flex; gap: .57rem; align-items: center; min-height: 2.75rem; padding: .44rem .58rem; border-radius: .33rem; color: var(--white); font-size: .9rem; text-decoration: none; }
.sidebar nav a:hover { background: var(--sidebar-active); text-decoration: underline; }
.sidebar nav a[aria-current] { background: var(--sidebar-active); color: var(--lime); font-weight: 690; }
.sidebar nav a[aria-current]::after { position: absolute; right: .58rem; width: .25rem; height: .82rem; border-radius: 2px; background: var(--lime); content: ""; }
.nav-mark { display: inline-block; position: relative; flex: none; width: .88rem; height: .83rem; border: 1px solid currentColor; border-radius: 2px; }
.nav-mark::before, .nav-mark::after { position: absolute; content: ""; }
.nav-deals::before { top: .23rem; width: 100%; border-top: 1px solid currentColor; }
.nav-companies::before { top: .14rem; left: .13rem; width: .18rem; aspect-ratio: 1; border-radius: 50%; background: currentColor; }
.nav-companies::after { top: .16rem; right: .12rem; width: .22rem; height: .29rem; border-block: 1px solid currentColor; }
.nav-tasks::before { top: .16rem; left: .21rem; width: .29rem; height: .13rem; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(-45deg); }
.nav-reports::before { inset: auto .14rem .12rem; height: .34rem; border-inline: 2px solid currentColor; }
.nav-reports::after { left: .37rem; bottom: .12rem; height: .5rem; border-left: 2px solid currentColor; }
.profile { display: flex; align-items: center; gap: .55rem; margin-top: auto; padding: .85rem .37rem .1rem; border-top: 1px solid var(--sidebar-active); font-size: .81rem; }
.avatar { display: grid; place-items: center; flex: none; width: 2.06rem; aspect-ratio: 1; border-radius: 50%; background: var(--sidebar-active); color: var(--lime); font-size: .7rem; font-weight: 690; }
.profile small { display: block; color: var(--sidebar-muted); font-size: .7rem; }

.surface { min-width: 0; display: flex; flex-direction: column; }
.content-width { width: min(100% - clamp(2rem,6vw,5rem),86rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: var(--white); }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 3.65rem; gap: .45rem .8rem; padding-block: .4rem; color: var(--muted); font-size: .82rem; }
.top-inner i { margin-inline: .45rem; font-style: normal; }
.top-inner strong { color: var(--ink); }
.top-inner time { text-align: end; white-space: nowrap; }
main { flex: 1; padding-block: clamp(1.25rem,3.3vw,2.65rem) 1.15rem; }
.heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: end; gap: .65rem 1rem; margin-bottom: 1.25rem; }
h1 { font-size: clamp(1.95rem,3.65vw,3rem); font-weight: 730; line-height: 1.03; letter-spacing: -.055em; overflow-wrap: break-word; }
.heading p { margin-top: .28rem; color: var(--muted); font-size: .9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .48rem .8rem; border: 1px solid var(--accent); border-radius: .36rem; background: var(--accent); color: var(--white); font-size: .84rem; font-weight: 690; text-decoration: none; }
.button:hover { background: var(--accent-dark); text-decoration: underline; }

.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 1.1rem; border: 1px solid var(--line); border-radius: .49rem; background: var(--white); }
.metrics > div { padding: .75rem 1rem .8rem; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics > div:last-child { background: var(--light-green); border-radius: 0 .47rem .47rem 0; }
.metrics dt { color: var(--muted); font-size: .77rem; }
.metrics dd { font-size: clamp(1.15rem,2.35vw,1.65rem); font-weight: 720; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics .positive { color: var(--accent-dark); }

.dashboard { display: grid; grid-template-columns: minmax(0,1fr) minmax(13rem,.37fr); gap: 1rem; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: .49rem; background: var(--white); }
.panel-heading { display: flex; gap: .5rem; justify-content: space-between; align-items: center; min-height: 3.3rem; padding: .65rem .9rem; }
.panel-heading h2 { font-size: 1rem; line-height: 1.18; letter-spacing: -.02em; }
.panel-heading > span { color: var(--muted); font-size: .75rem; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: start; font-size: .84rem; overflow-wrap: anywhere; }
th, td { padding: .65rem .64rem; border-top: 1px solid var(--line); text-align: start; vertical-align: top; }
th:first-child, td:first-child { padding-left: .9rem; }
th:last-child, td:last-child { padding-right: .9rem; }
thead { background: var(--background); }
thead th { color: var(--muted); font-size: .73rem; font-weight: 680; }
.deals th:first-child { width: 36%; }
.deals th:last-child { width: 25%; }
.deals th.money { width: 18%; }
.companies th:first-child { width: 25%; }
.companies th:last-child { width: 31%; }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-details summary { display: grid; grid-template-columns: .45rem minmax(0,1fr); gap: .35rem; list-style: none; cursor: pointer; font-weight: 680; }
.deal-details summary::-webkit-details-marker { display: none; }
.deal-details summary::before { align-self: start; width: .34rem; height: .34rem; margin-top: .42em; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); content: ""; }
.deal-details[open] summary::before { transform: rotate(135deg); }
.deal-details summary:hover, .deal-details[open] summary { color: var(--accent); }
.deal-details summary:hover { text-decoration: underline; }
.deal-details p { margin: .38rem 0 0 .8rem; color: var(--muted); font-size: .75rem; }
.company-cell a, .related a, .task-list a { color: var(--accent-dark); }
.mobile-company { display: none; }
.row-note { display: block; margin-top: .15rem; color: var(--muted); font-size: .74rem; font-weight: 400; }
.related a { display: block; width: fit-content; }
.related a + a { margin-top: .2rem; }
.stage { display: inline-block; max-width: 100%; padding: .16rem .37rem; border-radius: .28rem; font-size: .71rem; font-weight: 660; }
.stage.new { color: var(--new); background: var(--new-bg); }
.stage.talk { color: var(--talk); background: var(--talk-bg); }
.stage.offer { color: var(--offer); background: var(--offer-bg); }
.stage.won { color: var(--won); background: var(--won-bg); }
.target { scroll-margin-top: .7rem; }
.target:target { background: var(--target); }
.agenda ul { margin: 0; padding: 0; list-style: none; }
.agenda li { display: grid; gap: .18rem; padding: .59rem .9rem; border-top: 1px solid var(--line); }
.agenda li time { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }
.agenda li a { width: fit-content; color: var(--accent-dark); font-size: .84rem; }
.panel-link { display: block; padding: .62rem .9rem; border-top: 1px solid var(--line); color: var(--accent-dark); font-size: .82rem; font-weight: 690; }

.task-stack { display: grid; gap: .95rem; max-width: 55rem; }
.task-list { margin: 0; padding: 0; list-style: none; }
.task-list li { display: grid; grid-template-columns: minmax(3rem,.2fr) minmax(0,1fr) minmax(8rem,.36fr); align-items: baseline; gap: .5rem .7rem; padding: .65rem .9rem; border-top: 1px solid var(--line); font-size: .84rem; }
.task-list time { color: var(--accent-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.task-list a { display: block; width: fit-content; margin-top: .18rem; font-size: .75rem; }
.task-list li > span { color: var(--muted); }
.report table th:first-child { width: 34%; }
.report table th:last-child { width: 29%; }
.volume meter { width: min(100%,14rem); height: .48rem; display: block; margin: .26rem 0 .18rem; accent-color: var(--accent); }
.volume meter::-webkit-meter-bar { background: var(--line); border: 0; }
.volume meter::-webkit-meter-optimum-value { background: var(--accent); }
.volume meter::-moz-meter-bar { background: var(--accent); }
.volume > span { color: var(--muted); font-size: .73rem; }
tfoot { font-weight: 690; }

.empty-page { max-width: 39rem; padding: clamp(1.5rem,5vw,3.4rem); border: 1px solid var(--line); border-radius: .49rem; background: var(--white); }
.error-code { margin-bottom: .6rem; color: var(--accent); font-size: clamp(3.2rem,10vw,6rem); font-weight: 770; line-height: .95; letter-spacing: -.067em; }
.empty-page h1 { font-size: clamp(1.7rem,4vw,2.6rem); }
.empty-page h1 + p { margin: .7rem 0 1rem; color: var(--muted); }
footer { padding-block: .68rem .9rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

@media (max-width: 71rem) {
  .shell { grid-template-columns: 11.5rem minmax(0,1fr); }
  .dashboard { grid-template-columns: minmax(0,1fr); }
  .agenda { max-width: 38rem; }
}
@media (max-width: 45rem) {
  .shell { display: block; }
  .sidebar { position: static; min-height: unset; padding: .44rem .65rem .34rem; }
  .brand { margin-left: .06rem; }
  .workspace, .profile, .sidebar nav a[aria-current]::after { display: none; }
  .sidebar nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .12rem; margin-top: .25rem; }
  .sidebar nav a { min-height: 2.75rem; padding-inline: .36rem; font-size: .78rem; }
  .sidebar nav .nav-mark { display: none; }
  .content-width { width: calc(100% - 1.35rem); }
  .top-inner { min-height: 2.55rem; padding-block: .26rem; font-size: .73rem; }
  .top-inner i { margin-inline: .24rem; }
  main { padding-top: 1.2rem; }
  .heading { margin-bottom: .9rem; }
  .metrics > div { padding: .44rem .36rem; display: grid; grid-template-rows: minmax(2em,auto) auto; align-items: start; }
  .metrics dt { font-size: .69rem; }
  .metrics dd { font-size: clamp(.89rem,4.3vw,1.15rem); }
  .panel-heading { padding-inline: .55rem; }
  th, td { padding: .57rem .35rem; }
  th:first-child, td:first-child { padding-left: .5rem; }
  th:last-child, td:last-child { padding-right: .5rem; }
}

@media (max-width: 31rem) {
  .deals .company-cell, .companies .owner-cell { display: none; }
  .deals th:first-child { width: 40%; }
  .deals th.money { width: 25%; }
  .deals th:last-child { width: 35%; }
  .deal-details summary { gap: .19rem; font-size: .79rem; }
  .mobile-company { display: inline-block; margin-top: .24rem; color: var(--accent-dark); font-size: .72rem; }
  .stage { font-size: .68rem; padding-inline: .24rem; }
  .money { font-size: .76rem; }
  .companies th:first-child { width: 28%; }
  .companies th:last-child { width: 38%; }
  .task-list li { grid-template-columns: 3rem minmax(0,1fr); }
  .task-list li > span { grid-column: 2; }
}
