:root {
  --maroon: #7e153f;
  --maroon-dark: #5e0f2f;
  --bg: #f6f4f2;
  --surface: #ffffff;
  --text: #1f1d1c;
  --muted: #5b5753;
  --border: #ddd7d2;
  --warn-bg: #fff4e0;
  --warn-border: #c77700;
  --ok-bg: #e9f5ec;
  --ok-border: #2e7d4f;
  --test-bg: #fde68a;
  --test-text: #3b2f00;
  --focus: #1a5fb4;
  --radius: 12px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Light only, even when the phone is in dark mode. */
  color-scheme: only light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

a { color: var(--maroon); }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; }

.test-banner {
  background: var(--test-bg);
  color: var(--test-text);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 16px;
}

.site-header {
  background: #ffffff;
  border-bottom: 4px solid var(--maroon);
}
.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-header img { height: 34px; width: auto; display: block; }
.site-header .inner > a { display: flex; align-items: center; min-height: 44px; }
.site-header .inner > img { margin: 5px 0; }
.site-header .tag {
  color: #5b5753;
  font-size: 0.8125rem;
  text-align: right;
  line-height: 1.3;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.3rem; margin: 36px 0 12px; }
h2.first { margin-top: 8px; }
.lede { color: var(--muted); margin: 0 0 24px; }

.back { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 8px; font-size: 0.95rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
}

.choices { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 8px 0 28px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 88px;
}
.choice:hover { border-color: var(--maroon); }
.choice svg { flex: none; width: 40px; height: 40px; color: var(--maroon); }
.choice strong { display: block; font-size: 1.15rem; }
.choice span { color: var(--muted); font-size: 0.95rem; }

.callout {
  border-left: 5px solid var(--warn-border);
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.callout.ok { border-left-color: var(--ok-border); background: var(--ok-bg); }
/* The 8-hour TAP warning sits first on every page. */
.callout.top { margin: 0 0 16px; }
.callout.top + .back { margin-top: 0; }
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding: 8px 0 8px 34px;
  border-bottom: 1px solid var(--border);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--maroon);
  border-radius: 4px;
}

/* Video */
.video-wrap { text-align: center; }
.video-wrap video {
  width: 100%;
  max-width: 420px;
  max-height: 78vh;
  background: #000;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}
.video-tools {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.toggle {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 44px;
  cursor: pointer;
}
.toggle .pill {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background 0.15s;
}
.toggle .pill::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.toggle[aria-pressed="true"] .pill { background: var(--maroon); }
.toggle[aria-pressed="true"] .pill::after { transform: translateX(16px); }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  margin-bottom: 14px;
}
.steps > li > p {
  margin: 0;
  position: relative;
  padding-left: 44px;
  min-height: 32px;
}
.steps > li > p::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.steps figure { margin: 14px 0 0; text-align: center; }
.steps figure img {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.steps figure img.icon { max-height: 96px; border: 0; background: transparent; }

.help { margin-top: 36px; }

/* Long words like the account.microsoft.com URL must wrap on narrow phones. */
.steps p, .checklist li, .callout p { overflow-wrap: anywhere; }

/* Small phones: iPhone SE / mini, compact Androids (320-380px wide). */
@media (max-width: 380px) {
  body { font-size: 1rem; }
  .site-header .inner { padding: 4px 12px; }
  .site-header img { height: 26px; }
  .site-header .tag { font-size: 0.75rem; }
  main { padding: 18px 12px 40px; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.15rem; margin-top: 28px; }
  .card { padding: 12px 14px; }
  .choice { padding: 14px; gap: 12px; min-height: 72px; }
  .choice svg { width: 32px; height: 32px; }
  .callout { padding: 12px 14px; }
  .checklist li { padding-left: 30px; }
  .checklist li::before { left: 2px; width: 16px; height: 16px; }
  .steps > li { padding: 12px 12px 14px; }
  .steps > li > p { padding-left: 38px; min-height: 28px; }
  .steps > li > p::before { width: 28px; height: 28px; font-size: 0.875rem; top: -1px; }
  .steps figure { margin-top: 10px; }
  .steps figure img.icon { max-height: 72px; }
  .video-wrap video { max-height: 70vh; }
}

/* Smallest screens: folding-phone cover screens, about 280px wide. */
@media (max-width: 300px) {
  .site-header .inner { padding: 2px 10px; }
  .site-header img { height: 22px; }
  .site-header .tag { font-size: 0.6875rem; }
  main { padding: 14px 10px 32px; }
  h1 { font-size: 1.3rem; }
  .lede { font-size: 0.95rem; }
  .choice { padding: 12px; }
  .choice strong { font-size: 1.05rem; }
  .steps > li { padding: 10px 10px 12px; }
  .toggle { padding: 8px 12px; }
  footer { padding: 16px 10px 24px; }
}

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px 16px 32px;
}

@media print {
  .test-banner, .video-section, .back, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .steps > li { break-inside: avoid; border-color: #bbb; }
  .steps figure img { max-height: 3.2in; }
}
