/* Speed Reader — styled with the site's own tokens (site.css): the dark ground, Anton titles, the
   notched console with its scanline screen, orange for the focus letter and for actions, mint for "on".
   The reading fonts live in fonts/ beside this file; a face downloads only when a reader picks it. */

@font-face { font-family: "SR Lexend"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lexend-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SR Lexend"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/lexend-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SR Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/lexend-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SR Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/lexend-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SR Atkinson"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SR Atkinson"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SR Atkinson"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SR Atkinson"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SR OpenDyslexic"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/opendyslexic-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "SR OpenDyslexic"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/opendyslexic-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "SR Epilogue"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/epilogue-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "SR Epilogue"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/epilogue-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "SR Epilogue"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/epilogue-vietnamese-wght-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
/* Anything that shows the reader's own words (the boxes, the paragraph, the title, the status line) uses the
   device's own font: the site's Epilogue comes from Google Fonts in letter sets, and a letter outside the
   first set (ł, ő, ș, Vietnamese) would make the browser ask Google for the next one. */
:root { --sr-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

.sr { --word-size: clamp(42px, 6.2vw, 80px); --led: var(--muted); display: flex; flex-direction: column; gap: 28px; }
.sr[data-size="s"] { --word-size: clamp(32px, 4.4vw, 58px); }
.sr[data-size="l"] { --word-size: clamp(52px, 8.4vw, 108px); }
.sr[data-state="playing"] { --led: var(--mint); }
.sr[data-state="paused"], .sr[data-state="done"] { --led: var(--orange); }

/* ---- the reader ---- */
.sr-console { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--bg2); border: 1px solid var(--line); scroll-margin-top: 24px; clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.sr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sr-slot { white-space: nowrap; }
.sr-title { flex: 1; min-width: 0; font-family: var(--sr-ui); text-align: center; color: var(--ink2); letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-led-wrap { display: flex; align-items: center; gap: 8px; color: var(--led); white-space: nowrap; }
.sr-led { width: 8px; height: 8px; background: var(--led); box-shadow: 0 0 10px var(--led); }
.sr-screen { position: relative; display: flex; align-items: center; justify-content: center; height: clamp(200px, 24vw, 300px); overflow: hidden; background: var(--screen); border: 1px solid var(--line); box-shadow: inset 0 0 80px rgba(0, 0, 0, .7); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sr-screen:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.sr-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(124, 245, 168, .05) 0 1px, transparent 1px 3px); }
.sr-tick { position: absolute; left: 50%; width: 2px; height: 16px; margin-left: -1px; background: var(--orange); opacity: .75; pointer-events: none; }
.sr-tick-top { top: calc(50% - var(--word-size) * .78 - 18px); }
.sr-tick-bottom { bottom: calc(50% - var(--word-size) * .78 - 18px); }
.sr-word { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; width: 100%; padding: 0 16px; font-family: "SR Lexend", var(--sr-ui); font-size: calc(var(--word-size) * var(--fit, 1)); font-weight: 400; line-height: 1.2; letter-spacing: .005em; color: var(--ink); white-space: pre; transform: translateX(var(--shift, 0px)); }
.sr[data-font="atkinson"] .sr-word { font-family: "SR Atkinson", var(--sr-ui); }
.sr[data-font="dyslexic"] .sr-word { font-family: "SR OpenDyslexic", var(--sr-ui); letter-spacing: 0; }
.sr[data-font="site"] .sr-word { font-family: "SR Epilogue", var(--sr-ui); }
.sr[data-bold="1"] .sr-word { font-weight: 700; }
.sr-l { justify-self: end; }
.sr-p { color: var(--orange); }
.sr-r { justify-self: start; }
.sr-note { position: absolute; left: 12px; right: 12px; bottom: 12px; text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mint-dim); pointer-events: none; }
.sr[data-state="playing"] .sr-note { visibility: hidden; }

.sr-seek { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.sr-seek::-webkit-slider-runnable-track { height: 4px; background: var(--line); }
.sr-seek::-moz-range-track { height: 4px; background: var(--line); }
.sr-seek::-moz-range-progress { height: 4px; background: var(--orange); }
.sr-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; background: var(--orange); border: 0; }
.sr-seek::-moz-range-thumb { width: 14px; height: 14px; background: var(--orange); border: 0; border-radius: 0; }
.sr-seek:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.sr-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.sr-stats span:first-child { color: var(--ink); }
.sr-saved { color: var(--mint); }

.sr-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); cursor: pointer; clip-path: var(--cut); transition: background .15s, color .15s, border-color .15s; }
.sr-btn:hover { color: var(--ink); border-color: var(--orange); }
.sr-btn:active { transform: scale(.97); }
.sr-play { min-width: 124px; color: var(--bg); background: var(--orange); border-color: var(--orange); }
.sr-play:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.sr-ico { flex: none; display: inline-block; }
.sr-play .sr-ico { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.sr[data-state="playing"] .sr-play .sr-ico { width: 10px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.sr-back .sr-ico { width: 0; height: 0; border-right: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.sr-fwd .sr-ico { width: 0; height: 0; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.sr-fwd { flex-direction: row-reverse; }
.sr-slower .sr-ico, .sr-faster .sr-ico { display: none; }
.sr-slower .sr-lbl::before { content: "−"; margin-right: 1px; }
.sr-faster .sr-lbl::before { content: "+"; margin-right: 1px; }
.sr-restart .sr-ico { font-size: 16px; line-height: 1; }
.sr-restart .sr-ico::before { content: "\21BA"; }
.sr-restart { margin-left: auto; }

/* ---- where you are ---- */
.sr-ctx { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 0; }
.sr[data-state="playing"] .sr-ctx { display: none; }
.sr-ctx-head { justify-content: space-between; flex-wrap: wrap; }
.sr-ctx-hint { color: var(--muted); letter-spacing: .16em; }
.sr-ctx-text { max-width: 78ch; font-family: var(--sr-ui); font-size: clamp(16px, 1.2vw, 18px); line-height: 1.85; color: var(--ink2); }
.sr-cw { cursor: pointer; }
.sr-cw:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.sr-cw.is-now { color: var(--bg); background: var(--orange); padding: 1px 3px; }

/* ---- the ways in + the settings ---- */
.sr-lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sr-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 24px 26px 26px; background: var(--bg2); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.sr[data-drop="1"] .sr-in { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.sr-panel-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; font-family: var(--anton); font-weight: 400; font-size: 22px; line-height: 1; text-transform: uppercase; color: var(--orange); }
.sr-panel-title small { font-family: var(--epilogue); font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.sr-box { position: relative; background: var(--screen); border: 1px solid var(--line); box-shadow: inset 0 0 60px rgba(0, 0, 0, .6); }
.sr-box:focus-within { border-color: var(--mint); }
.sr-text { display: block; width: 100%; min-height: 190px; resize: vertical; margin: 0; padding: 16px 18px; font: 15px/1.6 var(--sr-ui); color: var(--ink); background: transparent; border: 0; }
.sr-text:focus { outline: none; }
.sr-text::placeholder, .sr-url::placeholder { color: var(--mint-dim); }
.sr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.sr-row .btn, .sr-link .btn { padding: 11px 18px; font-size: 12px; cursor: pointer; border: 1px solid var(--orange); }
.sr-row .btn-line { background: transparent; }
.sr-count { margin-left: auto; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sr-file { display: none; }
.sr-or { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.sr-or::before, .sr-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sr-link { display: flex; gap: 10px; }
.sr-url { flex: 1; min-width: 0; padding: 10px 12px; font: 15px var(--sr-ui); color: var(--ink); background: var(--screen); border: 1px solid var(--line); }
.sr-url:focus { outline: none; border-color: var(--mint); }
.sr-hint { font-size: 13px; line-height: 1.55; color: var(--muted); }
.sr-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; min-height: 1.5em; font-family: var(--sr-ui); font-size: 14px; line-height: 1.5; color: var(--mint); }
.sr-status[data-kind="busy"] { color: var(--ink2); }
.sr-status[data-kind="error"] { color: var(--pink); }
.sr-link-btn { padding: 0; font: inherit; font-size: 13px; color: var(--orange); background: none; border: 0; text-decoration: underline; cursor: pointer; }

.sr-set { display: flex; flex-direction: column; gap: 10px; }
.sr-set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sr-set-head output { font-size: 13px; letter-spacing: .08em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sr-set input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.sr-set input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--line); }
.sr-set input[type="range"]::-moz-range-track { height: 4px; background: var(--line); }
.sr-set input[type="range"]::-moz-range-progress { height: 4px; background: var(--mint); }
.sr-set input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; background: var(--mint); border: 0; }
.sr-set input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--mint); border: 0; border-radius: 0; }
.sr-set input[type="range"]:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.sr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sr-chip { position: relative; display: inline-flex; }
.sr-check { align-self: flex-start; }
.sr-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sr-chip span { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); cursor: pointer; user-select: none; -webkit-user-select: none; clip-path: var(--cut); transition: background .15s, color .15s, border-color .15s; }
.sr-chip span::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--line); border-radius: 50%; }
.sr-check span::before { border-radius: 0; }
.sr-chip:hover span { color: var(--ink); border-color: var(--orange); }
.sr-chip input:checked + span { color: var(--bg); background: var(--mint); border-color: var(--mint); }
.sr-chip input:checked + span::before { background: var(--bg); }
.sr-chip input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 3px; }
.sr-keys { font-size: 13px; line-height: 1.7; color: var(--muted); }
.sr-keys b { font-weight: 600; color: var(--ink2); }
.sr-lifetime { font-size: 13px; color: var(--mint); }
.sr-lifetime:empty { display: none; }

@media (max-width: 1099px) {
  .sr-lower { grid-template-columns: minmax(0, 1fr); }
  .sr-console { padding: 14px; }
  .sr-head { flex-wrap: wrap; }
  .sr-title { order: 3; flex-basis: 100%; text-align: left; }
  .sr-panel { padding: 20px 18px 22px; }
  .sr-text { font-size: 16px; min-height: 160px; }
  .sr-url { font-size: 16px; }
  .sr-link { flex-wrap: wrap; }
  .sr-transport { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sr-play { grid-column: 1 / -1; }
  .sr-btn { padding: 11px 4px; }
  .sr-restart { margin-left: 0; }
  .sr-restart .sr-lbl { display: none; }
}
