:root {
  color-scheme: light;
  --ink: #1c1c1e;
  --muted: #65656b;
  --back: #f2f2f7;
  --line: #e2e2e8;
  --amber: #9a6700;
  font:
    16px/1.45 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: white;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: 100dvh;
}
button,
textarea,
a {
  font: inherit;
  color: inherit;
}
a {
  text-decoration: none;
}
button {
  background: transparent;
  border: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid #6268b4;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p,
pre {
  margin: 0;
}
h1 {
  font-size: 22px;
  line-height: 1.2;
}
aside {
  padding: 22px 16px;
  background: var(--back);
  overflow: auto;
  border-right: 1px solid var(--line);
}
aside header {
  padding: 0 4px;
}
.counts,
.meta,
.empty,
.status,
h3 {
  font-size: 13px;
  color: var(--muted);
}
.counts {
  margin-top: 4px;
}
#main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mobile {
  display: none;
}
#content {
  flex: 1;
  overflow: auto;
  padding: 40px 24px 20px;
  scrollbar-gutter: stable both-edges;
}
.column,
form,
#notice:not(:empty) {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}
.column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bubble,
.reply,
.card,
.box,
.row strong,
.row small,
.notice {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble {
  align-self: flex-end;
  max-width: 90%;
  padding: 9px 15px;
  border-radius: 24px;
  background: var(--ink);
  color: white;
}
.reply {
  line-height: 1.5;
}
.card,
.box,
.rows {
  border-radius: 14px;
}
.card,
.box {
  padding: 13px 15px;
}
.card {
  background: var(--back);
  display: grid;
  gap: 5px;
  text-align: left;
}
.card.approval {
  background: #fff8e7;
  border: 1px solid #ffc15b;
}
.card .overline {
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}
.card strong,
.row strong {
  font-size: 16px;
  font-weight: 550;
}
.controls {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.controls button,
.primary,
.retry {
  padding: 9px 20px;
  border-radius: 24px;
  text-align: center;
}
.controls button {
  border: 1px solid #c9c9d0;
  min-width: 120px;
  background: white;
}
.controls .primary,
.primary,
.send {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.send {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-content: center;
}
#composer {
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 8px 0 24px;
  width: calc(100% - 48px);
}
textarea {
  resize: vertical;
  min-height: 48px;
  max-height: 30dvh;
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 24px;
  background: var(--back);
  padding: 12px 18px;
}
h3 {
  font-weight: 550;
  margin: 20px 0 7px;
}
.rows,
.box {
  background: white;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
}
.row:not(:last-child) {
  border-bottom: 1px solid var(--line);
}
.row > span:first-child {
  flex: 1;
  min-width: 0;
}
.row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.row img {
  flex: none;
}
.status {
  white-space: nowrap;
}
.done {
  color: #1b7543;
}
.pending {
  color: var(--amber);
}
.empty {
  padding: 14px 0;
}
#notice:not(:empty) {
  padding: 14px 20px;
}
.retry,
.back {
  font-size: 14px;
  text-decoration: underline;
}
.back {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  text-decoration: none;
}
.details #content {
  background: var(--back);
}
.box pre,
.card pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0;
  font-size: 13px;
}
.box p + p {
  margin-top: 8px;
}
.action-link {
  justify-self: start;
  text-align: left;
  padding: 0;
}
.detail-group h3 {
  margin-top: 0;
}
.signed-out {
  display: grid;
  place-items: center;
  background: var(--back);
  grid-template-columns: 1fr;
}
.signed-out main {
  background: white;
  padding: 32px;
  border-radius: 16px;
}
.signed-out p {
  margin: 10px 0 22px;
}
.signed-out a {
  display: inline-block;
}
@media (max-width: 899px) {
  body {
    display: block;
  }
  aside {
    display: none;
  }
  #main {
    height: 100dvh;
  }
  .mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 20px 16px 10px;
  }
  .mobile h1 {
    font-size: 26px;
  }
  nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
  }
  nav a {
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 20px;
  }
  nav a[aria-current="page"] {
    background: var(--ink);
    color: white;
  }
  #pending:not(:empty) {
    margin-left: 3px;
    background: #b5122b;
    color: white;
    border-radius: 12px;
    padding: 0 4px;
    font-size: 12px;
  }
  #content {
    padding: 8px 16px 16px;
    scrollbar-gutter: auto;
  }
  #composer {
    width: 100%;
    border-top: 1px solid var(--line);
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  .details .mobile,
  .listing .mobile,
  .listing #content {
    background: var(--back);
  }
  .controls button {
    min-width: 0;
    flex: 1;
  }
}
.reply > * {
  margin: 0;
}
.reply > * + * {
  margin-top: 8px;
}
.reply h3,
.reply h4,
.reply h5,
.reply h6 {
  font-size: 1em;
  font-weight: 600;
}
.reply ul,
.reply ol {
  padding-left: 1.4em;
}
.reply li + li {
  margin-top: 2px;
}
.reply code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.reply pre {
  overflow-x: auto;
  white-space: pre;
}
.reply a {
  color: inherit;
  text-decoration: underline;
}
