/* findmyferry.com, in the app's brand (docs/brand.md). Colors, spacing and
   radii come from brand-tokens.css, generated from design/tokens.json.
   System font, calm space, the navy board for anything that shows boats;
   no shadows, no scripts. */
@import url("/brand-tokens.css");

* { box-sizing: border-box; }

/* Dark scrollbars and form controls in dark mode, as brand-tokens.css. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

html { background: var(--background); }

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}

/* Header: the tile and the wordmark, two quiet links. */
header.site {
  background: var(--background);
  border-bottom: 1px solid var(--separator);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  min-height: 60px;
}

header.site a.home {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

header.site a.home > img { width: 32px; height: 32px; border-radius: 22.5%; }
header.site .wordmark img { display: block; height: 24px; width: auto; }

header.site nav { margin-left: auto; display: flex; gap: var(--space-l); font-size: 15px; }
header.site nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--text); }

main.wrap { padding-top: var(--space-xxl); padding-bottom: 48px; }

h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--space-s); font-weight: 700; }
h2 { font-size: 20px; line-height: 1.3; margin: var(--space-xxl) 0 var(--space-s); font-weight: 600; }
h3 { font-size: 17px; line-height: 1.35; margin: var(--space-xl) 0 var(--space-xs); font-weight: 600; }
p, ul { margin: 0 0 var(--space-m); }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--text-secondary); }
strong { font-weight: 600; }

.lead { font-size: 20px; line-height: 1.45; color: var(--text-secondary); margin-bottom: var(--space-xl); }
.muted { color: var(--text-secondary); font-size: 15px; }

/* Home: the app's tile, its name, and where to get it. */
.hero { display: flex; align-items: center; gap: var(--space-l); margin-bottom: var(--space-l); }
.hero > img { width: 88px; height: 88px; border-radius: 22.5%; flex: none; }
.hero h1 { margin-bottom: 6px; }

/* Cards: white (or dark) panels on the page, no border or shadow. */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-xs) var(--space-xl) var(--space-l);
  margin: var(--space-l) 0;
}
.card > h2:first-child { margin-top: var(--space-l); }
.card > h3:first-of-type { margin-top: var(--space-m); }
/* Questions on the support page, separated like list rows. */
.card h3 + p { padding-bottom: var(--space-s); }
.card h2 + h3 ~ h3 { border-top: 1px solid var(--separator); padding-top: var(--space-l); }

.badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--primary);
  background: var(--primary-container);
  /* A capsule on one line, a soft box when it wraps on a phone. */
  border-radius: 14px;
  padding: 4px 12px;
}

/* The app, the home screen widget and the watch, with the same boats
   (screenshots from design/web/shots/). The phone in the middle; the
   widget and watch overlap its lower edges, each ringed in the page color
   so they read as separate things. No shadows. */
.devices {
  --device: #0A0D14;          /* phone and watch cases */
  --ring: var(--background);
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  grid-template-rows: auto auto;
  align-items: end;
  margin: var(--space-xl) 0 var(--space-xxl);
}
.devices img { display: block; width: 100%; height: auto; }
.devices .phone {
  grid-column: 2; grid-row: 1;
  border: 9px solid var(--device);
  border-radius: 46px;
  overflow: hidden;
  background: var(--device);
}
.devices .phone img { border-radius: 37px; }
.devices .widget {
  grid-column: 1; grid-row: 1;
  z-index: 1;
  justify-self: end;
  width: calc(100% + 72px);
  max-width: 320px;
  margin: 0 -72px 118px 0;
}
.devices .widget img { border-radius: 22px; box-shadow: 0 0 0 6px var(--ring); }
.devices .watch {
  grid-column: 3; grid-row: 1;
  z-index: 1;
  justify-self: start;
  width: 150px;
  margin: 0 0 24px -48px;
}
.devices .watch .case {
  border: 7px solid var(--device);
  border-radius: 44px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 6px var(--ring);
}
/* Each caption under its device; under the widget and watch, only below
   the part that doesn't cover the phone. */
.devices .label {
  display: block;
  margin-top: var(--space-m);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}
.devices .widget .label { padding-right: 72px; }
.devices .watch .label { text-align: left; padding-left: 54px; }
.devices .for-phone { grid-column: 2; grid-row: 2; }
/* The one-line caption, for phones (and always for screen readers). */
.devices figcaption {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  /* A dark case still needs an edge on a dark page. */
  .devices { --device: #2A3140; }
}

/* Phones: a smaller phone, the widget over its bottom, the watch over its
   right side; the captions as one line under it all. */
@media (max-width: 600px) {
  .devices { grid-template-columns: 1fr 210px 1fr; margin-bottom: var(--space-xl); }
  .devices .phone { border-width: 7px; border-radius: 36px; }
  .devices .phone img { border-radius: 29px; }
  .devices .widget {
    grid-column: 1 / 4; grid-row: 1;
    justify-self: center; align-self: end;
    width: 80%; max-width: 300px;
    margin: 0 0 -28px 0;
  }
  .devices .widget img { border-radius: 18px; }
  .devices .watch {
    grid-column: 2 / 4; grid-row: 1;
    justify-self: end; align-self: center;
    width: 96px; margin: 0;
  }
  .devices .watch .case { border-width: 5px; border-radius: 30px; }
  .devices .label { display: none; }
  .devices figcaption {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none;
    white-space: normal;
    grid-column: 1 / 4; grid-row: 2;
    margin-top: 44px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary); text-align: center;
  }
}

/* Features: a card each, a headline and a line beside its screenshots
   (from design/web/shots/), which switch sides from card to card. On
   phones, the screenshots go under the text. */
.card.feature {
  --device: #0A0D14;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
}
.feature:nth-of-type(even) .shots { order: -1; }
.feature h2 { margin: 0 0 var(--space-s); }
.feature p { margin: 0; color: var(--text-secondary); }
.feature .shots { display: flex; align-items: center; gap: var(--space-m); }
.feature img { display: block; width: 100%; height: auto; }
.feature .phone {
  width: 180px;
  border: 6px solid var(--device);
  border-radius: 32px;
  overflow: hidden;
  background: var(--device);
}
.feature .phone img { border-radius: 26px; }
.feature .phone:not(:only-child) { width: 150px; }
.feature .watch, .feature .wear {
  border: 7px solid var(--device);
  overflow: hidden;
  background: #000;
}
.feature .watch { width: 144px; border-radius: 40px; }
.feature .wear { width: 154px; border-radius: 50%; }

@media (prefers-color-scheme: dark) {
  .card.feature { --device: #2A3140; }
}

@media (max-width: 600px) {
  .card.feature { grid-template-columns: 1fr; padding: var(--space-l); }
  .feature:nth-of-type(even) .shots { order: 0; }
  .feature .shots { justify-content: center; }
  .feature .phone { width: 160px; }
  .feature .phone:not(:only-child) { width: 136px; }
  .feature .watch { width: 124px; }
  .feature .wear { width: 132px; }
}

/* Where it runs: capsules. */
/* Help pages (setup walkthroughs): numbered steps, screenshots, and the
   names of settings and buttons. */
ol { margin: 0 0 var(--space-m); padding-left: 26px; }
ol > li { padding-left: 4px; margin-bottom: var(--space-s); }
ol > li::marker { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
img { max-width: 100%; height: auto; }
figure { margin: var(--space-l) 0 var(--space-xl); }
figure img { display: block; border-radius: var(--radius-card); border: 1px solid var(--separator); }
/* Phone and watch screenshots: shown at about phone size, not full width. */
figure.device img { max-width: 300px; margin: 0 auto; border: 0; }
figcaption { margin-top: var(--space-s); font-size: 14px; color: var(--text-secondary); text-align: center; }
/* Phone shots in a thin case, as on the home page; watch shots smaller
   (they bring their own round or rounded screen); widgets at widget size. */
figure.device.phone img {
  max-width: 220px;
  border: 6px solid var(--device-case);
  border-radius: 32px;
  background: var(--device-case);
}
figure.device.watch img { max-width: 150px; }
figure.widget img { max-width: 320px; margin: 0 auto; border: 0; border-radius: 0; }
figure.widget.small img { max-width: 160px; }
/* Screenshots side by side, wrapping on phones. */
.shots-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: var(--space-l); margin: var(--space-l) 0 var(--space-xl);
}
.shots-row figure { margin: 0; }
:root { --device-case: #0A0D14; }
@media (prefers-color-scheme: dark) { :root { --device-case: #2A3140; } }
/* A note on a help page: what needs Plus. */
.note {
  background: var(--primary-container);
  border-radius: var(--radius-card);
  padding: var(--space-m) var(--space-l);
  margin: var(--space-l) 0;
}
.note p { margin: 0; }
/* Back to /help/ from a guide, with a chevron; tall enough to tap. */
a.back {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: 44px; margin-bottom: var(--space-s);
  font-size: 17px; font-weight: 600; text-decoration: none;
}
a.back::before {
  content: ""; width: 9px; height: 9px;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg); margin-left: 3px;
}
a.back:hover { text-decoration: underline; }
/* The guides on /help/. */
.guides { list-style: none; padding: 0; }
.guides li { margin: 0; }
.guides a { display: block; padding: var(--space-m) 0; border-top: 1px solid var(--separator); text-decoration: none; }
.guides li:first-child a { border-top: 0; }
.guides strong { display: block; color: var(--text); font-size: 17px; }
.guides span { color: var(--text-secondary); font-size: 15px; }
code, kbd { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }
kbd, .ui { font-weight: 600; } /* "Tap <span class="ui">Widget settings</span>" */

/* Not found: the ferry mark, a line, the way home. */
.lost { text-align: center; padding-top: 48px; }
.lost img { width: 96px; height: 96px; margin-bottom: var(--space-l); }

footer.site {
  border-top: 1px solid var(--separator);
  padding: var(--space-xl) 0 var(--space-xxl);
  color: var(--text-secondary);
  font-size: 14px;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: var(--space-l); margin-bottom: var(--space-s); }
footer.site a { color: var(--text-secondary); }
footer.site a:hover { color: var(--text); }

@media (max-width: 520px) {
  main.wrap { padding-top: var(--space-xl); }
  h1 { font-size: 28px; }
  .lead { font-size: 18px; }
  .hero > img { width: 64px; height: 64px; }
  .card { padding: var(--space-xs) var(--space-l) var(--space-m); }
  header.site nav { gap: var(--space-m); }
  /* The wordmark needs the room; the tile says it on its own. */
  header.site .wordmark img { height: 20px; }
}
