/* ABOUTME: Page layout for the app around the Nexus components: page width, gutters, headings. */
/* ABOUTME: Uses only Nexus tokens, so every theme applies. */
body {
  margin: 0;
}

.app-page {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

a.nx-btn {
  text-decoration: none;
}

.nx-table a {
  color: var(--accent);
  white-space: nowrap;
}

.app-home,
.app-home:visited {
  color: inherit;
  text-decoration: none;
}

.app-h1 {
  margin: 0;
  font: 500 30px/36px var(--font-display);
  color: var(--ink);
}

.app-title p {
  margin: var(--space-1) 0 0;
}

.app-signout {
  background: transparent;
  color: var(--on-header);
  border-color: var(--on-header-muted);
}

.nx-empty h2 {
  margin: 0;
  font: 400 24px/30px var(--font-display);
  color: var(--ink);
}

.nx-card__head {
  flex-wrap: wrap;
}

.app-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nx-header {
    padding: 0 var(--space-4);
  }

  .app-email,
  .app-wide-only {
    display: none;
  }

  .nx-card {
    padding: var(--space-4);
  }
}

.app-alert-title {
  margin: 0;
  font: 400 24px/30px var(--font-display);
  color: var(--ink);
}

.app-delete {
  margin: var(--space-6) auto 0;
}

.app-h2 {
  margin: 0;
  font: 500 20px/26px var(--font-display);
  color: var(--ink);
}

.app-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.app-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-12);
}

.app-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.app-links--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

.app-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
}

.app-list-head {
  justify-content: space-between;
}

.app-list-head p {
  margin: 0;
}

.app-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-history p {
  margin: 0;
}

.app-change {
  font-weight: 600;
  color: var(--ink);
}

.app-nav {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.app-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.app-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Row headers read as part of their row, not as column headings. */
.nx-table tbody th {
  font: 500 14px/20px var(--font-sans);
  color: var(--ink);
  background: transparent;
  position: static;
  padding: 12px var(--space-4);
  white-space: normal;
  overflow-wrap: anywhere;
}

.nx-table tr:last-child th {
  border-bottom: 0;
}

/* A column of buttons, as narrow as they are. */
.nx-table .app-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.nx-kv dd {
  overflow-wrap: anywhere;
}

/* Sign-in: the card centred on the page. */
.app-signin-wrap {
  display: flex;
  justify-content: center;
  padding-block: var(--space-8);
}

.app-problem {
  margin: 0;
  color: var(--danger-ink);
  font-weight: 600;
}

/* The entries list's checkbox column stays as narrow as its checkbox. */
.app-select {
  width: 1%;
}
