:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #172b4d;
    --muted: #5e6c84;
    --border: #dfe1e6;
    --primary: #0c66e4;
    --primary-hover: #0055cc;
    --topbar: #1d2125;
    --success-bg: #dcfff1;
    --success-text: #216e4e;
    --error-bg: #ffeceb;
    --error-text: #ae2e24;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--primary); }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    background: var(--topbar);
    color: #fff;
}
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.topbar-user { display: flex; align-items: center; gap: 0.75rem; }
.topbar-user form { margin: 0; }
.topbar .btn-link { color: #c7d1db; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.08);
}
.auth-card { max-width: 400px; margin: 2rem auto; }
.auth-card h1 { margin-top: 0; font-size: 1.5rem; }
.empty-state { text-align: center; }

label { display: block; margin: 1rem 0 0.3rem; font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}
input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }

.field-error { color: var(--error-text); font-size: 0.85rem; margin: 0.3rem 0 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; margin-top: 1.5rem; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

.muted { color: var(--muted); font-size: 0.9rem; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.btn-danger { background: var(--error-text); color: #fff; }
.btn-danger:hover { background: #8c241d; }
.btn-ghost { background: rgba(255, 255, 255, 0.2); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.32); }

/* Color picker */
.swatches { border: 0; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatches legend { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; padding: 0; }
.swatch {
    margin: 0; width: 40px; height: 32px; border-radius: 6px; cursor: pointer;
    background: var(--swatch); position: relative;
}
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: 3px solid var(--text); outline-offset: 2px; }
.swatch:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Boards grid */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    align-items: start;
}
.board-tile {
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 100px; padding: 0.75rem; border-radius: var(--radius);
    background: var(--board-bg); color: #fff; text-decoration: none;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.2);
}
a.board-tile:hover { filter: brightness(0.92); }
.board-tile-name { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.board-tile-meta { font-size: 0.8rem; opacity: 0.85; }
.board-tile-new { background: #e9ebee; color: var(--text); box-shadow: none; padding: 0; }
.board-tile-new summary {
    min-height: 100px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; list-style: none; font-weight: 600; border-radius: var(--radius);
}
.board-tile-new summary::-webkit-details-marker { display: none; }
.board-tile-new summary:hover { background: #dcdfe4; }
.board-tile-new[open] { grid-column: span 2; }
.board-tile-new[open] summary { min-height: 0; padding: 0.6rem; }
.board-tile-new .card { margin: 0 0.5rem 0.5rem; padding: 1rem; }
@media (max-width: 480px) { .board-tile-new[open] { grid-column: auto; } }

/* Single board page */
body.board-page { background: var(--board-bg); }
.board-main { padding: 0; }
.board-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 1.25rem; background: rgba(0, 0, 0, 0.18); color: #fff;
}
.board-title { margin: 0; font-size: 1.25rem; padding: 0.3rem 0; overflow-wrap: anywhere; }
.board-settings { position: relative; }
.board-settings summary { list-style: none; white-space: nowrap; }
.board-settings summary::-webkit-details-marker { display: none; }
.board-settings-panel {
    position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 10;
    width: min(340px, calc(100vw - 2rem)); color: var(--text); padding: 1rem;
}
.danger-zone { border-top: 1px solid var(--border); margin-top: 1.25rem; padding-top: 1rem; }
.danger-zone .btn { width: 100%; }
.board-main > .alert { margin: 1rem 1.25rem 0; }

/* Lists and cards */
body.board-page { min-height: 100vh; display: flex; flex-direction: column; }
.board-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.board-canvas {
    flex: 1; display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 1.25rem; overflow-x: auto;
}
.list {
    flex: 0 0 272px; max-height: calc(100vh - 140px); display: flex; flex-direction: column;
    background: #f1f2f4; border-radius: 12px; padding: 0.5rem;
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25);
}
.list-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.25rem; padding: 0.25rem 0.25rem 0.5rem 0.5rem; }
.list-name { margin: 0; font-size: 0.95rem; font-weight: 600; padding-top: 0.2rem; overflow-wrap: anywhere; }

.icon-btn {
    list-style: none; cursor: pointer; border-radius: 6px; padding: 0.1rem 0.45rem;
    color: var(--muted); line-height: 1.4; user-select: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: rgba(9, 30, 66, 0.12); color: var(--text); }

.list-menu { position: relative; }
.menu-panel {
    position: absolute; left: 0; top: calc(100% + 0.25rem); z-index: 20;
    width: 260px; padding: 1rem;
}
.menu-panel label:first-of-type { margin-top: 0; }
.menu-panel .btn-primary { margin-top: 0.75rem; }

.card-list { list-style: none; margin: 0; padding: 0 0.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.card-item {
    position: relative; background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25); font-size: 0.92rem;
}
.card-item:hover { box-shadow: 0 0 0 2px var(--primary); }
.card-link {
    display: flex; flex-direction: column; gap: 0.3rem; padding: 0.5rem 0.75rem;
    color: inherit; text-decoration: none; border-radius: inherit;
}
.card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.card-title { overflow-wrap: anywhere; padding: 0.1rem 0; }

textarea {
    width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 6px;
    font: inherit; resize: vertical;
}
textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.form-row { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.88rem; width: auto; margin-top: 0; }
.add-card form .btn-sm, .add-list form .btn-sm { margin-top: 0.4rem; }

.add-card { padding: 0.5rem 0.25rem 0; }
.add-card summary, .add-list summary {
    list-style: none; cursor: pointer; padding: 0.4rem 0.5rem; border-radius: 8px;
    color: var(--muted); font-weight: 600; font-size: 0.92rem;
}
.add-card summary::-webkit-details-marker, .add-list summary::-webkit-details-marker { display: none; }
.add-card summary:hover { background: rgba(9, 30, 66, 0.1); color: var(--text); }
.add-card[open] summary, .add-list[open] summary { display: none; }

.add-list { background: rgba(255, 255, 255, 0.24); box-shadow: none; }
.add-list summary { color: #fff; }
.add-list summary:hover { background: rgba(255, 255, 255, 0.16); }
.add-list[open] { background: #f1f2f4; }
.add-list input { margin: 0; }

/* Drag and drop */
.list-header { cursor: grab; }
.card-item { cursor: grab; }
.card-list { min-height: 0.5rem; }            /* empty lists still accept drops */
.drag-ghost { opacity: 0.4; }
.card-item.drag-ghost { background: #dcdfe4; box-shadow: none; }
.drag-floating { opacity: 1 !important; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.3); }
.card-item.drag-floating { transform: rotate(3deg); }
body:has(.drag-floating), body:has(.drag-floating) * { cursor: grabbing !important; }

.toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 100;
    background: var(--error-text); color: #fff; padding: 0.75rem 1.25rem; border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); max-width: calc(100vw - 2rem);
}
.btn-ghost-dark { background: rgba(9, 30, 66, 0.08); color: var(--text); }
.btn-ghost-dark:hover { background: rgba(9, 30, 66, 0.16); }

/* Labels and badges */
.label-chip {
    display: inline-flex; align-items: center; min-height: 1.6rem; min-width: 2.5rem;
    padding: 0 0.6rem; border-radius: 4px; background: var(--label); color: #1d2125;
    font-size: 0.82rem; font-weight: 600;
}
.label-chip-sm { min-height: 0.5rem; min-width: 2.5rem; padding: 0 0.4rem; font-size: 0.72rem; line-height: 1rem; }
.label-chip-sm:empty { height: 0.5rem; }
.label-chip-wide { flex: 1; }
.card-labels { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.card-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.8rem; }
.badge { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.05rem 0.3rem; border-radius: 4px; }
.badge-done { background: #1f845a; color: #fff; }
.icon { width: 1em; height: 1em; flex: 0 0 auto; }
/* Two classes so these beat .btn-ghost-dark on the dialog's due-date button. */
.due-overdue.badge, .due-overdue.btn { background: #c9372c; color: #fff; }
.due-soon.badge, .due-soon.btn { background: #f5cd47; color: #172b4d; }
.due-complete.badge, .due-complete.btn { background: #1f845a; color: #fff; }

/* Card dialog */
html.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 30, 66, 0.55); z-index: 50; }
.card-modal {
    position: fixed; inset: 3rem 1rem auto; z-index: 60; margin: 0 auto;
    width: min(768px, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem; border: 0; border-radius: 12px;
    background: #f1f2f4; color: var(--text); box-shadow: 0 12px 32px rgba(9, 30, 66, 0.35);
}
.card-modal:modal { inset: 0; margin: 3rem auto; max-height: calc(100vh - 6rem); }
.card-modal::backdrop { background: transparent; }   /* .modal-backdrop does the dimming */
.modal-close { position: absolute; top: 0.75rem; right: 0.75rem; font-size: 1.5rem; line-height: 1; text-decoration: none; padding: 0.15rem 0.5rem; }

.modal-header { padding-right: 2.5rem; }
.title-form { position: relative; }
.title-input {
    font-size: 1.25rem; font-weight: 700; border-color: transparent; background: transparent;
    resize: none; padding: 0.25rem 0.4rem; margin-left: -0.4rem; overflow: hidden;
}
.title-input:hover { background: rgba(9, 30, 66, 0.06); }
.title-input:focus { background: var(--surface); }
.title-save { display: none; margin-top: 0.4rem; }
.title-form:focus-within .title-save { display: inline-block; }
.modal-subtitle { margin: 0.1rem 0 0; }

.modal-body { display: grid; grid-template-columns: 1fr 180px; gap: 1.5rem; margin-top: 1rem; }
@media (max-width: 640px) {
    .modal-body { grid-template-columns: 1fr; }
    .card-modal, .card-modal:modal { margin: 0.5rem auto; max-height: calc(100vh - 1rem); padding: 1rem; }
}
.modal-section { margin-top: 1.5rem; }
.section-title { font-size: 1rem; margin: 0 0 0.5rem; }
.section-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 0 0 0.35rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.btn-block { display: block; width: 100%; }
.card-modal input[type="text"], .card-modal input[type="datetime-local"], .card-modal select {
    width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 6px;
    font: inherit; background: var(--surface);
}
.card-modal summary { list-style: none; cursor: pointer; }
.card-modal summary::-webkit-details-marker { display: none; }

/* Popovers (label picker, due date) */
.popover { position: relative; }
.popover-panel { position: absolute; left: 0; top: calc(100% + 0.35rem); z-index: 5; width: 290px; padding: 0.9rem; }
.popover-panel h4 { margin: 0 0 0.5rem; font-size: 0.9rem; text-align: center; color: var(--muted); }
.popover-panel form + form { margin-top: 0.5rem; }
.popover-panel label { margin-top: 0; }
.popover-panel .btn-primary { margin-top: 0.5rem; }
.label-option { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.label-option > form { flex: 1; }
.label-toggle { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.label-edit { flex-basis: auto; }
.label-edit[open] { flex-basis: 100%; }
.label-form { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0; }
.label-create { margin-top: 0.5rem; }
.label-create summary { width: 100%; text-align: center; }
.swatches-sm { margin: 0; gap: 0.3rem; }
.swatches-sm .swatch { width: 2.1rem; height: 1.5rem; }

/* Checkboxes (buttons styled as boxes, so they work as plain forms) */
.checkbox {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border: 2px solid #8590a2; border-radius: 3px;
    background: var(--surface); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 1;
}
[aria-pressed="true"] > .checkbox { background: var(--primary); border-color: var(--primary); }
.checkbox-btn { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.15rem 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.checkbox-btn .checkbox { margin-top: 0.15rem; }
.due-summary { display: inline-flex; gap: 0.4rem; align-items: center; }
.due-tag { font-size: 0.75rem; padding: 0 0.3rem; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }

/* Description */
.inline-editor[open] > summary { display: none; }
.description-view { display: block; padding: 0.5rem 0.6rem; border-radius: 6px; background: rgba(9, 30, 66, 0.04); }
.description-view:hover { background: rgba(9, 30, 66, 0.09); }
.description-text { overflow-wrap: anywhere; }

/* Checklists */
.checklist { margin-bottom: 1.25rem; }
.checklist-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.checklist-title { flex: 1; }
.checklist-title .form-row { margin-top: 0; }
.progress { display: flex; align-items: center; gap: 0.6rem; margin: 0.25rem 0 0.5rem; }
.progress-pct { width: 2.5rem; font-size: 0.75rem; color: var(--muted); }
.progress-track { flex: 1; height: 0.5rem; border-radius: 4px; background: rgba(9, 30, 66, 0.12); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--primary); transition: width 0.2s; }
.progress-fill.is-complete { background: #1f845a; }
.checklist-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; padding: 0.2rem 0.4rem; margin: 0 -0.4rem; border-radius: 6px; }
.checklist-item:hover { background: rgba(9, 30, 66, 0.06); }
.checklist-item.is-done .item-text { text-decoration: line-through; color: var(--muted); }
.item-text { overflow-wrap: anywhere; }
.item-delete { opacity: 0; }
.checklist-item:hover .item-delete, .item-delete:focus-visible { opacity: 1; }
@media (hover: none) { .item-delete { opacity: 1; } }
.add-item { margin-top: 0.4rem; }
.add-item[open] summary, .add-checklist[open] summary { display: none; }
.add-item .btn-primary { margin-top: 0.4rem; }
.add-checklist .form-row { margin-top: 0; }

/* Comments */
.comment-form .btn-primary { margin-top: 0.4rem; }
.comments { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.9rem; }
.comment-meta { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.88rem; }
.comment-meta time { font-size: 0.8rem; }
.comment-body {
    margin-top: 0.25rem; padding: 0.5rem 0.75rem; background: var(--surface); border-radius: 8px;
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.15); overflow-wrap: anywhere;
}
.comment-delete { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* Sidebar */
.modal-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-block label { margin: 0 0 0.3rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.sidebar-block select { margin-bottom: 0.4rem; }
.sidebar-meta { margin: 0; font-size: 0.8rem; }

/* Sharing */
.board-actions { display: flex; align-items: flex-start; gap: 0.5rem; }
.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 2rem; height: 2rem; border-radius: 50%; background: var(--avatar, #626f86);
    color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
}
.avatar-stack { display: flex; padding: 0.15rem 0.25rem 0 0; }
.avatar-stack li + li { margin-left: -0.45rem; }
.avatar-stack .avatar { border: 2px solid rgba(255, 255, 255, 0.85); }
.avatar-more { background: rgba(0, 0, 0, 0.35); }
.avatar-pending { background: #dfe1e6; color: var(--muted); }
.share-panel { width: min(380px, calc(100vw - 2rem)); }
.panel-title { font-size: 1rem; margin: 0 0 0.75rem; }
.share-form { margin: 0; }
.share-form input { flex: 1; min-width: 0; margin: 0; }
.share-form .btn { margin-top: 0; }
.share-hint { margin: 0.4rem 0 1rem; font-size: 0.8rem; }
.member-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.member-row { display: flex; align-items: center; gap: 0.6rem; }
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.member-info strong, .member-info .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-info .muted { font-size: 0.8rem; }
.role-tag { font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 0.15rem 0.45rem; border-radius: 4px; background: #f1f2f4; }
@media (max-width: 560px) {
    .board-header { flex-wrap: wrap; position: relative; }
    .avatar-stack { display: none; }
    /* Anchor header panels to the full header width so they stay on screen. */
    .board-settings { position: static; }
    .board-settings-panel, .share-panel { left: 1rem; right: 1rem; top: calc(100% - 0.25rem); width: auto; }
}

/* Activity */
.activity-panel { width: min(400px, calc(100vw - 2rem)); max-height: min(70vh, 560px); overflow-y: auto; }
.activity-list { display: flex; flex-direction: column; gap: 0.75rem; }
.activity-panel .activity-list { margin-bottom: 1rem; }
.activity { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; line-height: 1.4; }
.activity .avatar { width: 1.75rem; height: 1.75rem; font-size: 0.7rem; }
.activity-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.activity-text time { display: block; font-size: 0.78rem; }
.activity-text a { color: var(--text); font-weight: 600; }
.pager { display: flex; gap: 0.5rem; justify-content: space-between; margin-top: 1rem; }

/* Search */
.topbar { gap: 1rem; }
.topbar-search { flex: 1; max-width: 360px; margin: 0 auto 0 1rem; }
.topbar-search input {
    width: 100%; padding: 0.35rem 0.7rem; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 0.9rem;
}
.topbar-search input::placeholder { color: #b6c2cf; }
.topbar-search input:focus { background: #fff; color: var(--text); outline: 2px solid var(--primary); border-color: transparent; }
@media (max-width: 560px) {
    .topbar { flex-wrap: wrap; }
    .topbar-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
}
.search-page-form { display: flex; gap: 0.5rem; }
.search-page-form input {
    flex: 1; min-width: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--border);
    border-radius: 6px; font: inherit; background: var(--surface);
}
.search-page-form .btn { margin: 0; }
.search-tip { margin: 0.4rem 0 1.25rem; font-size: 0.85rem; }
.search-tip code { background: #e9ebee; padding: 0 0.25rem; border-radius: 3px; }
.search-heading { font-size: 1rem; margin: 1.5rem 0 0.6rem; }
.search-boards { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.search-board {
    padding: 0.5rem 0.85rem; border-radius: var(--radius); background: var(--board-bg);
    color: #fff; font-weight: 600; text-decoration: none;
}
.search-board mark { background: rgba(255, 255, 255, 0.85); color: var(--text); }
.search-results { display: flex; flex-direction: column; gap: 0.5rem; }
.search-result { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem 1rem; color: inherit; text-decoration: none; }
.search-result:hover { box-shadow: 0 0 0 2px var(--primary); }
.search-result-title { font-weight: 600; overflow-wrap: anywhere; }
.search-result-where { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); }
.board-dot { width: 0.65rem; height: 0.65rem; border-radius: 3px; background: var(--board-bg); }
.search-snippet { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.snippet-source { font-weight: 600; }
mark { background: #f8e6a0; color: inherit; border-radius: 2px; padding: 0 1px; }
