/* Glassy Dials. Dark, in the faces' own colors: black ground, Garmin's
   light and dark grays, WATER blue and the sun arc. Mobile first. System
   fonts only. The build appends one accent rule per face. */

:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #fff;
  --text: #d4d4d4;
  --muted: #aaa;
  --line: #2a2a2a;
  --edge: #555;
  --water: #00aaff;
  --sun: #ffaa00;
  --accent: var(--water);
  --measure: 40rem;
  --page: 66rem;
  --gap: 1.25rem;
}

*,
*::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: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

/* Links and focus */

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  border-radius: 0.4rem;
}

.skip:focus {
  left: 0.75rem;
}

/* Header */

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

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

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

.mark {
  flex: none;
  display: block;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Type */

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: 2.25rem;
  margin: 2rem 0 0.75rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.6rem;
}

h3 {
  font-size: 1.125rem;
  margin: 1.75rem 0 0.4rem;
}

p,
ul,
ol,
blockquote,
.table-wrap,
pre {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin: 0.3rem 0;
}

li > ul,
li > ol {
  margin: 0.3rem 0 0;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  background: #0d0d0d;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

blockquote {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--sun);
  background: #0d0a00;
  border-radius: 0 0.5rem 0.5rem 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.prose {
  max-width: var(--measure);
}

/* Tables scroll sideways on a phone rather than squeezing. */

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--edge);
}

td ul,
td ol {
  margin: 0;
}

.align-center {
  text-align: center;
}

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

/* Draft banner, shown until the copy for a page lands. */

.draft-note {
  margin: 1.5rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--sun);
  border-left-width: 4px;
  border-radius: 0.5rem;
  background: #140d00;
  color: var(--ink);
}

.draft-note p {
  margin: 0;
}

.draft-note strong {
  color: var(--sun);
}

/* Hero */

.hero h1 {
  color: var(--accent);
}

.lede {
  font-size: 1.1875rem;
  color: var(--ink);
  max-width: var(--measure);
}

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

.hero-home {
  padding-top: 1rem;
}

.hero-home .mark {
  margin-top: 1.5rem;
}

.hero-home h1 {
  color: var(--ink);
  margin-top: 1rem;
}

/* Jump links: one row that scrolls sideways on a phone, wrapping on a
   wide screen. */

.jump {
  margin: 1rem calc(-1 * var(--gap)) 0;
  padding: 0 var(--gap);
  overflow-x: auto;
  scrollbar-width: none;
}

.jump ul {
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.jump li {
  flex: none;
  margin: 0;
}

.jump a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.jump a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.prose .jump {
  margin-bottom: 1.75rem;
}

h2 {
  scroll-margin-top: 1rem;
}

/* Store status */

.store {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

a.pill-link {
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
}

a.pill-link:hover {
  background: #111;
}

/* Screenshots: round, since the watches are. A row that scrolls on a
   phone, and wraps on a wide screen. */

.shots {
  display: flex;
  gap: 1.25rem;
  margin: 1.75rem calc(-1 * var(--gap)) 0.5rem;
  padding: 0.25rem var(--gap) 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.shot {
  flex: none;
  width: min(68vw, 260px);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
  color: var(--accent);
}

.shot img,
.shot svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Face cards on the home page */

.cards {
  display: grid;
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  margin: 0;
  padding: 1.5rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 1rem;
  background: #070707;
}

.card:hover {
  border-color: var(--edge);
  border-top-color: var(--accent);
}

.card .shot {
  width: min(60vw, 200px);
  margin: 0 auto 0.5rem;
}

.card h3 {
  margin: 0.75rem 0 0.3rem;
  font-size: 1.375rem;
}

.card h3 a {
  color: var(--accent);
  text-decoration: none;
}

/* The whole card is the link. */
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
}

.card p {
  margin: 0;
}

.card .store {
  margin-top: 0.9rem;
}

/* Supported watches: the families in a line, every model behind a toggle. */

.all-watches summary {
  display: inline-block;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.all-watches summary::marker,
.all-watches summary::-webkit-details-marker {
  display: none;
  content: "";
}

.all-watches[open] summary {
  margin-bottom: 0.5rem;
}

.devices {
  list-style: none;
  padding: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.devices li {
  margin: 0 0 0.55rem;
}

.devices strong {
  margin-right: 0.35rem;
}

.pending {
  color: var(--muted);
}

/* Footer */

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

.site-footer nav {
  margin-bottom: 1rem;
}

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

.site-footer p {
  margin: 0 0 0.5rem;
  max-width: var(--measure);
}

/* Wider screens */

@media (min-width: 40rem) {
  h1 {
    font-size: 2.75rem;
  }

  .shots {
    flex-wrap: wrap;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .shot {
    width: 240px;
  }

  .jump {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    overflow: visible;
  }

  .jump ul {
    flex-wrap: wrap;
  }
}

@media (min-width: 56rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .card .shot {
    width: 100%;
    max-width: 220px;
  }

  .hero-home h1 {
    font-size: 3.25rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html,
  .shots {
    scroll-behavior: smooth;
  }
}

/* Face accents, from site/faces/*.json */
.face-surf {
  --accent: #00aaff;
}
.face-kite {
  --accent: #55ff55;
}
.face-ski {
  --accent: #aaffff;
}
