@import url('./preference-controls.css');

:root {
  color-scheme: light dark;
  --page: light-dark(#f4f1eb, #101113);
  --ink: light-dark(#292929, #eee);
  --muted: light-dark(#686868, #aaa);
  --teal: light-dark(#176c64, #79d6c8);
  --rule: light-dark(#dad8d3, #343536);
  --wash: light-dark(#ddefe8, #19342f);
  --surface: light-dark(#fffdf9, #1a1b1c);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}
/* System colors also follow the selected color scheme in older browsers. */
@supports not (color: light-dark(white, black)) {
  :root {
    --page: Canvas; --ink: CanvasText; --muted: CanvasText; --teal: LinkText;
    --rule: GrayText; --wash: ButtonFace; --surface: Canvas;
  }
}
:root[data-theme=day] { color-scheme: light; }
:root[data-theme=night] { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .19em; }
a:hover { text-decoration-thickness: .13em; }
:is(a, button, select, summary):focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .75rem; background: var(--page); }
.skip:focus { top: .6rem; z-index: 1; }
.topbar, .page { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  color: var(--ink);
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -.09em;
  line-height: 1;
  text-decoration: none;
}
.wordmark span { color: var(--teal); }
.topbar nav { margin-inline-start: auto; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.85rem, 3vw, 2rem); }
.topbar nav a { display: inline-flex; min-height: 44px; align-items: center; font-size: .94rem; text-decoration: none; }
.topbar nav a:hover, .topbar nav [aria-current] { text-decoration: underline; text-underline-offset: .28em; }
.topbar .reader-link { color: var(--ink); font-weight: 650; }
.guide-preferences {
  --text: var(--ink);
  --accent: var(--teal);
  --reader-chrome: light-dark(#f4f1ebf9, #101113d9);
}
@supports not (color: light-dark(white, black)) {
  .guide-preferences { --reader-chrome: var(--page); }
}
.guide-language { position: relative; }
.guide-language summary {
  display: flex; align-items: center; list-style: none;
  width: 64px; min-height: 44px; padding: 0 20px 0 8px;
  border-radius: 6px; color: var(--muted); background: var(--reader-chrome); cursor: pointer;
}
.guide-language summary::-webkit-details-marker { display: none; }
.guide-language summary::after {
  content: ""; position: absolute; right: 8px; top: 18px; width: 5px; height: 5px;
  border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.guide-language-options {
  position: absolute; z-index: 3; right: 0; top: 100%; min-width: 9rem;
  padding: .3rem; background: var(--surface); border: 1px solid var(--rule); border-radius: .65rem;
}
.guide-language-options a {
  display: flex; align-items: center; min-height: 44px; width: 100%; padding: .4rem .7rem;
  font: inherit; font-size: .95rem; color: var(--ink); border: none; border-radius: .4rem;
  text-align: start; text-decoration: none; background: transparent; cursor: pointer;
}
.guide-language-options [aria-current=page] { color: var(--teal); font-weight: 650; }
.guide-language-options a:hover { background: var(--wash); }
.page { padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(3rem, 8vw, 6rem); }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 6vw, 5.3rem); letter-spacing: -.065em; line-height: 1.02; font-weight: 650; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); letter-spacing: -.042em; line-height: 1.15; font-weight: 650; }
p { max-width: 65ch; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
p + p, h2 + p { margin-top: .75rem; }
strong { color: var(--ink); font-weight: 650; }
.lead { font-size: clamp(1.12rem, 2vw, 1.38rem); line-height: 1.5; margin-top: 1.25rem; max-width: 46ch; }
.setup-intro { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.connection-picture {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--wash);
  border-radius: 1.5rem;
  color: var(--teal);
}
.screen-outline, .phone-outline { position: absolute; overflow: hidden; border: .15rem solid currentColor; }
.screen-outline {
  left: 11%; top: 18%; width: 72%; height: 57%;
  background: var(--page); border-radius: .65rem;
  display: flex; flex-direction: column; align-items: center;
}
.screen-address {
  display: block; width: 100%; padding: .3rem 8%; margin-bottom: auto;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(.65rem, 1.5vw, .8rem); color: var(--muted);
}
.verse { display: block; width: 30%; height: .27rem; background: currentColor; border-radius: .5rem; opacity: .4; }
.verse.focus { width: 50%; height: .42rem; margin-block: 5%; opacity: 1; }
.verse:last-child { margin-bottom: 9%; }
.phone-outline { left: 70%; top: 42%; width: 17%; height: 43%; background: var(--page); border-radius: .65rem; display: grid; place-items: center; }
.confirmed { font-size: clamp(1.1rem, 2vw, 1.6rem); }
.steps { margin: clamp(2.2rem, 5vw, 4rem) 0 0; padding: 0; counter-reset: steps; list-style: none; }
.steps li { position: relative; padding: 1.7rem 0 1.7rem 3.5rem; border-top: 1px solid var(--rule); counter-increment: steps; }
.steps li::before {
  content: counter(steps);
  position: absolute; left: 0; top: 1.65rem;
  display: grid; width: 2.15rem; height: 2.15rem; place-items: center;
  border-radius: 50%; color: var(--teal); background: var(--wash);
  font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.help-section { margin-top: 1.6rem; border-top: 1px solid var(--rule); padding-top: 1.8rem; }
.prose { max-width: 47rem; }
.prose h1 { max-width: 14ch; }
.prose section { scroll-margin-top: 2rem; margin-top: 2.25rem; padding-top: 1.65rem; border-top: 1px solid var(--rule); }
@media (max-width: 640px) {
  .topbar, .page { width: min(100% - 2rem, 40rem); }
  .topbar { display: grid; grid-template-columns: 1fr auto; row-gap: .1rem; padding-block: .65rem; }
  .guide-preferences { grid-column: 2; grid-row: 1; }
  .topbar nav { grid-row: 2; grid-column: 1 / -1; margin-inline-start: 0; }
  .topbar nav { column-gap: .85rem; }
  .topbar nav a { font-size: .87rem; }
  .setup-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .connection-picture { width: min(100%, 23rem); aspect-ratio: 2 / 1; }
  .steps li { padding-left: 2.9rem; }
  .prose section { margin-top: 1.5rem; }
}
@media (max-width: 350px) {
  .topbar nav { column-gap: .55rem; }
  .steps li { padding-left: 2.4rem; }
  .steps li::before { width: 1.8rem; height: 1.8rem; }
}
