/* phonetotv.app — mobile-first, no framework, no webfonts.
   Everyone reading these pages is holding the phone they want to cast from,
   and half of them are standing in front of a TV that isn't working. Fast and
   legible beats pretty. */

:root {
  --ink: #14161a;
  --muted: #5b6270;
  --line: #e3e6ec;
  --bg: #ffffff;
  --soft: #f5f7fa;
  --brand: #1a56db;
  --brand-dark: #1541a8;
  --ok: #0a7d43;
  --warn: #a15c00;
  --warn-bg: #fff8e6;
  --bad: #b42318;
  --radius: 10px;
  --wrap: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --muted: #a2aab8;
    --line: #2a2f38;
    --bg: #14161a;
    --soft: #1c2027;
    --brand: #6f9bff;
    --brand-dark: #8fb2ff;
    --ok: #4ade80;
    --warn: #f5c451;
    --warn-bg: #2b2412;
    --bad: #f87171;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

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

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  padding: .85rem 0;
  position: sticky; top: 0; background: var(--bg); z-index: 20;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.logo span { color: var(--brand); }

/* ---- type ---- */
h1 { font-size: 1.85rem; line-height: 1.25; letter-spacing: -.02em; margin: 1.4rem 0 .6rem; }
h2 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; margin: 2.2rem 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
p, li { color: var(--ink); }
.lede { color: var(--muted); font-size: 1.05rem; margin-top: 0; }
a { color: var(--brand); }

/* ---- the answer box: first 80 words, above everything ---- */
.answer {
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.2rem 0 1.6rem;
}
.answer p:first-child { margin-top: 0; }
.answer p:last-child { margin-bottom: 0; }

/* ---- steps ---- */
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 1rem 0; }
ol.steps > li {
  counter-increment: s;
  position: relative;
  padding: 0 0 1.1rem 2.6rem;
  border-left: 2px solid var(--line);
  margin-left: .85rem;
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before {
  content: counter(s);
  position: absolute; left: -.85rem; top: 0;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: .85rem; font-weight: 700;
  display: grid; place-items: center;
}
ol.steps strong { display: block; }

/* ---- screenshot slots: replace these, do not ship them ---- */
.shot {
  display: block; width: 100%; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--soft);
  color: var(--muted); font-size: .85rem; text-align: center;
  padding: 2.2rem 1rem; margin: .7rem 0;
}

/* ---- callouts ---- */
.note, .warn {
  border-radius: var(--radius); padding: .85rem 1rem; margin: 1.2rem 0;
  border: 1px solid var(--line); font-size: .96rem;
}
.warn { background: var(--warn-bg); border-color: transparent; }
.warn strong { color: var(--warn); }

/* ---- compatibility table: honesty prevents one-star reviews ---- */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.yes { color: var(--ok); font-weight: 600; }
.no  { color: var(--bad); font-weight: 600; }

/* ---- conversion ---- */
.cta {
  display: block; background: var(--brand); color: #fff; text-decoration: none;
  border-radius: var(--radius); padding: .95rem 1.2rem; text-align: center;
  font-weight: 600; margin: 1.4rem 0; line-height: 1.35;
}
.cta:hover { background: var(--brand-dark); }
.cta small { display: block; font-weight: 400; opacity: .85; font-size: .82rem; margin-top: .15rem; }

.cta-inline {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; margin: 1.6rem 0; background: var(--soft);
}
.cta-inline h3 { margin-top: 0; }
.cta-inline .cta { margin-bottom: .3rem; }

/* ---- related ---- */
.related ul { padding-left: 1.1rem; }
.related li { margin: .35rem 0; }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.5rem;
  color: var(--muted); font-size: .9rem;
}
footer.site a { color: var(--muted); }

@media (min-width: 40rem) {
  h1 { font-size: 2.2rem; }
  body { font-size: 18px; }
}

/* ---- the TV checker ---- */
select {
  width: 100%; padding: .7rem .8rem; margin: .4rem 0 .2rem;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
}
#tvHint { font-size: .9rem; margin: .2rem 0 .6rem; }
#tvResult table { margin-top: .8rem; }
#tvResult .cta { margin-bottom: 0; }
