/*
 * VoteCast brand layer, VoteCast Brand Bible 1.10. Belongs to Centipod Brand Bible 1.34, kit 1.3.4 (sections 3.6, 6.1, 6.4, 6.5.1,
 * 6.7, 6.10, 6.11, 6.12, 6.13 and 8.10).
 *
 * This is ONE layer on the Centipod kit, not a stylesheet of its own. The kit build publishes it with the kit, from the same
 * host and the same version, and a site loads it from there after the kit; a site keeps NO local copy. Never alone:
 *   <script src="https://cdn.centipod.io/v1/js/focus.js"></script>                  thin line with Tab, 2 px when active
 *   <script src="https://cdn.centipod.io/v1/js/fields.js" defer></script>           the kit's select, date and colour pop-ups
 *   <script src="https://cdn.centipod.io/v1/js/tabs.js" defer></script>             the arrow keys of the kit's .cp-tabs
 *   <link rel="stylesheet" href="https://cdn.centipod.io/v1/css/centipod.css">      the kit: tokens, base, layout,
 *                                                                                  components, forms, fonts
 *   <link rel="stylesheet" href="https://cdn.centipod.io/v1/brands/votecast/css/votecast.css">   this file
 * DEV sites use cdn.dev.centipod.io/v1/, UAT cdn.uat.centipod.io/v1/, PRD cdn.centipod.io/v1/. The kit owns the spacing scale,
 * radius, hairline, measure, container, the type scale, every distance (.cp-actions, .cp-card, .cp-form with .cp-field,
 * .cp-flow, .cp-stack: Bible 3.6), the form lines, the table rules, every form element (the check,
 * the radio, the select, the switch, the range, the progress bar, the file button and the rest of Bible 6.5.1), the busy
 * layer with its spinner and the Light/Dark/System control. This file never redefines them, and draws no form element
 * of its own: the colour that marks a choice is --color-action, set below.
 *
 * What this file sets (Brand Bible 8.10): the action colours, the mark, the focus colour, the block colours, the three
 * font stacks, VoteCast's own Mondrian primitives, and the components with the vc- prefix, all built from kit tokens.
 * VoteCast keeps the Centipod ground and palette, so it sets no ground tokens, and it uses the kit's spinner (a grey ring
 * and a Logo Navy arc), so it sets no --spinner-ring or --spinner-arc.
 * Every colour is written for light (:root), for dark (:root[data-theme="dark"]) and for System
 * (:root:not([data-theme]) under prefers-color-scheme: dark). A brand never uses a media query alone (Bible 6.12).
 * The status tints and the neutral inks are the kit's: the VoteCast palette is the Centipod palette.
 *
 * Contents: 1 tokens  2 logo  3 menu bar, tabs and language  4 the Mondrian composition  5 the ballot and results
 *           6 forms: field spacing, error summary, password rules, upload area  7 navigation: breadcrumbs and pagination
 *           8 pop-ups  9 footer  10 helpers  11 forced colours
 *
 * Accessibility floor (Centipod Bible 6.1): text 4.5:1, non-text 3:1, targets at least 24 px, focus never hidden, forced
 * colours (section 11), reduced motion (this file animates nothing). Text on the mist field is ink or ink-2, never ink-3:
 * ink-3 on #E6EDF3 is 4.03:1.
 */

/* 1 --------------------------------------------------------------------------------------- tokens */
:root {
  /* primitives: the Centipod palette as VoteCast uses it */
  --vc-navy: 0 64 107;               /* #00406B Logo Navy: the logo, one Mondrian field */
  --vc-orange: 194 77 0;             /* #C24D00 Burnt Orange: the tick, the one button, the active mark */
  --vc-harbour: 15 33 51;            /* #0F2133 Harbour Midnight: text, lines, blocks */
  --vc-mist: 230 237 243;            /* #E6EDF3 Harbour Mist: the tinted Mondrian field */
  --vc-on-harbour: 248 250 252;      /* #F8FAFC: text on a Harbour block, in either theme */
  --vc-tint: var(--vc-mist);         /* the quiet field of a composition, per theme */

  /* the brand-owned tokens of the kit */
  --color-action: var(--vc-orange);          /* #C24D00 */
  --color-action-hover: 169 67 0;            /* #A94300 */
  --color-action-pressed: 143 57 0;          /* #8F3900 */
  --color-on-action: 255 255 255;            /* #FFFFFF, 4.8:1 on the action */
  --color-mark: var(--vc-orange);            /* the dot, the underline, the current step */
  --color-focus: var(--vc-harbour);          /* #0F2133: 16.3:1 on base, 15.6:1 on surface */
  --color-block: var(--vc-harbour);          /* #0F2133 */
  --color-on-block: 248 250 252;             /* #F8FAFC */

  /* the three font stacks: the Centipod faces, which the kit loads */
  --font-heading: "Albert Sans", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-code: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="dark"] {
  --vc-tint: 18 41 63;               /* #12293F */
  --color-action: var(--vc-orange);          /* the orange keeps its value and its white label in dark */
  --color-action-hover: 169 67 0;
  --color-action-pressed: 143 57 0;
  --color-on-action: 255 255 255;
  --color-mark: var(--vc-orange);
  --color-focus: 248 250 252;        /* #F8FAFC: 15.6:1 on base #0F2133, 14.2:1 on surface #12293F */
  --color-block: 248 250 252;
  --color-on-block: 15 33 51;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme]) {
  --vc-tint: 18 41 63;               /* #12293F */
  --color-action: var(--vc-orange);          /* the orange keeps its value and its white label in dark */
  --color-action-hover: 169 67 0;
  --color-action-pressed: 143 57 0;
  --color-on-action: 255 255 255;
  --color-mark: var(--vc-orange);
  --color-focus: 248 250 252;        /* #F8FAFC: 15.6:1 on base #0F2133, 14.2:1 on surface #12293F */
  --color-block: 248 250 252;
  --color-on-block: 15 33 51;
}
}

/* 2 ------------------------------------------------------------------------------------------ logo */
/* Each theme shows its own master (Bible 1.10): put both in the markup, <img class="vc-logo vc-logo--on-light"> and
   <img class="vc-logo vc-logo--on-dark">. Both from the kit: https://cdn.centipod.io/v1/logo/votecast/. */
.vc-logo { display: block; width: 128px; height: auto; }
.vc-logo--on-dark { display: none; }
:root[data-theme="dark"] .vc-logo--on-light { display: none; }
:root[data-theme="dark"] .vc-logo--on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .vc-logo--on-light { display: none; }
  :root:not([data-theme]) .vc-logo--on-dark { display: block; }
}
@media (max-width: 479px) { .vc-logo { width: 112px; } }   /* the logo's minimum width on screen */
.vc-name { text-transform: none; letter-spacing: 0.02em; }   /* the name keeps its spelling inside a label */
.vc-ref { font-family: var(--font-code); font-size: 0.875rem; }

/* 3 ------------------------------------------------------------ menu bar, language, tabs (Bible 6.7, 6.12) */
/* The menu bar on the website and in the app, on the kit's container: the logo, the areas, the language codes, and the
   Light/Dark/System control (.cp-theme-switch) always top right. Never a dropdown. The areas use .cp-nav: 48 px apart,
   the dot slot reserved, each label holding its bold width (.cp-steady-label), so nothing moves when the active item
   changes. On a phone the control stays on the logo row and the areas wrap underneath. */
.vc-menubar { border-bottom: var(--hairline) solid rgb(var(--color-line)); background: rgb(var(--color-base)); }
.vc-menubar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6);
  min-height: 72px; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.vc-menubar__logo { order: 1; display: inline-flex; align-items: center; }
.vc-menubar__end { order: 2; margin-left: auto; display: inline-flex; }
.vc-menubar__nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-12); }
@media (min-width: 1024px) {
  .vc-menubar__nav { order: 2; flex: 1; width: auto; margin-left: var(--space-6); }
  .vc-menubar__end { order: 3; margin-left: 0; }
  .vc-lang { margin-left: auto; }
}
/* Language codes: EN, AF, NL, never flags. The current one is ink and bold, and holds its width. */
.vc-lang { display: flex; gap: var(--space-3); font: 600 0.875rem/1.5 var(--font-body); }
.vc-lang a { display: inline-flex; align-items: center; min-height: var(--space-8); color: rgb(var(--color-ink-2)); text-decoration: none; }   /* a target of 32 px, never under 24 */
.vc-lang a:hover, .vc-lang a[aria-current="true"] { color: rgb(var(--color-ink)); }

/* Tabs, the second level of navigation, as links: the same measures as the kit's .cp-tabs (24 px apart, a hairline under
   the row, a 2 px mark underline, weight 600), for a tab bar that navigates between pages. */
.vc-tabs { display: flex; gap: var(--space-6); border-bottom: var(--hairline) solid rgb(var(--color-line)); overflow-x: auto; }
.vc-tabs a { padding: var(--space-3) 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: rgb(var(--color-ink-2)); text-decoration: none; white-space: nowrap; }
.vc-tabs a:hover { color: rgb(var(--color-ink)); }
.vc-tabs a[aria-current="page"] { color: rgb(var(--color-ink)); font-weight: 600; border-bottom-color: rgb(var(--color-mark)); }

/* 4 -------------------------------------------------------------------- the Mondrian composition (Bible 3.2) */
/* Covers, heroes and chapter openings only, never a working screen. A 12-column grid whose cells are divided by 1 px
   Harbour Midnight lines. Per composition: at most one navy field, one small orange square, one Harbour block; the rest
   white, surface or mist. Content sits in white cells. */
.vc-mond { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--hairline); background: rgb(var(--vc-harbour));
  border: var(--hairline) solid rgb(var(--vc-harbour)); }
.vc-mond > * { background: rgb(var(--color-base)); min-width: 0; }
.vc-mond__navy { background: rgb(var(--vc-navy)) !important; }
.vc-mond__harbour { background: rgb(var(--vc-harbour)) !important; color: rgb(var(--vc-on-harbour)); }
.vc-mond__orange { background: rgb(var(--vc-orange)) !important; }
.vc-mond__mist { background: rgb(var(--vc-tint)) !important; color: rgb(var(--color-ink)); }   /* ink on mist 13.8:1; never ink-3 (4.03:1) */
.vc-mond__surface { background: rgb(var(--color-surface)) !important; }
/* Below 1024 px the composition keeps its content cell and one row of fields under it */
@media (max-width: 1023px) {
  .vc-mond { grid-template-columns: repeat(6, 1fr); }
  .vc-mond > * { grid-column: auto / span 6 !important; grid-row: auto !important; }
  .vc-mond > .vc-mond__fields { display: grid; grid-template-columns: 3fr 1fr 2fr; gap: var(--hairline);
    background: rgb(var(--vc-harbour)); min-height: var(--space-16); }
}

/* 5 --------------------------------------------------------------------- the ballot and results (Bible 5.4, 5.5) */
/* Every option is the same full-width row, in the same ink, in the order the organiser set. The row is a control: a 1 px
   ink-3 line, like a field. The chosen option takes the focus colour at 2 px, the extra pixel drawn inward so nothing
   moves. The rows sit in the kit's <div class="cp-stack"> (8 px apart; the layer sets no distance). The radio inside the row is the kit's (<label class="vc-option cp-option"><input type="radio" class="cp-radio">):
   chosen, it is filled with the action colour as the kit draws it, and the row does not change its ink. Reached with Tab,
   the row shows the thin focus line. */
.vc-option { display: flex; align-items: center; gap: var(--space-3); min-height: var(--space-12); padding: 0 var(--space-4);
  border: var(--hairline) solid rgb(var(--color-ink-3)); border-radius: var(--radius-sm); background: rgb(var(--color-base));
  width: 100%; font-weight: 500; cursor: pointer; }
.vc-option:has(input:checked) { border-color: rgb(var(--color-focus)); box-shadow: inset 0 0 0 1px rgb(var(--color-focus)); }
.vc-option:has(input:focus-visible) { outline: var(--hairline) solid rgb(var(--color-focus)); outline-offset: 2px; }
.vc-option .cp-radio:focus-visible, .vc-option .cp-check:focus-visible { outline: none; }   /* the row carries the focus line */

/* Results: one neutral bar per option, ink on the line colour, the count and share at the right. No winner colour, no
   green for For, no red for Against. The bar is the kit's <progress class="cp-progress"> (ink on the line colour), so its
   width needs no inline style; this layer only places it under the row. */
.vc-result { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-4); padding: var(--space-3) 0;
  border-bottom: var(--hairline) solid rgb(var(--color-line)); }
.vc-result__count { font-variant-numeric: tabular-nums; color: rgb(var(--color-ink-2)); }
.vc-result .cp-progress { grid-column: 1 / -1; }

/* Steps: a bar per step with its number and name under it, so the state is never colour alone. Done: an ink bar. Current:
   a thicker bar in the mark colour, aria-current="step", its label in ink and weight 600. Not yet: an ink-3 bar (3:1 on base
   and surface in light and dark). Every li also holds a visually hidden label, "Step 2 of 4, current" (Dutch "Stap 2 van 4,
   huidig"), in <span class="cp-sr-only">. Markup: <ol class="vc-steps" aria-label="Progress"><li data-state="done"><span
   class="vc-steps__label">1 Invitation</span><span class="cp-sr-only">Step 1 of 3, done</span></li> ... */
.vc-steps { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; align-items: flex-start; }
.vc-steps li { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.vc-steps li::before { content: ""; display: block; height: var(--space-1); background: rgb(var(--color-ink-3)); }
.vc-steps li[data-state="done"]::before { background: rgb(var(--color-ink)); }
.vc-steps li[aria-current="step"]::before { height: var(--space-2); background: rgb(var(--color-mark)); }
.vc-steps__label { font-size: 0.875rem; line-height: 1.43; color: rgb(var(--color-ink-2)); }
.vc-steps li[aria-current="step"] .vc-steps__label { color: rgb(var(--color-ink)); font-weight: 600; }

/* Status the kit does not have: a quiet word for a state that is neither good nor bad (Not opened, Closed). It reads on
   the surface with a thin line, in the kit's status shape. */
.vc-status--neutral { background: rgb(var(--color-surface)); color: rgb(var(--color-ink-2));
  border: var(--hairline) solid rgb(var(--color-line)); }

/* 6 ---------------------------------------------------- forms: field spacing, summary, password rules, upload area */
/* Every form element is the kit's (Bible 6.5.1): .cp-field-label, .cp-input, .cp-textarea, .cp-select, .cp-check and
   .cp-radio inside a .cp-option, .cp-switch, .cp-range, .cp-progress, .cp-meter, .cp-file, .cp-color, .cp-fieldset,
   .cp-details, .cp-output, .cp-help, .cp-error. A thin 1 px line; 2 px in the focus colour when active; only the thin
   line when reached with Tab (Bible 6.4). Chosen is the action colour. Required fields carry an asterisk, explained once
   at the top of the form. A form is the kit's <form class="cp-form"> of <div class="cp-field"> blocks (label to field 8 px,
   field to field 24 px, then 24 px to the actions). What follows is only what the kit lacks, and sets no distance. */

/* The form error summary (Bible 6.4): at the top when the form is sent, a notice with links to the fields to fix. Focus
   moves to it. It is the kit's .cp-notice--error with .cp-flow (the kit sets the distance above the list), holding a list. */
.vc-summary ul { margin: 0; padding-left: var(--space-4); }
.vc-summary a { color: rgb(var(--color-ink)); }

/* Choosing a new password (Bible 6.4): the rules are listed before typing. Pending is an empty 12 px square in ink-3 with
   the text in ink-2; met is a check in success green with the text in ink; unmet, after Save, is a crimson triangle.
   Put the list in a .cp-flow: the kit sets the distances around it. */
.vc-rules { list-style: none; margin: 0; padding: 0; }
.vc-rules li { display: flex; align-items: center; gap: var(--space-2); color: rgb(var(--color-ink-2)); min-height: var(--space-6); }
.vc-rules li::before { content: ""; flex: none; width: var(--space-3); height: var(--space-3);
  border: var(--hairline) solid rgb(var(--color-ink-3)); }
.vc-rules li[data-state="met"] { color: rgb(var(--color-ink)); }
.vc-rules li[data-state="met"]::before { border: 0; background: rgb(var(--color-success));
  clip-path: polygon(0 55%, 12% 40%, 38% 65%, 88% 10%, 100% 25%, 38% 95%); }
.vc-rules li[data-state="unmet"] { color: rgb(var(--color-error)); font-weight: 500; }
.vc-rules li[data-state="unmet"]::before { border: 0; background: rgb(var(--color-error)); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* File upload (Bible 6.11): a dashed 1 px area with the kit's file button inside (<input type="file" class="cp-file">), the
   limits stated before upload, progress as the kit's ink line (<progress class="cp-progress">) with the percentage in text.
   The dashed area and the file row are all this layer adds. The area is a kit card with a dashed line
   (<div class="vc-upload cp-card cp-flow">): the kit sets its padding and the distances inside it. */
.vc-upload { border-style: dashed; border-color: rgb(var(--color-ink-3)); text-align: center; }
.vc-file { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-4); padding: var(--space-3) 0;
  border-bottom: var(--hairline) solid rgb(var(--color-line)); }
.vc-file .cp-progress { grid-column: 1 / -1; }

/* 7 ---------------------------------------------------------------- navigation: breadcrumbs, pagination (Bible 6.7) */
/* Breadcrumbs show where the page sits; the current page is not a link. */
.vc-breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); list-style: none; margin: 0; padding: 0;
  font-size: 0.875rem; color: rgb(var(--color-ink-2)); }
.vc-breadcrumbs li + li::before { content: "/"; content: "/" / ""; margin-right: var(--space-2); color: rgb(var(--color-ink-3)); }
.vc-breadcrumbs a { display: inline-flex; align-items: center; min-height: var(--space-6); }   /* a target of at least 24 px */
.vc-breadcrumbs [aria-current="page"] { color: rgb(var(--color-ink)); font-weight: 600; }
/* Pagination: Previous and Next are always present; the current page has an ink outline. */
.vc-pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.vc-pagination a, .vc-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-12);
  min-height: 40px; padding: 0 var(--space-3); border: var(--hairline) solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; }
.vc-pagination a[aria-current="page"] { border-color: rgb(var(--color-ink)); font-weight: 600; }
.vc-pagination [aria-disabled="true"] { color: rgb(var(--color-ink-3)); }

/* 8 ---------------------------------------------------------------------------- pop-ups (Bible 6.9) */
/* Pop-ups are never see-through: the page's own background and a 1 px ink line. The backdrop is the busy-layer scrim. */
.vc-dialog { background: rgb(var(--color-base)); color: rgb(var(--color-ink)); border: var(--hairline) solid rgb(var(--color-ink));
  border-radius: var(--radius-md); max-width: 480px; }   /* <dialog class="vc-dialog cp-card cp-flow">: the kit sets the padding */
.vc-dialog::backdrop { background: rgb(var(--busy-scrim, 15 33 51 / 40%)); }
.vc-banner { position: fixed; inset: auto 0 0 0; z-index: 50; background: rgb(var(--color-base));
  border-top: var(--hairline) solid rgb(var(--color-ink)); padding: var(--space-4) 0; }

/* 9 -------------------------------------------------------------------------- site footer (Bible 5.9, 8.6) */
/* The legal entity, the legal links and Cookie preferences, on every page. A hairline above, small text in ink-2, links in
   ink. The button that reopens the cookie banner looks like a link. */
.vc-footer { border-top: var(--hairline) solid rgb(var(--color-line)); background: rgb(var(--color-base));
  padding: var(--space-8) 0; font-size: 0.875rem; line-height: 1.43; color: rgb(var(--color-ink-2)); }
.vc-footer p { margin: 0; max-width: none; }
.vc-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4) var(--space-8); }
.vc-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; margin: 0; padding: 0; }
.vc-footer a, .vc-footer__link { color: rgb(var(--color-ink)); }
.vc-footer__links a, .vc-footer__link { display: inline-flex; align-items: center; min-height: var(--space-6); }   /* a target of at least 24 px */
.vc-footer__link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* 10 ---------------------------------------------------------------------------------------- helpers */
.vc-button--block { display: flex; width: 100%; }   /* a full-width button on a phone ballot, with .cp-button */

/* 11 --------------------------------------------------------------------------------------- forced colours */
/* Under forced-colors: active the browser drops backgrounds and shadows, so what this layer draws with a background or an
   inset shadow is drawn again in system colours: the Mondrian lines, the chosen ballot row, the steps and the password rules.
   The kit does the same for its own components. */
@media (forced-colors: active) {
  .vc-mond { gap: 0; }
  .vc-mond > * { outline: var(--hairline) solid CanvasText; outline-offset: -1px; }
  .vc-option:has(input:checked) { border-width: 2px; border-color: Highlight; box-shadow: none; padding: 0 calc(var(--space-4) - 1px); }
  .vc-steps li::before { background: GrayText; }
  .vc-steps li[data-state="done"]::before { background: CanvasText; }
  .vc-steps li[aria-current="step"]::before { background: Highlight; }
  .vc-rules li[data-state="met"]::before, .vc-rules li[data-state="unmet"]::before { background: CanvasText; }
  .vc-status--neutral { border-color: CanvasText; }
}
