/*
 * Purpose: Styles for the website's content sections: videos, screenshots, voice samples, the speech
 *   demo, the Windows download, install steps, tables, the architecture list, FAQ, footer and the
 *   release history page.
 * Scope: Uses the tokens defined in styles.css (light and dark); responsive from 320 px.
 * Does NOT belong: Tokens, base type, header, hero, buttons or cards (styles.css).
 */
/* Media */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

figure {
  margin: 0;
}

video {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #000;
}

figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.samples {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.samples li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.samples span {
  font-weight: 600;
}

.samples small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.samples audio {
  width: min(340px, 100%);
}

/* Demo */
.note-box,
.warn {
  border-radius: 10px;
  padding: 12px 16px;
}

.note-box {
  background: var(--accent-soft);
  border: 1px solid var(--line);
}

.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.demo {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-top: 20px;
}

.demo label {
  font-weight: 600;
  font-size: 0.95rem;
}

textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

select {
  min-height: 44px;
}

.demo-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
}

.demo-row > div {
  display: grid;
  gap: 6px;
}

input[type='range'] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--accent);
}

.status-line {
  display: block;
  min-height: 1.6em;
}

/* The text being read, with the current sentence highlighted (visual only; the textarea has it). */
.readalong {
  margin: 4px 0 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.8;
}

.readalong span + span::before {
  content: ' ';
}

.readalong .current {
  background: var(--accent-soft);
  border-radius: 4px;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Privacy, install, engineering */
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.code {
  position: relative;
  margin: 18px 0;
}

pre {
  margin: 0;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.95rem;
}

code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 36px;
}

.steps {
  padding-left: 1.3em;
}

.steps li {
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 8px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.arch ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  counter-reset: layer;
}

.arch li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.arch span {
  color: var(--muted);
  font-size: 0.93rem;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

@media (max-width: 820px) {
  .demo-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Windows download and release history */
.checks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.checks li {
  position: relative;
  padding-left: 24px;
}

.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent-text);
}

.releases {
  max-width: 980px;
  padding-block: 48px 80px;
}

/* The list of versions beside the selected version's notes; the list wraps above them on phones. */
.release-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  margin-top: 28px;
}

.release-index h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.release-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.release-index a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.release-index a:hover {
  border-color: var(--muted);
}

.release-index a[aria-current='page'] {
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}

.release-index small {
  color: var(--muted);
  font-size: 0.85rem;
}

.release {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.release h2 {
  margin-top: 6px;
}

.release h3 {
  margin: 20px 0 4px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.release-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.release-pager > a,
.release-pager > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.release-pager > span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .release-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .release-index ol {
    display: flex;
    flex-wrap: wrap;
  }

  .release {
    padding: 22px 20px;
  }
}
