:root {
  --panel-base: #0a1721;
  --panel-tint: #0d202c;
  --dim: #9fb6c4;
  --signal-late: #ffb29a;
  --signal-today: #a2eeff;
  --signal-future: #b6c5d5;
  --signal-closed: #b0edd2;
  --ff-gutter: clamp(1rem, 4.65vw, 5rem);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% 0%, #16364b8a, transparent 38rem),
    linear-gradient(#08141e, var(--ff-night) 34rem);
}

button, select { cursor: pointer; }
[hidden] { display: none !important; }
.shell { max-width: 92rem; margin-inline: auto; padding-inline: var(--ff-gutter); }
#werkruimte, #detail { scroll-margin-top: 5rem; }
.skip {
  position: fixed; z-index: 10; inset: .75rem auto auto 1rem;
  transform: translateY(-150%); padding: .65rem 1rem; color: var(--ff-night);
  background: var(--ff-ice); text-decoration: none;
}
.skip:focus { transform: none; }
p, h1, h2, h3, dl, dd { margin: 0; }
h2, h3 { line-height: 1.15; letter-spacing: -.025em; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.intro {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1.1rem;
  padding: 1.65rem 0 1.25rem;
}
.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 28%;
  pointer-events: none;
  background-image: linear-gradient(#477a9224 1px, transparent 1px), linear-gradient(90deg, #477a9224 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: radial-gradient(ellipse at 78% 26%, black, transparent 72%);
}
.hero-text .ff-eyebrow { margin-bottom: .6rem; white-space: normal; flex-wrap: wrap; }
.hero-text .ff-eyebrow::before { flex: 0 0 1.5rem; }
#company { overflow-wrap: anywhere; }
#company:empty { display: none; }
#company-logo { display: block; object-fit: contain; width: 2rem; height: 2rem; }
.demo-label { color: #a8bfcc; font-size: .7rem; letter-spacing: .08em; }
.demo-label::before { content: "·"; padding-right: .6rem; }
.intro .ff-title { font-size: clamp(2.8rem, 8.75vw, 5.35rem); text-wrap: initial; }
.intro-copy { color: var(--ff-muted); margin-top: .65rem; max-width: 28rem; font-size: clamp(.94rem, 2vw, 1.06rem); }
.hero-tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.hero-tools time { color: #c0d5df; font-size: .83rem; }
.hero-tools .ff-primary { white-space: nowrap; gap: .35rem; padding-inline: .72rem; }
.workspace-nav {
  display: flex;
  align-items: stretch;
  gap: 1.65rem;
  padding: 0 .1rem;
  border-bottom: 1px solid var(--ff-line);
}
.nav-button {
  padding: .62rem .1rem;
  min-height: 44px;
  color: var(--ff-muted);
  position: relative;
  border: 0;
  font-weight: 700;
  font-size: .94rem;
  background: transparent;
}
.nav-button:hover, .nav-button[aria-current] { color: var(--ff-text); }
.nav-button[aria-current]::after {
  content: ""; height: 2px; position: absolute; inset: auto 0 -1px;
  background: var(--ff-ice); box-shadow: 0 -2px 10px #67d6ed5c;
}
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: 1rem 0; }
.metric {
  border: 1px solid var(--ff-line);
  border-radius: var(--ff-radius);
  background: linear-gradient(155deg, #102430, #0a1720 80%);
  color: var(--ff-text);
  display: grid;
  justify-content: stretch;
  text-align: left;
  gap: .25rem;
  padding: .6rem .65rem .55rem;
  min-width: 0;
  position: relative;
}
.metric:hover, .metric[aria-pressed=true] { border-color: var(--signal-color); background: #142b3a; }
.metric > span { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: #d2e0e7; }
.metric > strong { font-size: 1.87rem; font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -.055em; }
.late { --signal-color: var(--signal-late); }
.today { --signal-color: var(--signal-today); }
.future { --signal-color: var(--signal-future); }
.closed { --signal-color: var(--signal-closed); }
.signal {
  display: inline-block; background: var(--signal-color, var(--ff-ice)); flex: 0 0 6px;
  width: 6px; height: 6px; border-radius: 50%;
}
.metric .signal { box-shadow: 0 0 11px color-mix(in srgb, var(--signal-color) 52%, transparent); }
.work-grid { display: grid; gap: 1rem; align-items: start; }
.queue, .detail, .pipeline-lane, .settings { min-width: 0; }
.queue { background: var(--panel-base); }
.queue-head {
  display: flex; gap: .65rem; align-items: flex-end; justify-content: space-between;
  padding: 1rem 1rem .7rem;
}
.queue-head h2 { font-size: 1.42rem; }
.queue-head p { color: var(--dim); margin-top: .18rem; font-size: .86rem; }
.owner-filter { display: grid; gap: .15rem; color: var(--dim); font-size: .76rem; max-width: 48%; }
.owner-filter select { min-width: 7rem; padding: .35rem .55rem; font-size: .86rem; }
.scope-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 0 1rem .65rem; }
.chip {
  min-height: 2.75rem; padding: .45rem .65rem; display: inline-flex; align-items: center; gap: .4rem;
  border-radius: .24rem; border: 1px solid transparent; background: transparent; color: var(--dim);
  font-size: .82rem; font-weight: 700;
}
.chip span { font-weight: 400; color: var(--dim); }
.chip:hover, .chip[aria-pressed=true] { border-color: #365668; background: #122735; color: var(--ff-text); }
.group-title {
  padding: .48rem 1rem; display: flex; align-items: center; gap: .45rem;
  border-block: 1px solid #223947; color: var(--signal-color); background: #0e202c;
  font-size: .76rem; text-transform: uppercase; letter-spacing: .077em;
}
.group-title span:last-child { color: var(--dim); margin-left: auto; letter-spacing: 0; }
.action-list li + li { border-top: 1px solid #1c3340; }
.action-row {
  display: grid; width: 100%; align-items: center; text-align: left; grid-template-columns: minmax(0, 1fr) minmax(0, .76fr) auto;
  color: var(--ff-text); border: 0; border-left: 3px solid transparent;
  background: transparent; min-height: 5rem; padding: .6rem .72rem .6rem .83rem; gap: .2rem .6rem;
}
.action-row:hover { background: #102735; }
.action-row[aria-pressed=true] { border-left-color: var(--ff-ice); background: #112a38; }
.action-row:focus-visible, .pipeline-card:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.row-main, .row-action { display: grid; min-width: 0; align-content: center; overflow-wrap: anywhere; }
.row-main strong { line-height: 1.2; font-size: .97rem; }
.row-main > span, .row-action > span { color: var(--dim); font-size: .77rem; line-height: 1.35; margin-top: .17rem; }
.row-action strong { color: #d3e8f0; font-size: .85rem; line-height: 1.25; }
.row-action > span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-meta {
  grid-row: 2; grid-column: 1 / span 2;
  display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .6rem; color: #c2d6e0; font-size: .76rem;
}
.row-arrow { grid-row: 1 / span 2; grid-column: 3; color: var(--ff-ice); font-size: 1.25rem; }
.person { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; overflow-wrap: anywhere; }
.avatar {
  width: 1.36rem; height: 1.36rem; flex: 0 0 1.36rem; display: grid; place-items: center;
  border-radius: 50%; background: #214251; color: #d0f5fb; border: 1px solid #395b6a;
  font-size: .65rem; font-weight: 700; line-height: 1;
}
.detail { padding: 1rem; background: linear-gradient(153deg, #112735 0, #0a1721 75%); }
.rubric {
  display: flex; justify-content: space-between; gap: .5rem; color: #c0d9e3;
  font-size: .73rem; letter-spacing: .095em; font-weight: 700; text-transform: uppercase;
}
.rubric span { color: var(--ff-ice); }
.detail > h2 { font-size: clamp(1.52rem, 3.4vw, 2.1rem); margin-top: .6rem; overflow-wrap: anywhere; }
.detail > h2:focus { outline: none; }
.deal-title, .note p, .history li p, .dialog-note { overflow-wrap: anywhere; }
.deal-title { color: #bfd0d9; margin-top: .22rem; font-size: .94rem; }
.next-card { border: 1px solid #2b5365; border-radius: var(--ff-radius); background: #0a1b26; padding: .72rem .8rem; margin-top: .9rem; }
.next-head { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.next-head > span:first-child, .next-card.outcome > span:first-child { color: #bbd7e1; font-size: .77rem; font-weight: 700; }
.badge {
  border: 1px solid color-mix(in srgb, var(--signal-color) 54%, transparent);
  background: color-mix(in srgb, var(--signal-color) 13%, #07151d);
  color: var(--signal-color); padding: .13rem .43rem; border-radius: .2rem;
  font-size: .73rem; font-weight: 700; white-space: nowrap;
}
.next-channel { font-size: 1.35rem; font-weight: 700; margin-top: .35rem; letter-spacing: -.03em; }
.next-text { color: #d2e0e7; line-height: 1.35; font-size: .92rem; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .7rem; padding-top: .55rem; border-top: 1px solid #24424f; }
.facts dt { font-size: .73rem; color: var(--dim); margin-bottom: .13rem; }
.facts dd { font-size: .87rem; color: #ebf3f6; }
.outcome { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.outcome .person { margin-left: auto; font-size: .87rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: .75rem; }
.detail-actions button { font-size: .86rem; padding-inline: .7rem; }
.note, .history { margin-top: .95rem; padding-top: .82rem; border-top: 1px solid #29424e; }
.note h3, .history h3 { font-size: .91rem; }
.note p { color: #c2d4de; font-size: .84rem; margin-top: .28rem; white-space: pre-wrap; }
.history ol { margin-top: .43rem; padding-left: .58rem; border-left: 1px solid #325263; }
.history li { position: relative; padding: .28rem 0 .3rem .4rem; color: #c5d8e1; font-size: .82rem; }
.history li::before {
  content: ""; position: absolute; left: -.74rem; top: .62rem;
  width: .29rem; height: .29rem; border-radius: 50%; background: var(--ff-ice);
}
.history li > div { display: flex; justify-content: space-between; gap: .35rem; }
.history li time, .history .previous { color: var(--dim); }
.history li p { white-space: pre-wrap; }
.empty { color: var(--dim); padding: 1rem; }
.pipeline, .settings { margin-top: 1rem; }
.pipeline > h2, .settings h2 { margin-bottom: .65rem; font-size: 1.5rem; }
.pipeline-grid { display: grid; gap: .6rem; }
.pipeline-lane { background: var(--panel-base); }
.pipeline-lane h3 {
  display: flex; align-items: center; justify-content: space-between; padding: .7rem .78rem;
  border-bottom: 1px solid #223947; color: #d2e5ed; font-size: .94rem;
}
.pipeline-lane h3 span { color: var(--ff-ice); }
.pipeline-lane ul { padding: .45rem; display: grid; gap: .42rem; }
.pipeline-card {
  display: grid; text-align: left; gap: .19rem; width: 100%; padding: .72rem;
  color: var(--ff-text); background: #102532; border: 1px solid #315060; border-radius: var(--ff-radius);
  overflow-wrap: anywhere;
}
.pipeline-card:hover { background: #173747; }
.pipeline-card > span:nth-child(2) { font-size: .83rem; color: var(--dim); }
.pipeline-meta { display: flex; justify-content: space-between; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .81rem; margin-top: .25rem; }
.settings { max-width: 44rem; padding: 1rem; }
.settings > p { color: var(--ff-muted); margin-bottom: .8rem; max-width: 32rem; }
.settings form, dialog form { display: grid; gap: .65rem; }
.settings form > .ff-primary, dialog form > .ff-primary { justify-self: start; }
.form-grid, .owners-grid { display: grid; gap: .56rem; }
:is(.settings, dialog) label { display: grid; gap: .22rem; color: #d7e6ec; font-size: .9rem; }
:is(.settings, dialog) :is(input, select, textarea):not([type=checkbox]) { width: 100%; min-width: 0; }
.ff-input[type=date] { min-width: 0; }
.form-error { color: var(--ff-error); font-size: .87rem; }
.form-error:empty { display: none; }
fieldset { margin: 0; padding: .5rem .67rem .67rem; min-width: 0; border: 1px solid #385565; }
legend { padding-inline: .25rem; color: #b9dce8; font-size: .86rem; }
.plan { display: grid; gap: .5rem; }
.optional { color: var(--dim); font-size: .79rem; }
.work-footer {
  display: flex; gap: .3rem .8rem; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding: .72rem 0 .85rem; margin-top: 1rem; border-top: 1px solid #213947;
  color: var(--dim); font-size: .82rem;
}
.text-button {
  border: 0; border-radius: var(--ff-radius); color: #cce8f1; background: transparent; text-decoration: underline;
  text-underline-offset: .22em; padding: .35rem .18rem; min-height: 2.75rem; font-size: .88rem;
}
.text-button:hover { color: var(--ff-ice); }
.notice {
  position: fixed; z-index: 9; bottom: .9rem; left: 50%; transform: translateX(-50%); width: max-content;
  max-width: calc(100vw - 2rem); border-radius: var(--ff-radius); border: 1px solid #5f91a4; 
  padding: .65rem .8rem; background: #123647; color: var(--ff-text); font-size: .9rem; box-shadow: 0 6px 20px #0005;
}
.notice:empty { display: none; }
dialog {
  width: min(34rem, calc(100% - 1.4rem)); max-height: calc(100dvh - 1.4rem);
  border: 1px solid #5f8295; border-radius: .48rem; background: #101f2b; color: var(--ff-text);
  padding: 1rem; box-shadow: 0 24px 80px #01080dc4; overflow: auto;
}
dialog::backdrop { background: #02080cbb; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .58rem; }
.dialog-head h2 { font-size: 1.43rem; }
.icon-button {
  width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; line-height: 1; border-radius: var(--ff-radius);
  border: 1px solid #51788b; background: #152d3a; color: var(--ff-text); font-size: 1.4rem;
}
.icon-button:hover { background: #234755; }
.dialog-note { color: #c3d5df; font-size: .91rem; }
#trial-content > p { margin-bottom: .7rem; }
:is(dialog, .settings) label.check { display: flex; align-items: center; gap: .5rem; margin: .15rem 0; min-height: 44px; cursor: pointer; line-height: 1.28; }
.check input { width: 1rem; height: 1rem; min-width: 1rem; margin: .05rem 0 0; accent-color: var(--ff-ice); }
.input-help { color: var(--dim); font-size: .8rem; }
.ff-input::file-selector-button {
  margin-right: .55rem; padding: .25rem .45rem; cursor: pointer; color: var(--ff-text);
  background: #192f3d; border: 1px solid var(--ff-control); border-radius: .2rem;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.receipt {
  display: grid; padding: .75rem; margin: .75rem 0; background: #071923;
  border-left: 2px solid var(--ff-ice); overflow-wrap: anywhere;
}
.receipt strong { color: var(--ff-ice); font-family: ui-monospace, monospace; }
.receipt-page { padding-top: 2rem; padding-bottom: 2rem; }
.receipt-page .ff-panel { max-width: 42rem; padding: 1.2rem; }
.receipt-page h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); margin-block: .5rem; }
.receipt-page a { margin-top: .5rem; }

@media (min-width: 35rem) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60rem) {
  .intro { grid-template-columns: 1fr auto; align-items: end; padding: 2.55rem 0 1.65rem; }
  .hero-tools { display: grid; justify-items: end; gap: .55rem; padding-bottom: .28rem; }
  .hero-tools .ff-primary { padding-inline: 1rem; }
  .workspace-nav { gap: 2.1rem; }
  .metrics { gap: .85rem; margin: 1.25rem 0; }
  .metric { padding: .83rem 1.05rem; grid-template-columns: 1fr auto; align-items: center; }
  .metric > span { font-size: .93rem; gap: .55rem; }
  .metric > strong { font-size: 2.15rem; }
  .work-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; }
  .work-grid.single { grid-template-columns: minmax(0, 1fr); }
  .queue-head { padding: 1.05rem 1.15rem .66rem; }
  .scope-buttons { margin-inline: 1.15rem; }
  .group-title { padding-inline: 1.15rem; }
  .action-row {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(4rem, .52fr) auto;
    padding: .6rem 1.05rem .6rem 1rem; min-height: 4.15rem; gap: .45rem .8rem;
  }
  .row-meta { grid-row: auto; grid-column: auto; justify-content: space-between; }
  .row-arrow { grid-row: auto; grid-column: auto; }
  .detail { padding: 1.15rem; }
  .next-card { padding: .82rem .9rem; }
  .pipeline-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings { padding: 1.2rem; }
  dialog { padding: 1.2rem; }
}
