/* Shared by every page of watchmy.media: the tokens, the header and footer,
   text pages, buttons and the app badges. Rules only one page uses stay in
   that page's <style>. Tokens from web/src/index.css; see brand/README.md. */
:root {
  color-scheme: dark;
  --ground: #0f0f10;
  --surface: #151517;
  --surface-2: #1a1a1d;
  --line: #222225;
  --line-2: #2a2a2e;
  /* Burgundy is always a fill on the ground, never text or a thin line. */
  --brand: #5a1414;
  --brand-line: #b04545;
  --accent: #ffb612;
  --text: #f5f5f5;
  --text-2: #d4d4d4;
  --muted: #a3a3a3;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text-2);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

/* Classes such as .button set display, which would otherwise win over hidden. */
[hidden] {
  display: none !important;
}

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* The logo, home, and the same links on every page. */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 16px;
}

.site-header .home img {
  display: block;
  width: auto;
  height: 24px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Padded to a 44px tap target without moving the text. */
.site-nav a {
  display: inline-block;
  padding-block: 11px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
}

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

/* "page" on the page itself, "true" on Guide while reading any guide page. */
.site-nav a[aria-current] {
  color: var(--text);
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 6px;
}

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 2px;
}

/* Text pages: downloads, privacy, and the guides to come. :where() keeps
   these rules weaker than a page's own classes, such as .sum or .state. */
.page {
  padding-block: 40px 64px;
}

:where(.page) h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

:where(.page) h2 {
  margin: 48px 0 12px;
  color: var(--text);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

:where(.page) h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

:where(.page) p,
:where(.page) ul,
:where(.page) ol {
  margin: 0 0 16px;
}

:where(.page) ul,
:where(.page) ol {
  padding-left: 20px;
}

:where(.page) li {
  margin-bottom: 6px;
}

:where(.page) strong {
  color: var(--text);
}

:where(.page) a:where(:not(.button)) {
  color: var(--accent);
  text-underline-offset: 2px;
}

.lede {
  color: var(--muted);
  font-size: 1.0625rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #6e1a1a;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tag {
  padding: 1px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

/* The apps as store-style badges, a row per store, dashed and not links until they are in the stores. */
.badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 30rem;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges > .badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
}

.badge svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

/* A column of text inside a wide page, kept to a readable line length. */
.measure {
  max-width: 720px;
}

/* Sections of a wide page, such as /download and the guide's start page. */
.section {
  padding-block: 24px 56px;
}

.section > h2 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section > h2:has(+ .section-lede) {
  margin-bottom: 6px;
}

.section-lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Cards in a row that wraps: what you need, the four steps, the guide's pages. */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards > li {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.cards.steps-4 > li {
  flex-basis: 230px;
}

.cards h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
}

.cards p {
  flex: 1;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.cards p:last-child {
  margin-bottom: 0;
}

.cards strong {
  color: var(--text);
  font-weight: 600;
}

.cards .more {
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 500;
  text-underline-offset: 3px;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--brand);
}

.icon-tile svg,
.icon-line {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A step number: an accent ring around the digit. */
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

/* "You're done when…": what the reader sees when the steps worked. */
.done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 16px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
}

/* The tick sits in the padding, so the text can hold <strong> or links. */
.done p {
  position: relative;
  margin: 0;
  padding-left: 30px;
  color: var(--text);
  font-weight: 500;
}

.done svg {
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done a {
  color: var(--text-2);
  text-underline-offset: 3px;
}

/* A boxed aside: You'll need, If it doesn't work. */
.callout {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.callout h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0;
}

.callout ul,
.callout p:last-child {
  margin-bottom: 0;
}

/* The guide: breadcrumb, then the list of guide pages beside the article.
   They stack on a phone, the list first. */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-2);
  text-underline-offset: 3px;
}

.guide {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 56px;
}

.guide-nav {
  flex: 1 1 240px;
}

.guide-nav p {
  margin: 20px 0 6px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-nav p:first-child {
  margin-top: 0;
}

.guide-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-nav li {
  margin: 0;
}

.guide-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.guide-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}

.guide-article {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 720px;
}

.guide-article h1 {
  font-size: clamp(1.875rem, 1.5rem + 1.2vw, 2.5rem);
  letter-spacing: -0.025em;
}

/* Numbered steps in an article: each an h2 with its number. */
.steps {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.steps > li {
  margin: 0 0 40px;
}

/* Lists inside a step inherit list-style: none; give them their markers back. */
.steps ol {
  list-style: decimal;
}

.steps ul {
  list-style: disc;
}

.steps h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.steps h2 .num {
  margin: 0;
}

.steps figure {
  margin: 20px 0 0;
}

.steps figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Previous and next pages. */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 40px 0 0;
}

.pager a {
  flex: 1 1 240px;
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.pager a small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.pager .next {
  text-align: right;
}

.checked {
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Rows that open in place, without JavaScript: troubleshooting and release notes. */
.rows {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  list-style: none;
  overflow: hidden;
}

.rows > * + * {
  border-top: 1px solid var(--line);
}

.rows summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 44px;
  padding: 12px 44px 12px 16px;
  position: relative;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.rows summary::-webkit-details-marker {
  display: none;
}

/* The chevron, pointing down when closed and up when open. */
.rows summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg);
}

.rows details[open] > summary::after {
  margin-top: -2px;
  transform: rotate(225deg);
}

.rows .row-body {
  padding: 0 16px 18px;
  color: var(--text-2);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* A drawing of the Mac app's menu, with its real labels. */
.menu-mock {
  max-width: 360px;
  margin: 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.menu-mock .bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  height: 30px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
}

.menu-mock .bar i {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
}

.menu-mock .bar b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  border-radius: 5px;
  background: var(--line-2);
}

.menu-mock .bar svg {
  width: 15px;
  height: 15px;
}

.menu-mock .drop {
  display: flex;
  justify-content: flex-end;
  padding: 18px 18px 22px;
}

.menu-mock ul {
  width: 268px;
  margin: 0;
  padding: 6px;
  border: 1px solid #333338;
  border-radius: 10px;
  background: #232326;
  box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.7);
  font-size: 13px;
  line-height: 1.3;
  list-style: none;
}

.menu-mock li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px 5px 24px;
  color: var(--text);
}

/* Status lines: the menu shows them greyed out, as disabled items. */
.menu-mock li.off {
  padding-left: 10px;
  color: var(--muted);
}

.menu-mock li.on {
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
}

.menu-mock li.tick {
  justify-content: flex-start;
  padding-left: 4px;
}

.menu-mock li.tick svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-mock li.rule {
  height: 1px;
  margin: 5px 8px;
  padding: 0;
  background: #3a3a3f;
}

.menu-mock kbd {
  color: inherit;
  font: inherit;
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: 48px;
  }
}
