/* Feedback overlay. Uses the page's tokens when present, with neutral fallbacks. */
.fb-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fb-sr, .fb-trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* dock button: same family as the December button */
.fb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px; border: 1.5px solid var(--ink, #292826); border-radius: 999px; background: var(--sheet, #FAF9F6); color: var(--ink, #292826); font: 700 15px/1 var(--f-ui, system-ui, sans-serif); box-shadow: 0 2px 4px rgba(0,0,0,.22), 0 10px 22px -10px rgba(0,0,0,.45); cursor: pointer; transition: transform 240ms cubic-bezier(.2,.8,.2,1), background-color 200ms, color 200ms; }
.fb-btn:hover { transform: translateY(-2px); }
.fb-btn[aria-pressed="true"] { background: var(--blue, #49352C); border-color: var(--blue, #49352C); color: var(--paper, #FAF9F6); }
.fb-btn--float { position: fixed; right: 14px; bottom: 14px; z-index: 50; }
@media (max-width: 899px) { .fb-btn { padding: 0; width: 44px; justify-content: center; } .fb-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.fb-btn.is-folded { padding: 0; width: 48px; justify-content: center; gap: 0; }
.fb-btn.is-folded span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the paper tag on each section */
.fb-target { position: relative; }
.fb-tag { position: absolute; top: 14px; right: 14px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px 6px 10px; border: 0; border-radius: 2px; background: var(--sheet, #FAF9F6); color: var(--blue, #49352C); font: 700 16px/1 var(--f-hand, cursive); box-shadow: 0 1px 2px rgba(21,19,15,.16), 0 8px 18px -10px rgba(21,19,15,.45); transform: rotate(-1.8deg); cursor: pointer; transition: transform 200ms, box-shadow 200ms; }
.fb-tag:hover { transform: rotate(0deg) translateY(-1px); }
.fb-tag.is-set { background: var(--blue, #49352C); color: var(--paper, #FAF9F6); }
@media (min-width: 900px) { .fb-tag { top: 22px; right: max(22px, calc((100% - var(--wrap, 1200px)) / 2)); } }
@media (prefers-reduced-motion: reduce) { .fb-tag, .fb-btn { transition: none; transform: none; } }

/* the slim bar while feedback is on */
.fb-bar { position: fixed; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 49; display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 92px); padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--ink, #292826); color: var(--paper, #FAF9F6); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); font: 600 14px/1.2 var(--f-ui, system-ui, sans-serif); }
.fb-bar[hidden] { display: none; }
.fb-bar__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-bar__go { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--paper, #FAF9F6); color: var(--ink, #292826); font: 700 14px/1 var(--f-ui, system-ui, sans-serif); cursor: pointer; white-space: nowrap; }
.fb-bar__off { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.fb-bar__off:hover { background: rgba(255,255,255,.12); }
@media (max-width: 599px) { .fb-bar__t { display: none; } .fb-bar { padding-left: 6px; } }

/* the popover for one section (a bottom sheet on phones) */
.fb-pop { position: absolute; z-index: 70; width: min(360px, calc(100vw - 32px)); padding: 16px; border-radius: 12px; background: var(--sheet, #FAF9F6); color: var(--ink, #292826); box-shadow: 0 2px 6px rgba(21,19,15,.18), 0 24px 48px -20px rgba(21,19,15,.5); display: grid; gap: 12px; }
.fb-pop[hidden] { display: none; }
.fb-pop.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 14px 14px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.fb-pop__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fb-pop__t { margin: 0; font: 800 17px/1.25 var(--f-ui, system-ui, sans-serif); }
.fb-pop__act { display: flex; gap: 12px; align-items: center; }
.fb-x { display: grid; place-items: center; width: 40px; height: 40px; margin: -8px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; flex: none; }
.fb-x:hover { background: rgba(21,19,15,.06); }

/* shared controls */
.fb-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-seg label { position: relative; }
.fb-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.fb-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid rgba(21,19,15,.25); border-radius: 999px; font: 600 15px/1 var(--f-ui, system-ui, sans-serif); transition: background-color 160ms, color 160ms, border-color 160ms; }
.fb-seg input:checked + span { background: var(--ink, #292826); color: var(--paper, #FAF9F6); border-color: var(--ink, #292826); }
.fb-seg input:focus-visible + span { outline: 2px solid var(--blue, #49352C); outline-offset: 2px; }
.fb-field { display: grid; gap: 6px; font: 600 14px/1.3 var(--f-ui, system-ui, sans-serif); }
.fb-field small { font-weight: 400; color: var(--ink-3, #49352C); }
.fb-field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid rgba(21,19,15,.2); border-radius: 10px; background: var(--paper, #FAF9F6); color: inherit; font: 16px/1.45 var(--f-ui); resize: vertical; }
.fb-field textarea:focus { outline: none; border-color: var(--blue, #49352C); }
.fb-primary { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink, #292826); color: var(--paper, #FAF9F6); font: 700 15px/1 var(--f-ui, system-ui, sans-serif); cursor: pointer; }
.fb-primary:hover { background: var(--blue, #49352C); }
.fb-primary:disabled { opacity: .6; cursor: default; }
.fb-ghost { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink, #292826); border-radius: 999px; background: transparent; color: var(--ink, #292826); font: 700 15px/1 var(--f-ui, system-ui, sans-serif); cursor: pointer; }
.fb-quiet { min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--ink, #292826); font: 600 15px/1 var(--f-ui, system-ui, sans-serif); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* the drawer */
.fb-drawer { margin: auto 0 0 0; width: 100%; max-width: none; max-height: 92svh; padding: 0; border: 0; border-radius: 14px 14px 0 0; background: var(--paper, #FAF9F6); color: var(--ink, #292826); overflow: auto; overscroll-behavior: contain; }
.fb-drawer::backdrop { background: rgba(15,13,11,.55); }
@media (min-width: 720px) { .fb-drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(520px, 100vw); border-radius: 0; } }
.fb-drawer__in { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
@media (min-width: 720px) { .fb-drawer__in { padding: 28px 32px 32px; } }
.fb-drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fb-drawer__h { margin: 0; font: 500 32px/1.05 var(--f-serif, Georgia, serif); }
.fb-drawer__h:focus { outline: none; }
.fb-drawer__sub { margin: 6px 0 0; color: var(--ink-2, #49352C); font-size: 15px; }
.fb-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(21,19,15,.15); }
.fb-tabs button { min-height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-2, #49352C); font: 700 15px/1 var(--f-ui, system-ui, sans-serif); cursor: pointer; }
.fb-tabs button[aria-selected="true"] { color: var(--ink, #292826); border-bottom-color: var(--ink, #292826); }
.fb-rows, .fb-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fb-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--sheet, #FAF9F6); }
.fb-row__t { font-weight: 700; }
.fb-row__v { grid-row: 2; color: var(--ink-2, #49352C); font-size: 15px; }
.fb-row__n { grid-row: 3; grid-column: 1 / -1; font: 14px/1.45 var(--f-ui); color: var(--ink-2, #49352C); white-space: pre-wrap; }
.fb-row .fb-quiet { grid-column: 2; grid-row: 1 / span 2; }
.fb-topic__intro { margin: 0; color: var(--ink-2, #49352C); font-size: 15px; line-height: 1.5; }
.fb-topic { display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: var(--sheet, #FAF9F6); }
.fb-topic__t { margin: 0; font-weight: 800; line-height: 1.3; }
.fb-topic__s { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2, #49352C); }
.fb-topic__q { margin: 0; font: italic 500 18px/1.35 var(--f-serif, Georgia, serif); }
.fb-fine { margin: 0; font-size: 13px; color: var(--ink-3, #49352C); }
.fb-msg { margin: 0; min-height: 1.2em; font-size: 15px; }
.fb-msg.is-ok { color: var(--blue, #49352C); }
.fb-msg.is-err { color: var(--red-ink, #49352C); }
.fb-drawer__act { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; padding: 12px 0 4px; background: var(--paper, #FAF9F6); box-shadow: 0 -14px 14px -10px var(--paper, #FAF9F6); }

.fb-live { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--ink, #292826); color: var(--paper, #FAF9F6); font: 15px/1.3 var(--f-ui); max-width: calc(100vw - 32px); transition: opacity 240ms, transform 320ms; }
.fb-live.is-on { opacity: 1; transform: translate(-50%, 0); }
html.fb-on body:has(.fb-pop:not([hidden])) .dock { opacity: .35; }
.fb-live { visibility: hidden; transition: opacity 240ms, transform 320ms, visibility 0s 320ms; }
.fb-live.is-on { visibility: visible; transition: opacity 240ms, transform 320ms, visibility 0s; }
.fb-live { opacity: 1; transform: translate(-50%, 0); }
.fb-live:not(.is-on) { transform: translate(-50%, 16px); }

/* the section's why note inside the popover (task 12b) */
.fb-why { margin: 0 0 12px; border: 1px solid rgba(21,19,15,.14); border-radius: 8px; background: rgba(36,64,168,.05); }
.fb-why summary { cursor: pointer; padding: 10px 12px; min-height: 44px; display: flex; align-items: center; font-weight: 700; font-size: 14px; color: var(--blue, #49352C); }
.fb-why p { margin: 0 12px 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2, #292826); }
.fb-why summary::-webkit-details-marker { display: none; }
.fb-why summary { list-style: none; }
.fb-why summary::after { content: "Vis"; margin-left: auto; font-weight: 400; font-size: 13px; text-decoration: underline; }
.fb-why[open] summary::after { content: "Skjul"; }

/* blind-spot question cards, inline in their section. A question, not a note: paper card, red rule, typewriter heads (the notes are blue hand) */
.fb-btn--float-2 { bottom: 70px; }
.fb-blind { position: relative; max-width: 34em; margin: 18px 0; padding: 14px 16px; border: 1px solid rgba(21,19,15,.14); border-left: 3px solid #49352C; border-radius: 4px; background: #FAF9F6; color: #292826; font-family: inherit; }
.fb-blind__k { margin: 0 0 4px; font: 700 12px/1.3 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: #49352C; }
.fb-blind__t { margin: 0 0 8px; font: 700 17px/1.3 var(--f-ui); color: #292826; }
.fb-blind__s, .fb-blind__q { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: #292826; }
.fb-blind__s b, .fb-blind__q b { font-weight: 700; }
.fb-blind__go { min-height: 44px; padding: 0 14px; margin-top: 6px; border: 1px solid #292826; border-radius: 999px; background: transparent; color: #292826; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.fb-blind__go:hover { background: rgba(21,19,15,.06); }
.fb-blind__go:focus-visible { outline: 2px solid #49352C; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .fb-blind { animation: fb-blind-in 240ms ease-out both; } }
@keyframes fb-blind-in { from { opacity: 0; } to { opacity: 1; } }

/* element variants: a concept strip on the page (Daniel's layer, not Mazen's content). Blue like the concept strip; the why panel is blue too, so its white text has a ground. */
[data-fb-variants] > [data-fb-variant][hidden] { display: none !important; }
.fb-var { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin-bottom: 10px; padding: 6px 8px; border-radius: 8px; background: #49352C; color: #FAF9F6; }
.fb-var__k { font-family: var(--f-ui); font-size: 12px; letter-spacing: .04em; padding: 0 4px 0 2px; }
.fb-var__b, .fb-var__pick { min-height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; background: transparent; color: #FAF9F6; font: 600 13px/1.2 var(--f-ui, system-ui, sans-serif); cursor: pointer; }
.fb-var__b[aria-pressed="true"] { background: #FAF9F6; color: #49352C; border-color: #FAF9F6; }
.fb-var__pick { min-height: 36px; font-weight: 700; }
.fb-var__pick[aria-pressed="true"] { background: #FAF9F6; color: #49352C; border-color: #FAF9F6; }
.fb-var__b:focus-visible, .fb-var__pick:focus-visible, .fb-var__why summary:focus-visible { outline: 2px solid #FAF9F6; outline-offset: 2px; }
.fb-var__why { width: fit-content; max-width: 100%; margin: -4px 0 10px; padding: 6px 10px; border-radius: 8px; background: #49352C; color: #FAF9F6; }
.fb-var__why summary { display: inline-block; min-height: 32px; line-height: 32px; font-size: 12px; color: #FAF9F6; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fb-var__why p { margin: 4px 0 4px; font-size: 13px; line-height: 1.45; color: #FAF9F6; }
