#activity {
  --ac-gap: clamp(16px, 1.4vw, 24px);
  min-width: 0;
}
.ac-intro,
.ac-privacy,
.ac-load,
.ac-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  margin: 0;
  background: #e9f1ff;
  color: #304c78;
  border-radius: 16px;
  line-height: 1.5;
}
.ac-intro,
.ac-privacy {
  font-size: var(--type-support);
  font-weight: 620;
}
.ac-intro > .icon,
.ac-privacy > .icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: #335d9b;
}
.ac-privacy {
  max-width: none;
  margin-top: clamp(20px, 1.9vw, 32px);
  color: var(--muted);
  background: #edf3fd;
  font-weight: 550;
}
.ac-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  gap: var(--ac-gap);
  align-items: start;
  margin-top: var(--ac-gap);
}
.ac-ledger {
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 1.65vw, 28px);
  min-width: 0;
}
.ac-head,
.ac-chip,
.ac-attempts,
.ac-more,
.ac-states {
  display: flex;
  align-items: center;
}
.ac-head {
  gap: clamp(12px, 1.4vw, 22px);
  margin-bottom: clamp(18px, 1.65vw, 26px);
}
.ac-tile {
  width: clamp(52px, 5vw, 76px);
  height: clamp(52px, 5vw, 76px);
  border-radius: 19px;
  display: grid;
  place-items: center;
  flex: none;
  color: #1760df;
  background: #e6efff;
}
.ac-tile .icon {
  width: 50%;
  height: 50%;
}
#ac-inbox .ac-tile {
  color: #087e70;
  background: #dff7f0;
}
.ac-head h2,
.ac-detail h2 {
  margin: 0;
  line-height: 1.35;
  font-size: var(--type-card);
  letter-spacing: normal;
}
.ac-head p {
  color: var(--muted);
  margin: 3px 0 0;
  font-size: var(--type-support);
}
.ac-ledger table {
  display: table;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
  text-align: left;
}
.ac-ledger thead {
  display: table-header-group;
}
.ac-ledger tbody {
  display: table-row-group;
}
.ac-ledger tr {
  display: table-row;
  border: 0;
  padding: 0;
}
.ac-ledger :is(td, th),
.ac-ledger :is(td, th):first-child {
  display: table-cell;
  border: 0;
  padding: 0 clamp(8px, 1.05vw, 17px);
  text-align: left;
  vertical-align: middle;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ac-ledger th {
  font-size: var(--type-support);
  font-weight: 680;
}
.ac-ledger thead th,
.ac-date th {
  height: clamp(41px, 3.5vw, 54px);
  background: #f2f6fd;
}
.ac-ledger thead th:first-child {
  border-radius: 13px 0 0 13px;
}
.ac-ledger thead th:last-child {
  border-radius: 0 13px 13px 0;
}
.ac-ledger .ac-date th {
  border-top: 8px solid var(--surface);
  background-clip: padding-box;
  border-radius: 16px;
  color: var(--muted);
  font-size: var(--type-support);
}
.ac-date .icon {
  height: 17px;
  width: 17px;
  margin-right: 8px;
  vertical-align: text-bottom;
}
#ac-outbox th:first-child {
  width: 32%;
}
#ac-outbox th:last-child {
  width: 24%;
}
#ac-inbox th:first-child {
  width: 34%;
}
#ac-inbox th:last-child {
  width: 39%;
}
.ac-ledger td::before {
  content: none;
}
.ac-ledger .ac-row td {
  height: 3.5rem;
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: var(--type-body);
  font-weight: 550;
}
.ac-ledger .ac-row:last-child td {
  border: 0;
}
.ac-row {
  cursor: pointer;
}
.ac-row:hover,
.ac-row:focus-within {
  background: #f7faff;
}
.ac-ledger button.ac-time,
.ac-ledger button.ac-id {
  min-height: 32px;
  max-width: 100%;
  padding: 4px 0;
  background: none;
  border: 0;
  box-shadow: none;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}
.ac-ledger time {
  white-space: nowrap;
}
.ac-ledger button.ac-id {
  padding: 4px 8px;
  background: #eef3fb;
  border-radius: 8px;
  color: #354c70;
  text-align: left;
  min-width: 0;
}
button.ac-id code {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  color: inherit;
  font-size: var(--type-meta);
}
.ac-states {
  gap: 6px;
  flex-wrap: wrap;
}
.ac-chip,
.ac-hint {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: var(--type-meta);
  line-height: 1.5;
  font-weight: 660;
  border-radius: 9px;
  padding: 3px 9px;
}
.ac-chip .icon {
  width: 15px;
  height: 15px;
  margin-right: 4px;
}
.ac-chip.ac-green {
  background: #ddf7e9;
  color: #086543;
}
.ac-chip.ac-blue,
.ac-hint {
  background: #e7f0ff;
  color: #2458b7;
}
.ac-chip.ac-violet {
  background: #eee8ff;
  color: #653ca7;
}
.ac-chip.ac-plain {
  background: #edf1f5;
  color: #4c5c73;
}
.ac-chip.ac-amber {
  background: #fff0d9;
  color: #855000;
}
.ac-chip.ac-red {
  background: #ffeaec;
  color: #a9364c;
}
.ac-hint {
  font-size: var(--type-meta);
  padding: 2px 7px;
}
.ac-attempts {
  gap: 6px;
  justify-content: space-between;
  white-space: nowrap;
}
.ac-attempts .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
button.ac-more {
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-size: var(--type-control);
  background: #f1f6ff;
  color: var(--blue);
  border: 0;
  border-radius: 14px;
  min-height: clamp(47px, 4vw, 64px);
  margin-top: clamp(16px, 1.65vw, 26px);
  box-shadow: none;
}
button.ac-more:hover {
  background: #e4edff;
}
.ac-more .icon {
  width: 16px;
  height: 16px;
}
.ac-more[aria-expanded='true'] .icon {
  transform: rotate(180deg);
}
.ac-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  background: #f5f8fd;
  border-radius: 14px;
}
.ac-empty strong {
  color: var(--ink);
}
.ac-empty p,
.ac-error p {
  margin: 5px 0 0;
}
.ac-error {
  background: #fff1e4;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ac-switch {
  display: none;
}
.ac-detail header h2 {
  font-size: var(--type-card);
}
.ac-detail dl {
  margin: 0;
}
.ac-detail dl > div {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
}
.ac-detail dl > div + div {
  border-top: 1px solid var(--line);
}
.ac-detail dt {
  color: var(--muted);
  font-size: var(--type-support);
}
.ac-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ac-detail code {
  font-size: 14px;
  color: var(--ink);
  user-select: all;
}
.ac-detail-note {
  color: var(--muted);
  background: #f3f7ff;
  padding: 12px 16px;
  border-radius: 12px;
}
@media (max-width: 1150px) {
  .ac-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
  .ac-ledger {
    padding: 16px;
  }
  .ac-ledger :is(td, th),
  .ac-ledger :is(td, th):first-child {
    padding-left: 7px;
    padding-right: 7px;
  }
}
@media (max-width: 980px) {
  .ac-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 12px;
  }
  .ac-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #e9f0fb;
    border-radius: 14px;
    margin-top: 16px;
  }
  .ac-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    border: 0;
    border-radius: 11px;
    box-shadow: none;
    min-height: 42px;
    color: var(--muted);
    background: transparent;
  }
  .ac-switch button[aria-pressed='true'] {
    color: var(--blue);
    background: #fff;
    box-shadow: 0 1px 4px #324f7b14;
  }
  #activity[data-direction='inbox'] #ac-outbox,
  #activity[data-direction='outbox'] #ac-inbox {
    display: none;
  }
}
@media (max-width: 600px) {
  .ac-ledger {
    padding: 15px 12px;
    border-radius: 20px;
  }
  .ac-head {
    margin: 0 2px 15px;
    gap: 12px;
  }
  .ac-tile {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }
  .ac-intro,
  .ac-privacy {
    padding: 12px 14px;
    gap: 9px;
  }
  .ac-ledger .ac-chip {
    padding: 3px 6px;
    font-size: var(--type-meta);
  }
  .ac-ledger .ac-chip .icon {
    width: 13px;
    height: 13px;
    margin-right: 3px;
  }
  .ac-attempts .icon {
    width: 12px;
    height: 12px;
  }
  .ac-detail dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (min-width: 981px) {
  #activity {
    padding-top: 16px;
  }
}
