/* ListBreak styles - LST-S1-L */

:root {
  --bg: #edeff4;
  --panel: #ffffff;
  --ink: #1b1e29;
  --muted: #5a6073;
  --line: #d4d8e2;
  --accent: #3b39d4;
  --accent-ink: #ffffff;
  --warn: #8a5000;
  --warn-bg: #fff1d6;
  --ok: #1f6f33;
  --ok-bg: #e3f4e6;
  --danger: #b3261e;
  --spectrum: linear-gradient(90deg, #ff3b5c 0%, #ff8a2e 17%, #ffd23b 33%, #36c96b 50%, #2ec0ff 67%, #5b5bff 83%, #b84bff 100%);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius-s: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13151c;
    --panel: #1c1f29;
    --ink: #e7e9f0;
    --muted: #9aa1b4;
    --line: #2e3241;
    --accent: #8f8dff;
    --accent-ink: #13151c;
    --warn: #ffcb6b;
    --warn-bg: #3a2c10;
    --ok: #7ee08f;
    --ok-bg: #12301a;
    --danger: #ff8a80;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) 1.25rem 3rem;
}

/* Masthead */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 2.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand::before {
  content: "";
  width: 1.5rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--spectrum);
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
}

.lede {
  max-width: 34em;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 1.075rem;
}

.first-time {
  margin: 0 0 2rem;
  font-weight: 600;
}

.first-time a,
.foot a {
  color: var(--accent);
}

/* Query form */

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.query-row {
  display: flex;
  gap: 0.6rem;
}

.query-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 3.2rem;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  padding: 0.8rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.btn {
  padding: 0.75rem 1.15rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--muted);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  border-color: var(--accent);
  filter: brightness(1.08);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.status {
  min-height: 1.55em;
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.status[data-kind="error"] {
  color: var(--danger);
  font-weight: 600;
}

/* Results */

.results {
  margin-top: 2.75rem;
}

.pl-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.pl-meta {
  margin: 0;
  color: var(--muted);
}

.pl-meta a {
  color: inherit;
}

/* The one loud element: a spectrum that fills as videos load. */

.band {
  height: 14px;
  margin: 1.25rem 0 0.6rem;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.band-fill {
  height: 100%;
  background: var(--spectrum);
  clip-path: inset(0 calc((1 - var(--fill, 0)) * 100%) 0 0);
  transition: clip-path 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pl-count {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1.4rem;
  margin: 1.5rem 0 1rem;
  padding: 0;
  border: 0;
}

.opt {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.opt label {
  font-size: 0.875rem;
  font-weight: 600;
}

select {
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.55rem;
  font-size: 0.95rem;
}

.check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
}

textarea {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
}

.action-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Transcripts */

.tx-copy {
  max-width: 40em;
  margin: 0 0 0.9rem;
}

.tx .check {
  padding-bottom: 0.7rem;
}

.tx-options .opt input[type="text"] {
  min-width: 14rem;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

.tx-step {
  margin: 1.4rem 0 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
}

.tx-guide {
  color: var(--accent);
  font-weight: 600;
}

.tx-where {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

/* LST-S1-I: who may read the files, above the command */
.tx-badge {
  margin: 0.75rem 0 0.25rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid currentColor;
}
.tx-badge[data-role="public"],
.tx-badge[data-role="ask"] {
  background: var(--warn-bg);
  color: var(--warn);
}
.tx-badge[data-role="internal"],
.tx-badge[data-role="management"],
.tx-badge[data-role="admin"],
.tx-badge[data-role="team"] {
  background: var(--ok-bg);
  color: var(--ok);
}
.action-note.warn {
  color: var(--warn);
  font-weight: 600;
}

.tx-error {
  min-height: 0;
  margin: 0 0 0.5rem;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.tx-error:empty {
  display: none;
}

textarea.cmd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  resize: none;
}

.tx-hint {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.tx-small {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Video list */

.list-head {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}

.vids {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.vid {
  display: grid;
  grid-template-columns: 2.4rem 96px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.vid-num {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.vid-thumb {
  display: block;
  width: 96px;
  height: 54px;
  border-radius: 4px;
  background: var(--line);
  object-fit: cover;
}

.vid-body {
  min-width: 0;
}

.vid-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vid-title:hover {
  text-decoration: underline;
}

.vid-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.vid.is-gone .vid-title {
  color: var(--muted);
  font-weight: 500;
}

.tag {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 600;
}

.foot {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 34rem) {
  .query-row {
    flex-direction: column;
  }

  .vid {
    grid-template-columns: 1.8rem 72px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .vid-thumb {
    width: 72px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .band-fill {
    transition: none;
  }
}

/* Guide page */

.guide .brand a {
  color: inherit;
  text-decoration: none;
}

.guide section {
  margin: 0 0 2.2rem;
}

.guide h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

.guide p,
.guide li {
  max-width: 40em;
}

.guide ol,
.guide ul {
  padding-left: 1.3rem;
}

.guide li {
  margin: 0.35rem 0;
}

.guide code {
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.9em;
}

.guide a {
  color: var(--accent);
}

.g-note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* The three steps: a big spectrum numeral beside each step. */

.g-step {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.g-num {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 0.9;
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.g-once {
  color: var(--muted);
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
}

.g-body textarea.cmd {
  margin-top: 0.4rem;
}

.guide details {
  max-width: 40em;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.guide summary {
  font-weight: 600;
  cursor: pointer;
}

.guide details p,
.guide details ul {
  margin: 0.5rem 0 0.2rem;
  color: var(--muted);
}

@media (max-width: 34rem) {
  .g-step {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.7rem;
  }

  .g-num {
    font-size: 2.2rem;
  }
}
