html {
  accent-color: var(--color-primary);
}

body {
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-inline-code);
}

mark {
  background: transparent;
  color: inherit;
  font-weight: var(--weight-semibold);
}

[hidden] {
  display: none !important;
}

.frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
}

.frame > main {
  flex: 1 0 auto;
}

.public {
  display: flex;
  flex-direction: column;
}

.public > .frame {
  flex: 1 0 auto;
  min-height: 0;
}

.sidebar {
  display: none;
}

.sidebar__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.sidebar__head .search {
  flex: 1 1 auto;
}

.sidebar__scroll ul {
  display: flex;
  flex-direction: column;
}

.sidebar-item .badge,
.sidebar-item .dot {
  margin-left: auto;
}

.dot {
  flex: none;
  width: var(--space-8);
  height: var(--space-8);
  border-radius: 50%;
  background: var(--color-primary);
}

.dot--alert {
  background: var(--color-error);
}

.dot--unread {
  align-self: flex-start;
  margin-top: calc((var(--page-text-size) * var(--leading-ui) - var(--space-8)) / 2);
}

.dot--off {
  visibility: hidden;
}

body.app:not([data-mode="modal"]) .frame > main.page,
body.app:not([data-mode="modal"]) .frame > main > .page {
  padding-bottom: calc(var(--space-64) + var(--size-bar-compact) + env(safe-area-inset-bottom));
}

body[data-mode="modal"] .tabbar {
  display: none;
}

.navbar__left.btn--plain > .icon {
  display: none;
}

@media (min-width: 900px) {
  body.app:has(> .sidebar) {
    display: grid;
    grid-template-columns: var(--size-sidebar) minmax(0, 1fr);
    align-items: stretch;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100dvh;
    overflow-y: auto;
  }

  .tabbar {
    display: none;
  }

  body.app:has(> .sidebar) .backlink--up {
    display: none;
  }

  body.app:not([data-mode="modal"]) .frame > main.page,
  body.app:not([data-mode="modal"]) .frame > main > .page {
    padding-bottom: var(--space-64);
  }
}

.page-head {
  padding-bottom: var(--space-16);
}

.page-head__subtitle {
  margin-top: var(--space-4);
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.page-head + .group,
.group__header[data-total] + .group,
.summary + .group,
.hero + .group,
.hero__actions + .group {
  margin-top: var(--space-16);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-24) 0;
  text-align: center;
}

.hero > .avatar {
  margin-bottom: var(--space-12);
}

.hero__title {
  font-size: var(--text-28);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-28);
  overflow-wrap: anywhere;
}

.hero__subtitle {
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 100%;
  min-height: 1lh;
  color: var(--color-text-secondary);
  font-size: var(--page-meta-size);
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: var(--size-ring-offset);
  overflow-wrap: anywhere;
}

.hero__link:hover {
  color: var(--color-text);
  text-decoration-color: currentColor;
}

.hero__label {
  text-box: trim-both ex alphabetic;
}

.hero__note {
  font-size: var(--text-13);
  color: var(--color-text-secondary);
}

.hero__badge {
  margin-top: var(--space-8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-8) 0 var(--space-12);
}

@supports (animation-timeline: scroll()) {
  .page-detail .navbar--fold .navbar__title {
    animation-range: calc(var(--space-128) + var(--space-32)) calc(var(--space-128) + var(--space-64));
  }

  .page-detail:not(:has(.hero > .avatar)) .navbar--fold .navbar__title {
    animation-range: var(--space-64) var(--space-96);
  }
}

.group__footer a,
.timeline__text a {
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: var(--size-ring-offset);
}

.group__footer a:hover,
.timeline__text a:hover {
  text-decoration-color: currentColor;
}

.add-card {
  margin-top: var(--space-16);
}

.text-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.state-row .cell__value {
  color: var(--color-text);
}

.status {
  margin: 0 var(--space-16) var(--space-16);
  text-align: center;
  font-size: var(--text-13);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
}

.page > .search {
  margin: var(--space-8) 0 var(--space-16);
}

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  margin: var(--space-8) calc(var(--space-16) * -1) 0;
  padding: var(--space-4) var(--space-16);
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar,
.summary::-webkit-scrollbar {
  display: none;
}

.chips + .search,
.filters + .search {
  margin-top: var(--space-12);
}

.summary {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-8);
  margin: 0 calc(var(--space-16) * -1) var(--space-12);
  padding: var(--space-4) var(--space-16);
  overflow-x: auto;
  scrollbar-width: none;
}

.summary .chip b {
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.date-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  height: var(--size-control);
  padding: 0 var(--space-12);
  border-radius: var(--radius-8);
  background: var(--color-fill);
  color: var(--color-text-secondary);
  font-size: var(--text-15);
  cursor: pointer;
}

.date-filter:focus-within {
  outline: var(--size-ring) solid var(--color-focus);
  outline-offset: var(--size-ring-offset);
}

.date-filter input {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
}

.date-filter input:focus {
  outline: none;
}

.date-filter input::-webkit-calendar-picker-indicator {
  display: none;
}

.row-remove {
  position: relative;
  z-index: 1;
  display: none;
}

[data-editing] .row-remove {
  display: inline-flex;
}

[data-editing] .cell:not(:has(> .row-remove)) {
  padding-left: calc(var(--space-16) + var(--size-control) + var(--space-12));
}

[data-edit-list]:not([data-editing]) .cell__actions {
  display: none;
}

[data-editing] .cell__chevron {
  display: none;
}

[data-editing] .cell__link {
  pointer-events: none;
}

.credential .cell__body code {
  display: block;
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--text-13);
  line-height: var(--leading-ui);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.outcome .credential .cell__body code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.glyph-eye-off,
.glyph-done,
[aria-pressed="true"] > .glyph-eye,
.is-copied > .glyph-copy {
  display: none;
}

[aria-pressed="true"] > .glyph-eye-off,
.is-copied > .glyph-done {
  display: block;
}

.meter {
  display: block;
  width: 100%;
  height: var(--space-4);
  margin-top: var(--space-8);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-fill);
  color: var(--color-primary);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.meter::-webkit-progress-bar {
  background: transparent;
}

.meter::-webkit-progress-value {
  border-radius: var(--radius-pill);
  background: currentColor;
}

.meter::-moz-progress-bar {
  border-radius: var(--radius-pill);
  background: currentColor;
}

.meter[data-level="high"] {
  color: var(--color-warn);
}

.meter[data-level="full"] {
  color: var(--color-error);
}

.selection {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 var(--space-16) var(--space-4);
}

.selection .btn--plain {
  justify-self: start;
}

.selection__count {
  font-size: var(--page-meta-size);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

.timeline .cell {
  align-items: flex-start;
}

.timeline .cell--action {
  align-items: center;
}

.timeline__text {
  overflow-wrap: anywhere;
}

.timeline__meta {
  font-size: var(--text-13);
  color: var(--color-text-secondary);
  overflow-wrap: anywhere;
}

.timeline__time {
  flex: none;
  color: var(--color-text-secondary);
  font-size: var(--text-13);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.repeat {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.repeat + .repeat {
  margin-top: var(--space-16);
}

#results[aria-busy="true"] {
  opacity: var(--opacity-busy);
  transition: opacity var(--duration-state) var(--ease-standard) var(--duration-move);
}

#sheet .page {
  padding: 0 var(--space-16) var(--space-32);
}

@media (min-width: 900px) {
  #sheet:has(> .outcome):not(:has(.field)) {
    width: min(var(--width-alert), calc(100vw - var(--space-32)));
    background: var(--color-surface-raised);
  }
}


