/*
 * Design tokens and the shared components. Loaded after bootstrap.min.css so it
 * can retint Bootstrap through its own custom properties — no Sass build.
 *
 * Warm paper underneath, white borderless cards on top, the brand's navy for
 * what carries weight. No shadows anywhere. The gold comes from the photographs
 * of the pieces, never from the stylesheet.
 */

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 1000;
    src: url(/static/fonts/dm-sans-latin-opsz-normal.woff2) format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 1000;
    src: url(/static/fonts/dm-sans-latin-ext-opsz-normal.woff2) format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;

    --ccg-canvas: #F5F7FA;
    --ccg-surface: #FFFFFF;
    --ccg-surface-muted: #EDF1F6;
    --ccg-surface-hover: #F9FAFC;

    --ccg-ink: #1D2A3A;
    --ccg-heading: #1F3864;
    --ccg-ink-muted: #556575;
    --ccg-line: #E3E8EF;
    --ccg-line-control: #7D8796;

    --ccg-primary: #1F3864;
    --ccg-primary-hover: #182C4F;
    --ccg-accent: #3A64B0;
    --ccg-calm: #E6ECF6;
    --ccg-calm-hover: #D6E0F0;

    --ccg-attention: #F6E5D9;
    --ccg-attention-ink: #78452C;
    --ccg-success: #27724A;
    --ccg-success-ink: #1F5C3B;
    --ccg-success-soft: #E3EFE8;
    --ccg-warning: #78452C;
    --ccg-warning-soft: #F6E5D9;
    --ccg-danger: #A3412B;
    --ccg-danger-hover: #8A3523;
    --ccg-danger-soft: #F6E1DC;

    --radius-control: 12px;
    --radius-card: 16px;
    --radius-sheet: 28px;

    --measure: 34rem;

    /* Motion: four durations, three curves. What leaves goes faster than what
       arrives, and nothing springs. Reduced motion sets them all to zero. */
    --t-fast: 120ms;
    --t-base: 200ms;
    --t-slow: 320ms;
    --t-page: 420ms;
    --e-out: cubic-bezier(.2, .7, .2, 1);
    --e-move: cubic-bezier(.4, 0, .2, 1);
    --e-in: cubic-bezier(.4, 0, 1, 1);

    /* ------------------------------------------------------------------
       Bootstrap retint. Everything it derives follows from these.
       ------------------------------------------------------------------ */

    --bs-font-sans-serif: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-line-height: 1.375;

    --bs-body-bg: var(--ccg-canvas);
    --bs-body-bg-rgb: 245, 247, 250;
    --bs-body-color: var(--ccg-ink);
    --bs-body-color-rgb: 29, 42, 58;

    --bs-heading-color: var(--ccg-heading);
    --bs-emphasis-color: var(--ccg-ink);
    --bs-emphasis-color-rgb: 29, 42, 58;
    --bs-secondary-color: var(--ccg-ink-muted);
    --bs-secondary-color-rgb: 85, 101, 117;
    --bs-tertiary-color: var(--ccg-ink-muted);
    --bs-tertiary-color-rgb: 85, 101, 117;
    --bs-secondary-bg: var(--ccg-surface-muted);
    --bs-secondary-bg-rgb: 237, 241, 246;
    --bs-tertiary-bg: var(--ccg-canvas);
    --bs-tertiary-bg-rgb: 245, 247, 250;

    --bs-border-color: var(--ccg-line);
    --bs-border-color-translucent: var(--ccg-line);
    --bs-border-radius-sm: 8px;
    --bs-border-radius: var(--radius-control);
    --bs-border-radius-lg: var(--radius-card);
    --bs-border-radius-xl: 24px;
    --bs-border-radius-xxl: var(--radius-sheet);
    --bs-box-shadow: none;
    --bs-box-shadow-sm: none;
    --bs-box-shadow-lg: none;

    --bs-link-color: var(--ccg-accent);
    --bs-link-color-rgb: 58, 100, 176;
    --bs-link-hover-color: var(--ccg-primary);
    --bs-link-hover-color-rgb: 31, 56, 100;
    --bs-link-decoration: none;

    --bs-focus-ring-width: 2px;
    --bs-focus-ring-opacity: 1;
    --bs-focus-ring-color: var(--ccg-accent);

    --bs-primary: var(--ccg-primary);
    --bs-primary-rgb: 31, 56, 100;
    --bs-primary-text-emphasis: var(--ccg-primary);
    --bs-primary-bg-subtle: var(--ccg-calm);
    --bs-primary-border-subtle: #C5D3EA;

    --bs-secondary: var(--ccg-ink-muted);
    --bs-secondary-rgb: 85, 101, 117;
    --bs-secondary-text-emphasis: #3F4B59;
    --bs-secondary-bg-subtle: var(--ccg-surface-muted);
    --bs-secondary-border-subtle: var(--ccg-line);

    --bs-info: var(--ccg-accent);
    --bs-info-rgb: 58, 100, 176;
    --bs-info-text-emphasis: var(--ccg-primary);
    --bs-info-bg-subtle: var(--ccg-calm);
    --bs-info-border-subtle: #C5D3EA;

    --bs-success: var(--ccg-success);
    --bs-success-rgb: 39, 114, 74;
    --bs-success-text-emphasis: var(--ccg-success-ink);
    --bs-success-bg-subtle: var(--ccg-success-soft);
    --bs-success-border-subtle: #BFD9C9;

    --bs-warning: var(--ccg-warning);
    --bs-warning-rgb: 120, 69, 44;
    --bs-warning-text-emphasis: var(--ccg-attention-ink);
    --bs-warning-bg-subtle: var(--ccg-warning-soft);
    --bs-warning-border-subtle: #E8CBB6;

    --bs-danger: var(--ccg-danger);
    --bs-danger-rgb: 163, 65, 43;
    --bs-danger-text-emphasis: var(--ccg-danger-hover);
    --bs-danger-bg-subtle: var(--ccg-danger-soft);
    --bs-danger-border-subtle: #E8C0B6;

    --bs-light: var(--ccg-canvas);
    --bs-light-rgb: 245, 247, 250;
    --bs-dark: var(--ccg-ink);
    --bs-dark-rgb: 29, 42, 58;

    --bs-form-valid-color: var(--ccg-success);
    --bs-form-valid-border-color: var(--ccg-success);
    --bs-form-invalid-color: var(--ccg-danger);
    --bs-form-invalid-border-color: var(--ccg-danger);
}

/* The one deep band — the contacts at the foot of the landing page — as
   Bootstrap's own inversion in the brand navy, so everything inside it is built
   from bg-body, text-body-secondary and border-top with nothing to override. */
[data-bs-theme="dark"] {
    --bs-body-bg: var(--ccg-primary);
    --bs-body-bg-rgb: 31, 56, 100;
    --bs-body-color: #FFFFFF;
    --bs-body-color-rgb: 255, 255, 255;
    --bs-emphasis-color: #FFFFFF;
    --bs-secondary-color: rgba(255, 255, 255, .78);
    --bs-tertiary-color: rgba(255, 255, 255, .7);
    --bs-secondary-bg: #2A4675;
    --bs-tertiary-bg: #2A4675;
    --bs-heading-color: #FFFFFF;
    --bs-border-color: rgba(255, 255, 255, .16);
    --bs-border-color-translucent: rgba(255, 255, 255, .16);
    --bs-link-color: #C5D3EA;
    --bs-link-color-rgb: 197, 211, 234;
    --bs-link-hover-color: #FFFFFF;
    --bs-link-hover-color-rgb: 255, 255, 255;
    --bs-focus-ring-color: #C5D3EA;
}

body {
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3,
.h1, .h2, .h3 {
    font-weight: 700;
}

/* The type scale: display 40/46, head 28/32, title 20/26. */
h1, .h1 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -.015em; }
h2, .h2 { font-size: 1.75rem; line-height: 1.143; }
h3, .h3 { font-size: 1.25rem; line-height: 1.3; }

/* Vertical rhythm for a full-width band. */
.section {
    padding: 3rem 1.25rem;
}

@media (min-width: 992px) {
    .section {
        padding: 4rem 3rem;
    }
}

/* Bootstrap's font-size utilities stop at 1rem. */
.fs-7 { font-size: .875rem; }
.fs-8 { font-size: .75rem; }

.measure {
    max-width: var(--measure);
}

/* Counts, dates and ids line up in columns. */
.tabular {
    font-variant-numeric: tabular-nums;
}

/* The label over a heading: label 14/500 muted, never spaced capitals. */
.eyebrow {
    font-size: .875rem;
    line-height: 1.43;
    font-weight: 500;
    color: var(--bs-secondary-color);
    margin-bottom: .375rem;
}

a {
    text-decoration: none;
}

/* A plain link in running text: a fine underline that thickens under the
   pointer. Titles and links dressed as something else keep their own look. */
main :is(p, dd) a:not([class]) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-thickness var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}

main :is(p, dd) a:not([class]):hover {
    text-decoration-thickness: 2px;
}

/* Keyboard focus is one accent ring everywhere, not Bootstrap's 25% glow. The
   controls named here switch the outline off themselves, so they take it back;
   fields mark focus with their border instead (below). */
:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.btn-close:focus-visible,
.page-link:focus-visible,
.form-check-input:focus-visible,
.dropdown-item:focus-visible {
    outline: 3px solid var(--bs-focus-ring-color);
    outline-offset: 3px;
    box-shadow: none;
}

/* Zero specificity: the ring is rounded only where nothing has a radius already. */
:where(:focus-visible) {
    border-radius: 4px;
}

/* Off-screen until a keyboard reaches it, then the first thing on the page. */
.skip-link {
    position: absolute;
    top: 0;
    left: -999px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    background: var(--ccg-surface);
    color: var(--ccg-heading);
    font-weight: 700;
}

.skip-link:focus {
    left: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    :root {
        --t-fast: 0ms;
        --t-base: 0ms;
        --t-slow: 0ms;
        --t-page: 0ms;
    }
}

/* ------------------------------------------------------------------
   Icons: Lucide symbols from /static/icons/lucide.svg, drawn by
   <x-icon name="..."/> in Blade and icon(name) in js/core/html.js.
   ------------------------------------------------------------------ */

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.25em;
}

.icon-sm { width: 1em; height: 1em; vertical-align: -.125em; }
.icon-lg { width: 1.75rem; height: 1.75rem; }

/* ------------------------------------------------------------------
   Buttons: pills, 52px, 16/700. One primary per screen; secondary is paper
   with a hairline; link is accent text with a 44px hit area. .btn-sm is the
   44px compact variant for dense dashboard toolbars. Busy: aria-busy="true"
   hides the label behind a spinner, screen readers still read it.
   ------------------------------------------------------------------ */

.btn {
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-font-size: 1rem;
    --bs-btn-font-weight: 700;
    --bs-btn-line-height: 1.25;
    --bs-btn-border-radius: 999px;
    --bs-btn-disabled-opacity: .6;
    --bs-btn-focus-box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 52px;
    transition: color var(--t-fast) var(--e-out), background-color var(--t-fast) var(--e-out),
        border-color var(--t-fast) var(--e-out), transform var(--t-fast) var(--e-out);
}

.btn:active {
    transform: scale(.98);
}

.btn-sm {
    --bs-btn-padding-x: 1.125rem;
    --bs-btn-padding-y: .25rem;
    --bs-btn-font-size: .875rem;
    --bs-btn-border-radius: 999px;
    min-height: 44px;
}

.btn-lg {
    --bs-btn-font-size: 1.0625rem;
    --bs-btn-border-radius: 999px;
    min-height: 56px;
}

.btn-primary {
    --bs-btn-color: #FFFFFF;
    --bs-btn-bg: var(--ccg-primary);
    --bs-btn-border-color: var(--ccg-primary);
    --bs-btn-hover-color: #FFFFFF;
    --bs-btn-hover-bg: var(--ccg-primary-hover);
    --bs-btn-hover-border-color: var(--ccg-primary-hover);
    --bs-btn-active-color: #FFFFFF;
    --bs-btn-active-bg: var(--ccg-primary-hover);
    --bs-btn-active-border-color: var(--ccg-primary-hover);
    --bs-btn-disabled-color: #FFFFFF;
    --bs-btn-disabled-bg: var(--ccg-primary);
    --bs-btn-disabled-border-color: var(--ccg-primary);
}

.btn-secondary {
    --bs-btn-color: var(--ccg-primary);
    --bs-btn-bg: var(--ccg-canvas);
    --bs-btn-border-color: var(--ccg-line);
    --bs-btn-hover-color: var(--ccg-primary);
    --bs-btn-hover-bg: var(--ccg-calm);
    --bs-btn-hover-border-color: var(--ccg-calm);
    --bs-btn-active-color: var(--ccg-primary);
    --bs-btn-active-bg: var(--ccg-calm-hover);
    --bs-btn-active-border-color: var(--ccg-calm-hover);
    --bs-btn-disabled-color: var(--ccg-primary);
    --bs-btn-disabled-bg: var(--ccg-canvas);
    --bs-btn-disabled-border-color: var(--ccg-line);
}

.btn-link {
    --bs-btn-color: var(--ccg-accent);
    --bs-btn-hover-color: var(--ccg-primary);
    --bs-btn-active-color: var(--ccg-primary);
    --bs-btn-disabled-color: var(--ccg-accent);
    --bs-btn-padding-x: .5rem;
    min-height: 44px;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger {
    --bs-btn-color: #FFFFFF;
    --bs-btn-bg: var(--ccg-danger);
    --bs-btn-border-color: var(--ccg-danger);
    --bs-btn-hover-color: #FFFFFF;
    --bs-btn-hover-bg: var(--ccg-danger-hover);
    --bs-btn-hover-border-color: var(--ccg-danger-hover);
    --bs-btn-active-color: #FFFFFF;
    --bs-btn-active-bg: var(--ccg-danger-hover);
    --bs-btn-active-border-color: var(--ccg-danger-hover);
    --bs-btn-disabled-color: #FFFFFF;
    --bs-btn-disabled-bg: var(--ccg-danger);
    --bs-btn-disabled-border-color: var(--ccg-danger);
}

/* A quiet text action with a button's hit area: row actions, dismissals. */
.btn-ghost {
    --bs-btn-color: var(--ccg-accent);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--ccg-primary);
    --bs-btn-hover-bg: var(--ccg-calm);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--ccg-primary);
    --bs-btn-active-bg: var(--ccg-calm-hover);
    --bs-btn-active-border-color: transparent;
}

/* The light-blue filled button: the menu opener, icon buttons on paper. */
.btn-calm {
    --bs-btn-color: var(--ccg-primary);
    --bs-btn-bg: var(--ccg-calm);
    --bs-btn-border-color: var(--ccg-calm);
    --bs-btn-hover-color: var(--ccg-primary);
    --bs-btn-hover-bg: var(--ccg-calm-hover);
    --bs-btn-hover-border-color: var(--ccg-calm-hover);
    --bs-btn-active-color: var(--ccg-primary);
    --bs-btn-active-bg: var(--ccg-calm-hover);
    --bs-btn-active-border-color: var(--ccg-calm-hover);
}

/* A round 44px button holding only an icon; it needs an aria-label. */
.btn-icon {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    width: 44px;
    height: 44px;
    min-height: 44px;
}

/* At work: a small spinner beside "A guardar…" (core/modal.js submitting()
   swaps the words); then "Guardado" with a tick, in green, for a moment. */
.btn[aria-busy="true"] {
    pointer-events: none;
}

.btn[aria-busy="true"]::before {
    content: "";
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: .8s linear infinite spinner-border;
}

.btn.is-done {
    --bs-btn-bg: var(--ccg-success);
    --bs-btn-border-color: var(--ccg-success);
    --bs-btn-color: #FFFFFF;
    --bs-btn-hover-bg: var(--ccg-success);
    --bs-btn-hover-border-color: var(--ccg-success);
    --bs-btn-hover-color: #FFFFFF;
    pointer-events: none;
}

.btn.is-done .icon {
    animation: ccg-tick var(--t-slow) var(--e-out);
}

@keyframes ccg-tick {
    from {
        opacity: 0;
        transform: scale(.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn[aria-busy="true"]::before,
    .btn.is-done .icon {
        animation: none;
    }
}

/* A message about one field, under it (core/modal.js fieldError()). */
.field-error {
    margin: .375rem 0 0;
    color: var(--ccg-danger);
    font-size: .875rem;
    animation: ccg-arrive var(--t-fast) var(--e-out);
}

.field-error:empty {
    display: none;
}

.btn-close {
    --bs-btn-close-focus-shadow: none;
    --bs-btn-close-opacity: .7;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--ccg-surface-muted);
    background-size: .75rem;
}

/* ------------------------------------------------------------------
   Fields: label above (14/500 muted), 56px box, 12px radius, line-control
   border. Focus thickens the border to accent, no halo. Error: danger border
   and 12px danger text below.
   ------------------------------------------------------------------ */

.form-label {
    color: var(--ccg-ink-muted);
    font-size: .875rem;
    line-height: 1.43;
    font-weight: 500;
    margin-bottom: .375rem;
}

.form-control,
.form-select {
    min-height: 56px;
    padding: .875rem 1rem;
    font-size: 1rem;
    color: var(--ccg-ink);
    background-color: var(--ccg-surface);
    border: 1px solid var(--ccg-line-control);
    border-radius: var(--radius-control);
}

.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556575' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    padding-right: 2.75rem;
    background-position: right 1rem center;
    background-size: 20px 20px;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--ccg-accent);
    box-shadow: inset 0 0 0 1px var(--ccg-accent);
}

.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"] {
    border-color: var(--ccg-danger);
    box-shadow: inset 0 0 0 1px var(--ccg-danger);
    background-image: none;
    padding-right: 1rem;
}

.form-control::placeholder {
    color: var(--ccg-ink-muted);
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--ccg-canvas);
    opacity: .7;
}

.help {
    color: var(--ccg-ink-muted);
    font-size: .75rem;
    line-height: 1.33;
    margin-top: .375rem;
}

.form-check-input {
    border-color: var(--ccg-line-control);
}

.form-check-input:focus {
    border-color: var(--ccg-accent);
    box-shadow: none;
}

.form-check-input:checked {
    background-color: var(--ccg-primary);
    border-color: var(--ccg-primary);
}

/* A field with a leading icon (search): <div class="field-icon"><x-icon
   name="search"/><input class="form-control"></div> */
.field-icon {
    position: relative;
    color: var(--ccg-ink-muted);
}

.field-icon > .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.field-icon > .form-control {
    padding-left: 2.875rem;
}

/* A checkbox drawn as a 44px chip: <label class="choice-chip"><input
   class="form-check-input" type="checkbox"> Caixa <span class="count">4</span></label> */
.choice-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0 1rem 0 .75rem;
    border: 1px solid var(--ccg-line);
    border-radius: 999px;
    background: var(--ccg-surface);
    color: var(--ccg-ink);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
}

.choice-chip .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: none;
}

.choice-chip:has(:checked) {
    background: var(--ccg-calm);
    border-color: var(--ccg-calm);
    color: var(--ccg-primary);
}

.choice-chip:has(:disabled) {
    opacity: .55;
    cursor: default;
}

.choice-chip .count {
    color: var(--ccg-ink-muted);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
   Cards and rows: white, 16px radius, no border, no shadow.
   ------------------------------------------------------------------ */

.card {
    --bs-card-bg: var(--ccg-surface);
    --bs-card-border-width: 0;
    --bs-card-border-radius: var(--radius-card);
    --bs-card-inner-border-radius: var(--radius-card);
    --bs-card-spacer-x: 1rem;
    --bs-card-spacer-y: 1rem;
    --bs-card-cap-bg: transparent;
    --bs-card-title-color: var(--ccg-heading);
}

@media (min-width: 992px) {
    .card {
        --bs-card-spacer-x: 1.5rem;
        --bs-card-spacer-y: 1.5rem;
    }
}

/* A row: <a class="list-row"> holding a .disc or an img.list-row-thumb, a
   .list-row-body with .list-row-title and .list-row-sub, and an optional
   trailing chevron or actions. Stack rows in .list-rows. */
.list-rows {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.list-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    min-height: 72px;
    padding: .75rem 1rem;
    background: var(--ccg-surface);
    border-radius: var(--radius-card);
    color: var(--ccg-ink);
}

a.list-row:hover,
button.list-row:hover {
    background: var(--ccg-surface-hover);
    color: var(--ccg-ink);
}

.list-row:has(> .list-row-thumb) {
    padding-left: .75rem;
}

.list-row-thumb {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: var(--radius-control);
    object-fit: cover;
}

.list-row-body {
    flex: 1;
    min-width: 0;
}

.list-row-title {
    display: block;
    font-size: 1rem;
    line-height: 1.375;
    font-weight: 500;
}

.list-row-sub {
    display: block;
    font-size: .8125rem;
    line-height: 1.385;
    color: var(--ccg-ink-muted);
}

.list-row > .icon:last-child {
    color: var(--ccg-ink-muted);
}

/* ------------------------------------------------------------------
   Discs and avatars: a circle with its content centred. .disc alone is only
   the shape; add a size and .disc-calm (or .disc-attention). An avatar is a
   calm disc holding an initial.
   ------------------------------------------------------------------ */

.disc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex: none;
}

.disc-sm { width: 32px; height: 32px; font-size: .8rem; }
.disc-md { width: 44px; height: 44px; font-size: 1rem; }
.disc-lg { width: 64px; height: 64px; font-size: 1.4rem; }

.disc-calm {
    background: var(--ccg-calm);
    color: var(--ccg-primary);
    font-weight: 700;
}

.disc-attention {
    background: var(--ccg-attention);
    color: var(--ccg-attention-ink);
}

/* ------------------------------------------------------------------
   Status pills: <span class="badge rounded-pill bg-success-subtle
   text-success-emphasis">, from Bootstrap's subtle pairs (primary = calm,
   secondary = neutral, success, warning, danger). Icon optional.
   ------------------------------------------------------------------ */

.badge {
    --bs-badge-padding-x: .75rem;
    --bs-badge-padding-y: 0;
    --bs-badge-font-size: .8125rem;
    --bs-badge-font-weight: 500;
    --bs-badge-border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    min-height: 28px;
    line-height: 1;
    white-space: nowrap;
}

.badge .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

/* ------------------------------------------------------------------
   Empty state: <div class="card empty-state"> with a .disc.disc-lg.disc-calm,
   an h2/h3 title, a muted line and one action.
   ------------------------------------------------------------------ */

.empty-state {
    padding: 1.5rem;
    align-items: flex-start;
}

.empty-state > .disc {
    margin-bottom: 1rem;
}

.empty-state h2,
.empty-state h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: .375rem;
}

.empty-state p {
    color: var(--ccg-ink-muted);
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------
   Loading: pulsing blocks in the shape of what comes (Bootstrap's
   placeholder-glow). White on the canvas, muted on a white card.
   ------------------------------------------------------------------ */

.placeholder {
    background-color: var(--ccg-surface);
    border-radius: 8px;
    opacity: 1;
    cursor: default;
}

.card .placeholder,
.list-row .placeholder,
.bg-white .placeholder {
    background-color: var(--ccg-surface-muted);
}

/* Loading: a light passing over the blocks, left to right, reads as "on its way". */
.placeholder-glow .placeholder {
    background-image: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .8) 50%, transparent 70%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: ccg-shimmer 1.4s var(--e-move) infinite;
}

@keyframes ccg-shimmer {
    from {
        background-position: 150% 0;
    }

    to {
        background-position: -50% 0;
    }
}

/* What replaces the blocks fades in rather than landing all at once. */
@keyframes ccg-arrive {
    from {
        opacity: 0;
    }
}

.arrive > :not([aria-hidden="true"]),
.dash-panel-rows {
    animation: ccg-arrive var(--t-slow) var(--e-out);
}

/* Photographs fade in over the calm blue once they have loaded (core/fade-in.js). */
img.fade-in {
    background-color: var(--ccg-calm);
    transition: opacity var(--t-slow) var(--e-out);
}

.js-fade img.fade-in:not(.is-loaded) {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .placeholder-glow .placeholder,
    .arrive > *,
    .dash-panel-rows,
    .field-error {
        animation: none;
    }
}

/* ------------------------------------------------------------------
   Overlays: sheets and dialogs over the scrim, on the canvas.
   ------------------------------------------------------------------ */

.modal-backdrop,
.offcanvas-backdrop {
    --bs-backdrop-bg: #1D2A3A;
    --bs-backdrop-opacity: .4;
    --bs-offcanvas-backdrop-bg: #1D2A3A;
}

.offcanvas-backdrop {
    background-color: #1D2A3A;
}

.offcanvas-backdrop.show {
    opacity: .4;
}

/* A dialog settles in from 97% and 8px low; it leaves faster than it came. */
.modal.fade,
.modal-backdrop.fade {
    transition: opacity var(--t-base) var(--e-in);
}

.modal.fade.show,
.modal-backdrop.fade.show {
    transition: opacity var(--t-slow) var(--e-out);
}

.modal.fade .modal-dialog {
    transform: translateY(8px) scale(.97);
    transition: transform var(--t-base) var(--e-in);
}

.modal.show .modal-dialog {
    transform: none;
    transition: transform var(--t-slow) var(--e-out);
}

/* Toasts (core/notify.js): navy news that comes down 8px and goes on its own;
   an error in the danger red, which stays until closed. */
.toast-ccg {
    --bs-toast-bg: var(--ccg-primary);
    --bs-toast-color: #FFFFFF;
    --bs-toast-border-width: 0;
    --bs-toast-border-radius: var(--radius-card);
    --bs-toast-box-shadow: none;
    --bs-toast-max-width: 360px;
    padding: .875rem .5rem .875rem 1rem;
    font-size: .9375rem;
}

.toast-ccg.is-error {
    --bs-toast-bg: var(--ccg-danger);
}

.toast-ccg .toast-body {
    flex: 1;
    padding: .125rem .75rem 0;
}

.toast-ccg .btn-close {
    flex: none;
    margin: -.5rem 0;
}

.toast-disc {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ccg-success);
}

.toast-ccg.is-error .toast-disc {
    background: rgb(255 255 255 / .2);
}

.toast.fade {
    transition: opacity var(--t-base) var(--e-in), transform var(--t-base) var(--e-in);
}

.toast.fade:not(.show) {
    transform: translateY(-8px);
}

.toast.fade.show {
    transition: opacity var(--t-slow) var(--e-out), transform var(--t-slow) var(--e-out);
}

.modal {
    --bs-modal-bg: var(--ccg-canvas);
    --bs-modal-border-width: 0;
    --bs-modal-border-radius: var(--bs-border-radius-xl);
    --bs-modal-inner-border-radius: var(--bs-border-radius-xl);
    --bs-modal-box-shadow: none;
    --bs-modal-padding: 1.5rem;
    --bs-modal-header-padding: 1.25rem 1.5rem .5rem;
    --bs-modal-header-border-width: 0;
    --bs-modal-footer-border-width: 0;
    --bs-modal-title-line-height: 1.3;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ccg-heading);
}

.offcanvas,
.offcanvas-lg {
    --bs-offcanvas-bg: var(--ccg-canvas);
    --bs-offcanvas-border-width: 0;
    --bs-offcanvas-box-shadow: none;
    --bs-offcanvas-padding-x: 1.25rem;
    --bs-offcanvas-padding-y: 1rem;
}

/* The bottom sheet: auto height, 28px top corners and a grab handle. Bootstrap
   gives a responsive one (offcanvas-lg) max-height: 100%, hence the second selector. */
.offcanvas-bottom,
.offcanvas-lg.offcanvas-bottom {
    --bs-offcanvas-height: auto;
    max-height: 90vh;
    border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
    padding-top: .625rem;
}

.offcanvas-bottom::before {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    margin: 0 auto .25rem;
    border-radius: 3px;
    background: #C9C5B9;
}

.dropdown-menu {
    --bs-dropdown-bg: var(--ccg-surface);
    --bs-dropdown-border-color: var(--ccg-line);
    --bs-dropdown-border-radius: var(--radius-card);
    --bs-dropdown-inner-border-radius: calc(var(--radius-card) - 1px);
    --bs-dropdown-box-shadow: none;
    --bs-dropdown-padding-x: .375rem;
    --bs-dropdown-padding-y: .375rem;
    --bs-dropdown-item-padding-x: .875rem;
    --bs-dropdown-item-padding-y: .625rem;
    --bs-dropdown-item-border-radius: var(--radius-control);
    --bs-dropdown-link-color: var(--ccg-ink);
    --bs-dropdown-link-hover-color: var(--ccg-primary);
    --bs-dropdown-link-hover-bg: var(--ccg-calm);
    --bs-dropdown-link-active-color: #FFFFFF;
    --bs-dropdown-link-active-bg: var(--ccg-primary);
    --bs-dropdown-divider-bg: var(--ccg-line);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 44px;
}

/* ------------------------------------------------------------------
   Navigation: the current page is a filled navy pill (aria-current), the
   others turn calm on hover. Underline tabs keep Bootstrap's shape.
   ------------------------------------------------------------------ */

.nav-pills {
    --bs-nav-pills-border-radius: 999px;
    --bs-nav-pills-link-active-color: #FFFFFF;
    --bs-nav-pills-link-active-bg: var(--ccg-primary);
    --bs-nav-link-color: var(--ccg-ink);
    --bs-nav-link-hover-color: var(--ccg-primary);
    --bs-nav-link-padding-x: 1.125rem;
    --bs-nav-link-font-weight: 500;
    gap: .25rem;
}

.nav-pills .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
}

.nav-pills .nav-link:not(.active):hover {
    background: var(--ccg-calm);
}

.nav-pills .nav-link.active {
    font-weight: 700;
}

/* 44px circles, white, the current page navy. */
.pagination {
    --bs-pagination-padding-x: 0;
    --bs-pagination-padding-y: 0;
    --bs-pagination-color: var(--ccg-ink);
    --bs-pagination-bg: var(--ccg-surface);
    --bs-pagination-border-width: 0;
    --bs-pagination-border-radius: 50%;
    --bs-pagination-hover-color: var(--ccg-primary);
    --bs-pagination-hover-bg: var(--ccg-calm);
    --bs-pagination-focus-color: var(--ccg-primary);
    --bs-pagination-focus-bg: var(--ccg-calm);
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-color: #FFFFFF;
    --bs-pagination-active-bg: var(--ccg-primary);
    --bs-pagination-disabled-color: var(--ccg-ink-muted);
    --bs-pagination-disabled-bg: var(--ccg-surface);
    gap: .375rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 500;
}

.active > .page-link,
.page-link.active {
    font-weight: 700;
}

.disabled > .page-link,
.page-link.disabled {
    opacity: .5;
}

/* ------------------------------------------------------------------
   The no-photograph tile: the piece's type icon on a wash mixed from its own
   colour. --ph-color / --ph-wash / --ph-circle are set inline per product by
   js/core/placeholder.js. Shared, because the dashboard's table draws it too.
   ------------------------------------------------------------------ */

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--ph-wash, var(--ccg-calm));
    container-type: inline-size;
}

.product-placeholder-circle {
    width: 34%;
    aspect-ratio: 1 / 1;
    background: var(--ph-circle, var(--ccg-calm-hover));
    color: var(--ph-color, var(--ccg-primary));
    font-size: clamp(1rem, 8cqw, 2.4rem);
}

/* ------------------------------------------------------------------
   The colour-set pill: a named pill with one dot per colour, each dot over
   the last, washed in the colour that identifies the set. --cs-bg and --cs-fg
   are set inline per set by js/core/color-set.js.
   ------------------------------------------------------------------ */

.color-set-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 28px;
    padding: 0 11px 0 6px;
    border-radius: 999px;
    background-color: var(--cs-bg, var(--ccg-surface-muted));
    color: var(--cs-fg, var(--ccg-ink));
    font-size: .8125rem;
    line-height: 1;
    font-weight: 500;
}

.swatch-set {
    display: inline-flex;
    flex: none;
}

.color-set-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swatch {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    /* A white dot on a pale wash is only its outline, so the ring stays. */
    border: 1px solid rgb(29 42 58 / .25);
}

.swatch + .swatch {
    margin-left: -5px;
}

/* The count of colourways a card has no room to name. */
.color-set-more {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 500;
    background: var(--ccg-surface);
    color: var(--ccg-ink-muted);
    border: 1px solid var(--ccg-line);
}

/* A row-shaped block, as <x-skeleton> draws it. */
.placeholder-row {
    display: block;
    width: 100%;
    height: 2.75rem;
}

/* An event as the home page's "Por onde andamos" draws it, and the dashboard's
   Eventos page previews it. */
.event-card {
    gap: .75rem;
    padding: 1.125rem;
    border-radius: 20px;
}

.event-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.event-card-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-name {
    margin-bottom: .125rem;
    font-size: 1rem;
    line-height: 1.375;
}

.event-name a {
    color: var(--ccg-heading);
    text-decoration-color: #B9C6DE;
    text-underline-offset: 4px;
}

.event-name a:hover {
    text-decoration-color: currentColor;
}

.event-place {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    line-height: 1.43;
    font-weight: 500;
    color: var(--ccg-ink-muted);
}

.event-times {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .3125rem;
    padding: .1875rem .5625rem;
    border-radius: 999px;
    background: var(--ccg-calm);
    color: var(--ccg-heading);
    font-size: .75rem;
    line-height: 1.5;
    font-weight: 600;
}

/* The years sit on one line and scroll sideways; an edge fades out only
   while there is more past it (event-photos.js sets data-more). */
.event-years-scroll {
    --fade: 40px;
    min-width: 0;
    margin: -6px;
}

.event-years {
    --fade-start: 0px;
    --fade-end: 0px;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 6px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent);
}

.event-years::-webkit-scrollbar {
    display: none;
}

.event-years > li {
    flex: none;
    scroll-snap-align: start;
}

.event-years-scroll[data-more~="start"] .event-years {
    --fade-start: var(--fade);
}

.event-years-scroll[data-more~="end"] .event-years {
    --fade-end: var(--fade);
}

.event-year {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 .75rem;
    border: 1.5px solid var(--ccg-calm-hover);
    border-radius: 999px;
    background: var(--ccg-surface);
    color: var(--ccg-heading);
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}

button.event-year {
    font-family: inherit;
    cursor: pointer;
    transition: background-color var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}

button.event-year:hover {
    border-color: var(--ccg-primary);
}

.event-year-latest,
.event-year.active {
    border-color: var(--ccg-primary);
    background: var(--ccg-primary);
    color: #FFFFFF;
}

/* A year's photographs in the frame of the hero's showcase cards, tilted and
   overlapping in a row; the one under the pointer straightens and comes forward. */
.event-card {
    container-type: inline-size;
}

/* Five cards overlapping by a third take 3.6 card widths, so a narrow event card shrinks them to fit. */
.event-photos {
    --w: min(112px, 26cqi);
    --overlap: .35;
    display: flex;
    align-items: flex-end;
    margin: 0;
    padding: .75rem 0 .25rem .25rem;
}

.events-featured .event-photos {
    --w: 152px;
    --overlap: .22;
}

.event-photos > li {
    position: relative;
    flex: none;
    width: var(--w);
    margin-left: calc(var(--w) * var(--overlap) * -1);
}

.event-photos > li:first-child {
    margin-left: 0;
}

.event-photos > li:nth-child(1) { --r: -4deg; --i: 0; z-index: 5; }
.event-photos > li:nth-child(2) { --r: 3deg; --i: 1; z-index: 4; }
.event-photos > li:nth-child(3) { --r: -2deg; --i: 2; z-index: 3; }
.event-photos > li:nth-child(4) { --r: 4deg; --i: 3; z-index: 2; }
.event-photos > li:nth-child(5) { --r: -3deg; --i: 4; z-index: 1; }

.event-photos > li:hover,
.event-photos > li:focus-within {
    z-index: 6;
}

.event-photo {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    padding: 6px;
    border-radius: 16px;
    background: var(--ccg-surface);
    box-shadow: 0 1px 2px rgb(29 42 58 / .08), 0 10px 26px -12px rgb(29 42 58 / .35);
    transform: rotate(var(--r));
    transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}

.events-featured .event-photo {
    padding: 8px;
    border-radius: 18px;
}

.event-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
}

.events-featured .event-photo img {
    border-radius: 12px;
}

.event-photo:hover,
.event-photo:focus-visible {
    transform: translateY(-10px) scale(1.06);
}

/* Each year's cards are dealt in when its tab shows them. */
@media (prefers-reduced-motion: no-preference) {
    .event-photo {
        animation: event-photo-deal .35s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * 45ms) backwards;
    }
}

@keyframes event-photo-deal {
    from {
        opacity: 0;
        translate: calc(var(--i) * -40%) 0;
    }
}

.event-photo-more {
    position: absolute;
    inset: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgb(31 56 100 / .62);
    color: #FFFFFF;
    font-size: 1.375rem;
    font-weight: 700;
}

.events-featured .event-photo-more {
    inset: 8px;
    border-radius: 12px;
    font-size: 1.75rem;
}

/* On a phone the row becomes a hand of cards fanned round a point below it:
   the first photograph upright in the middle and on top, the next ones
   alternating behind it, the +N on the far right. */
@media (max-width: 575.98px) {
    .event-photos,
    .events-featured .event-photos {
        --w: min(30vw, 132px);
        justify-content: center;
        padding: 1.25rem 0 .5rem;
    }

    .event-photos > li,
    .event-photos > li:first-child {
        margin-inline: calc(var(--w) * -.38);
    }

    .event-photos > li:nth-child(1) { --r: 0deg; order: 3; }
    .event-photos > li:nth-child(2) { --r: -6deg; order: 2; }
    .event-photos > li:nth-child(3) { --r: 6deg; order: 4; }
    .event-photos > li:nth-child(4) { --r: -11deg; order: 1; }
    .event-photos > li:nth-child(5) { --r: 11deg; order: 5; }
    .event-photos > li:nth-child(2):last-child { --r: 6deg; order: 4; }

    .event-photo,
    .events-featured .event-photo {
        padding: 6px;
        border-radius: 16px;
        transform-origin: 50% 130%;
    }

    .event-photo:hover,
    .event-photo:focus-visible {
        transform: rotate(var(--r)) translateY(-14px);
    }

    .events-featured .event-photo-more {
        inset: 6px;
        border-radius: 11px;
    }

    .event-photos > li:nth-child(5) .event-photo-more {
        justify-content: flex-end;
        padding-right: 6%;
        font-size: 1.125rem;
    }
}

@media (min-width: 992px) {
    .event-card {
        padding: 1.375rem;
    }

    .event-name {
        font-size: 1.0625rem;
    }
}
