/* Free Online Teleprompter by Thruline. Loaded after styles.css and uses its tokens. */

/* ---------- page band + editor ---------- */
.tp-band { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 110px); }
.tp-head { text-align: center; }
.tp-head .lede { margin-inline: auto; }
.tp-h1 { font-size: clamp(40px, 6.4vw, 80px); }

.tp-tool {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start;
}
.tp-editor, .tp-panel { background: #fff; border-radius: 22px; box-shadow: 0 0 0 1px var(--hair), 0 24px 48px -32px rgba(28, 28, 26, 0.25); }
.tp-editor { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.tp-editor-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--hair); font-size: 14px;
}
.tp-editor-bar label { font-weight: 600; }
#tp-stats { color: var(--ink-2); font-variant-numeric: tabular-nums; }
#tp-text {
  display: block; width: 100%; min-height: 460px; resize: vertical; border: 0; outline: 0;
  padding: 20px; font: 400 18px/1.6 var(--text); color: var(--ink); background: transparent;
}
#tp-text::placeholder { color: #A9A79F; }
.tp-upsell { margin: 0; padding: 12px 20px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--ink-2); background: var(--paper); }
.tp-upsell a { color: var(--red); font-weight: 560; text-decoration: none; }
.tp-upsell a:hover { text-decoration: underline; text-underline-offset: 3px; }

.tp-panel { padding: 20px; display: grid; gap: 18px; }
.tp-start {
  appearance: none; border: 0; cursor: pointer; width: 100%; padding: 15px 20px; border-radius: 999px;
  background: var(--red); color: #fff; font: 600 17px/1 var(--text);
}
.tp-start:hover { background: #D24A35; }
.tp-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.tp-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.tp-label output { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-field input[type=range] { width: 100%; accent-color: var(--red); }
.tp-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-themes legend { width: 100%; }
.tp-themes label { cursor: pointer; }
.tp-themes input { position: absolute; opacity: 0; pointer-events: none; }
.tp-themes span { display: grid; place-items: center; width: 52px; height: 40px; border-radius: 10px; font-weight: 650; font-size: 16px; }
.tp-themes input:checked + span { outline: 2px solid var(--red); outline-offset: 2px; }
.tp-themes input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.tp-switches { display: grid; gap: 10px; }
.tp-switch { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.tp-switch input { width: 18px; height: 18px; accent-color: var(--red); }
.tp-keys { font-size: 12.5px; line-height: 1.9; color: var(--ink-2); }
.tp-keys kbd { font: 500 11.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--paper-2); box-shadow: inset 0 -1px 0 var(--hair); margin-right: 2px; }

.tp-card { position: relative; padding: 16px; border-radius: 16px; background: var(--paper-2); display: grid; gap: 10px; }
.tp-card img { border-radius: 10px; display: block; width: 100%; }
.tp-card h3 { font-size: 17px; }
.tp-card p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tp-card .btn { justify-content: center; font-size: 15px; padding: 11px 18px; }
.tp-card-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(28,28,26,.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }

@media (max-width: 860px) {
  .tp-tool { grid-template-columns: minmax(0, 1fr); }
  #tp-text { min-height: 300px; }
}

/* ---------- info band ---------- */
.tp-info .doc h2:first-child { border-top: 0; padding-top: 0; }
.tp-steps { padding-left: 1.3em; display: grid; gap: 10px; margin: 14px 0; }
.tp-steps li { font-size: 18px; line-height: 1.6; color: #34332F; }
.tp-steps li::marker { color: var(--red); font-weight: 600; }
.tp-compare-wrap { overflow-x: auto; }
.tp-compare { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 460px; }
.tp-compare th, .tp-compare td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--hair); }
.tp-compare th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.tp-compare td:not(:first-child), .tp-compare th:not(:first-child) { text-align: center; width: 24%; }
.tp-compare td:last-child { color: var(--red); font-weight: 560; }

/* ---------- prompter stage ---------- */
html.tp-open, html.tp-open body { overflow: hidden; }
.tp-stage {
  --fg: #fff; --bg: #000; --cue: #5AA9FF; --lens: #ED3438;
  position: fixed; inset: 0; z-index: 100; background: var(--bg); color: var(--fg); overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.tp-stage[hidden] { display: none; }
.tp-stage.dragging { cursor: grabbing; }
.tp-stage[data-theme=yellow] { --fg: #FFD84D; }
.tp-stage[data-theme=green] { --fg: #5BE37D; }
.tp-stage[data-theme=paper] { --fg: #000; --bg: #fff; --cue: #2E6FD8; }
.tp-view { position: absolute; inset: 0; }
.tp-script { position: absolute; left: 0; top: 0; box-sizing: border-box; will-change: transform; font-family: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.tp-script p { margin: 0; min-height: 1em; overflow-wrap: anywhere; }
.tp-script .cue { color: var(--cue); font-style: italic; font-weight: 500; }
.tp-script .tp-end { margin-top: 1.2em; font-size: .45em; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; opacity: .45; }
.tp-lens { position: absolute; left: 0; right: 0; height: 3px; transform: translateY(-50%); background: var(--lens); pointer-events: none; }
.tp-lens::before, .tp-lens::after { content: ""; position: absolute; top: 50%; width: 16px; height: 22px; transform: translateY(-50%); background: var(--lens); }
.tp-lens::before { left: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.tp-lens::after { right: 0; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.tp-glow {
  position: absolute; left: 0; right: 0; height: 16vh; transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(to bottom, rgba(237,52,56,0), rgba(237,52,56,.09) 35%, rgba(237,52,56,.22) 50%, rgba(237,52,56,.09) 65%, rgba(237,52,56,0));
  opacity: .4; transition: opacity 1.2s ease;
}
/* a brief brighter glow when the script jumps, like the app's catch-up glow in Voice Follow */
.tp-glow.flash { opacity: 1; transition: opacity .15s ease; }
.tp-stage[data-theme=paper] .tp-glow { opacity: .25; }
.tp-stage[data-theme=paper] .tp-glow.flash { opacity: .7; }
.tp-handle {
  position: absolute; right: 28px; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  border: 2px solid #fff; background: var(--lens); cursor: ns-resize; z-index: 3; box-shadow: 0 2px 10px rgba(0,0,0,.4);
  transition: opacity .3s;
}
.tp-count { position: absolute; inset: 0; display: grid; place-items: center; font: 650 min(32vw, 40vh)/1 var(--display); color: var(--fg); background: color-mix(in srgb, var(--bg) 70%, transparent); z-index: 4; }
.tp-count[hidden] { display: none; }

.tp-controls {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; z-index: 5;
  background: rgba(30, 30, 30, .86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.4);
  transition: opacity .3s, transform .3s; max-width: calc(100vw - 24px); overflow-x: auto; cursor: default;
}
.tp-controls button {
  appearance: none; border: 0; background: transparent; color: #F5F4F0; font: 600 16px/1 var(--text);
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: 999px; cursor: pointer; flex: none;
}
.tp-controls button:hover { background: rgba(255,255,255,.12); }
.tp-controls .tp-play { background: #F5F4F0; color: #000; min-width: 54px; }
.tp-controls .tp-play:hover { background: #fff; }
.tp-speed { color: #F5F4F0; font: 600 14px/1 var(--text); min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.tp-sep { width: 1px; height: 24px; background: rgba(255,255,255,.18); margin-inline: 4px; flex: none; }
.tp-stage-upsell {
  position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); z-index: 5;
  font-size: 13px; color: #CFCDC6; text-decoration: none; padding: 7px 12px; border-radius: 999px;
  background: rgba(30, 30, 30, .7); transition: opacity .3s;
}
.tp-stage-upsell:hover { color: #fff; }
/* while reading, everything but the script steps back */
.tp-stage.playing.idle { cursor: none; }
.tp-stage.playing.idle .tp-controls { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
.tp-stage.playing .tp-stage-upsell, .tp-stage.playing.idle .tp-handle { opacity: 0; pointer-events: none; }
@media (max-width: 560px) {
  .tp-controls button { min-width: 36px; height: 38px; padding: 0 7px; font-size: 14px; }
  .tp-stage-upsell { display: none; }
  .tp-handle { right: 12px; }
}
.doc a.btn, .tp-card a.btn { color: #fff; text-decoration: none; }
@media (max-width: 560px) {
  .tp-controls [data-act=smaller], .tp-controls [data-act=larger], .tp-controls [data-act=full] { display: none; }
}
@media (max-width: 560px) {
  .tp-compare { min-width: 0; font-size: 14px; }
  .tp-compare th, .tp-compare td { padding: 10px 6px; }
  .tp-compare th { font-size: 11px; letter-spacing: .03em; }
  .tp-compare td:not(:first-child), .tp-compare th:not(:first-child) { width: 27%; }
}

.tp-price-note { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
