.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);
}

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

.site-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  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-2);
  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;
}

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

/* A long email truncates on the trigger button itself; the menu opens in the top layer, so no overflow here clips it. */
.site-account-trigger {
  max-width: 45vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.site-subnav {
  padding: 0 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-nav-link-secondary {
    display: inline-flex;
  }

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

  .site-account-trigger {
    max-width: none;
    overflow: visible;
  }
}

/* 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);
}
