/*
 * Bionic Reading Toggle — styles.
 * The bold onset of each word (.br-f) plus the floating toggle button.
 */

/* Fixation points: bold, keep the exact glyph width so the text doesn't reflow
   more than font-weight implies; no extra letter-spacing on purpose. */
.br-f {
    font-weight: 700;
}

/* Toggle button ---------------------------------------------------------- */
.br-toggle {
    position: fixed;
    z-index: 99999;
    padding: 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    background: #fff;
    color: #1d2327;
    font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.br-toggle:hover { background: #f0f0f1; }
.br-toggle:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }

/* Active state: filled pill so readers immediately see the mode. */
.br-toggle[aria-pressed="true"] {
    background: #1d2327;
    border-color: #1d2327;
    color: #fff;
}
.br-toggle[aria-pressed="true"]:hover { background: #000; }

/* Positions (configurable in settings) */
.br-toggle--bottom-right { bottom: 16px; right: 16px; }
.br-toggle--bottom-left  { bottom: 16px; left: 16px; }
.br-toggle--top-right    { top: 16px; right: 16px; }
.br-toggle--top-left     { top: 16px; left: 16px; }

/* Respect users who prefer less motion; keep it fully functional. */
@media (prefers-reduced-motion: reduce) {
    .br-toggle { transition: none; }
}
