/*
 * tvcasually.com: one stylesheet for every page. Colors follow the brand sheet
 * and the app's Classic theme; light or dark
 * follows the system. System fonts only: nothing is loaded from elsewhere.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #e2f6ff;
  --raised: #ffffff;
  --text: #0b1f3b;
  --text-2: #425875;
  --text-3: #5f7088;
  --separator: #c9dfec;
  --accent: #2563eb;
  --on-accent: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --warning: #9a5b00;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --measure: 44rem;
  --wide: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1f3b;
    --surface: #142e50;
    --raised: #1d395c;
    --text: #ffffff;
    --text-2: #c4d4e6;
    --text-3: #a1b7cd;
    --separator: #355171;
    --accent: #80abff;
    --on-accent: #0b1f3b;
    --accent-soft: rgba(128, 171, 255, 0.16);
    --warning: #f5b544;
    --warning-soft: rgba(245, 181, 68, 0.14);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-wide {
  max-width: var(--wide);
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--separator);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.wordmark img {
  display: block;
  width: 10rem;
  height: auto;
}

.site-header nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--separator);
  margin-top: 4rem;
  padding: 2rem 0 2.5rem;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Text pages */

.page {
  padding: 2.5rem 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.125rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.meta {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.note {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.note > :last-child {
  margin-bottom: 0;
}

.note h2,
.note h3 {
  margin-top: 0;
}

.toc {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1rem 2.5rem;
  margin: 1.5rem 0 2rem;
}

.toc li + li {
  margin-top: 0.2rem;
}

/* Tables scroll on their own on narrow screens instead of the page. */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--separator);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface);
  font-weight: 600;
}

/* On phones, each row becomes a block with its column names as labels (data-label). */
@media (max-width: 40rem) {
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table-wrap tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--separator);
  }

  .table-wrap tr:last-child {
    border-bottom: 0;
  }

  .table-wrap td {
    border: 0;
    padding: 0.2rem 0.9rem;
  }

  .table-wrap td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
  }
}

.planned {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  vertical-align: 0.15em;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  min-height: 1.75rem;
}

.steps li + li {
  margin-top: 0.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ui {
  font-weight: 600;
  white-space: nowrap;
}

details {
  border-bottom: 1px solid var(--separator);
  padding: 0.25rem 0;
}

details:first-of-type {
  border-top: 1px solid var(--separator);
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style-position: outside;
}

details > :not(summary) {
  margin-left: 0;
}

details[open] > summary {
  padding-bottom: 0.4rem;
}

/* Landing */

.hero {
  padding: 4.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  margin-bottom: 1rem;
}

.hero .lede {
  max-width: 36rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0.75rem;
}

/* Stand-ins for the official store badges (L-93). */
.badge-soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 10.5rem;
  min-height: 3.25rem;
  padding: 0.4rem 1rem;
  border: 1px dashed var(--text-3);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  line-height: 1.25;
}

.badge-soon small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.badge-soon span {
  font-weight: 600;
  color: var(--text);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.features li {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.features h3 {
  margin: 0 0 0.35rem;
}

.features p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9875rem;
}

.section {
  padding: 2rem 0;
}

.section h2 {
  margin-top: 0;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.plan {
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
}

.plan h3 {
  margin-top: 0;
}

.plan ul {
  padding-left: 1.2rem;
  color: var(--text-2);
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding-top: 3rem;
  }
}

@media print {
  .site-header nav,
  .skip-link {
    display: none;
  }

  a {
    color: inherit;
  }
}
