/* Horizon component styles. Foundations and palettes live in tokens.css; do not add literal colours here. */
@layer h-tokens, horizon;
@import url("tokens.css") layer(h-tokens);
@layer horizon {
/* Brand mark is a dark-on-light asset in light schemes. */
:root {
  --surface-grain: none;
  font-family: var(--h-font-ui);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--h-color-canvas); color: var(--h-color-text); font-size: var(--h-type-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--h-color-accent); outline-offset: 4px; }
svg.h-icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.h-app-shell { min-height: 100vh; }
.h-sidebar { width: 222px; position: fixed; inset: 0 auto 0 0; z-index: var(--h-z-sticky); border-right: 1px solid var(--h-color-line); background: var(--h-color-navigation); display: flex; flex-direction: column; padding: 30px 16px 22px; }
.h-brand { display: flex; align-items: center; gap: var(--h-space-3); padding: 0 13px; font-size: 1.5625rem; letter-spacing: -1.2px; font-weight: 500; }
.h-brand-mark, .h-brand-mark svg { width: 28px; height: 30px; color: var(--h-color-text-secondary); }
.h-brand-period { color: var(--h-color-accent); }
.h-workspace-label { margin: 43px 14px 15px; color: var(--h-color-soft); font-size: var(--h-type-meta); letter-spacing: 1.2px; font-weight: 400; }
#navigation { display: flex; flex-direction: column; gap: 6px; }
.h-nav-item { display: flex; align-items: center; gap: var(--h-space-3); padding: 12px 14px; border-left: 2px solid transparent; color: var(--h-color-soft); font-size: var(--h-type-navigation); transition: background .15s, color .15s; }
.h-nav-item:hover { color: var(--h-color-text); background: color-mix(in srgb, var(--h-color-text) 2%, transparent); }
.h-nav-item.active { color: var(--h-color-accent); background: linear-gradient(90deg, color-mix(in srgb, var(--h-color-text) 4%, transparent), color-mix(in srgb, var(--h-color-text) 1%, transparent)); border-left-color: var(--h-color-accent); }
.h-nav-item .h-icon { width: 16px; height: 16px; color: var(--h-color-soft); }
.h-nav-item.active .h-icon { color: var(--h-color-accent); }

.h-sidebar-bottom { margin-top: auto; padding: 65px 12px 0; }
.h-local-label { display: flex; align-items: center; gap: var(--h-space-2); color: var(--h-color-success); font-size: var(--h-type-meta); }
.h-status-dot { height: 4px; width: 4px; border-radius: 50%; background: var(--h-color-success); flex-shrink: 0; }

.h-preview-note { color: var(--h-color-soft); font-size: var(--h-type-meta); margin: 9px 0 21px; }

.h-avatar { display: grid; place-items: center; width: 30px; height: 32px; color: var(--h-color-text-secondary); background: color-mix(in srgb, var(--h-color-text) 3%, transparent); border: 1px solid color-mix(in srgb, var(--h-color-text) 5%, transparent); font-size: var(--h-type-meta); }

.h-workspace { position: relative; isolation: isolate; margin-left: 222px; min-height: 100vh; }
.h-workspace::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 75% 42% at 90% 10%, color-mix(in srgb, var(--h-color-accent) 23%, transparent), transparent 72%), radial-gradient(ellipse 50% 55% at 32% 62%, color-mix(in srgb, var(--h-color-text) 9%, transparent), transparent 76%), linear-gradient(135deg, color-mix(in srgb, var(--h-color-text) 1%, transparent), transparent 50%); }
.h-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-6); height: 66px; padding: 0 var(--h-page-inset); border-bottom: 1px solid var(--h-color-line); }
.h-breadcrumb { display: flex; gap: 14px; color: var(--h-color-soft); font-size: var(--h-type-control); }
.h-breadcrumb strong { color: var(--h-color-text-secondary); font-weight: 400; }
.h-breadcrumb-slash { color: var(--h-color-faint); }

kbd { font-family: inherit; font-size: var(--h-type-meta); border: 1px solid var(--h-color-line); padding: 3px 5px; border-radius: 2px; color: var(--h-color-soft); }
.h-sample-badge { display: flex; align-items: center; gap: 6px; font-size: var(--h-type-meta); color: var(--h-color-soft); }
.h-sample-badge span { width: 3px; height: 3px; border-radius: 50%; background: var(--h-color-muted); }
.h-icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--h-control-height); height: var(--h-control-height); border-radius: 2px; background: none; color: var(--h-color-soft); }
.h-icon-button:hover { background: color-mix(in srgb, var(--h-color-text) 3%, transparent); }
.h-icon-button i { position: absolute; right: 7px; top: 5px; width: 3px; height: 3px; border-radius: 50%; background: var(--h-color-primary); }
main { max-width: 1610px; margin: 0 auto; padding: var(--h-space-7) var(--h-page-inset) var(--h-space-4); }
.h-page-heading { display: flex; justify-content: space-between; align-items: center; gap: var(--h-space-6); margin-bottom: 22px; }
h1 { font-weight: 500; font-size: var(--h-type-page-title); line-height: 1.2; letter-spacing: -.8px; margin: 0 0 9px; }
.h-page-subtitle { color: var(--h-color-soft); font-size: var(--h-type-control); margin: 0; }
.h-heading-actions { display: flex; align-items: center; gap: 17px; }

.h-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: var(--h-control-height); padding: 0 var(--h-control-pad-x); background: color-mix(in srgb, var(--h-color-text) 1%, transparent); border: 1px solid color-mix(in srgb, var(--h-color-text) 14%, transparent); border-radius: 2px; color: var(--h-color-text-secondary); font-size: var(--h-type-control); line-height: 1.25; white-space: nowrap; transition: background .15s, border-color .15s; }
.h-button:hover { background: color-mix(in srgb, var(--h-color-text) 4%, transparent); border-color: color-mix(in srgb, var(--h-color-text) 24%, transparent); }
.h-button .h-icon { width: 14px; height: 14px; }
.h-button.primary { background: var(--h-color-primary); color: var(--h-color-primary-ink); border-color: var(--h-color-text); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--h-color-text) 14%, transparent); font-weight: 500; }
.h-button.primary:hover { background: var(--h-color-primary); }
.h-button.subtle { border: 0; background: none; height: auto; min-height: 0; padding: 6px 0; color: var(--h-color-text-secondary); font-size: var(--h-type-meta); }
.h-button.subtle:hover { color: var(--h-color-accent); }
.h-button.full { width: 100%; }
.h-eyebrow { font-size: var(--h-type-meta); letter-spacing: 1.2px; color: var(--h-color-soft); font-weight: 400; }

.h-hero { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: 22px 27px; min-height: 143px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--h-color-text) 23%, transparent); border-top-color: color-mix(in srgb, var(--h-color-text) 42%, transparent); border-radius: 2px; background-image: var(--surface-grain), linear-gradient(105deg, color-mix(in srgb, var(--h-color-text) 8%, transparent), color-mix(in srgb, var(--h-color-text) 3%, transparent)); background-blend-mode: soft-light, normal; background-color: color-mix(in srgb, var(--h-color-text) 48%, transparent); backdrop-filter: blur(28px) saturate(.8); box-shadow: var(--h-elevation-2); }
.h-hero-material, .h-glass-reflection { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; border-radius: inherit; }
.h-card, .h-choice { position: relative; isolation: isolate; }
.h-hero-copy { min-width: 310px; }
.h-hero .h-eyebrow { color: var(--h-color-muted); }
.h-hero h2 { font-size: var(--h-type-hero-title); line-height: 1.15; letter-spacing: -.75px; font-weight: 400; margin: 12px 0 13px; color: var(--h-color-text); }
.h-hero-baseline { display: flex; align-items: center; gap: 21px; }
.h-hero-description { color: var(--h-color-soft); font-size: var(--h-type-control); margin: 0; }
.h-hero .h-button { font-size: var(--h-type-meta); }
.h-hero-stats { display: flex; align-items: center; }
.h-hero-stat { text-align: left; background: none; border-left: 1px solid color-mix(in srgb, var(--h-color-text) 9%, transparent); padding: 8px 23px; min-width: 126px; }
.h-hero-stat:last-child { padding-right: 0; }
.h-hero-stat strong { font-size: var(--h-type-metric); letter-spacing: -1px; font-weight: 300; display: block; margin-bottom: 9px; color: var(--h-color-text-secondary); font-variant-numeric: tabular-nums; line-height: 1; }
.h-hero-stat span { color: var(--h-color-muted); font-size: var(--h-type-meta); }

.h-panel { position: relative; isolation: isolate; border: 1px solid color-mix(in srgb, var(--h-color-text) 16%, transparent); border-top-color: color-mix(in srgb, var(--h-color-text) 30%, transparent); border-radius: 2px; background-image: var(--surface-grain), linear-gradient(145deg, color-mix(in srgb, var(--h-color-text) 7%, transparent), transparent 56%), radial-gradient(ellipse at 100% -70%, color-mix(in srgb, var(--h-color-accent) 20%, transparent), transparent 68%); background-blend-mode: soft-light, normal, normal; background-color: color-mix(in srgb, var(--h-color-shadow) 52%, transparent); backdrop-filter: blur(28px) saturate(.75); box-shadow: var(--h-elevation-1); overflow: hidden; }
.h-panel-header { display: flex; align-items: center; justify-content: space-between; padding: var(--h-space-6) var(--h-space-6) var(--h-space-4); gap: 15px; }
.h-panel-title { display: flex; align-items: baseline; gap: 10px; }
.h-panel-title h2 { font-size: var(--h-type-panel-title); font-weight: 500; letter-spacing: -.12px; margin: 0; color: var(--h-color-text); }
.h-count-pill { font-size: var(--h-type-meta); color: var(--h-color-soft); font-variant-numeric: tabular-nums; }
.h-section-description { color: var(--h-color-soft); font-size: var(--h-type-meta); margin: 7px 0 0; line-height: 1.5; }
.h-list { padding: 0 22px; }
 .h-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 115px 48px 12px; align-items: center; gap: var(--h-space-4); }

.h-row { width: 100%; text-align: left; padding: var(--h-row-pad) 0; background: none; border-top: 1px solid var(--h-color-line); transition: background .18s; }
.h-row:hover { background: color-mix(in srgb, var(--h-color-text) 4%, transparent); }
.h-mark { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 34px; color: var(--logo, var(--h-color-muted)); font-family: Georgia, serif; font-size: 1.5625rem; line-height: 1; }
.h-mark .h-icon { width: 24px; height: 24px; }
.h-row-copy { min-width: 0; }
.h-row-copy h3 { font-size: var(--h-type-body); font-weight: 500; margin: 0 0 7px; color: var(--h-color-text); line-height: 1.4; }
.h-row-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--h-color-muted); font-size: var(--h-type-meta); align-items: center; line-height: 1.5; }

.h-row-info { text-align: right; }
.h-row-value { display: block; font-size: var(--h-type-navigation); color: var(--h-color-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.h-row-value small { display: block; font-size: var(--h-type-meta); color: var(--h-color-soft); margin-top: 6px; }
.h-fit { display: flex; align-items: baseline; justify-content: flex-end; gap: var(--h-space-1); color: var(--h-color-success); font-size: var(--h-type-body); font-weight: 400; font-variant-numeric: tabular-nums; }
.h-fit small { color: var(--h-color-soft); font-size: var(--h-type-meta); }
.h-row-chevron { width: 12px !important; color: var(--h-color-soft); }
.h-tag { display: inline-flex; align-items: center; gap: var(--h-space-1); font-size: var(--h-type-meta); line-height: 1.2; padding: 3px 6px; border-radius: 1px; background: color-mix(in srgb, var(--h-color-text) 3%, transparent); color: var(--h-color-muted); border: 1px solid color-mix(in srgb, var(--h-color-text) 4%, transparent); }
.h-tag.green { color: var(--h-color-success); background: var(--h-color-success-wash); border-color: color-mix(in srgb, var(--h-color-success) 30%, transparent); }
.h-tag.blue { color: var(--h-color-accent); background: var(--h-color-accent-wash); border-color: color-mix(in srgb, var(--h-color-accent) 28%, transparent); }
.h-tag.amber { color: var(--h-color-warning); background: var(--h-color-warning-wash); border-color: color-mix(in srgb, var(--h-color-warning) 30%, transparent); }
.h-panel-footer { padding: 12px 23px; border-top: 1px solid var(--h-color-line); color: var(--h-color-soft); font-size: var(--h-type-meta); display: flex; align-items: center; gap: var(--h-space-2); }
.h-panel-footer .h-icon { width: 12px; height: 12px; }

.h-task { display: flex; gap: 11px; padding: 15px 0; border-top: 1px solid var(--h-color-line); }
.h-task-check { flex-shrink: 0; width: 15px; height: 15px; margin-top: 3px; border: 1px solid color-mix(in srgb, var(--h-color-text) 32%, transparent); border-radius: 1px; background: color-mix(in srgb, var(--h-color-text) 1%, transparent); display: grid; place-items: center; }
.h-task-check:hover { border-color: var(--h-color-accent); }
.h-task-check .h-icon { width: 11px; height: 11px; }
.h-task.done { opacity: .5; }
.h-task.done .h-task-title { text-decoration: line-through; }
.h-task.done .h-task-check { background: color-mix(in srgb, var(--h-color-accent) 20%, transparent); color: var(--h-color-accent); }
.h-task-title { font-size: var(--h-type-control); margin: 0 0 7px; font-weight: 400; line-height: 1.5; color: var(--h-color-text-secondary); }
.h-task-caption { font-size: var(--h-type-meta); color: var(--h-color-soft); display: flex; flex-wrap: wrap; gap: 9px; line-height: 1.5; }

.h-workspace-footer { display: flex; justify-content: space-between; max-width: 1610px; margin: 0 auto; padding: 15px 42px 25px; color: var(--h-color-soft); font-size: var(--h-type-meta); }
.h-workspace-footer > span:last-child { font-size: var(--h-type-meta); letter-spacing: 1px; }

.h-filter-chip { border-bottom: 1px solid transparent; background: none; color: var(--h-color-muted); font-size: var(--h-type-control); padding: 9px 13px; }
.h-filter-chip.active { color: var(--h-color-accent); border-bottom-color: var(--h-color-accent); background: color-mix(in srgb, var(--h-color-accent) 2%, transparent); }
.h-role-dropdown { position: relative; z-index: 30; }
.h-filter-select { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 175px; background: var(--h-color-surface-solid); border: 1px solid var(--h-color-line-bright); border-radius: 0; height: var(--h-control-height); padding: 0 calc(var(--h-control-pad-x) - 3px); color: var(--h-color-muted); font-size: var(--h-type-meta); }
.h-filter-select .h-icon { width: 13px; height: 13px; transform: rotate(90deg); color: var(--h-color-soft); }
.h-filter-select[aria-expanded="true"] { border-color: color-mix(in srgb, var(--h-color-text) 35%, transparent); }
.h-filter-select[aria-expanded="true"] .h-icon { transform: rotate(-90deg); }
.h-role-menu { position: absolute; top: calc(100% + 5px); left: 0; min-width: 224px; padding: 5px; border: 1px solid color-mix(in srgb, var(--h-color-text) 27%, transparent); border-radius: 0; background: var(--h-color-surface-raised); box-shadow: var(--h-elevation-3); }
.h-role-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-5); padding: 10px 11px; border-radius: 0; background: none; color: var(--h-color-text-secondary); text-align: left; font-size: var(--h-type-control); }
.h-role-option:hover, .h-role-option:focus-visible { background: color-mix(in srgb, var(--h-color-text) 8%, transparent); color: var(--h-color-text); }
.h-role-option:focus-visible { outline: 1px solid color-mix(in srgb, var(--h-color-text) 23%, transparent); outline-offset: -1px; }
.h-role-option[aria-selected="true"] { color: var(--h-color-accent); }
.h-role-option .h-icon, .h-option-marker { width: 13px; height: 13px; }

.h-list-panel .h-list { padding-top: 3px; }
.h-list-panel .h-row { padding: var(--h-space-5) 0; }
.h-list-panel .h-row:first-child { border-top: 0; }
.h-list-panel .h-row-copy h3 { font-size: var(--h-type-body); }
.h-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.h-empty-state { text-align: center; padding: 55px 20px; color: var(--h-color-soft); font-size: var(--h-type-control); }
.h-empty-state strong { display: block; margin-bottom: var(--h-space-2); color: var(--h-color-text-secondary); font-weight: 400; }
.h-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 19px; align-items: start; }
.h-board:focus { outline: none; }
.h-board-column { position: relative; padding: 0 0 var(--h-space-3); min-height: 400px; border-top: 1px solid var(--h-color-line-bright); transition: background .16s, box-shadow .16s; }
.h-board-card-list { position: relative; }
.h-board-slot { margin-bottom: var(--h-space-3); border: 1px dashed color-mix(in srgb, var(--h-color-accent) 35%, transparent); border-radius: 2px; background: color-mix(in srgb, var(--h-color-accent) 2%, transparent); }
.h-board-slot::before { content: "Drop here"; display: grid; place-items: center; height: 100%; color: var(--h-color-muted); font-size: var(--h-type-meta); }
.h-board-column.is-drop-target { background: none; box-shadow: none; border-top-color: color-mix(in srgb, var(--h-color-accent) 47%, transparent); }
.h-board-column.is-drop-target .h-board-heading { color: var(--h-color-accent); }
.h-card[data-item-id] { cursor: grab; }
.h-card:focus-visible { outline: 2px solid var(--metal-tint,var(--h-color-accent)); outline-offset: 3px; }
:is(.h-card,.h-choice).material-hover { --material-lift:var(--h-motion-hover-lift); }
:is(.h-card,.h-choice).material-pressed { --material-lift:var(--h-motion-pressed-lift); }
.h-card.is-drag-source { position: absolute; opacity: 0; pointer-events: none; cursor: grabbing; transition: none; }
.h-card.is-keyboard-drag-source { opacity: .55; outline: 2px solid var(--metal-tint,var(--h-color-accent)); outline-offset: 3px; }
.is-pointer-dragging, .is-pointer-dragging * { cursor: grabbing !important; user-select: none; }
.h-card.just-moved { border-color: color-mix(in srgb, var(--h-color-text) 61%, transparent); }
.h-card-eyebrow-name { flex: 1; min-width: 0; }
.h-drag-handle { display: flex; margin-left: 0; color: var(--h-color-text-secondary); }
.h-drag-handle .h-icon { width: 15px; height: 18px; }
.h-card:hover .h-drag-handle { color: var(--h-color-accent); }
.h-card-meta { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--h-color-muted); font-size: var(--h-type-meta); line-height: 1.5; }
.h-card-meta .h-icon { width: 12px; height: 12px; }
/* Empty columns are drop zones. While dragging they brighten; the column under the pointer shows the insertion slot instead. */
.h-board-empty { display: grid; place-items: center; min-height: 140px; padding: 24px 15px; border: 1px dashed color-mix(in srgb, var(--h-color-text) 22%, transparent); border-radius: 2px; font-size: var(--h-type-control); color: var(--h-color-soft); transition: border-color .15s, color .15s, background-color .15s; }
.h-board.is-dragging .h-board-empty { border-color: color-mix(in srgb, var(--h-color-accent) 45%, transparent); background: color-mix(in srgb, var(--h-color-accent) 3%, transparent); color: var(--h-color-text-secondary); }
.h-board.is-dragging .is-drop-target .h-board-empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.h-board-heading { display: flex; align-items: center; gap: 9px; padding: 19px 4px; font-size: var(--h-type-control); color: var(--h-color-muted); }
.h-board-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--stage-color); }
.h-board-heading .h-count-pill { margin-left: auto; }
.h-card { margin: 0 0 var(--h-space-3); padding: 19px 17px; border: 1px solid color-mix(in srgb, var(--h-color-text) 16%, transparent); border-top-color: color-mix(in srgb, var(--h-color-text) 30%, transparent); border-radius: 2px; background-image: var(--surface-grain), linear-gradient(135deg, color-mix(in srgb, var(--h-color-text) 9%, transparent), transparent 65%); background-blend-mode: soft-light, normal; background-color: color-mix(in srgb, var(--h-color-text) 48%, transparent); backdrop-filter: blur(22px) saturate(.75); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--h-color-text) 3%, transparent); }
.h-card:hover { border-color: color-mix(in srgb, var(--h-color-accent) 22%, transparent); }
.h-card-eyebrow { display: flex; align-items: center; gap: var(--h-space-2); font-size: var(--h-type-meta); color: var(--h-color-muted); }
.h-card-eyebrow .h-mark { width: 21px; height: 24px; font-size: 1.1875rem; }
.h-card-eyebrow .h-mark .h-icon { width: 20px; height: 20px; }
.h-card h3 { font-size: var(--h-type-body); font-weight: 500; line-height: 1.55; margin: 16px 0 9px; }
.h-card h3 button { padding: 0; text-align: left; background: none; }
.h-card .h-row-meta { font-size: var(--h-type-meta); }
.h-card .h-row-meta > .h-icon { width: 13px; }
.h-card-note { padding: 17px 0; font-size: var(--h-type-meta); color: var(--h-color-muted); display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.h-card-note .h-icon { width: 12px; height: 12px; }
.h-card-footer { padding-top: 13px; border-top: 1px solid var(--h-color-line); display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-2); }
.h-card-footer small { color: var(--h-color-soft); font-size: var(--h-type-meta); }

.h-choice { display: block; text-align: left; padding: 23px 19px; border: 1px solid color-mix(in srgb, var(--h-color-text) 16%, transparent); border-radius: 2px; background-image: var(--surface-grain), linear-gradient(135deg, color-mix(in srgb, var(--h-color-text) 7%, transparent), transparent 70%); background-blend-mode: soft-light, normal; background-color: color-mix(in srgb, var(--h-color-text) 50%, transparent); backdrop-filter: blur(22px); }
.h-choice.active { border-left: 2px solid var(--h-color-accent); background-color: var(--h-color-surface-raised); }
.h-choice .h-icon { color: var(--h-color-accent); width: 20px; height: 20px; margin-bottom: 18px; }
.h-choice strong { display: block; font-size: var(--h-type-navigation); font-weight: 500; margin-bottom: 9px; }
.h-choice small { color: var(--h-color-soft); font-size: var(--h-type-meta); line-height: 1.6; }

.h-field { display: block; margin-bottom: var(--h-space-5); }
.h-field > span { display: block; color: var(--h-color-muted); font-size: var(--h-type-control); margin-bottom: 10px; }
.h-field input, .h-field textarea, .h-field select { display: block; width: 100%; min-height: var(--h-control-height); padding: calc(var(--h-control-pad-y) + 2px) var(--h-control-pad-x); border: 1px solid var(--h-color-line-bright); border-radius: 2px; background: color-mix(in srgb, var(--h-color-shadow) 40%, transparent); color: var(--h-color-text-secondary); font-size: var(--h-type-control); line-height: 1.8; }
.h-field textarea { resize: vertical; min-height: 132px; }

.h-field input[aria-invalid="true"], .h-field textarea[aria-invalid="true"], .h-field select[aria-invalid="true"] { border-color: var(--h-color-danger); box-shadow: inset 0 0 0 1px var(--h-color-danger); }
.h-paper { background: var(--h-color-paper); padding: 37px 29px; min-height: 550px; color: var(--h-color-paper-ink); font-family: Georgia, serif; box-shadow: 0 8px 25px color-mix(in srgb, var(--h-color-shadow) 20%, transparent); }
.h-paper-name { font-size: 1.625rem; letter-spacing: -.6px; margin: 0 0 11px; font-weight: 400; }
.h-paper-headline { font-size: var(--h-type-meta); line-height: 1.7; color: color-mix(in srgb, var(--h-color-paper-ink) 72%, var(--h-color-paper)); margin: 0 0 27px; }
.h-paper-section { text-transform: uppercase; letter-spacing: 1px; font-family: Arial, sans-serif; font-size: var(--h-type-meta); color: var(--h-color-paper-ink); border-bottom: 1px solid color-mix(in srgb, var(--h-color-paper-ink) 20%, transparent); padding-bottom: var(--h-space-2); margin: 23px 0 12px; }
.h-paper-content { font-size: var(--h-type-meta); line-height: 1.85; white-space: pre-line; margin: 0; color: var(--h-color-paper-ink); }

.h-setting-row { padding: 17px 0; display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-5); border-top: 1px solid var(--h-color-line); }
.h-setting-row strong { display: block; font-size: var(--h-type-navigation); font-weight: 400; color: var(--h-color-text-secondary); }
.h-setting-row small { display: block; font-size: var(--h-type-meta); line-height: 1.7; color: var(--h-color-soft); margin-top: 7px; }

.h-switch { position: relative; width: 42px; height: 22px; flex-shrink: 0; border-radius: 2px; background: color-mix(in srgb, var(--h-color-shadow) 18%, var(--h-color-surface-solid)); border: 1px solid color-mix(in srgb, var(--h-color-text) 30%, transparent); box-shadow: inset 0 1px 2px color-mix(in srgb, var(--h-color-shadow) 30%, transparent); transition: background-color .15s, border-color .15s; }
.h-switch[aria-checked="true"] { background: var(--h-color-primary); border-color: var(--h-color-primary); box-shadow: none; }
.h-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 1px; background: var(--h-color-text-secondary); box-shadow: 0 1px 2px color-mix(in srgb, var(--h-color-shadow) 45%, transparent); transition: transform .15s, background-color .15s; }
.h-switch[aria-checked="true"]::after { background: var(--h-color-primary-ink); transform: translateX(20px); }
.h-switch:focus-visible { outline: 2px solid var(--h-color-accent); outline-offset: 3px; }
/* Optional visible state: <span class="h-switch-field"><button class="h-switch" …></button><span class="h-switch-state" aria-hidden="true"></span></span>. The text follows aria-checked. */
.h-switch-field { display: inline-flex; flex-direction: row-reverse; align-items: center; gap: var(--h-space-3); flex-shrink: 0; }
.h-switch-state { min-width: 3ch; text-align: right; color: var(--h-color-muted); font-size: var(--h-type-control); }
.h-switch-state::before { content: "Off"; }
.h-switch[aria-checked="true"] + .h-switch-state { color: var(--h-color-text); }
.h-switch[aria-checked="true"] + .h-switch-state::before { content: "On"; }

dialog { color: var(--h-color-text); border: 1px solid color-mix(in srgb, var(--h-color-text) 29%, transparent); background-image: var(--surface-grain), linear-gradient(125deg, color-mix(in srgb, var(--h-color-text) 10%, transparent), transparent 70%); background-blend-mode: soft-light, normal; background-color: color-mix(in srgb, var(--h-color-shadow) 72%, transparent); backdrop-filter: blur(32px) saturate(.65); box-shadow: var(--h-elevation-4); padding: 0; }
dialog::backdrop { background: color-mix(in srgb, var(--h-color-shadow) 63%, transparent); backdrop-filter: blur(3px); }
.h-drawer { position: fixed; inset: 12px 12px 12px auto; margin: 0; width: 495px; max-width: calc(100vw - 24px); height: calc(100dvh - 24px); max-height: none; border-radius: 2px; overflow: auto; }
.h-drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 19px 28px; border-bottom: 1px solid var(--h-color-line); color: var(--h-color-muted); font-size: var(--h-type-meta); letter-spacing: 1.1px; }
.h-drawer-content { padding: var(--h-space-7); }

.h-drawer-content h2 { font-size: var(--h-type-page-title); line-height: 1.3; letter-spacing: -.7px; font-weight: 400; margin: var(--h-space-6) 0 var(--h-space-4); }
.h-drawer-content h2:first-child { margin-top: 0; }
.h-tags[hidden] { display: none; }
.h-drawer-section { padding: 25px 0; border-bottom: 1px solid var(--h-color-line); }
.h-drawer-section h3 { font-size: var(--h-type-control); font-weight: 500; color: var(--h-color-text-secondary); margin: 0 0 18px; }

.h-reason { display: flex; align-items: start; gap: var(--h-space-3); margin: 13px 0; color: var(--h-color-muted); font-size: var(--h-type-control); line-height: 1.8; }
.h-reason .h-icon { width: 14px; height: 14px; color: var(--h-color-success); margin-top: var(--h-space-1); }
.h-reason.warning .h-icon { color: var(--h-color-warning); }
.h-drawer-description { color: var(--h-color-muted); font-size: var(--h-type-navigation); line-height: 1.9; margin: 0; }

.h-dialog { width: 440px; max-width: calc(100vw - 30px); border-radius: 2px; padding: 30px; }
.h-dialog h2 { font-size: var(--h-type-title); font-weight: 400; margin: var(--h-space-4) 0; }
.h-dialog p { font-size: var(--h-type-navigation); line-height: 1.8; color: var(--h-color-muted); }
.h-dialog .h-heading-actions { justify-content: flex-end; margin-top: 27px; }
/* A small change in depth and light, confined to the surface under the pointer. */
:is(.h-hero, .h-panel, .h-card, .h-choice) {
  background-position: var(--grain-offset, 0 0), 0 0, 0 0;
  transform: translateY(var(--material-lift, 0px));
  transition: transform var(--h-motion-lift) var(--h-motion-easing), box-shadow var(--h-motion-brightness) ease, border-color var(--h-motion-control) ease, opacity .18s ease;
}
:is(.h-hero, .h-panel, .h-card, .h-choice)::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(125deg, color-mix(in srgb, var(--h-color-text) 5%, transparent), color-mix(in srgb, var(--h-color-text) 2%, transparent));
  opacity: var(--material-light, 0);
  transition: opacity var(--h-motion-brightness) ease;
}
:is(.h-hero, .h-panel, .h-card, .h-choice).material-hover {
  --material-light: .8;
  border-color: color-mix(in srgb, var(--h-color-text) 31%, transparent); border-top-color: color-mix(in srgb, var(--h-color-text) 47%, transparent);
  box-shadow: var(--h-elevation-3);
}
:is(.h-hero, .h-panel, .h-card, .h-choice).material-pressed {
  --material-light: 1;
  border-color: color-mix(in srgb, var(--h-color-text) 45%, transparent);
  box-shadow: var(--h-elevation-3);
}
:is(.h-card,.h-choice).material-hover { --material-lift:var(--h-motion-hover-lift); }
:is(.h-card,.h-choice).material-pressed { --material-lift:var(--h-motion-pressed-lift); }
.h-card.is-drag-source { --material-lift: 0px; --material-light: 0; }
.h-card.is-drop-landing { opacity: 0; transition: none; }
.h-drag-preview { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; will-change: transform; }
.h-drag-preview .h-card {
  margin: 0; width: 100%; opacity: 1; --material-light: .6;
  transform: none;
  border-color: color-mix(in srgb, var(--h-color-text) 45%, transparent); border-top-color: color-mix(in srgb, var(--h-color-text) 57%, transparent); background-color: color-mix(in srgb, var(--h-color-text) 85%, transparent);
  box-shadow: var(--h-elevation-4);
  transition: box-shadow .17s ease, background-color .17s ease, border-color .17s ease;
}
.h-drag-preview.is-settling .h-card {
  transform: none; background-color: color-mix(in srgb, var(--h-color-text) 48%, transparent); border-color: color-mix(in srgb, var(--h-color-text) 61%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--h-color-text) 3%, transparent); --material-light: 0;
  transition-duration: .17s;
}
.h-toast { position: fixed; bottom: 24px; left: calc(50% + 111px); transform: translate(-50%, 12px); z-index: var(--h-z-popover); color: var(--h-color-canvas); background: color-mix(in srgb, var(--h-color-text) 96%, transparent); border: 1px solid color-mix(in srgb, var(--h-color-accent) 21%, transparent); padding: 14px 20px; border-radius: 2px; box-shadow: var(--h-elevation-3); font-size: var(--h-type-control); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 40px); }
.h-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.spin { animation: spin 1s linear infinite; transform-origin:center; transform-box:fill-box; }
[data-save-item][aria-pressed=true] svg, [data-save-article][aria-pressed=true] svg { fill:currentColor; }
[data-save-item][aria-pressed=true], [data-save-article][aria-pressed=true] { color:var(--h-color-accent); background:color-mix(in srgb,var(--h-color-accent) 12%,transparent); }
[data-busy-demo] { min-width:124px; justify-content:center; }
@keyframes spin { to { transform: rotate(360deg); } }
.h-view-tabs { display: flex; gap: 22px; margin-bottom: var(--h-space-5); border-bottom: 1px solid var(--h-color-line); }
.h-text-tab { background: none; padding: 10px 0; border-bottom: 1px solid transparent; color: var(--h-color-muted); font-size: var(--h-type-control); text-align: left; }
.h-text-tab.active { color: var(--h-color-accent); border-bottom-color: var(--h-color-accent); }
.h-stage-jumps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0; }
.h-stage-cluster { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--h-space-3); padding: var(--h-space-3) var(--h-space-4); border-bottom: 1px solid transparent; }
.h-stage-cluster.is-current { border-bottom-color: color-mix(in srgb, var(--h-color-text) 34%, transparent); }
/* Stages are buttons and drop targets: bordered, with a large count. */
.h-stage-jumps .h-text-tab { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 0; padding: 6px 10px; border: 1px solid var(--h-color-line); border-radius: 2px; background: color-mix(in srgb, var(--h-color-text) 2%, transparent); color: var(--h-color-text-secondary); white-space: nowrap; font-size: var(--h-type-control); transition: border-color .15s, background-color .15s, color .15s; }
.h-stage-jumps .h-text-tab:hover { border-color: color-mix(in srgb, var(--h-color-text) 34%, transparent); background: color-mix(in srgb, var(--h-color-text) 5%, transparent); color: var(--h-color-text); }
.h-stage-jumps .h-stage-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.h-stage-jumps .h-stage-count { min-width: 2ch; color: var(--h-color-text); font-size: var(--h-type-title-small); font-weight: 300; line-height: 1.1; text-align: left; font-variant-numeric: tabular-nums; }
.h-stage-jumps .in-group { border-color: color-mix(in srgb, var(--h-color-accent) 30%, transparent); color: var(--h-color-accent); }
.is-drag-toolbar .h-stage-jumps .h-text-tab { border-style: dashed; border-color: color-mix(in srgb, var(--h-color-accent) 45%, transparent); }
.h-board-toolbar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; background: color-mix(in srgb, var(--h-color-surface-solid) 88%, transparent); backdrop-filter: blur(20px); border: 1px solid var(--h-color-line); margin-bottom: var(--h-space-5); }
/* Group labels sit directly above their stage clusters, so the strip reads as one control. */
.h-board-toolbar .h-board-controls { order: -1; margin: 0; padding: 12px 0 0; }
.h-board-toolbar .h-choice-buttons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; width: 100%; }
.h-board-toolbar [data-board-group] { justify-self: start; min-width: 0; margin-left: var(--h-space-4); color: var(--h-color-text-secondary); font-size: var(--h-type-meta); font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.h-board-toolbar .h-board-controls .h-section-description { display: none; }
.h-board-controls [data-board-group] { padding: 6px 0; min-width: 88px; text-align: left; background: none; border-bottom: 2px solid transparent; }
.h-board-controls [data-board-group]:hover { color: var(--h-color-text); }
.h-board-controls [data-board-group].active { color: var(--h-color-text); border-bottom-color: var(--h-color-accent); }
.h-board-controls .h-filter-chip.is-drag-group { color: var(--h-color-accent); border-bottom-color: color-mix(in srgb, var(--h-color-text) 64%, transparent); }
.h-card h3 button { cursor: grab; }
.h-board-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-6); margin-bottom: 18px; }
.h-board-controls .h-choice-buttons { margin: 0; }
.h-board-controls .h-section-description { margin: 0; width: 240px; min-height: 20px; text-align: right; }
.h-board-controls .h-choice-buttons.is-group-switching [data-board-group].active { border-bottom-color: transparent; }
.h-group-switch-marker { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--h-color-primary); box-shadow: 0 0 7px color-mix(in srgb, var(--h-color-text) 21%, transparent); pointer-events: none; }
.h-board-controls .h-choice-buttons { position: relative; gap: 22px; }
.h-board-wrap { position: relative; max-width: 100%; overflow: visible; padding: 4px 0 18px; }
.h-board-wrap .h-board { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: start; }
.h-board-wrap .h-board-column { min-height: 300px; }
.h-board-wrap .h-board.is-dragging .h-board-column { min-height: max(300px,var(--drag-column-height,300px)); }
.h-board-column[hidden] { display: none; }
.h-board-heading .h-stage-label { flex: 1; }
.h-board-heading .h-count-pill{ width: 4ch; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.h-hero-stat { width: 160px; min-width: 160px; flex: 0 0 160px; }
.h-hero-stat strong { min-height: 32px; font-variant-numeric: tabular-nums; }

.h-card[data-material="gold"], .h-card[data-material="platinum"] {
  --metal-tint: #d9c59a; background-color: #333027eb;
  background-image: var(--surface-grain), repeating-linear-gradient(0deg, #fff8e606 0px, #fff8e606 1px, transparent 1px, transparent 3px), linear-gradient(115deg,#c4a46a25 0%,#ead5a817 25%,transparent 58%,#bba1760c 100%);
  background-blend-mode: soft-light, soft-light, normal; border-color: #cbb27b55; border-top-color: #e3cea180;
  box-shadow: inset 0 1px 0 #fff3cd1a, 0 9px 20px -16px #000b; backdrop-filter: blur(18px) saturate(.6);
}
.h-card[data-material="platinum"] {
  --metal-tint: #30383e; background-color: #aeb6b9;
  background-image: var(--surface-grain), repeating-linear-gradient(0deg,#fff9df29 0px,#fff9df29 .5px,#3a43450f .5px,#3a43450f 1px,transparent 1px,transparent 3px),linear-gradient(112deg,#9ca3a2 0%,#bcc1bd 26%,#d5d4c5 41%,#c2c6bc 54%,#abb3af 78%,#c4c8bb 100%);
  background-blend-mode: soft-light, soft-light, normal; border-color: #e1ddc7b3; border-top-color: #fff7d9d9;
  color: #1d282f; box-shadow: inset 0 1px 0 #fff9df7a, inset 0 -1px 0 #4c595c5c, 0 9px 20px -16px #000b; backdrop-filter: none;
}
.h-card[data-material="platinum"] h3, .h-card[data-material="platinum"] h3 button { color: #1d282f; }

.h-card[data-material="platinum"] :is(.h-row-meta, .h-card-footer small, .h-drag-handle) { color: #424d53; }
.h-card[data-material="platinum"] .h-mark { color: #27343e; background-color: #35434d12; border-color: #35434d24; }

.h-card[data-material] .h-card-eyebrow, .h-card[data-material] .h-card-note, .h-card[data-material] .h-card-meta { color: var(--metal-tint); }

.h-choice-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--h-space-2); margin-bottom: 15px; }

.h-check-label { display: flex; align-items: center; gap: 10px; margin: 13px 0; font-size: var(--h-type-control); color: var(--h-color-muted); }
.h-check-label input, .h-checkbox { appearance: none; display: inline-grid; place-content: center; width: 16px; height: 16px; padding: 0; flex-shrink: 0; margin: 0; border: 1px solid color-mix(in srgb, var(--h-color-text) 33%, transparent); border-radius: 1px; background: var(--h-color-surface-solid); cursor: pointer; }
.h-check-label input::before, .h-checkbox::before { content: ""; width: 10px; height: 10px; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: var(--h-color-primary-ink); transform: scale(0); transition: transform .12s; }
.h-check-label input:checked, .h-checkbox:checked { background: var(--h-color-accent); border-color: var(--h-color-accent); }
.h-check-label input:checked::before, .h-checkbox:checked::before { transform: scale(1); }
.h-check-label input:focus-visible, .h-checkbox:focus-visible { outline: 2px solid var(--h-color-accent); outline-offset: 3px; }

.h-callout { border-left: 2px solid color-mix(in srgb, var(--h-color-text) 41%, transparent); padding-left: var(--h-space-3); font-size: var(--h-type-meta); line-height: 1.8; color: var(--h-color-warning); }
.h-facts-list { margin: var(--h-space-5) 0; }
.h-facts-list > div { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 18px; padding: 11px 0; border-top: 1px solid var(--h-color-line); font-size: var(--h-type-meta); line-height: 1.8; }
.h-facts-list dt { color: var(--h-color-soft); }
.h-facts-list dd { margin: 0; color: var(--h-color-text-secondary); overflow-wrap: anywhere; }

.h-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-4); margin-bottom: var(--h-space-3); }
.h-section-heading h3 { margin: 0; }

.h-brand-mark img { transition: filter var(--h-motion-control); }
:root[data-scheme="light"] .h-brand-mark img { filter: brightness(.18) saturate(.6); }
@media (max-width: 1380px) {
  .h-sidebar { width: 205px; padding-inline: var(--h-space-3); }
  .h-workspace { margin-left: 205px; }
  .h-topbar { padding-inline: 30px; }
  main { padding-inline: 30px; }
  .h-workspace-footer { padding-inline: 30px; }
  
  .h-hero { gap: 22px; padding-inline: 23px; }
  .h-hero-stat { padding-inline: 18px; min-width: 113px; }
  .h-hero-description { font-size: var(--h-type-meta); }
  .h-hero-baseline { gap: 15px; }
  .h-hero-stats { flex-shrink: 0; }
  
   .h-row { grid-template-columns: 25px minmax(0, 1fr) 100px 39px 10px; gap: var(--h-space-3); }
  .h-row-copy h3 { font-size: var(--h-type-navigation); }
  .h-row-meta { font-size: var(--h-type-meta); }
  .h-row-value { font-size: var(--h-type-control); }
  .h-row-value small { font-size: var(--h-type-meta); }
  .h-panel-header { padding-inline: var(--h-space-5); }
  .h-list { padding-inline: var(--h-space-5); }
  
  .h-toast { left: calc(50% + 102px); }
  
  
  .h-card { padding-inline: 13px; }
}
@media (max-width: 1120px) {
  .h-sidebar { width: 76px; padding: 27px 10px; align-items: center; }
  .h-brand { padding: 0; }
  .h-brand > span:last-child, .h-workspace-label, .h-nav-item .h-nav-label, .h-sidebar-bottom .h-local-label, .h-preview-note, #account-icon { display: none; }
  #navigation { margin-top: var(--h-page-inset); width: 100%; gap: var(--h-space-3); }
  .h-nav-item { padding: var(--h-space-3); justify-content: center; }
  .h-sidebar-bottom { padding: 50px 0 0; }
  
  .h-workspace { margin-left: 76px; }
  .h-hero-copy { min-width: 0; }
  .h-hero-baseline { flex-wrap: wrap; gap: 5px 13px; }
  .h-hero-stat { min-width: 100px; padding-inline: var(--h-space-4); }
  .h-toast { left: calc(50% + 38px); }
  
  .h-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  :is(.h-hero, .h-panel, .h-card, .h-choice) { transform: none; }
  .h-drag-preview .h-card { transform: none; }
}
@media print {
  :root { color-scheme: light; }
  body { background: white; }
  .h-sidebar, .h-topbar, .h-page-heading, .h-workspace-footer, .h-toast, .h-glass-reflection, .h-panel::after, .h-drag-preview { display: none !important; }
  .h-workspace { margin: 0; }
  main { padding: 0; }
  
  .h-panel { background: white; border: 0; box-shadow: none; backdrop-filter: none; transform: none; }
  .h-paper { color: var(--h-color-paper-ink); box-shadow: none; padding: 25px; background: white; min-height: 0; }
  
  
  
  
  
  
  
  
}

/* Board movement: stable targets, explicit destinations, and an alternative to dragging. */
.h-board-feedback { display: flex; align-items: center; justify-content: space-between; gap: var(--h-space-4); min-height: 44px; padding: 6px 16px; border-top: 1px solid var(--h-color-line); color: var(--h-color-text-secondary); font-size: var(--h-type-control); }
.h-board-feedback [role="status"] { line-height: 1.5; }
.h-board-feedback .h-button { flex-shrink: 0; padding: 5px 10px; font-size: var(--h-type-control); }
.h-board-feedback [hidden] { display: none; }
.h-board-toolbar .h-board-controls .h-section-description { width: auto; font-size: var(--h-type-meta); }
.h-board-column { scroll-margin-top: 180px; }
.h-board-slot { position: relative; min-height: 96px; box-sizing: border-box; border: 1px dashed color-mix(in srgb, var(--h-color-accent) 55%, transparent); background: color-mix(in srgb, var(--h-color-accent) 4%, transparent); scroll-margin-top: 180px; }
.h-board-slot::before { content: attr(data-label); padding: var(--h-space-4); box-sizing: border-box; color: var(--h-color-accent); font-size: var(--h-type-control); text-align: center; }
.h-board-slot::after { content: ""; position: absolute; height: 2px; top: -2px; left: 0; right: 0; background: var(--h-color-accent); }
.h-board.is-dragging .h-card { --material-lift: 0px; }
.h-board.is-dragging .h-board-column.is-drop-target { border-top-color: var(--h-color-accent); box-shadow: 0 -1px var(--h-color-accent); }
.h-board.is-dragging .h-board-column { min-height: max(410px,var(--drag-column-height,410px)); }
/* Dragging (grip or card) is the primary affordance; Move is the quieter keyboard and touch alternative. */
.h-board-move-button { padding: 4px 6px; min-height: 28px; color: inherit; background: transparent; border: 0; border-radius: 2px; opacity: .72; font-size: var(--h-type-meta); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; cursor: pointer; }
.h-board-move-button:hover, .h-board-move-button:focus-visible { opacity: 1; text-decoration-color: currentColor; background: color-mix(in srgb, var(--h-color-accent) 8%, transparent); }
.h-drag-handle { align-items: center; justify-content: center; width: 28px; min-height: 32px; margin-left: 0; flex-shrink: 0; touch-action: none; cursor: grab; }
.h-card-eyebrow { gap: var(--h-space-2); }
.h-stage-jumps .h-text-tab { min-height: 40px; }
.h-stage-jumps .h-text-tab.is-drop-target { border-style: solid; border-color: var(--h-color-accent); background: color-mix(in srgb, var(--h-color-accent) 12%, transparent); box-shadow: 0 0 0 1px var(--h-color-accent); color: var(--h-color-accent); }
.is-navigation-pending { outline: 1px dashed color-mix(in srgb, var(--h-color-accent) 42%, transparent); outline-offset: 3px; }
.h-board-move-dialog { width: 440px; max-width: calc(100vw - 32px); padding: var(--h-space-6); border-radius: 2px; }
.h-board-move-dialog h2 { margin: 0 0 10px; font-size: var(--h-type-title-small); font-weight: 500; }
.h-board-move-dialog p { color: var(--h-color-text-secondary); font-size: var(--h-type-control); line-height: 1.6; }
.h-board-move-options { display: grid; gap: var(--h-space-1); margin: var(--h-space-5) 0; }
.h-board-move-options button { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; min-height: 40px; background: color-mix(in srgb, var(--h-color-accent) 4%, transparent); color: inherit; text-align: left; border: 1px solid transparent; }
.h-board-move-options button:nth-child(3n+1):not(:first-child) { margin-top: var(--h-space-2); }
.h-board-move-options button:hover:not(:disabled), .h-board-move-options button:focus-visible { border-color: color-mix(in srgb, var(--h-color-accent) 55%, transparent); background: color-mix(in srgb, var(--h-color-accent) 10%, transparent); }
.h-board-move-options button:disabled { opacity: .5; }
.h-board-move-options small { color: var(--h-color-text-secondary); font-size: var(--h-type-meta); }

/* ---- Accessibility modes -------------------------------------------------------------------
   Honour the user's system preferences. All rules are token-level so every palette inherits them. */
@media (prefers-reduced-transparency: reduce) {
  :root, [data-palette] {
    --h-glass-card: var(--h-color-surface-raised);
    --h-glass-panel: var(--h-color-surface-solid);
    --h-glass-dialog: var(--h-color-surface-raised);
    --h-backdrop: var(--h-color-scrim);
  }
  *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .h-glass-reflection, .h-hero-material { display: none; }
}
@media (prefers-contrast: more) {
  :root, [data-palette] {
    --h-color-muted: var(--h-color-text-secondary);
    --h-color-soft: var(--h-color-text-secondary);
    --h-color-line: color-mix(in srgb, var(--h-color-text) 38%, transparent);
    --h-color-line-bright: color-mix(in srgb, var(--h-color-text) 62%, transparent);
  }
  :focus-visible { outline-width: 3px; }
}
@media (forced-colors: active) {
  /* System colours replace palette colours; remove decoration that would fight them. */
  .h-hero, .h-panel, .h-choice, .h-card, dialog, .h-metal-sample { background-image: none !important; border: 1px solid CanvasText; box-shadow: none; }
  .h-glass-reflection, .h-hero-material { display: none; }
  .h-button, .h-icon-button, .h-filter-select, .h-role-menu, input, textarea, select { border: 1px solid ButtonText; }
  .h-button.primary { background: Highlight; color: HighlightText; border-color: Highlight; }
  .h-switch { border: 1px solid ButtonText; }
  .h-switch[aria-checked="true"] { background: Highlight; }
  .h-switch::after, .h-status-dot { background: ButtonText; forced-color-adjust: none; }
  .h-check-label input:checked, .h-checkbox:checked { background: Highlight; border-color: Highlight; }
  .h-check-label input::before, .h-checkbox::before { background: HighlightText; forced-color-adjust: none; }
  :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}

/* ---- Responsive: tablet and phone ----------------------------------------------------------
   Breakpoints (tokens.json "breakpoint"): md 860, sm 640. Components stack; the rail becomes a top bar. */
@media (max-width: 860px) {
  :root { --h-page-inset: 24px; }
  main { padding-inline: var(--h-page-inset); }
  .h-topbar { padding-inline: var(--h-page-inset); }
  
  
  .h-hero { flex-direction: column; align-items: flex-start; gap: var(--h-space-5); }
  .h-page-heading { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  :root { --h-page-inset: 16px; }
  .h-sidebar { position: sticky; top: 0; inset: 0 0 auto 0; width: 100%; height: auto; flex-direction: row; align-items: center; gap: var(--h-space-3); padding: var(--h-space-2) var(--h-space-3); border-right: 0; border-bottom: 1px solid var(--h-color-line); overflow-x: auto; }
  .h-sidebar .h-brand { flex-shrink: 0; }
  .h-sidebar .h-brand-mark, .h-sidebar .h-brand-mark svg { width: 24px; height: 26px; }
  #navigation { flex-direction: row; margin: 0; width: auto; gap: 0; }
  .h-nav-item { padding: var(--h-space-3); border-left: 0; border-bottom: 2px solid transparent; }
  .h-nav-item.active { border-bottom-color: var(--h-color-accent); background: none; }
  .h-sidebar-bottom { display: none; }
  .h-workspace { margin-left: 0; }
  .h-topbar { height: auto; min-height: 56px; flex-wrap: wrap; gap: var(--h-space-2); padding-block: var(--h-space-2); }
   .h-heading-actions { gap: var(--h-space-3); flex-wrap: wrap; }
  .h-breadcrumb > span:first-child, .h-breadcrumb-slash { display: none; }
  .h-toast { left: 50%; max-width: calc(100vw - 32px); }
  .h-hero-stats { flex-wrap: wrap; row-gap: var(--h-space-3); }
  .h-hero-stat { min-width: 0; padding-inline: var(--h-space-4); }
  .h-board, .h-board-wrap .h-board { grid-template-columns: minmax(0, 1fr); }
  .h-stage-jumps, .h-stage-cluster { grid-template-columns: minmax(0, 1fr); }
  .h-board-toolbar .h-choice-buttons { display: flex; gap: var(--h-space-5); padding-inline: var(--h-space-4); }
  .h-board-toolbar [data-board-group] { margin-left: 0; }
   .h-row { grid-template-columns: 30px minmax(0, 1fr) 12px; }
   .h-row > :nth-child(3), .h-row > :nth-child(4) { display: none; }
  
  .h-facts-list > div { grid-template-columns: minmax(0, 1fr); }
  dialog { max-width: calc(100vw - 24px); }
}
@media (max-width: 640px) { .h-sidebar { scrollbar-width: none; } .h-sidebar::-webkit-scrollbar { display: none; } }
}
