:root {
  --panel: #0b1924;
  --dim: #8ba7b8;
  --line: #233d50;
  --amber: #ffcf89;
  --green: #9ce3c8;
  --rail: 80rem;
}
[hidden] { display: none !important; }
h1, h2, h3, p, ul { margin: 0; }
a { color: var(--ff-ice); }
button { cursor: pointer; }
main { width: min(var(--rail), 100%); margin-inline: auto; padding: 0 1rem 1rem; }
body { background: radial-gradient(ellipse 66rem 38rem at 76% 5%, #102535 0%, transparent 72%), var(--ff-night); }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 10; width: auto; height: auto; clip-path: none; top: .5rem; left: .5rem; padding: .6rem; background: var(--panel); }
.ff-bar-inner { max-width: var(--rail); padding-inline: 1rem; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.35rem 0 1.1rem; }
.identity { display: flex; align-items: center; gap: .55rem; margin-bottom: .38rem; }
.identity img { object-fit: contain; }
.hero .ff-title { font-size: clamp(3rem, 8vw, 5.35rem); white-space: nowrap; }
.location { display: flex; align-items: center; gap: .45rem; margin-top: .5rem; color: var(--ff-muted); font-size: .91rem; }
.plus { font-size: 1.32rem; line-height: .75; }
#hero-book { min-height: 2.8rem; }
#navigation { display: flex; border-bottom: 1px solid var(--line); gap: clamp(.25rem, 2vw, 1.6rem); }
#navigation a { display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: .4rem clamp(.24rem, 1.5vw, .9rem); font-weight: 700; font-size: .91rem; text-decoration: none; color: var(--ff-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
#navigation a:hover, #navigation a[aria-current] { color: var(--ff-ice); }
#navigation a[aria-current] { border-color: var(--ff-ice); }
#nav-count { background: #2e281d; color: var(--amber); border-radius: 1rem; padding: .04rem .43rem; font-size: .72rem; }
#nav-count:empty { display: none; }
.workspace { padding-top: 1rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .4rem; margin-bottom: 1rem; }
.metric { color: var(--ff-text); text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--ff-radius); padding: .55rem .56rem; min-width: 0; }
.metric:is(button):hover { border-color: var(--ff-ice); }
.metric strong { display: block; font-size: 1.6rem; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric:nth-child(2) strong { color: var(--amber); }
.metric:nth-child(3) strong { color: var(--ff-ice); }
.metric span { display: block; font-size: .75rem; color: var(--ff-muted); }
.stock-grid, .summary { display: grid; gap: 1rem; align-items: start; }
.ff-panel { min-width: 0; }
.panel-head { min-height: 3.65rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .75rem .8rem; }
h2, h3 { font-weight: 800; letter-spacing: -.027em; line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
.muted { color: var(--ff-muted); font-size: .88rem; }
.eyebrow { color: #b2d0dd; text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .105em; margin-bottom: .2rem; }
.filters { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .4rem; padding: 0 .8rem .6rem; }
.filters > * { min-width: 0; }
.filters .ff-input { width: 100%; padding-inline: .5rem; }
.stock-labels { display: none; }
.rows { list-style: none; padding: 0; }
.rows > li { border-top: 1px solid var(--line); padding: .68rem .8rem; }
.stock-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .4rem .6rem; }
.article { min-width: 0; }
.article-name { display: block; font-weight: 800; overflow-wrap: anywhere; }
.article-meta { display: block; color: var(--ff-muted); font-size: .81rem; overflow-wrap: anywhere; }
.bin { color: #badbe7; font: 700 .73rem/1.2 ui-monospace, monospace; }
.level { grid-row: 2; display: inline-flex; align-items: center; flex-wrap: wrap; gap: .28rem .45rem; font-size: .8rem; color: var(--ff-muted); }
.level strong { font-size: .97rem; color: var(--ff-text); font-variant-numeric: tabular-nums; }
.level-low strong, .level-low .threshold { color: var(--amber); }
.level .threshold { white-space: nowrap; }
.stock-row .book { grid-column: 2; grid-row: 1 / span 2; }
.book { min-height: 44px; min-width: 44px; padding: .4rem .58rem; font-size: .85rem; }
.replenishment { background: linear-gradient(145deg, #122d3d, #0a1924 69%); }
.summary-icon { color: var(--ff-ice); font-size: 1.8rem; }
.summary-list-row, .order-row, .movement { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.summary-list-row strong:last-child { color: var(--amber); white-space: nowrap; }
.summary-list-row strong.ordered { color: var(--ff-ice); }
.replenishment > a { margin: .85rem .8rem; }
.recent .panel-head { min-height: 3.3rem; }
.recent .panel-head h2 { font-size: 1.25rem; }
.recent #latest { padding: 0 .8rem .55rem; }
.recent .link { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; margin: 0 .8rem .25rem; font-size: .88rem; }
.view-heading { margin: .5rem 0 1.1rem; }
.view-heading p { margin-top: .35rem; color: var(--ff-muted); }
.order-row { align-items: start; flex-wrap: wrap; }
.order-row .article { flex: 1 1 12rem; }
.order-row .ff-secondary { flex-shrink: 0; }
.order-row .order-status { display: block; color: var(--ff-ice); font-weight: 700; font-size: .89rem; margin-top: .25rem; }
.movement { align-items: start; }
.movement .change { flex-shrink: 0; font-weight: 800; color: var(--green); }
.movement .out { color: var(--amber); }
.movement small { display: block; color: var(--ff-muted); margin-top: .2rem; }
.history-selection { display: grid; gap: .3rem; min-width: 0; max-width: 60%; }
.history-selection select { width: 100%; }
.empty { padding: .8rem; color: var(--ff-muted); }
footer { display: flex; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; justify-content: space-between; padding-top: .75rem; margin-top: 1rem; color: var(--dim); font-size: .86rem; border-top: 1px solid var(--line); }
.quiet { min-height: 44px; border: 0; background: transparent; color: var(--ff-muted); padding: .3rem 0; text-decoration: underline; text-underline-offset: .2em; }
.formbox, dialog { max-width: 38rem; padding: 1rem; }
.formbox { display: grid; width: 100%; justify-items: start; gap: .8rem; }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .93rem; }
label .ff-input { width: 100%; font-weight: 400; }
.fields { width: 100%; display: grid; gap: .65rem; }
.formbox > label { width: 100%; }
.formbox .consent { grid-template-columns: 1.5rem minmax(0,1fr); align-items: center; gap: .55rem; min-height: 44px; color: var(--ff-muted); }
.consent input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: #87ddee; }
.error { color: var(--ff-error); font-size: .88rem; }
.error:empty, .notification:empty, #action-details:empty { display: none; }
.receipt { color: var(--ff-ice); font: 700 clamp(.94rem, 5vw, 1.2rem)/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.receipt-page { margin-top: 2rem; }
.receipt-page .ff-title { font-size: clamp(2.3rem, 6vw, 3.6rem); }
#proef { scroll-margin-top: 5rem; }
dialog { color: var(--ff-text); width: min(32rem, calc(100% - 2rem)); border: 1px solid var(--ff-control); border-radius: var(--ff-radius); background: #0e2331; }
dialog::backdrop { background: #02070ec9; }
dialog h2 { margin-bottom: .4rem; }
dialog form, #manual-fields { display: grid; gap: .75rem; }
dialog fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
dialog legend { font-weight: 700; font-size: .93rem; margin-bottom: .3rem; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.choices label { display: flex; align-items: center; justify-content: center; min-height: 44px; gap: .38rem; border: 1px solid var(--ff-control); border-radius: var(--ff-radius); cursor: pointer; }
.choices label:has(:checked) { color: var(--ff-ice); border-color: var(--ff-ice); background: #193c4d; }
.choices input { margin: 0; accent-color: #87ddee; }
dialog .actions { display: flex; justify-content: end; gap: .45rem; margin-top: .35rem; flex-wrap: wrap; }
#reset-dialog > p { color: var(--ff-muted); margin: .65rem 0 .8rem; }
.notification { position: fixed; z-index: 7; inset: auto 1rem 1rem auto; width: fit-content; max-width: calc(100% - 2rem); padding: .65rem .9rem; border: 1px solid var(--ff-control); border-radius: var(--ff-radius); color: var(--ff-text); background: #173647; box-shadow: 0 .5rem 1.8rem #02070ec9; }
@media (max-width: 25rem) {
  .location { flex-wrap: wrap; }
  #hero-book { width: 100%; }
}
@media (min-width: 42rem) {
  .hero { padding-block: 1.8rem 1.5rem; }
  .workspace { padding-top: 1.25rem; }
  .metrics { gap: .75rem; }
  .metric { padding: .7rem 1rem; }
  .metric strong { font-size: 2rem; }
  .metric span { font-size: .86rem; }
  .stock-labels, .stock-row { grid-template-columns: minmax(0,1fr) minmax(10rem, .62fr) 4.25rem; }
  .stock-labels { display: grid; gap: .6rem; color: var(--ff-muted); padding: .34rem .95rem; font-size: .74rem; letter-spacing: .045em; text-transform: uppercase; }
  .stock-row .book, .level { grid-row: auto; grid-column: auto; }
  .rows > li, .panel-head { padding-inline: .95rem; }
  .filters { padding-inline: .95rem; }
  .fields { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 59rem) {
  .stock-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 1rem; }
  .purchase-grid { grid-template-columns: 1fr 1fr; }
}

/* BEGIN gedeeld demo-familie.css */
/* Gemeenschappelijke afwerking voor de tien openbare demo's. */
@media screen {
  .ff-familiekop {
    background: linear-gradient(110deg, #071620, #091b27 65%, #07131c);
    border-bottom: 1px solid var(--ff-line, #284457);
    box-shadow: 0 2px 14px #02091030;
  }
  .ff-familiekop .ff-bar-inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 96rem;
    min-height: 4.5rem;
    margin-inline: auto;
    padding: 0 clamp(1rem, 5.7vw, 6.5rem);
  }
  .ff-familiekop .ff-trial {
    border-radius: var(--ff-radius, .35rem);
    font-family: var(--ff-sans, Instrument, Arial, sans-serif);
  }
  .ff-familiekop .ff-trial > [aria-hidden="true"] {
    font: inherit;
    letter-spacing: normal;
  }
  .ff-familiestappen {
    font-family: var(--ff-sans, Instrument, Arial, sans-serif);
    font-variant-numeric: tabular-nums;
  }
  .ff-familiestappen [aria-current]:not([aria-current="false"]) {
    box-shadow: inset 0 -2px #91dbe9;
  }
  .ff-familiekaart {
    border-radius: .55rem;
    border-color: var(--ff-line, #284457);
  }
}
@media screen and (max-width: 42rem) {
  .ff-familiekop .ff-bar-inner {
    min-height: 4.15rem;
    padding-inline: 1rem;
  }
}
@media screen and (prefers-reduced-motion: no-preference) {
  [data-ff-merk] { animation: ff-merk-binnen 360ms ease-out both; }
  .ff-familiekaart, .ff-familiestappen :is(a, button) {
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
  }
  @keyframes ff-merk-binnen {
    from { opacity: .45; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-ff-merk], .ff-familiekaart, .ff-familiestappen :is(a, button) {
    animation: none !important;
    transition: none !important;
  }
}
/* EINDE gedeeld demo-familie.css */
