/* ByPlay Audio website - the plugin style "Grau & Salbei" (StepLookAndFeel.h):
   Inter, flat matte surfaces, a light ground plus a device panel a step darker,
   buttons a step lighter than the panel, 5 px radii, 1 px edges. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/inter-700.woff") format("woff"); }

:root {
  /* colour roles, the website's own values */
  --ground:    #f1f0ec;   /* page */
  --device:    #d6d5ce;   /* the device panel */
  --deep:      #b9b8b1;   /* tracks, pressed surfaces */
  --panel:     #e6e5e0;   /* chips and buttons at rest */
  --edge:      #c9c8c1;   /* outlines */
  --ink:       #111111;   /* text */
  --muted:     #5c5b56;   /* secondary text */
  --bone:      #ffffff;
  --sage:      #9fab93;   /* main accent: on / selected */
  --sage-deep: #8e9c7f;
  --run:       #f6c700;   /* what runs right now */
  --danger:    #d8232a;
  --knob:      #2a2a28;

  --radius: 5px;
  --gutter: 20px;
  --max: 1040px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.top { padding: 22px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; }
.top nav { display: flex; gap: 20px; font-size: 15px; font-weight: 600; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 20px; max-width: 14ch; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 38ch; margin: 0 0 28px; }

/* ---------- buttons (plugin buttons: lighter than the panel, 1 px edge) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  font: 600 16px/1 "Inter", system-ui, sans-serif;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--edge); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--bone); text-decoration: none; }
.btn:active { background: var(--deep); }
.btn-on { background: var(--sage); border-color: var(--sage-deep); }
.btn-on:hover { background: #aab59f; }
.btn-on:active { background: var(--sage-deep); }

/* ---------- the device panel ---------- */
.device {
  background: var(--device);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 18px;
}
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.slot {
  aspect-ratio: 4 / 3;
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.slot::before { /* the slice marks */
  content: ""; position: absolute; inset: 14% 8% 30% 8%; z-index: 1;
  background: repeating-linear-gradient(90deg, rgba(17, 17, 17, .6) 0 1.5px, transparent 1.5px 12.5%);
  opacity: 0;
}
.slot.sliced::before { opacity: 1; }
.slot .wave { position: absolute; inset: 20% 8% 34% 8%; width: 84%; height: 46%; }
.slot.on { background: var(--sage); border-color: var(--sage-deep); }
.slot.run::after { content: ""; position: absolute; left: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--run); }
.slot-num { position: absolute; bottom: 6px; left: 8px; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot.on .slot-num { color: var(--ink); }

.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--edge); color: var(--ink);
}
.chip.on { background: var(--sage); border-color: var(--sage-deep); }
.chip.run { background: var(--run); border-color: #d9b000; }
.knobs { display: flex; gap: 14px; }
.knob { width: 34px; height: 34px; }

/* ---------- sections ---------- */
section { padding: 44px 0; }
h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 6px; font-weight: 600; }
.rule { border: 0; border-top: 1px solid var(--edge); margin: 0; }

.product { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.product p { margin: 0 0 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.facts li { font-size: 14px; font-weight: 600; padding: 7px 11px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); }
.facts li.price { background: var(--ink); color: var(--bone); border-color: var(--ink); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.features li { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px; }
.features li p { margin: 0; color: var(--muted); font-size: 15px; }
.features .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; padding: 3px 7px; border-radius: 3px; background: var(--device); }

.next { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.next p { margin: 0; color: var(--muted); max-width: 52ch; }
.soon { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border-radius: var(--radius); border: 1px dashed var(--deep); color: var(--muted); white-space: nowrap; }

/* ---------- waitlist ---------- */
.waitlist { background: var(--device); border: 1px solid var(--edge); border-radius: 10px; padding: 32px; }
.waitlist p { color: var(--muted); margin: 0 0 20px; max-width: 54ch; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input[type="email"],
.form-row input[type="password"] {
  flex: 1 1 260px; min-height: 48px; padding: 0 14px;
  font: 400 17px "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--bone); border: 1px solid var(--edge); border-radius: var(--radius);
}
.form-row input[type="email"]:focus,
.form-row input[type="password"]:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------- beta area (password gate + video page) ---------- */
.gate { max-width: 560px; margin: 24px auto 64px; }
.beta-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.beta-chapters > li { background: var(--device); border: 1px solid var(--edge); border-radius: 10px; padding: 18px 20px; }
.beta-chapters p { margin: 0; color: var(--muted); }
.beta-chapters ul { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.beta-chapters li li { padding: 3px 0; background: none; border: 0; }
.beta-chapters li li:target { color: var(--ink); background: var(--run); border-radius: var(--radius); padding: 3px 8px; }
.beta-search { margin: 0 0 32px; }
.beta-search > p { color: var(--muted); margin: 0 0 14px; }
.form-row input[type="search"] {
  flex: 1 1 260px; min-height: 48px; padding: 0 14px;
  font: 400 17px "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--bone); border: 1px solid var(--edge); border-radius: var(--radius);
}
.form-row input[type="search"]:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.search-summary { color: var(--muted); margin: 16px 0 10px; }
.search-hit { background: var(--bone); border: 1px solid var(--edge); border-radius: 10px; padding: 14px 18px; margin: 0 0 10px; }
.search-hit h3 { margin: 0; }
.search-chapter { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.search-hit ul { list-style: none; margin: 0; padding: 0; }
.search-hit li { padding: 3px 0; }
.search-time { display: inline-block; min-width: 3.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
.search-more { font-size: 13px; color: var(--muted); }
.search-topics { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.video-player { margin: 12px 0 4px; max-width: 760px; }
.video-player iframe, .video-player video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; background: #111; }
.video-player-bar { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.video-player-close { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.beta-chapters li li a { color: inherit; }
.search-howto { margin: 0 0 18px; max-width: 640px; }
.search-howto video { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 10px; background: var(--bone); }
.search-howto figcaption { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.search-hit mark { background: var(--run); color: var(--ink); border-radius: 2px; padding: 0 1px; }
.beta-soon { display: inline-block; margin: 20px 0 0; }
.beta-notice { background: var(--bone); border: 1px solid var(--edge); border-left: 6px solid var(--run); border-radius: 10px; padding: 18px 20px; margin: 0 0 28px; }
.beta-notice p { margin: 8px 0 0; color: var(--ink); max-width: 70ch; }
.form-row .btn { min-height: 48px; }
.fine { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.form-msg { font-weight: 600; margin: 14px 0 0; min-height: 1.5em; }
.form-msg.err { color: var(--danger); }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.foot { padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- legal pages ---------- */
.legal { padding: 24px 0 40px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(30px, 5vw, 42px); max-width: none; }
.legal h2 { font-size: 22px; margin: 34px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { font-size: 16px; }
.legal ul { padding-left: 20px; }
.lang-switch { display: flex; gap: 8px; margin: 0 0 26px; }
.draft {
  background: #fff6cc; border: 1px solid #e6cf5c; border-radius: var(--radius);
  padding: 12px 14px; font-size: 14px; margin: 0 0 26px;
}
.fill { background: #fff0a8; padding: 0 3px; border-radius: 2px; }
.legal .lang-block + .lang-block { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--edge); }
.form-box { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 14px 16px; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 28px; }
  .next { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top nav { gap: 14px; font-size: 14px; }
  .top nav .hide-s { display: none; }
  .hero { padding: 28px 0 28px; }
  .device { padding: 12px; }
  .knobs { gap: 10px; }
  .slot .wave { top: 12%; height: 42%; }
  .slot::before { inset: 6% 8% 40% 8%; }
  .slot-num { bottom: 3px; left: 6px; font-size: 10px; }
  .slot.run::after { left: 5px; top: 5px; width: 6px; height: 6px; }
  .features { grid-template-columns: 1fr; }
  .waitlist { padding: 22px 18px; }
  .form-row .btn { flex: 1 1 100%; }
  section { padding: 34px 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .slot, .chip { transition: background-color .15s ease; }
}

/* ---------- beta: "Your setup" picker (filter.js) ---------- */
.beta-setup { background: var(--bone); border: 1px solid var(--edge); border-radius: 10px; padding: 18px 20px; margin: 0 0 28px; }
.beta-setup h2 { margin: 0 0 4px; }
.beta-setup > p { color: var(--muted); margin: 0 0 14px; max-width: 70ch; }
.setup-q { margin: 0 0 14px; }
.setup-label { font-weight: 600; margin: 0 0 8px; }
.setup-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button {
  min-height: 44px; padding: 0 16px; font: 600 15px "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--panel); border: 1px solid var(--edge); border-radius: 999px; cursor: pointer;
}
.pills button[aria-pressed="true"] { background: var(--sage); border-color: var(--sage-deep); }
.pills button:focus-visible, #setup-device:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#setup-device {
  width: 100%; max-width: 460px; min-height: 44px; padding: 0 12px;
  font: 400 16px "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--bone); border: 1px solid var(--edge); border-radius: var(--radius);
}
.setup-summary { margin: 4px 0 0; font-weight: 600; }
.link-button { font: inherit; font-weight: 400; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.beta-chapters li li.is-basic::after { content: " · basics"; color: var(--muted); font-size: 13px; }
.beta-chapters [hidden] { display: none !important; }

/* ---------- beta: folders (Templates, Modes, Views) ---------- */
.beta-chapters li.folder { padding: 4px 0; }
.beta-chapters details > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px; background: var(--panel); border: 1px solid var(--edge);
  border-radius: var(--radius); color: var(--ink); font-weight: 600;
}
.beta-chapters details > summary::-webkit-details-marker { display: none; }
.beta-chapters details > summary::before {
  content: ""; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--ink); transition: transform .15s;
}
.beta-chapters details[open] > summary::before { transform: rotate(90deg); }
.beta-chapters details > summary:hover { background: var(--bone); }
.beta-chapters details > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.folder-count { font-weight: 400; font-size: 13px; color: var(--muted); }
.beta-chapters details > ul { padding: 6px 0 4px 22px; }
.beta-chapters details details > summary { min-height: 38px; background: var(--ground); }

/* ---------- beta: Start here (My videos / All videos) ---------- */
.beta-chapters[hidden], .beta-soon[hidden] { display: none !important; }
.setup-result { margin: 8px 0 0; padding: 14px 0 0; border-top: 1px solid var(--edge); }
.setup-result .scope { margin: 0 0 10px; }
.beta-chapters li li.for-you .v-title::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0;
  border-radius: 50%; background: var(--sage-deep);
}
.beta-chapters li li.for-you::after { content: " · for you"; color: var(--sage-deep); font-size: 13px; font-weight: 600; }
.setup-next-row { margin: 10px 0 0; }
.next-button {
  min-height: 44px; padding: 0 18px; font: 600 15px "Inter", system-ui, sans-serif; color: var(--ink);
  background: var(--run); border: 1px solid var(--run); border-radius: 999px; cursor: pointer;
}
.next-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- beta: watched ticks and progress (filter.js) ---------- */
.beta-chapters li li { display: block; }
.tick {
  flex: none; width: 26px; height: 26px; margin: 0 10px 0 0; padding: 0;
  vertical-align: -6px; cursor: pointer;
  background: var(--bone); border: 1px solid var(--edge); border-radius: 50%;
  position: relative;
}
.tick::before {
  content: ""; position: absolute; left: 7px; top: 6px; width: 9px; height: 5px;
  border: solid var(--edge); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.tick:hover { background: var(--panel); }
.tick[aria-pressed="true"] { background: var(--sage); border-color: var(--sage-deep); }
.tick[aria-pressed="true"]::before { border-color: #1d2418; }
.tick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.beta-chapters li li.is-watched .v-title { color: var(--muted); }
.beta-chapters li li.soon-item .v-title { margin-left: 36px; }
.not-online { color: var(--muted); font-size: 13px; }

.setup-progress { margin: 12px 0 0; }
.progress-line { margin: 0 0 6px; font-weight: 600; }
.progress-bar { height: 8px; background: var(--deep); border-radius: 999px; overflow: hidden; max-width: 460px; }
.progress-bar > span { display: block; height: 100%; width: 0; background: var(--sage-deep); transition: width .2s; }
.setup-nextup { margin: 10px 0 0; color: var(--muted); }
.setup-nextup .link-button { color: var(--ink); font-weight: 600; }
.setup-done {
  margin: 12px 0 0; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--sage-deep); border-radius: var(--radius);
}
.setup-done p { margin: 0; }
.done-head { font-weight: 700; }
.done-ask { color: var(--muted); margin: 4px 0 0 !important; }
.done-buttons { margin: 12px 0 0 !important; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.video-player-seen { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.video-player-seen[aria-pressed="true"] { color: var(--sage-deep); font-weight: 600; text-decoration: none; }

/* ---------- beta: files (manual, use case, controller guides) ---------- */
.beta-files { margin: 28px 0 0; background: var(--device); border: 1px solid var(--edge); border-radius: 10px; padding: 18px 20px; }
.beta-files h2 { margin: 0 0 4px; }
.beta-files > p { color: var(--muted); margin: 0 0 12px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.file-list li { padding: 6px 0; }
.file-list li[hidden] { display: none !important; }
.file-list a { color: var(--ink); font-weight: 600; }
.file-meta { color: var(--muted); font-size: 13px; }
.file-list li.soon-item { color: var(--muted); }
.file-list li.for-you::after { content: " · for you"; color: var(--sage-deep); font-size: 13px; font-weight: 600; }
.beta-files[hidden] { display: none !important; }
