.app {
  min-height: 100vh;
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading);
}

/* The layout's first tab stop, out of sight until focused. */
.skip-link {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--surface);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app-main:focus {
  outline: none;
}

.app-main {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: var(--space-3);
}

/* Phone: the bar's gaps and the links' padding tighten so the coach shell's
   three sections (Coach, Calendar, Cycles) fit beside More and the account
   mark without scrolling the current page's name out of view. */
.site-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  background: var(--surface);
  border-bottom: var(--line-width) solid var(--line);
}

.site-logo {
  flex: 0 0 auto;
  display: inline-flex;
}

.site-logo-image {
  width: auto;
  height: 1.75rem;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  gap: var(--space-1);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-dense);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: var(--text-md);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-link:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.site-nav-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.site-nav-link[aria-current="page"] {
  background: var(--surface-sunken);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Phone: sections past the first two live in the More menu instead. */
.site-nav-link-secondary {
  display: none;
}

.site-nav-more {
  flex: 0 0 auto;
}

/* Phone: the More trigger and the account mark give up a step of padding
   each, the room the third section needs. */
.site-nav-more-trigger {
  padding: 0 var(--space-2);
}

.site-account {
  flex: 0 0 auto;
}

/* Phone: the account's trigger is a round mark of the email's first letter,
   so Plan, Coach and More keep their room; from 40rem it reads the email.
   The menu opens in the top layer, so nothing here clips it. */
.site-account-trigger {
  padding-left: var(--space-1);
  padding-right: var(--space-2);
  white-space: nowrap;
}

.site-account-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink-on-accent);
  font-size: var(--text-sm);
  font-weight: 600;
}

.site-account-email {
  display: none;
}

.site-logout-form {
  display: contents;
}

.site-subnav {
  padding: 0 var(--space-3);
  background: var(--surface);
}

/* Components::NativeBar: the native app's strip in place of the site header */
.native-bar {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-1) var(--space-3);
  background: var(--surface);
}

.site-footer {
  padding: var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

@media (min-width: 40rem) {
  .app-main {
    padding: var(--space-4);
  }

  .site-header {
    gap: var(--space-3);
  }

  .site-nav-link {
    padding: 0 var(--space-2);
  }

  .site-nav-link-secondary {
    display: inline-flex;
  }

  .site-nav-more {
    display: none;
  }

  .site-nav-more-trigger {
    padding: 0 var(--space-3);
  }

  .site-account-trigger {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .site-account-mark {
    display: none;
  }

  .site-account-email {
    display: inline;
  }
}

/* The walkthrough's chip under the navigation (Components::WalkthroughHint)
   and the panel it opens: a reading width, its instruction then its buttons. */
.walkthrough-hint {
  padding: var(--space-2) var(--space-3) 0;
}

.walkthrough-hint-panel {
  display: grid;
  gap: var(--space-2);
  width: 22rem;
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
}
