/* TETRI dock, preserving the reference's monochrome palette, hairlines and pills. */
#tetri-widget { --tw-bg: #0b0b0b; --tw-fg: #f1f1f1; --tw-accent: var(--tetri-tiffany,#81d8d0); --tw-chrome: var(--tetri-chrome,#c6d0d6); --tw-line: color-mix(in srgb,var(--tw-chrome) 28%,transparent); color: var(--tw-fg); font: 14px/1.45 HelveticaNeueLight, Arial, sans-serif; }
#tetri-widget *, #tetri-widget *::before, #tetri-widget *::after { box-sizing: border-box; }
#tetri-widget :is(button,a,input) { -webkit-tap-highlight-color: transparent; }
#tetri-widget :is(button,a,input):focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 4px; }
#tetri-widget button { font: inherit; cursor: pointer; color: inherit; }
#tetri-widget a { color: inherit; text-decoration: none; }
#tetri-widget button:disabled { cursor: default; opacity: .3; }
#tetri-widget .tw-launcher-wrap { position: fixed; right: 24px; bottom: 68px; display: flex; align-items: center; gap: 12px; z-index: 1200; }
#tetri-widget .tw-status { padding: 7px 10px; background: rgba(11,11,11,.75); color: var(--tw-accent); backdrop-filter: blur(12px); border: 1px solid var(--tw-line); border-radius: 30px; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
#tetri-widget .tw-launcher { position: relative; display: grid; place-items: center; width: 56px; height: 56px; padding: 13px; border: 1px solid var(--tw-chrome); border-radius: 50%; background: var(--tw-bg); box-shadow: 0 4px 30px rgba(0,0,0,.25); transition: transform .4s var(--default-ease,cubic-bezier(.83,0,.17,1)); }
#tetri-widget .tw-launcher:hover { transform: rotate(-6deg); }
#tetri-widget .tw-launcher img { display: block; width: 28px; height: 28px; object-fit: contain; }
#tetri-widget .tw-panel { position: fixed; inset: auto 24px 24px auto; width: 410px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 48px); margin: 0; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--tw-line); border-radius: 4px; background: var(--tw-bg); color: var(--tw-fg); box-shadow: 0 20px 100px rgba(0,0,0,.45); font: 14px/1.45 HelveticaNeueLight,Arial,sans-serif; text-align: left; }
#tetri-widget .tw-panel:not([open]) { display: none; }
#tetri-widget .tw-panel::backdrop { background: rgba(0,0,0,.4); }
#tetri-widget .tw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--tw-line); }
#tetri-widget .tw-kicker { margin: 0 0 12px; font-size: 10px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
#tetri-widget h2 { margin: 0; font-family: GothamThin,Arial,sans-serif; font-size: 30px; font-weight: 400; line-height: .98; letter-spacing: -1.5px; text-transform: uppercase; }
#tetri-widget .tw-close { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: none; border: 1px solid var(--tw-line); border-radius: 50%; font: 24px/1 Arial,sans-serif; }
#tetri-widget .tw-actions { display: grid; grid-template-columns: repeat(3,1fr); padding: 24px; gap: 10px; }
#tetri-widget .tw-core { position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin: 24px auto 18px; }
#tetri-widget .tw-core > svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: .65; transform: rotate(-90deg); }
#tetri-widget .tw-track { stroke: var(--tw-line); }
#tetri-widget .tw-arc { stroke: var(--tw-accent); transition: stroke-dasharray .65s var(--default-ease,cubic-bezier(.83,0,.17,1)); }
#tetri-widget .tw-core > div { display: grid; place-items: center; gap: 8px; }
#tetri-widget .tw-core img { width: 30px; height: 30px; }
html[data-tetri-theme="light"] #tetri-widget .tw-core img { filter: invert(1); }
html[data-a11y-contrast="high"] #tetri-widget .tw-core img,html[data-a11y-contrast="dark"] #tetri-widget .tw-core img { filter: none; }
#tetri-widget .tw-core span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
#tetri-widget .tw-modes { display: flex; gap: 8px; padding: 0 24px; }
#tetri-widget .tw-modes button { flex: 1; min-height: 40px; min-width: 0; padding: 9px 8px; border: 1px solid var(--tw-line); border-radius: 40px; background: transparent; font-size: 11px; text-transform: uppercase; }
#tetri-widget .tw-modes button[aria-pressed="true"] { border-color: var(--tw-accent); color: var(--tw-accent); }
#tetri-widget .tw-mode-panel { padding: 20px 24px 0; }
#tetri-widget .tw-mode-panel[hidden] { display: none; }
#tetri-widget .tw-mode-panel h3 { margin: 0 0 10px; font: 15px/1.3 GothamBook,Arial,sans-serif; }
#tetri-widget .tw-mode-panel p { margin: 0; line-height: 1.5; opacity: .72; }
#tetri-widget .tw-mode-panel > div { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 14px; font-size: 11px; text-transform: uppercase; }
#tetri-widget .tw-mode-panel a { padding-block: 6px; border-bottom: 1px solid var(--tw-line); }
#tetri-widget .tw-waiting { display: flex; justify-content: space-between; gap: 16px; width: calc(100% - 48px); margin: 12px 24px 0; padding: 14px 0; border: 0; border-block: 1px solid var(--tw-line); background: transparent; text-align: left; }
#tetri-widget .tw-review { margin: 20px 24px 0; }
#tetri-widget .tw-review[hidden] { display: none; }
#tetri-widget .tw-review :is(button,a) { display: block; width: 100%; padding: 12px 0; text-align: left; border: 0; border-top: 1px solid var(--tw-line); background: transparent; }
#tetri-widget .tw-actions :is(button,a) { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 4px; border: 1px solid var(--tw-line); background: transparent; border-radius: 48px; font-size: 11px; text-transform: uppercase; transition: background .3s; }
#tetri-widget .tw-actions :is(button,a):hover { border-color: var(--tw-accent); background: color-mix(in srgb,var(--tw-accent) 8%,transparent); }
#tetri-widget .tw-action-icon { height: 28px; color: var(--tw-accent); font: 24px/1 GothamBook,Arial,sans-serif; }
#tetri-widget .tw-shortcuts { display: grid; padding: 0 24px; }
#tetri-widget .tw-shortcuts a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--tw-line); }
#tetri-widget .tw-note { margin: 0; padding: 18px 24px; font-size: 11px; line-height: 1.5; color: rgba(241,241,241,.65); }
#tetri-widget .tw-log { min-height: 120px; max-height: min(38dvh,330px); padding: 20px 24px; overflow: auto; overscroll-behavior: contain; }
#tetri-widget .tw-message { width: fit-content; max-width: 100%; margin: 0 20px 14px 0; padding: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
#tetri-widget .tw-message:last-child { margin-bottom: 0; }
#tetri-widget .tw-message-you { margin: 0 0 14px 24px; padding: 10px 14px; border: 1px solid var(--tw-line); border-radius: 16px 16px 0 16px; background: rgba(241,241,241,.06); }
#tetri-widget .tw-prompts { display: flex; flex-wrap: wrap; padding: 0 24px 18px; gap: 7px; }
#tetri-widget .tw-prompts button { padding: 7px 10px; border: 1px solid var(--tw-line); border-radius: 30px; background: transparent; font-size: 11px; }
#tetri-widget .tw-question-form { border-top: 1px solid var(--tw-line); padding: 18px 24px 0; }
#tetri-widget .tw-question-form label { display: block; margin-bottom: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
#tetri-widget .tw-input-row { display: flex; align-items: center; gap: 10px; }
#tetri-widget .tw-question { width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 10px 12px; border: 1px solid var(--tw-line); border-radius: 3px; background: transparent; color: inherit; font: 14px/1.3 HelveticaNeueLight,Arial,sans-serif; }
#tetri-widget .tw-question::placeholder { color: rgba(241,241,241,.45); }
#tetri-widget .tw-input-row button { flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--tw-line); border-radius: 50%; background: var(--tw-fg); color: var(--tw-bg); font-size: 23px; }
#tetri-widget .tw-question-form .tw-note { padding: 12px 0 16px; }
#tetri-widget .tw-contact-links { display: flex; flex-wrap: wrap; gap: 18px; padding: 16px 24px; border-top: 1px solid var(--tw-line); font-size: 11px; text-transform: uppercase; }
#tetri-widget .tw-size-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 24px; }
#tetri-widget .tw-size-controls { display: flex; align-items: center; gap: 12px; }
#tetri-widget .tw-size-controls button { width: 36px; height: 36px; padding: 0; background: transparent; border: 1px solid var(--tw-line); border-radius: 50%; }
#tetri-widget .tw-size-controls output { min-width: 38px; text-align: center; font-size: 12px; }
#tetri-widget .tw-preferences { display: grid; gap: 10px; padding: 0 24px 20px; }
#tetri-widget .tw-preferences button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; border: 1px solid var(--tw-line); border-radius: 3px; background: transparent; }
#tetri-widget .tw-preferences button[aria-pressed="true"] { background: var(--tw-accent); color: var(--tw-bg); }
#tetri-widget .tw-reset { margin: 0 24px; padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; font-size: 11px; }
#tetri-widget .tw-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Reading adjustments target text while retaining the editorial chapter geometry. */
html[data-a11y-font]:not([data-a11y-font="0"]) :where(main p,main li,main label,main .b1-light,main .b1-bold) { font-size: calc(.9375rem * var(--tw-text-scale,1)); }
html[data-a11y-links="on"] body a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px; }
html[data-a11y-contrast="high"] :where(main,main section,main article,main div,body > header,body > footer) { background-color: #000 !important; color: #fff !important; }
html[data-a11y-contrast="high"] :where(main p,main h1,main h2,main h3,main a,main button,main span) { color: #fff !important; opacity: 1 !important; }
html[data-a11y-contrast="high"] .logo-black { filter: invert(1); }
html[data-a11y-contrast="dark"] :where(main,main section,main article,main div,body > header,body > footer) { background-color: #0b0b0b !important; color: #f1f1f1 !important; }
html[data-a11y-contrast="dark"] :where(main p,main h1,main h2,main h3,main a,main button,main span) { color: #f1f1f1 !important; opacity: 1 !important; }
html[data-a11y-zoom]:not([data-a11y-zoom="0"]) body > :is(#__nuxt, main) { zoom: var(--tw-page-zoom,1); width: calc(100% / var(--tw-page-zoom,1)); }
html[data-a11y-cursor="on"] :where(body,body *) { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 3v30l8-8 6 11 6-3-6-11h12z' fill='white' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 4 3, auto !important; }
#tetri-widget .tw-reading-guide { display: none; position: fixed; z-index: 2147483000; left: 0; top: 50%; width: 100%; height: 2px; pointer-events: none; background: var(--tw-accent); box-shadow: 0 0 0 7px color-mix(in srgb,var(--tw-accent) 10%,transparent); }
html[data-a11y-guide="on"] #tetri-widget .tw-reading-guide { display: block; }
html[data-a11y-motion="reduce"] *,html[data-a11y-motion="reduce"] *::before,html[data-a11y-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
html[data-a11y-motion="reduce"] .cursor-canvas { display: none !important; }

@media (max-width: 600px) {
  #tetri-widget .tw-launcher-wrap { right: 16px; bottom: 68px; gap: 8px; }
  #tetri-widget .tw-status { display: none; }
  #tetri-widget .tw-launcher { width: 48px; height: 48px; padding: 10px; }
  #tetri-widget .tw-launcher img { width: 25px; height: 25px; }
  #tetri-widget .tw-panel { right: 16px; bottom: max(16px,env(safe-area-inset-bottom)); max-height: calc(100dvh - 32px); }
  #tetri-widget .tw-head { padding: 20px; }
  #tetri-widget h2 { font-size: 28px; }
  #tetri-widget .tw-question { font-size: 16px; }
  #tetri-widget .tw-log { max-height: 35dvh; }
}
@media (prefers-reduced-motion: reduce) { #tetri-widget *,#tetri-widget *::before,#tetri-widget *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
