@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap");
/* Bokatider – komponenter och sidlayout. Kräver tokens.css före denna fil. */

/* Bas */
body { margin: 0; background: var(--surface-0); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
.bt-pad { padding: var(--space-4); }
.bt-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.bt-stack { display: flex; flex-direction: column; gap: var(--space-4); }
:where(.bt-btn, .bt-seg button, .bt-input, .bt-link):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bt-tnum { font-variant-numeric: tabular-nums; }

/* Button */
.bt-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: var(--space-3) 20px; border-radius: var(--radius-md); border: 1px solid transparent; font: 600 16px/20px var(--font-sans); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.bt-btn-primary { background: var(--brand); color: var(--on-brand); }
.bt-btn-primary:hover { background: var(--brand-ink); }
.bt-btn-secondary { background: var(--surface-1); color: var(--ink); border-color: var(--line-strong); }
.bt-btn-secondary:hover { background: var(--surface-2); }
.bt-btn-ghost { background: transparent; color: var(--brand-ink); }
.bt-btn-ghost:hover { background: var(--brand-tint); }
.bt-btn svg { width: 18px; height: 18px; flex: none; }
.bt-btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.bt-btn-block { width: 100%; }
.bt-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* SiteHeader */
.bt-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); max-width: var(--page-width); margin: 0 auto; }
.bt-wordmark { font: 700 26px/1 var(--font-logo); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
@media (min-width: 600px) { .bt-header { padding: var(--space-6) var(--space-4); } .bt-wordmark { font-size: 34px; } }
.bt-wordmark span { color: var(--brand); }
.bt-header-nav { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-right: -10px; }
.bt-link { white-space: nowrap; color: var(--brand-ink); font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: var(--radius-sm); }
.bt-link:hover { background: var(--brand-tint); }

/* DateBlock */
.bt-date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 72px; border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink); flex: none; }
.bt-date-wd { font: 600 13px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.bt-date-d { font: 700 28px/28px var(--font-display); margin: 2px 0; font-variant-numeric: tabular-nums; }
.bt-date-m { font: 400 13px/16px var(--font-sans); color: var(--ink-muted); }
.bt-date-today { background: var(--accent); color: var(--on-accent); }
.bt-date-today .bt-date-wd, .bt-date-today .bt-date-m { color: var(--on-accent); }

/* StatusPill */
.bt-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; border-radius: var(--radius-pill); font: 600 13px/16px var(--font-sans); letter-spacing: .02em; white-space: nowrap; }
.bt-pill svg { width: 14px; height: 14px; flex: none; }
.bt-pill-yes { background: var(--status-yes-tint); color: var(--status-yes); }
.bt-pill-no { background: var(--status-no-tint); color: var(--status-no); }
.bt-pill-maybe, .bt-pill-pending { background: var(--status-maybe-tint); color: var(--status-maybe); }
.bt-pill-count { background: var(--surface-2); color: var(--ink); }

/* ActivityCard */
.bt-card { display: flex; gap: var(--space-4); padding: var(--space-4); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; }
a.bt-card:hover { border-color: var(--line-strong); }
.bt-card-body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; flex: 1; }
.bt-card-title { font: 600 20px/28px var(--font-sans); margin: 0; }
.bt-card-meta { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); margin: 0; }
.bt-card-meta strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bt-card-foot { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
@media (min-width: 600px) { .bt-card { padding: var(--space-6); } }

/* RsvpSelector */
.bt-rsvp { border: 0; margin: 0; padding: 0; }
.bt-rsvp legend { font: 600 13px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-2); padding: 0; }
.bt-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.bt-seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); min-height: 72px; padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink); font: 600 15px/20px var(--font-sans); cursor: pointer; }
.bt-seg button svg { width: 22px; height: 22px; }
.bt-seg button:hover { background: var(--surface-2); }
.bt-seg button[aria-checked="true"].yes { background: var(--status-yes-tint); color: var(--status-yes); border-color: var(--status-yes); box-shadow: inset 0 0 0 1px var(--status-yes); }
.bt-seg button[aria-checked="true"].no { background: var(--status-no-tint); color: var(--status-no); border-color: var(--status-no); box-shadow: inset 0 0 0 1px var(--status-no); }
.bt-seg button[aria-checked="true"].maybe { background: var(--status-maybe-tint); color: var(--status-maybe); border-color: var(--status-maybe); box-shadow: inset 0 0 0 1px var(--status-maybe); }

/* ParticipantList */
.bt-plist { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.bt-plist-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.bt-plist-head h3 { margin: 0; font: 600 16px/24px var(--font-sans); }
.bt-plist ul { list-style: none; margin: 0; padding: 0; }
.bt-plist li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.bt-plist li:last-child { border-bottom: 0; }
.bt-initials { width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; font: 600 13px/1 var(--font-sans); flex: none; }
.bt-plist-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-plist-note { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* TextField */
.bt-field { display: flex; flex-direction: column; gap: 6px; }
.bt-field label { font: 600 14px/20px var(--font-sans); }
.bt-input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-1); color: var(--ink); font: 400 16px/24px var(--font-sans); width: 100%; }
textarea.bt-input { min-height: 96px; resize: vertical; }
.bt-field-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bt-field-error .bt-input { border-color: var(--status-no); box-shadow: inset 0 0 0 1px var(--status-no); }
.bt-field-error .bt-field-hint { color: var(--status-no); }

/* Notice */
.bt-notice { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font: 400 15px/22px var(--font-sans); }
.bt-notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.bt-notice-info { background: var(--brand-tint); color: var(--brand-ink); }
.bt-notice-success { background: var(--status-yes-tint); color: var(--status-yes); }
.bt-notice-error { background: var(--status-no-tint); color: var(--status-no); }
.bt-notice strong { font-weight: 600; }

/* Hjälpklasser */
.bt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bt-count { color: var(--ink-muted); font-weight: 400; }
:where(.bt-switch, .bt-chip button, .bt-select):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Panel */
.bt-panel { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.bt-panel-head { padding: var(--space-4) var(--space-4) 0; }
.bt-panel-title { margin: 0; font: 600 20px/28px var(--font-sans); color: var(--ink); }
.bt-panel-desc { margin: var(--space-1) 0 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-panel-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-6); }
.bt-panel-foot { padding: var(--space-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
@media (min-width: 600px) { .bt-panel-head { padding: var(--space-6) var(--space-6) 0; } .bt-panel-body, .bt-panel-foot { padding: var(--space-6); } }

/* StepIndicator */
.bt-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); }
.bt-step { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); font: 600 13px/16px var(--font-sans); color: var(--ink-muted); }
.bt-step::before { content: ""; height: 4px; border-radius: var(--radius-pill); background: var(--line); }
.bt-step-done::before, .bt-step-current::before { background: var(--brand); }
.bt-step-dot { display: none; }
.bt-step-current { color: var(--ink); }
.bt-step-done { color: var(--brand-ink); }

/* DateTimeField */
.bt-dt { border: 0; margin: 0; padding: 0; min-width: 0; }
.bt-dt legend { font: 600 14px/20px var(--font-sans); padding: 0; margin-bottom: 6px; }
.bt-dt-row { display: grid; grid-template-columns: 1fr 1fr auto 1fr; gap: var(--space-2); align-items: center; }
.bt-dt-date { grid-column: 1 / -1; }
.bt-dt-row > label:nth-of-type(2) { grid-column: 1 / 3; }
.bt-dt-dash { color: var(--ink-muted); }
@media (min-width: 600px) { .bt-dt-row { grid-template-columns: 2fr 1fr auto 1fr; } .bt-dt-date { grid-column: auto; } .bt-dt-row > label:nth-of-type(2) { grid-column: auto; } }
.bt-input[type="date"], .bt-input[type="time"] { color-scheme: light dark; }

/* SelectField */
.bt-select-wrap { position: relative; }
.bt-select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.bt-select-wrap svg { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; color: var(--ink-muted); }

/* Toggle */
.bt-toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.bt-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.bt-toggle-label { font: 600 15px/22px var(--font-sans); }
.bt-switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; padding: 0; transition: background-color .15s; }
.bt-switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--ink-muted); transition: transform .15s, background-color .15s; }
.bt-switch[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.bt-switch[aria-checked="true"] .bt-switch-knob { transform: translateX(20px); background: var(--on-brand); }

/* InviteeInput */
.bt-invite-row { display: flex; gap: var(--space-2); }
.bt-invite-row .bt-input { flex: 1; min-width: 0; }
.bt-invite-row .bt-btn svg { width: 18px; height: 18px; }
.bt-chips { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bt-chip { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand-ink); font: 500 14px/20px var(--font-sans); max-width: 100%; }
.bt-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-chip button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; cursor: pointer; padding: 0; }
.bt-chip button:hover { background: var(--surface-1); }
.bt-chip svg { width: 14px; height: 14px; }

/* ShareLink */
.bt-share label { display: inline-flex; align-items: center; gap: 6px; }
.bt-share label svg { width: 16px; height: 16px; color: var(--status-no); }
.bt-share-url { font-variant-numeric: tabular-nums; text-overflow: ellipsis; background: var(--surface-2); }
.bt-share-secret .bt-field-hint { color: var(--status-no); }

/* ResponseSummary */
.bt-summary { display: flex; flex-direction: column; gap: var(--space-4); }
.bt-summary-bar { display: flex; gap: 3px; height: 12px; border-radius: var(--radius-pill); overflow: hidden; }
.bt-summary-bar span { flex-basis: 0; min-width: 6px; }
.bt-bar-yes { background: var(--status-yes); }
.bt-bar-maybe { background: var(--status-maybe); }
.bt-bar-no { background: var(--status-no); }
.bt-bar-pending { background: var(--line-strong); }
.bt-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin: 0; }
@media (min-width: 600px) { .bt-summary-grid { grid-template-columns: repeat(4, 1fr); } }
.bt-summary-item { padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); }
.bt-summary-item dt { display: flex; align-items: center; gap: 6px; font: 600 13px/16px var(--font-sans); letter-spacing: .02em; }
.bt-summary-item dt svg { width: 14px; height: 14px; }
.bt-summary-item dd { margin: var(--space-2) 0 0; font: 700 32px/32px var(--font-display); color: var(--ink); }
.bt-summary-yes { background: var(--status-yes-tint); } .bt-summary-yes dt { color: var(--status-yes); }
.bt-summary-no { background: var(--status-no-tint); } .bt-summary-no dt { color: var(--status-no); }
.bt-summary-maybe { background: var(--status-maybe-tint); } .bt-summary-maybe dt { color: var(--status-maybe); }
.bt-summary-pending dt { color: var(--ink-muted); }
.bt-summary-goal { margin: 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }

/* DateBlock, liten */
.bt-date-sm { width: 44px; height: 52px; }
.bt-date-sm .bt-date-d { font-size: 20px; line-height: 20px; margin: 1px 0; }
.bt-date-sm .bt-date-wd, .bt-date-sm .bt-date-m { font-size: 11px; line-height: 14px; }

/* Ikonknapp */
.bt-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; padding: 0; }
.bt-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.bt-icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.bt-icon-btn svg { width: 18px; height: 18px; }
.bt-icon-btn:focus-visible, .bt-opted-kind button:focus-visible, .bt-poll-choices button:focus-visible, .bt-results-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Alternativets rubrik (förfrågan) */
.bt-opt-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.bt-opt-text { display: flex; flex-direction: column; min-width: 0; }
.bt-opt-title { font: 600 16px/24px var(--font-sans); color: var(--ink); }
.bt-opt-sub { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }

/* OptionEditor */
.bt-opted { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.bt-opted-kind { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-md); background: var(--surface-2); }
.bt-opted-kind button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-muted); font: 600 14px/20px var(--font-sans); cursor: pointer; }
.bt-opted-kind button[aria-checked="true"] { background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-card); }
.bt-opted-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); width: 100%; }
.bt-opted-row { display: flex; align-items: center; gap: var(--space-2); }
.bt-opted-n { width: 24px; flex: none; text-align: center; font: 600 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-opted-fields { flex: 1; min-width: 0; display: grid; gap: var(--space-2); }
.bt-opted-time { grid-template-columns: 1fr 1fr; }
.bt-opted-time label:first-child { grid-column: 1 / -1; }
@media (min-width: 600px) { .bt-opted-time { grid-template-columns: 2fr 1fr 1fr; } .bt-opted-time label:first-child { grid-column: auto; } }

/* PollVote */
.bt-poll-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.bt-poll-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-1); }
.bt-poll-row.bt-poll-yes { border-color: var(--status-yes); background: var(--status-yes-tint); }
.bt-poll-row.bt-poll-maybe { border-color: var(--status-maybe); background: var(--status-maybe-tint); }
.bt-poll-row.bt-poll-no { border-color: var(--line-strong); }
.bt-poll-choices { display: flex; gap: 4px; flex: none; }
.bt-poll-choices button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink-muted); cursor: pointer; padding: 0; }
.bt-poll-choices button svg { width: 20px; height: 20px; }
.bt-poll-choices button:hover { color: var(--ink); background: var(--surface-2); }
.bt-poll-choices button[aria-checked="true"].yes { background: var(--status-yes); border-color: var(--status-yes); color: var(--surface-1); }
.bt-poll-choices button[aria-checked="true"].maybe { background: var(--status-maybe); border-color: var(--status-maybe); color: var(--surface-1); }
.bt-poll-choices button[aria-checked="true"].no { background: var(--status-no); border-color: var(--status-no); color: var(--surface-1); }
.bt-poll-key { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-3) 0 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-poll-key span { display: inline-flex; align-items: center; gap: 4px; }
.bt-poll-key svg { width: 14px; height: 14px; }

/* PollResults */
.bt-results { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.bt-results-scroll { overflow-x: auto; }
.bt-results-table { border-collapse: separate; border-spacing: 0; width: 100%; font: 400 15px/20px var(--font-sans); }
.bt-results-table th, .bt-results-table td { padding: var(--space-3); border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; white-space: nowrap; }
.bt-results-table thead th { text-align: left; font-weight: 400; }
.bt-results-table thead .bt-opt-head { gap: var(--space-2); }
.bt-results-table thead .bt-opt-title { font-size: 14px; line-height: 20px; }
.bt-results-name { position: sticky; left: 0; z-index: 1; background: var(--surface-1); text-align: left !important; font-weight: 600; min-width: 128px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); }
.bt-results-youtag { font-weight: 400; color: var(--ink-muted); }
.bt-results-you th, .bt-results-you td { background-color: var(--brand-tint); }
.bt-results-you .bt-results-name { background: var(--brand-tint); color: var(--brand-ink); }
.bt-results-best { background-color: var(--brand-tint); }
.bt-cell { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-pill); }
.bt-cell svg { width: 16px; height: 16px; }
.bt-cell-yes .bt-cell { background: var(--status-yes-tint); color: var(--status-yes); }
.bt-cell-maybe .bt-cell { background: var(--status-maybe-tint); color: var(--status-maybe); }
.bt-cell-no .bt-cell { background: var(--status-no-tint); color: var(--status-no); }
.bt-cell-pending .bt-cell { color: var(--ink-muted); }
.bt-results-table tfoot th, .bt-results-table tfoot td { border-bottom: 0; }
.bt-results-total { vertical-align: top !important; }
.bt-results-total > * { display: block; margin: 0 auto; }
.bt-results-count { font: 700 24px/28px var(--font-display); color: var(--ink); }
.bt-results-maybe { font-size: 13px; line-height: 18px; color: var(--status-maybe); margin-bottom: 4px; }
.bt-results-total .bt-pill { display: inline-flex; margin-top: 4px; }

/* Ikoner utan JavaScript: <i class="bt-i bt-i-yes" aria-hidden="true"></i>. Färgen följer textfärgen. */
.bt-i { display: inline-block; flex: none; width: 1em; height: 1em; background-color: currentColor; -webkit-mask: var(--bt-icon) center / contain no-repeat; mask: var(--bt-icon) center / contain no-repeat; vertical-align: -0.125em; }
.bt-btn .bt-i { width: 18px; height: 18px; }
.bt-pill .bt-i { width: 14px; height: 14px; }
.bt-notice .bt-i { width: 20px; height: 20px; margin-top: 1px; }
.bt-i-yes { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 12.5l4.5 4.5L19 7.5%27/%3E%3C/svg%3E"); }
.bt-i-no { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6.5 6.5l11 11M17.5 6.5l-11 11%27/%3E%3C/svg%3E"); }
.bt-i-maybe { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M8.5 8.8a3.5 3.5 0 1 1 5 3.1c-.9.45-1.5 1.3-1.5 2.3v.4M12 18.6v.1%27/%3E%3C/svg%3E"); }
.bt-i-pending { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z%27/%3E%3C/svg%3E"); }
.bt-i-info { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 11v6M12 7.5v.1M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z%27/%3E%3C/svg%3E"); }
.bt-i-error { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 7.5v5.5M12 16.5v.1M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z%27/%3E%3C/svg%3E"); }
.bt-i-success { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M8 12.5l3 3 5-6M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z%27/%3E%3C/svg%3E"); }
.bt-i-copy { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M9 9h10v10H9zM5 15V5h10%27/%3E%3C/svg%3E"); }
.bt-i-plus { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 5v14M5 12h14%27/%3E%3C/svg%3E"); }
.bt-i-close { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M7 7l10 10M17 7L7 17%27/%3E%3C/svg%3E"); }
.bt-i-chevron { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E"); }
.bt-i-lock { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272.2%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M7 11V8a5 5 0 0 1 10 0v3M5 11h14v10H5z%27/%3E%3C/svg%3E"); }

/* Sidlayout */
.bt-page { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--space-4); }
.bt-page-wide { max-width: var(--page-width); }
.bt-hero { padding: var(--space-12) 0 var(--space-8); }
.bt-hero h1 { margin: var(--space-3) 0 var(--space-4); }
.bt-eyebrow { color: var(--brand-ink); margin: 0; }
.bt-lead { font: 400 18px/28px var(--font-sans); color: var(--ink-muted); margin: 0; max-width: 34em; }
.bt-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.bt-section { margin-top: var(--space-12); }
.bt-section > h2 { margin: 0 0 var(--space-4); }
.bt-how { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: how; }
.bt-how li { counter-increment: how; padding: var(--space-4); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.bt-how li::before { content: counter(how); display: block; font: 700 28px/28px var(--font-display); color: var(--brand); margin-bottom: var(--space-3); }
.bt-how h3 { margin: 0 0 var(--space-1); }
.bt-how p { margin: 0; color: var(--ink-muted); }
.bt-footer { max-width: var(--page-width); margin: var(--space-16) auto 0; padding: var(--space-6) var(--space-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-footer a { color: var(--ink-muted); }
.bt-footer a:hover { color: var(--ink); }
@media (min-width: 600px) {
  .bt-page { padding: 0 var(--space-6); }
  .bt-hero { padding-top: var(--space-16); }
  .bt-how { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Formulär i ren HTML (JSP-sidor) ---------- */
.bt-intro { padding: var(--space-6) 0 var(--space-6); }
.bt-intro h1 { margin: 0 0 var(--space-3); }
.bt-intro .bt-lead { margin: 0; }
.bt-steps { margin-top: var(--space-6); }
.bt-optional { font-weight: 400; color: var(--ink-muted); }
.bt-grid { display: grid; gap: var(--space-3); }
.bt-grid-time { grid-template-columns: 1fr 1fr; }
.bt-grid-time > :first-child { grid-column: 1 / -1; }
.bt-grid-2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 600px) {
  .bt-grid-time { grid-template-columns: 2fr 1fr 1fr; }
  .bt-grid-time > :first-child { grid-column: auto; }
}
.bt-field > .bt-field-hint + .bt-field-hint { margin-top: -2px; }
.bt-select-wrap .bt-i { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; color: var(--ink-muted); }
.bt-input[type="date"], .bt-input[type="time"] { min-width: 0; }

/* Flikar med radioknappar */
.bt-tabs-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.bt-tabs { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-md); background: var(--surface-2); }
.bt-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bt-tabs label { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 8px; font: 600 15px/20px var(--font-sans); color: var(--ink-muted); cursor: pointer; }
.bt-tabs input:checked + label { background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-card); }
.bt-tabs input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.bt-form[data-kind="text"] .bt-only-time, .bt-form[data-kind="time"] .bt-only-text { display: none !important; }

/* Fällbar sektion */
.bt-details > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 600 15px/20px var(--font-sans); color: var(--brand-ink); cursor: pointer; list-style: none; }
.bt-details > summary::-webkit-details-marker { display: none; }
.bt-details > summary .bt-i { width: 16px; height: 16px; transition: transform .15s; }
.bt-details[open] > summary .bt-i { transform: rotate(180deg); }
.bt-details[open] > summary { margin-bottom: var(--space-2); }
.bt-details > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Verifieringskod */
.bt-captcha { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.bt-captcha img { display: block; height: 48px; width: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #ffffff; }
.bt-captcha .bt-input { flex: 1; min-width: 140px; max-width: 220px; letter-spacing: .08em; }
.bt-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Fellista */
.bt-notice ul { margin: var(--space-1) 0 0; padding-left: 1.2em; }
.bt-notice a { color: inherit; font-weight: 600; }

/* Lista med alternativ */
.bt-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-3); }
.bt-list-head h2 { margin: 0; }
.bt-optlist { list-style: none; margin: 0; padding: 0; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.bt-optlist > li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.bt-optlist > li:last-child { border-bottom: 0; }
.bt-optlist form { margin: 0; }
.bt-opt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bt-opt-desc { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); margin-top: 2px; overflow-wrap: anywhere; }
.bt-opt-mark { display: grid; place-items: center; width: 44px; height: 52px; flex: none; border-radius: var(--radius-md); background: var(--brand-tint); color: var(--brand-ink); font: 700 20px/1 var(--font-display); }
.bt-optlist .bt-opt-title { overflow-wrap: anywhere; }
.bt-empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--ink-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.bt-empty strong { display: block; color: var(--ink); margin-bottom: var(--space-1); }

/* Åtgärdsrader */
.bt-bottombar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-8); }
.bt-bottombar .bt-field-hint { flex: 1 1 240px; }
.bt-share-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bt-share-url { font-size: 15px; }
.bt-stack-lg { display: flex; flex-direction: column; gap: var(--space-8); }
@media (max-width: 599px) { .bt-bottombar .bt-btn, .bt-panel-foot .bt-btn-primary { flex: 1 1 auto; } }
.bt-notice-block { margin-bottom: var(--space-6); }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
.bt-panel-body > .bt-notice-block, .bt-stack > .bt-notice-block, .bt-stack-lg > .bt-notice-block { margin-bottom: 0; }

/* Klockslag (bt.tid): timme : minut */
.bt-time-row { display: flex; align-items: center; gap: 4px; }
.bt-time-row .bt-select-wrap { flex: 1 1 0; min-width: 0; }
.bt-time .bt-select { padding-right: 28px; padding-left: 10px; }
.bt-time .bt-select-wrap .bt-i { right: 8px; width: 16px; height: 16px; margin-top: -8px; }
.bt-time-sep { font-weight: 600; color: var(--ink-muted); }

/* Inaktiva fält (t.ex. klockslag innan datum valts) */
.bt-input:disabled { opacity: .5; cursor: not-allowed; background: var(--surface-2); }
.bt-field:has(.bt-input:disabled) > label { color: var(--ink-muted); }

/* Kalender (bt.kalender): ett eller flera datum */
.bt-cal-label { font: 600 14px/20px var(--font-sans); }
.bt-cal.is-aktiv { position: relative; padding: var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-1); }
.bt-cal-nav { position: absolute; top: var(--space-2); left: var(--space-2); right: var(--space-2); display: flex; justify-content: space-between; pointer-events: none; }
.bt-cal-nav .bt-icon-btn { width: 40px; height: 40px; pointer-events: auto; }
.bt-cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-6); }
.bt-cal-title { text-align: center; font: 600 16px/40px var(--font-sans); margin-bottom: var(--space-1); }
.bt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bt-cal-wd { text-align: center; font: 600 12px/24px var(--font-sans); color: var(--ink-muted); }
.bt-cal-day { position: relative; aspect-ratio: 1; min-height: 40px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 500 15px/1 var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; }
.bt-cal-day:hover:not(:disabled) { background: var(--surface-2); }
.bt-cal-day.is-idag { box-shadow: inset 0 0 0 1px var(--line-strong); }
.bt-cal-day.is-valt { background: var(--brand); color: var(--on-brand); font-weight: 700; box-shadow: none; }
.bt-cal-day.is-valt:hover { background: var(--brand-ink); }
.bt-cal-day:disabled { color: var(--ink-muted); opacity: .4; cursor: default; }
.bt-cal-day.has-option::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.bt-cal-day.is-valt.has-option::after { background: var(--on-brand); }
.bt-cal-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; z-index: 1; }
.bt-cal-summary { display: flex; flex-direction: column; gap: var(--space-1); }
.bt-cal-count { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font: 600 14px/20px var(--font-sans); }
.bt-cal-summary .bt-chips { margin-top: 0; }
.bt-rot-90 { transform: rotate(90deg); }
.bt-rot-270 { transform: rotate(-90deg); }

/* ---------- Svarssidan (svara.jsp) ---------- */
.bt-desc { margin-top: var(--space-3); font: 400 16px/24px var(--font-sans); overflow-wrap: anywhere; }
.bt-desc p { margin: 0 0 var(--space-2); }
.bt-svar-summary { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: var(--space-4) 0 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-svar-summary > span + span::before { content: "\00B7"; margin-right: var(--space-3); color: var(--line-strong); }
.bt-svar-summary-best { color: var(--status-yes); font-weight: 600; }
.bt-svar-form { display: flex; flex-direction: column; gap: var(--space-6); }
.bt-svar-as { margin: 0; font: 600 15px/22px var(--font-sans); color: var(--ink-muted); }

/* Verktygsrad: vy, sortering, filter */
.bt-svar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.bt-seg-btns { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-md); background: var(--surface-2); }
.bt-seg-btns button { min-height: 36px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-muted); font: 600 14px/20px var(--font-sans); cursor: pointer; }
.bt-seg-btns button[aria-pressed="true"] { background: var(--surface-1); color: var(--ink); box-shadow: var(--shadow-card); }
.bt-seg-btns button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bt-check { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; font: 500 14px/20px var(--font-sans); cursor: pointer; }
.bt-check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }

/* Listan med alternativ */
.bt-svar-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.bt-svar-list { list-style: none; margin: 0; padding: 0; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.bt-svar-man { position: sticky; top: 0; z-index: 2; padding: var(--space-2) var(--space-4); background: var(--surface-2); color: var(--ink); font: 600 13px/18px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.bt-svar-man:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.bt-svar { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.bt-svar:last-child { border-bottom: 0; }
.bt-svar > .bt-date, .bt-svar > .bt-opt-mark { margin-top: 2px; }
.bt-svar-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bt-svar[data-mitt="yes"] { background: color-mix(in srgb, var(--status-yes-tint) 55%, transparent); }
.bt-svar[data-mitt="no"] { background: color-mix(in srgb, var(--status-no-tint) 45%, transparent); }

/* Vem har svarat: stapel + antal, fäll ut för namn */
.bt-svar-vem { margin-top: var(--space-2); }
.bt-svar-vem > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); list-style: none; cursor: pointer; font: 500 13px/18px var(--font-sans); color: var(--ink-muted); }
.bt-svar-vem > summary::-webkit-details-marker { display: none; }
.bt-svar-vem > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.bt-svar-bar { display: flex; gap: 2px; width: 72px; height: 8px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-2); flex: none; }
.bt-svar-bar .ja { background: var(--status-yes); }
.bt-svar-bar .nej { background: var(--status-no); }
.bt-svar-n { font-variant-numeric: tabular-nums; }
.bt-svar-best { height: 24px; font-size: 12px; padding: 0 10px 0 8px; }
.bt-svar-namnlista { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); font: 400 14px/20px var(--font-sans); }
.bt-svar-namnlista p { margin: 0; }
.bt-svar-namnlista p + p { margin-top: var(--space-1); }
.bt-svar-namnlista .ja { color: var(--status-yes); }
.bt-svar-namnlista .nej { color: var(--status-no); }

/* Ja / Nej */
.bt-svar-val { display: flex; gap: var(--space-1); flex: none; }
.bt-svar-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bt-svar-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; height: 52px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink-muted); font: 600 12px/14px var(--font-sans); cursor: pointer; user-select: none; }
.bt-svar-btn .bt-i { width: 18px; height: 18px; }
.bt-svar-btn:hover { background: var(--surface-2); color: var(--ink); }
.bt-svar-radio:checked + .bt-svar-btn.ja { background: var(--status-yes); border-color: var(--status-yes); color: var(--surface-1); }
.bt-svar-radio:checked + .bt-svar-btn.nej { background: var(--status-no); border-color: var(--status-no); color: var(--surface-1); }
.bt-svar-radio:focus-visible + .bt-svar-btn { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 420px) { .bt-svar-btn { width: 48px; } .bt-svar { gap: var(--space-2); padding-left: var(--space-3); } }

/* Tabellvyn */
.bt-results-comment { text-align: left !important; white-space: normal !important; min-width: 160px; max-width: 260px; color: var(--ink-muted); font-size: 14px; }
.bt-results-sub { display: block; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.bt-results-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-1); }
.bt-results-table thead th.bt-results-name { z-index: 3; }
.bt-results-table thead th.bt-results-best { background: var(--brand-tint); }
.bt-svar-tabell .bt-results-scroll { max-height: 75vh; }

/* Kommentarer */
.bt-svar-kommentarer h2 { margin: 0 0 var(--space-2); }
.bt-svar-kommentarer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.bt-svar-kommentarer li { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface-1); border: 1px solid var(--line); overflow-wrap: anywhere; }
.bt-svar-kommentarer strong { margin-right: var(--space-1); }

/* Spara-rad som ligger kvar i nederkant */
.bt-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0 calc(-1 * var(--space-4)); padding: var(--space-3) var(--space-4); background: var(--surface-1); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
.bt-savebar-text { font: 500 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-savebar.has-changes .bt-savebar-text { color: var(--ink); font-weight: 600; }
@media (min-width: 600px) { .bt-savebar { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; } }
.bt-desc a { color: var(--brand-ink); font-weight: 600; }
.bt-svar-summary-best { flex-basis: 100%; }
.bt-svar-summary > .bt-svar-summary-best::before { content: none; }

/* Tabellvyn: får använda hela sidbredden och har smala kolumner */
.bt-svar-tabell { position: relative; left: 50%; width: min(var(--page-width), calc(100vw - 2 * var(--space-4))); transform: translateX(-50%); }
.bt-svar-tabell .bt-results-table thead .bt-opt-head { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.bt-svar-tabell .bt-results-table thead .bt-opt-text { align-items: center; }
.bt-svar-tabell .bt-results-table thead .bt-opt-title { font-size: 12px; line-height: 16px; white-space: normal; }
.bt-svar-tabell .bt-results-table thead .bt-opt-sub { font-size: 11px; line-height: 14px; white-space: normal; }
.bt-svar-tabell .bt-results-table th, .bt-svar-tabell .bt-results-table td { padding: var(--space-2) 6px; min-width: 64px; max-width: 96px; }
.bt-svar-tabell .bt-results-table .bt-results-name { min-width: 112px; max-width: 160px; padding-left: var(--space-3); white-space: normal; }
.bt-svar-tabell .bt-results-table .bt-results-comment { min-width: 160px; max-width: 260px; }
.bt-svar-tabell .bt-results-count { font-size: 18px; line-height: 22px; }
.bt-svar-tools .bt-check { flex-basis: 100%; }
@media (min-width: 600px) { .bt-svar-tools .bt-check { flex-basis: auto; } }
/* Dolda skärmläsartexter i tabellen ska klippas av tabellens scrollruta. */
.bt-results, .bt-results-scroll { position: relative; }

/* Kommentar per alternativ */
.bt-i-comment { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 5h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-8l-5 4v-4H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z%27/%3E%3C/svg%3E"); }
.bt-svar { flex-wrap: wrap; }
.bt-svar-kom-btn { display: grid; place-items: center; width: 36px; height: 52px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; padding: 0; }
.bt-svar-kom-btn .bt-i { width: 18px; height: 18px; }
.bt-svar-kom-btn:hover { background: var(--surface-2); color: var(--ink); }
.bt-svar-kom-btn.has-kom, .bt-svar-kom-btn[aria-expanded="true"] { color: var(--brand-ink); }
.bt-svar-kom-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bt-svar-kom { flex-basis: 100%; display: flex; align-items: center; gap: var(--space-2); padding-left: 56px; }
.bt-svar-kom > .bt-i { width: 16px; height: 16px; color: var(--ink-muted); flex: none; }
.bt-svar-kom .bt-input { min-height: 40px; padding: 8px 10px; font-size: 16px; }
.bt-svar-komn { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.bt-svar-komn .bt-i { width: 14px; height: 14px; }
@media (max-width: 420px) { .bt-svar-kom { padding-left: 0; } .bt-svar-kom-btn { width: 30px; } }

/* Kommentar i tabellen: liten bubbla, texten visas vid hovring eller tryck */
.bt-results-table td { position: relative; }
.bt-cell-kom { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 18px; height: 18px; color: var(--brand-ink); cursor: help; border-radius: var(--radius-pill); }
.bt-cell-kom .bt-i { width: 13px; height: 13px; }
.bt-cell-kom:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.bt-tip { display: none; position: absolute; z-index: 4; top: 22px; right: -6px; width: max-content; max-width: 200px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--ink); color: var(--surface-0); font: 400 13px/18px var(--font-sans); text-align: left; white-space: normal; box-shadow: var(--shadow-card); }
.bt-cell-kom:hover .bt-tip, .bt-cell-kom:focus .bt-tip { display: block; }
.bt-results-table .bt-results-name { z-index: 3; }
.bt-results-table thead th.bt-results-name { z-index: 4; }
.bt-cell-kom { z-index: 1; }
.bt-cell-kom:hover, .bt-cell-kom:focus { z-index: 5; }

/* Språkval i sidhuvudet (bt.sprakval) */
.bt-lang { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.bt-lang .bt-select { min-height: 38px; width: auto; padding: 6px 32px 6px 34px; font-size: 15px; background-color: transparent; border-color: var(--line); }
.bt-lang .bt-select:hover { border-color: var(--line-strong); }
.bt-lang-wrap .bt-i { right: 10px; width: 16px; height: 16px; margin-top: -8px; }
.bt-lang-wrap .bt-i-globe { left: 11px; right: auto; }
.bt-i-globe { --bt-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zM3.5 9h17M3.5 15h17M12 3c-2.3 2.6-3.5 5.6-3.5 9s1.2 6.4 3.5 9M12 3c2.3 2.6 3.5 5.6 3.5 9s-1.2 6.4-3.5 9%27/%3E%3C/svg%3E"); }

/* Samtycke till cookies (samtycke.jspf) */
.bt-footer-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.bt-consent { position: fixed; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); z-index: 50; max-width: 720px; margin: 0 auto; background: var(--surface-1); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); padding: var(--space-4) var(--space-6); display: flex; align-items: center; gap: var(--space-6); }
.bt-consent-text { flex: 1; min-width: 0; }
.bt-consent-text strong { display: block; font: 600 16px/24px var(--font-sans); }
.bt-consent-text p { margin: 2px 0 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.bt-consent-actions { display: flex; gap: var(--space-2); flex: none; }
.bt-consent-actions .bt-btn { min-width: 110px; }
@media (max-width: 599px) { .bt-consent { flex-direction: column; align-items: stretch; gap: var(--space-3); padding: var(--space-4); } .bt-consent-actions .bt-btn { flex: 1; } }
.bt-consent-text p a { color: var(--brand); text-decoration: underline; }
/* Löptext (integritet.jsp) */
.bt-prose p, .bt-prose ul { margin: 0 0 var(--space-3); font: 400 16px/26px var(--font-sans); color: var(--ink); }
.bt-prose p:last-child, .bt-prose ul:last-child { margin-bottom: 0; }
.bt-prose ul { padding-left: 22px; }
.bt-prose li { margin-bottom: var(--space-2); }
.bt-table-wrap { overflow-x: auto; }
.bt-cookie-table { width: 100%; border-collapse: collapse; font: 400 15px/22px var(--font-sans); }
.bt-cookie-table th { text-align: left; font: 600 13px/18px var(--font-sans); color: var(--ink-muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.bt-cookie-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bt-cookie-table code { font-size: 14px; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
@media (max-width: 599px) { .bt-cookie-table thead { display: none; } .bt-cookie-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); } .bt-cookie-table td { display: block; border: 0; padding: 2px 0; } }
