/* One rule block per Figma component, named to match so Code Connect can map them 1:1.
   Modifiers mirror the Figma variant properties (Variant/Size/Tone/State/Decision). */

/* ---------------------------------------------------------------- Button */
.gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gc-space-xs);
    min-height: var(--gc-control-md);
    padding: 0 var(--gc-space-md);
    border: 1px solid transparent;
    border-radius: var(--gc-radius-sm);
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-medium);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--gc-transition-fast), border-color var(--gc-transition-fast), color var(--gc-transition-fast);
}

.gc-btn:hover {
    text-decoration: none;
}

.gc-btn:focus-visible {
    outline: none;
    box-shadow: var(--gc-ring-focus);
}

.gc-btn:disabled,
.gc-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

.gc-btn--primary {
    background: var(--gc-action-primary);
    border-color: var(--gc-action-primary);
    color: var(--gc-text-on-brand);
}

.gc-btn--primary:hover:not(:disabled) {
    background: var(--gc-action-primary-hover);
    border-color: var(--gc-action-primary-hover);
    color: var(--gc-text-on-brand);
}

.gc-btn--secondary {
    background: var(--gc-bg-surface);
    border-color: var(--gc-border-default);
    color: var(--gc-text-primary);
}

.gc-btn--secondary:hover:not(:disabled) {
    background: var(--gc-bg-hover);
    border-color: var(--gc-border-strong);
}

.gc-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--gc-text-link);
}

.gc-btn--ghost:hover:not(:disabled) {
    background: var(--gc-action-subtle);
}

.gc-btn--danger {
    background: var(--gc-deny-solid);
    border-color: var(--gc-deny-solid);
    color: var(--gc-neutral-0);
}

.gc-btn--danger:hover:not(:disabled) {
    background: var(--gc-deny-700);
    border-color: var(--gc-deny-700);
}

.gc-btn--warning {
    background: var(--gc-soft-solid);
    border-color: var(--gc-soft-solid);
    color: var(--gc-neutral-900, #1a1408);
}

.gc-btn--warning:hover:not(:disabled) {
    filter: brightness(0.95);
}

.gc-btn--success {
    background: var(--gc-allow-solid);
    border-color: var(--gc-allow-solid);
    color: var(--gc-neutral-0);
}

.gc-btn--success:hover:not(:disabled) {
    background: var(--gc-allow-700);
    border-color: var(--gc-allow-700);
}

.gc-btn--lg {
    min-height: var(--gc-control-lg);
    padding: 0 var(--gc-space-lg);
    font-size: 16px;
    line-height: 24px;
}

.gc-btn--kiosk {
    min-height: var(--gc-touch-kiosk);
    padding: 0 var(--gc-space-xl);
    border-radius: var(--gc-radius-md);
    font-size: 20px;
    line-height: 28px;
    font-weight: var(--gc-weight-semibold);
}

.gc-btn--block {
    width: 100%;
}

.gc-btn-group {
    display: inline-flex;
}

.gc-btn-group .gc-btn {
    border-radius: 0;
}

.gc-btn-group .gc-btn:first-child {
    border-start-start-radius: var(--gc-radius-sm);
    border-end-start-radius: var(--gc-radius-sm);
}

.gc-btn-group .gc-btn:last-child {
    border-start-end-radius: var(--gc-radius-sm);
    border-end-end-radius: var(--gc-radius-sm);
}

.gc-btn-group .gc-btn + .gc-btn {
    margin-inline-start: -1px;
}

/* ---------------------------------------------------------------- Icon */
.gc-icon {
    width: var(--gc-icon-md);
    height: var(--gc-icon-md);
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gc-icon--sm { width: var(--gc-icon-sm); height: var(--gc-icon-sm); }
.gc-icon--lg { width: var(--gc-icon-lg); height: var(--gc-icon-lg); }
.gc-icon--xl { width: var(--gc-icon-xl); height: var(--gc-icon-xl); }

/* ---------------------------------------------------------------- Card */
.gc-card {
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    box-shadow: var(--gc-shadow-card);
    padding: var(--gc-space-lg);
}

.gc-card--raised {
    background: var(--gc-bg-raised);
    box-shadow: var(--gc-shadow-raised);
}

.gc-card--flush {
    padding: 0;
    overflow: hidden;
}

.gc-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gc-space-md);
    margin-bottom: var(--gc-space-md);
}

.gc-card__title {
    font-size: 16px;
    line-height: 24px;
    font-weight: var(--gc-weight-semibold);
}

.gc-card__footer {
    display: flex;
    align-items: center;
    gap: var(--gc-space-xs);
    margin-top: var(--gc-space-lg);
    padding-top: var(--gc-space-md);
    border-top: 1px solid var(--gc-border-subtle);
}

/* ---------------------------------------------------------------- CardTile */
/* Figma "CardTile" (node 44:67): a horizontal tile — icon chip + text column +
   trailing chevron — used by the home area chooser and the guide index pages. */
.gc-card-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: var(--gc-space-lg);
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-default);
    border-radius: var(--gc-radius-lg);
    box-shadow: var(--gc-shadow-card);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--gc-transition-fast), box-shadow var(--gc-transition-fast);
}

.gc-card-tile:hover {
    border-color: var(--gc-border-focus);
    box-shadow: var(--gc-shadow-raised);
    text-decoration: none;
}

/* The icon chip. Also matches the bare <Icon class="gc-card-tile__icon"> used by
   the guide index pages so both surfaces render an identical 40px chip. */
.gc-card-tile__chip,
.gc-card-tile__icon {
    flex: none;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gc-action-subtle);
    border-radius: var(--gc-radius-md);
    color: var(--gc-action-primary);
    margin: 0;
}

.gc-card-tile__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-2xs);
}

.gc-card-tile__title {
    font-size: 16px;
    line-height: 24px;
    font-weight: var(--gc-weight-semibold);
    color: var(--gc-text-primary);
}

.gc-card-tile__blurb {
    font-size: 14px;
    line-height: 20px;
    color: var(--gc-text-secondary);
}

.gc-card-tile__chevron {
    flex: none;
    color: var(--gc-text-muted);
}

/* ------------------------------------------------------- Home area chooser */
/* Figma "Screen/home": Display/L welcome + Body/L lead + wrap grid of CardTiles. */
.gc-home__welcome {
    margin: 0;
    font-size: 36px;
    line-height: 44px;
    font-weight: var(--gc-weight-bold);
    letter-spacing: -0.015em;
    color: var(--gc-text-primary);
}

.gc-home__lead {
    margin: var(--gc-space-2xs) 0 0;
    font-size: 18px;
    line-height: 28px;
    color: var(--gc-text-secondary);
}

.gc-home__tiles {
    margin-top: var(--gc-space-lg);
    align-items: stretch;
}

/* ---------------------------------------------------------------- StatCard */
.gc-stat-card {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-2xs);
    padding: var(--gc-space-lg);
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-subtle);
    border-inline-start: 3px solid var(--gc-border-strong);
    border-radius: var(--gc-radius-md);
    box-shadow: var(--gc-shadow-card);
}

.gc-stat-card__label {
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--gc-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gc-text-muted);
}

.gc-stat-card__value {
    font-size: 30px;
    line-height: 38px;
    font-weight: var(--gc-weight-semibold);
    letter-spacing: -0.01em;
}

/* For stat cards whose value is text (a date, a word) rather than a big number. */
.gc-stat-card__value--sm {
    font-size: 18px;
    line-height: 26px;
}

.gc-stat-card__caption {
    font-size: 13px;
    line-height: 18px;
    color: var(--gc-text-secondary);
}

.gc-stat-card--allow { border-inline-start-color: var(--gc-allow-solid); }
.gc-stat-card--allow .gc-stat-card__value { color: var(--gc-allow-text); }
.gc-stat-card--soft { border-inline-start-color: var(--gc-soft-solid); }
.gc-stat-card--soft .gc-stat-card__value { color: var(--gc-soft-text); }
.gc-stat-card--deny { border-inline-start-color: var(--gc-deny-solid); }
.gc-stat-card--deny .gc-stat-card__value { color: var(--gc-deny-text); }

a.gc-stat-card--link {
    color: inherit;
    text-decoration: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

a.gc-stat-card--link:hover {
    text-decoration: none;
    border-color: var(--gc-border-strong);
    box-shadow: var(--gc-shadow-card), 0 0 0 1px var(--gc-border-subtle);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------------- Badge */
.gc-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2xs);
    padding: 2px var(--gc-space-xs);
    border: 1px solid var(--gc-offline-border);
    border-radius: var(--gc-radius-full);
    background: var(--gc-offline-bg);
    color: var(--gc-offline-text);
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--gc-weight-semibold);
    white-space: nowrap;
}

.gc-badge--allow {
    background: var(--gc-allow-bg);
    border-color: var(--gc-allow-border);
    color: var(--gc-allow-text);
}

.gc-badge--soft {
    background: var(--gc-soft-bg);
    border-color: var(--gc-soft-border);
    color: var(--gc-soft-text);
}

.gc-badge--deny {
    background: var(--gc-deny-bg);
    border-color: var(--gc-deny-border);
    color: var(--gc-deny-text);
}

.gc-badge--info {
    background: var(--gc-action-subtle);
    border-color: var(--gc-brand-300);
    color: var(--gc-text-link);
}

/* ---------------------------------------------------------------- DecisionChip */
.gc-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2xs);
    padding: var(--gc-space-2xs) var(--gc-space-sm);
    border: 1px solid var(--gc-offline-border);
    border-radius: var(--gc-radius-full);
    background: var(--gc-offline-bg);
    color: var(--gc-offline-text);
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-semibold);
    white-space: nowrap;
}

.gc-chip--allow {
    background: var(--gc-allow-bg);
    border-color: var(--gc-allow-border);
    color: var(--gc-allow-text);
}

.gc-chip--soft-deny {
    background: var(--gc-soft-bg);
    border-color: var(--gc-soft-border);
    color: var(--gc-soft-text);
}

.gc-chip--hard-deny {
    background: var(--gc-deny-bg);
    border-color: var(--gc-deny-border);
    color: var(--gc-deny-text);
}

.gc-chip--solid {
    border-color: transparent;
    background: var(--gc-offline-solid);
    color: var(--gc-neutral-0);
}

.gc-chip--solid.gc-chip--allow { background: var(--gc-allow-solid); }
.gc-chip--solid.gc-chip--soft-deny { background: var(--gc-soft-solid); }
.gc-chip--solid.gc-chip--hard-deny { background: var(--gc-deny-solid); }
.gc-chip--solid.gc-chip--allow,
.gc-chip--solid.gc-chip--soft-deny,
.gc-chip--solid.gc-chip--hard-deny { color: var(--gc-neutral-0); }

.gc-chip--lg {
    padding: var(--gc-space-xs) var(--gc-space-md);
    font-size: 18px;
    line-height: 24px;
}

/* ---------------------------------------------------------------- Field / Input / Select / Textarea */
.gc-field {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-2xs);
}

.gc-field__label {
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-medium);
    color: var(--gc-text-secondary);
}

.gc-field__hint {
    font-size: 13px;
    line-height: 18px;
    color: var(--gc-text-muted);
}

.gc-suggest {
    position: relative;
}

.gc-suggest:focus-within {
    z-index: 50;
}

.gc-suggest__list {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 50;
    margin: 0;
    padding: var(--gc-space-2xs);
    list-style: none;
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--gc-border-default);
    border-radius: var(--gc-radius-md);
    background: var(--gc-bg-surface);
    box-shadow: var(--gc-shadow-raised);
}

.gc-suggest__option {
    padding: 0.5rem 0.75rem;
    border-radius: var(--gc-radius-sm);
    cursor: pointer;
    color: var(--gc-text-primary);
    touch-action: manipulation;
}

.gc-suggest__option:hover,
.gc-suggest__option.is-active {
    background: var(--gc-bg-sunken);
}

.gc-field__error {
    font-size: 13px;
    line-height: 18px;
    color: var(--gc-deny-text);
}

.gc-input,
.gc-select,
.gc-textarea {
    width: 100%;
    min-height: var(--gc-control-md);
    padding: var(--gc-space-xs) var(--gc-space-sm);
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-default);
    border-radius: var(--gc-radius-sm);
    color: var(--gc-text-primary);
    font-size: 14px;
    line-height: 20px;
    transition: border-color var(--gc-transition-fast), box-shadow var(--gc-transition-fast);
}

.gc-input::placeholder,
.gc-textarea::placeholder {
    color: var(--gc-text-muted);
}

.gc-input:focus,
.gc-select:focus,
.gc-textarea:focus {
    outline: none;
    border-color: var(--gc-border-focus);
    box-shadow: var(--gc-ring-focus);
}

.gc-input:disabled,
.gc-select:disabled,
.gc-textarea:disabled {
    background: var(--gc-bg-sunken);
    color: var(--gc-text-muted);
    cursor: not-allowed;
}

/* .valid/.invalid/.modified are applied by Blazor's EditForm field CSS classes */
.gc-input.invalid,
.gc-select.invalid,
.gc-textarea.invalid,
.gc-input[aria-invalid="true"],
.gc-select[aria-invalid="true"],
.gc-textarea[aria-invalid="true"] {
    border-color: var(--gc-deny-solid);
}

.gc-input.valid.modified:not([type="checkbox"]),
.gc-select.valid.modified,
.gc-textarea.valid.modified {
    border-color: var(--gc-allow-solid);
}

.gc-input--lg,
.gc-select--lg {
    min-height: var(--gc-control-lg);
    font-size: 16px;
    line-height: 24px;
}

.gc-password {
    position: relative;
}

.gc-password .gc-input {
    padding-inline-end: var(--gc-control-md);
}

.gc-password__toggle {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--gc-control-md);
    height: var(--gc-control-md);
    padding: 0;
    border: 0;
    border-radius: var(--gc-radius-sm);
    background: transparent;
    color: var(--gc-text-muted);
    cursor: pointer;
}

.gc-password__toggle:hover {
    color: var(--gc-text-primary);
}

.gc-password__toggle:focus-visible {
    outline: none;
    box-shadow: var(--gc-ring-focus);
}

.gc-password__toggle[aria-pressed="true"] .gc-password__icon--show,
.gc-password__toggle[aria-pressed="false"] .gc-password__icon--hide {
    display: none;
}

.gc-select {
    appearance: none;
    padding-inline-end: var(--gc-space-xl);
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 18px center, right 13px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.gc-textarea {
    min-height: 96px;
    resize: vertical;
}

.gc-checkbox {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-xs);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.gc-checkbox input[type="checkbox"],
.gc-checkbox input[type="radio"] {
    width: var(--gc-icon-md);
    height: var(--gc-icon-md);
    accent-color: var(--gc-action-primary);
    cursor: pointer;
}

.gc-file-upload {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-xs);
    padding: var(--gc-space-lg);
    border: 1px dashed var(--gc-border-strong);
    border-radius: var(--gc-radius-md);
    background: var(--gc-bg-sunken);
    text-align: center;
}

.gc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: var(--gc-space-md);
}

.gc-form-actions {
    display: flex;
    align-items: center;
    gap: var(--gc-space-xs);
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------- InlineFormCard */
.gc-inline-form {
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    box-shadow: var(--gc-shadow-card);
    padding: var(--gc-space-lg);
    margin-bottom: var(--gc-space-lg);
}

.gc-inline-form__title {
    font-size: 16px;
    line-height: 24px;
    font-weight: var(--gc-weight-semibold);
    margin-bottom: var(--gc-space-md);
}

/* ---------------------------------------------------------------- Alert */
.gc-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--gc-space-sm);
    padding: var(--gc-space-sm) var(--gc-space-md);
    border: 1px solid var(--gc-brand-300);
    border-radius: var(--gc-radius-sm);
    background: var(--gc-action-subtle);
    color: var(--gc-text-link);
    font-size: 14px;
    line-height: 20px;
}

.gc-alert--success {
    background: var(--gc-allow-bg);
    border-color: var(--gc-allow-border);
    color: var(--gc-allow-text);
}

.gc-alert--warning {
    background: var(--gc-soft-bg);
    border-color: var(--gc-soft-border);
    color: var(--gc-soft-text);
}

.gc-alert--danger {
    background: var(--gc-deny-bg);
    border-color: var(--gc-deny-border);
    color: var(--gc-deny-text);
}

.gc-alert__icon {
    margin-top: 2px;
}

/* ---------------------------------------------------------------- Table */
.gc-table-wrap {
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    box-shadow: var(--gc-shadow-card);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gc-table {
    width: 100%;
    font-size: 14px;
    line-height: 20px;
}

.gc-table th,
.gc-table td {
    padding: var(--gc-space-sm) var(--gc-space-md);
    text-align: start;
    vertical-align: middle;
}

.gc-table thead th {
    background: var(--gc-bg-sunken);
    border-bottom: 1px solid var(--gc-border-subtle);
    color: var(--gc-text-muted);
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--gc-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gc-table tbody tr + tr td {
    border-top: 1px solid var(--gc-border-subtle);
}

.gc-table tbody tr:hover td {
    background: var(--gc-bg-hover);
}

.gc-table__actions {
    display: flex;
    gap: var(--gc-space-2xs);
    justify-content: flex-end;
    white-space: nowrap;
}

.gc-table__numeric {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.gc-table__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gc-space-sm);
    border-top: 1px solid var(--gc-border-subtle);
}

.gc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gc-space-xs);
    padding: var(--gc-space-3xl) var(--gc-space-lg);
    text-align: center;
    color: var(--gc-text-secondary);
}

.gc-empty-state__title {
    font-size: 16px;
    line-height: 24px;
    font-weight: var(--gc-weight-semibold);
    color: var(--gc-text-primary);
}

/* ---------------------------------------------------------------- GateStatusCard */
.gc-gate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gc-space-md);
    padding: var(--gc-space-md);
    background: var(--gc-bg-surface);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
}

.gc-gate-card__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--gc-radius-full);
    background: var(--gc-offline-solid);
    flex: none;
}

.gc-gate-card--online .gc-gate-card__dot { background: var(--gc-allow-solid); }
.gc-gate-card--degraded .gc-gate-card__dot { background: var(--gc-soft-solid); }
.gc-gate-card--offline .gc-gate-card__dot { background: var(--gc-offline-solid); }
.gc-gate-card--closed .gc-gate-card__dot { background: var(--gc-offline-solid); }
.gc-gate-card--opening {
    border-color: var(--gc-soft-solid);
}
.gc-gate-card--opening .gc-gate-card__dot { background: var(--gc-soft-solid); }
.gc-gate-card--open {
    border-color: var(--gc-allow-solid);
}
.gc-gate-card--open .gc-gate-card__dot { background: var(--gc-allow-solid); }

/* ---------------------------------------------------------------- EventRow */
.gc-event-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--gc-space-md);
    padding: var(--gc-space-md);
    border: 1px solid var(--gc-border-subtle);
    border-inline-start: 4px solid var(--gc-offline-solid);
    border-radius: var(--gc-radius-md);
    background: var(--gc-bg-surface);
    min-height: var(--gc-touch-min);
    box-shadow: var(--gc-shadow-card);
}

.gc-event-row--allow { border-inline-start-color: var(--gc-allow-solid); }
.gc-event-row--soft-deny {
    border-inline-start-color: var(--gc-soft-solid);
    border-color: var(--gc-soft-border);
    background: var(--gc-soft-bg);
}
.gc-event-row--hard-deny {
    border-inline-start-color: var(--gc-deny-solid);
    border-color: var(--gc-deny-border);
    background: var(--gc-deny-bg);
}

.gc-event-row--needs-ack {
    box-shadow: var(--gc-ring-alert);
}

.gc-event-row__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 72px;
}

.gc-event-row__time {
    font-family: var(--gc-font-mono);
    font-size: 13px;
    line-height: 18px;
    color: var(--gc-text-muted);
}

.gc-event-row__direction {
    font-size: 11px;
    line-height: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gc-text-muted);
    font-weight: var(--gc-weight-semibold);
}

.gc-event-row__plate {
    font-family: var(--gc-font-mono);
    font-size: 18px;
    line-height: 24px;
    font-weight: var(--gc-weight-bold);
    text-transform: uppercase;
}

.gc-event-row__detail {
    font-size: 14px;
    line-height: 20px;
    color: var(--gc-text-secondary);
}

.gc-event-row__reason {
    margin-top: 2px;
    font-size: 13px;
    line-height: 18px;
    color: var(--gc-text-secondary);
}

.gc-event-row__tags {
    margin-top: 2px;
    font-family: var(--gc-font-mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--gc-text-muted);
}

/* ---------------------------------------------------------------- GuideCallout */
.gc-callout {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-2xs);
    padding: var(--gc-space-md);
    margin: var(--gc-space-md) 0;
    border: 1px solid var(--gc-brand-300);
    border-inline-start-width: 4px;
    border-radius: var(--gc-radius-sm);
    background: var(--gc-action-subtle);
}

.gc-callout__title {
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-semibold);
    color: var(--gc-text-link);
}

.gc-callout__body {
    font-size: 14px;
    line-height: 20px;
    color: var(--gc-text-secondary);
}

.gc-callout--warning {
    background: var(--gc-soft-bg);
    border-color: var(--gc-soft-border);
}

.gc-callout--warning .gc-callout__title {
    color: var(--gc-soft-text);
}

.gc-callout--tip {
    background: var(--gc-allow-bg);
    border-color: var(--gc-allow-border);
}

.gc-callout--tip .gc-callout__title {
    color: var(--gc-allow-text);
}

/* ---------------------------------------------------------------- Detail summary */
/* Read-only key/value summary used on detail pages (e.g. the community overview)
   so a record can be reviewed at a glance without turning the panel into a form.
   Renders as a tidy two-column list of "label … value" rows with hairline dividers. */
.gc-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 0 var(--gc-space-2xl);
    margin: 0;
}

.gc-detail-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--gc-space-md);
    min-width: 0;
    padding: var(--gc-space-sm) 0;
    border-bottom: 1px solid var(--gc-border-subtle);
}

.gc-detail-item__label {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 20px;
    color: var(--gc-text-muted);
}

.gc-detail-item__value {
    margin: 0;
    text-align: right;
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-semibold);
    color: var(--gc-text-primary);
    overflow-wrap: anywhere;
}

.gc-detail-item__value--muted {
    font-weight: var(--gc-weight-medium);
    color: var(--gc-text-muted);
}

/* A subtly separated block for destructive / lifecycle actions on a detail card. */
.gc-danger-zone {
    margin-top: var(--gc-space-xs);
    padding-top: var(--gc-space-md);
    border-top: 1px solid var(--gc-border-subtle);
}

.gc-danger-zone__label {
    display: block;
    margin-bottom: var(--gc-space-xs);
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--gc-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gc-text-muted);
}

/* ---------------------------------------------------------------- Code block */
.gc-code-block {
    margin: 0 0 var(--gc-space-md);
    padding: var(--gc-space-md);
    overflow-x: auto;
    background: var(--gc-bg-sunken);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-sm);
    color: var(--gc-text-primary);
    font-family: var(--gc-font-mono);
    font-size: 14px;
    line-height: 20px;
    white-space: pre;
}

/* ---------------------------------------------------------------- FaqItem */
.gc-faq-item {
    padding-bottom: var(--gc-space-lg);
    margin-bottom: var(--gc-space-lg);
    border-bottom: 1px solid var(--gc-border-subtle);
}

.gc-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.gc-faq-item__question {
    font-size: 16px;
    line-height: 24px;
    font-weight: var(--gc-weight-semibold);
    margin-bottom: var(--gc-space-2xs);
}

.gc-faq-item__answer {
    color: var(--gc-text-secondary);
}

/* ---------------------------------------------------------------- LocalePicker / ThemeToggle */
.gc-locale-picker,
.gc-theme-toggle {
    display: inline-flex;
    border: 1px solid var(--gc-border-default);
    border-radius: var(--gc-radius-sm);
    overflow: hidden;
}

.gc-locale-picker__option,
.gc-theme-toggle__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gc-space-2xs);
    min-width: var(--gc-control-sm);
    min-height: var(--gc-control-sm);
    padding: 0 var(--gc-space-xs);
    background: var(--gc-bg-surface);
    color: var(--gc-text-secondary);
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--gc-weight-semibold);
    text-decoration: none;
}

.gc-locale-picker__option:hover,
.gc-theme-toggle__option:hover {
    background: var(--gc-bg-hover);
    text-decoration: none;
}

.gc-locale-picker__option + .gc-locale-picker__option,
.gc-theme-toggle__option + .gc-theme-toggle__option {
    border-inline-start: 1px solid var(--gc-border-default);
}

.gc-locale-picker__option[aria-current="true"],
.gc-theme-toggle__option[aria-current="true"] {
    background: var(--gc-action-primary);
    color: var(--gc-text-on-brand);
}

/* ---------------------------------------------------------------- Marketing header / footer */
.gc-marketing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gc-space-md);
    flex-wrap: wrap;
    padding: var(--gc-space-md) var(--gc-space-xl);
    background: var(--gc-bg-nav);
    border-bottom: 1px solid var(--gc-neutral-800);
}

.gc-marketing-header__brand {
    font-size: 18px;
    line-height: 28px;
    font-weight: var(--gc-weight-bold);
    color: var(--gc-neutral-0);
    letter-spacing: -0.005em;
}

.gc-marketing-header__brand:hover {
    color: var(--gc-neutral-0);
    text-decoration: none;
}

.gc-marketing-header__tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--gc-space-md);
    flex: 1 1 auto;
    min-width: 0;
}

.gc-marketing-header__actions {
    flex: none;
}

.gc-marketing-header__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--gc-space-md) var(--gc-space-lg);
    list-style: none;
}

.gc-marketing-header__nav a {
    color: var(--gc-neutral-300);
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-medium);
}

.gc-marketing-header__nav a:hover {
    color: var(--gc-neutral-0);
}

.gc-marketing-header__nav a[aria-current="page"] {
    color: var(--gc-neutral-0);
    font-weight: var(--gc-weight-semibold);
}

.gc-marketing-header .gc-locale-picker {
    border-color: var(--gc-neutral-700);
}

.gc-marketing-header .gc-locale-picker__option {
    background: transparent;
    color: var(--gc-neutral-300);
}

.gc-marketing-header .gc-locale-picker__option[aria-current="true"] {
    background: var(--gc-action-primary);
    color: var(--gc-text-on-brand);
}

.gc-marketing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gc-space-md);
    flex-wrap: wrap;
    padding: var(--gc-space-xl);
    border-top: 1px solid var(--gc-neutral-800);
    background: var(--gc-bg-nav);
    color: var(--gc-neutral-400);
    font-size: 14px;
    line-height: 20px;
}

.gc-marketing-footer a {
    color: var(--gc-neutral-300);
}

.gc-marketing-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gc-space-md);
}

.gc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--gc-space-2xs);
    min-height: 32px;
    padding: 0 var(--gc-space-sm);
    border: 1px solid var(--gc-border-default);
    border-radius: var(--gc-radius-full);
    background: transparent;
    color: var(--gc-text-secondary);
    font-size: 13px;
    line-height: 18px;
    font-weight: var(--gc-weight-medium);
    cursor: pointer;
}

.gc-filter-chip:hover {
    background: var(--gc-bg-hover);
}

.gc-filter-chip--active {
    background: var(--gc-action-primary);
    border-color: var(--gc-action-primary);
    color: var(--gc-text-on-brand);
}

.gc-live-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--gc-radius-full);
    background: var(--gc-allow-solid);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-allow-solid) 25%, transparent);
}

/* ---------------------------------------------------------------- NavItem */
.gc-nav-item {
    display: flex;
    align-items: center;
    gap: var(--gc-space-sm);
    min-height: var(--gc-touch-min);
    padding: 0 var(--gc-space-md);
    border-radius: var(--gc-radius-sm);
    color: var(--gc-text-on-nav);
    font-size: 14px;
    line-height: 20px;
    font-weight: var(--gc-weight-medium);
    text-decoration: none;
}

.gc-nav-item:hover {
    background: var(--gc-bg-nav-active);
    color: var(--gc-neutral-0);
    text-decoration: none;
}

.gc-nav-item.active,
.gc-nav-item[aria-current="page"] {
    background: var(--gc-bg-nav-active);
    color: var(--gc-neutral-0);
    box-shadow: inset 3px 0 0 var(--gc-action-primary);
}

/* ---------------------------------------------------- Inbox / threads */
.gc-thread-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-2xs);
}

.gc-thread-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: var(--gc-space-sm) var(--gc-space-md);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-sm);
    background: var(--gc-bg-surface);
    color: var(--gc-text-primary);
    cursor: pointer;
}

.gc-thread-item:hover {
    background: var(--gc-bg-hover);
}

.gc-thread-item.is-active {
    border-color: var(--gc-border-focus);
    box-shadow: inset 3px 0 0 var(--gc-action-primary);
}

.gc-thread-item__subject {
    font-weight: var(--gc-weight-medium);
}

.gc-thread-item__preview {
    font-size: 13px;
    color: var(--gc-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------- Message bubbles */
.gc-message {
    max-width: 80%;
    padding: var(--gc-space-sm) var(--gc-space-md);
    border-radius: var(--gc-radius-md);
    border: 1px solid var(--gc-border-subtle);
    background: var(--gc-bg-sunken);
}

.gc-message--out {
    align-self: flex-end;
    background: var(--gc-soft-bg);
    border-color: var(--gc-soft-border);
}

.gc-message__author {
    font-size: 12px;
    font-weight: var(--gc-weight-medium);
    color: var(--gc-text-secondary);
}

.gc-message__body {
    color: var(--gc-text-primary);
}

.gc-message__time {
    font-size: 11px;
    color: var(--gc-text-muted);
}

/* ---------------------------------------------------- Stepper */
.gc-stepper {
    display: flex;
    gap: var(--gc-space-sm);
    flex-wrap: wrap;
}

.gc-stepper__step {
    display: flex;
    align-items: center;
    gap: var(--gc-space-xs);
    padding: var(--gc-space-xs) var(--gc-space-md);
    border-radius: var(--gc-radius-full);
    border: 1px solid var(--gc-border-subtle);
    color: var(--gc-text-muted);
    font-size: 13px;
}

.gc-stepper__step.is-active {
    border-color: var(--gc-border-focus);
    color: var(--gc-text-primary);
    background: var(--gc-soft-bg);
    font-weight: var(--gc-weight-medium);
}

.gc-stepper__step.is-done {
    color: var(--gc-allow-text);
    border-color: var(--gc-allow-border);
    background: var(--gc-allow-bg);
}

/* ---------------------------------------------------- Camera tiles */
.gc-camera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: var(--gc-space-md);
}

.gc-camera-tile {
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-xs);
    padding: var(--gc-space-md);
    border: 1px solid var(--gc-border-subtle);
    border-radius: var(--gc-radius-md);
    background: var(--gc-bg-sunken);
}

.gc-camera-tile__preview {
    aspect-ratio: 16 / 9;
    border-radius: var(--gc-radius-sm);
    background: var(--gc-bg-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gc-text-muted);
}

.gc-camera-tile__name {
    font-weight: var(--gc-weight-medium);
    color: var(--gc-text-primary);
}

.gc-camera-tile__meta {
    font-size: 12px;
    color: var(--gc-text-muted);
}

.gc-stat-card__hint {
    font-size: 12px;
    color: var(--gc-text-muted);
}

@media (max-width: 639.98px) {
    .gc-btn {
        white-space: normal;
    }

    .gc-btn-group {
        flex-wrap: wrap;
        width: 100%;
    }

    .gc-btn-group .gc-btn {
        flex: 1 1 auto;
    }

    .gc-inline-form {
        padding: var(--gc-space-md);
    }

    .gc-stepper {
        gap: var(--gc-space-xs);
    }

    .gc-stepper__step {
        flex: 1 1 auto;
        justify-content: center;
        padding: var(--gc-space-xs) var(--gc-space-sm);
        font-size: 12px;
    }

    .gc-locale-picker,
    .gc-theme-toggle {
        flex: none;
    }
}

/* ---------------------------------------------------------------------------
   Face enrollment (docs/adr/0006)
   --------------------------------------------------------------------------- */
.gc-face-enroll__capture {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: var(--gc-space-md, 1rem);
  align-items: start;
}

@media (max-width: 640px) {
  .gc-face-enroll__capture {
    grid-template-columns: 1fr;
  }
}

.gc-face-enroll__camera {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--gc-radius-md, 12px);
  overflow: hidden;
  background: var(--gc-color-surface-2, #f1f3f5);
  border: 1px dashed var(--gc-color-border, #cbd2d9);
}

.gc-face-enroll__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.gc-face-enroll__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
}

.gc-face-enroll__thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gc-face-enroll__thumb {
  position: relative;
  margin: 0;
  width: 96px;
  height: 96px;
  border-radius: var(--gc-radius-sm, 8px);
  overflow: hidden;
  border: 1px solid var(--gc-color-border, #cbd2d9);
}

.gc-face-enroll__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gc-face-enroll__thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 0 0.4rem;
  line-height: 1.4;
}

.gc-face-enroll__consent {
  padding: 0.75rem 1rem;
  border-radius: var(--gc-radius-md, 12px);
  background: var(--gc-color-surface-2, #f1f3f5);
}

.gc-face-enroll__consent-text {
  white-space: pre-wrap;
}

/* Evidence thumbnails in the watchman feed */
.gc-event-row__evidence {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--gc-radius-sm, 8px);
  border: 1px solid var(--gc-color-border, #cbd2d9);
  cursor: zoom-in;
}

.gc-event-row__credential {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.gc-person-link {
    min-height: 2.75rem;
    padding: 0.25rem 0;
    border: 0;
    background: none;
    color: var(--gc-text-link);
    font: inherit;
    text-align: start;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gc-person-link:hover,
.gc-person-link:focus-visible {
    color: var(--gc-text-primary);
}

.gc-dialog {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--gc-space-md);
    background: rgba(0, 0, 0, 0.45);
}

.gc-dialog__panel {
    width: min(24rem, 100%);
    display: flex;
    flex-direction: column;
    gap: var(--gc-space-sm);
    padding: var(--gc-space-lg);
    border-radius: var(--gc-radius-md);
    background: var(--gc-bg-surface);
    box-shadow: var(--gc-shadow-overlay);
}

.gc-dialog__panel--wide {
    width: min(40rem, 100%);
    max-height: min(90vh, 40rem);
    overflow: auto;
}

.gc-dialog .gc-guide {
    max-width: none;
}

.gc-dialog .gc-guide h2 {
    margin-top: var(--gc-space-sm);
}

.gc-dialog__facts {
    display: grid;
    gap: var(--gc-space-xs);
    margin: 0;
}

.gc-dialog__facts dt {
    font-size: 13px;
    color: var(--gc-text-muted);
}

.gc-dialog__facts dd {
    margin: 0;
}

.gc-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gc-space-xs);
}

.gc-low-confidence {
  border-left: 4px solid var(--gc-color-warning, #d97706);
}

.gc-evidence-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: grid;
  place-content: center;
  z-index: 1000;
  cursor: zoom-out;
}

.gc-evidence-lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--gc-radius-md, 12px);
}

.gc-evidence-lightbox__close {
  position: absolute;
  top: var(--gc-space-md, 16px);
  right: var(--gc-space-md, 16px);
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  cursor: pointer;
}

.gc-evidence-lightbox__close:hover,
.gc-evidence-lightbox__close:focus-visible {
  background: rgba(0, 0, 0, 0.7);
}

.gc-toast-body {
  text-align: start;
}

.gc-toast-ref {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.75;
  text-align: start;
}

.gc-range {
  width: 100%;
}
