@font-face {
  font-family: "Public Sans";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0b0c0c;
  --white: #ffffff;
  --blue: #1351b4;
  --blue-dark: #0c326f;
  --blue-tint: #e7effb;
  --grey: #505a5f;
  --grey-tint: #f3f2f1;
  --line: #b1b4b6;
  /* Functional only: errors. */
  --red: #b10e1e;

  --font: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 3vw, 2rem);
  --measure: 66rem;
  /* Set from script to the visible height, so the on-screen keyboard shrinks the slab. */
  --app-height: 100dvh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
 * The page is a fixed slab. Nothing at document level can scroll or
 * rubber-band; only the marked inner regions scroll.
 */
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.slab {
  display: flex;
  flex-direction: column;
  height: var(--app-height);
}

.slab > main {
  flex: 1;
  min-height: 0;
  /* Content that does not fit is cut here, never drawn over the footer. */
  overflow: hidden;
}

.slab > main.scroll {
  overflow-y: auto;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
}

.scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

[hidden] {
  display: none !important;
}

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

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

a {
  color: var(--blue);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--blue-dark);
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--white), 0 0 0 8px var(--ink);
}

/* Header bar */

.bar {
  flex: none;
  padding-top: env(safe-area-inset-top);
  border-bottom: 0.5rem solid var(--blue);
  background: var(--ink);
  color: var(--white);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 3.5rem;
}

.wordmark {
  color: var(--white);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.bar :focus-visible {
  box-shadow: 0 0 0 6px var(--ink), 0 0 0 8px var(--white);
}

.phase {
  flex: none;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.phase .wrap {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-block: 0.55rem;
}

.tag {
  display: inline-block;
  flex: none;
  padding: 0.15rem 0.5rem;
  background: var(--blue);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.tag.plain {
  background: var(--grey-tint);
  color: var(--grey);
  font-weight: 600;
}

/* Buttons and fields */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--blue);
  box-shadow: 0 2px 0 var(--ink);
  color: var(--white);
  font: 700 1.0625rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.button:active {
  transform: translateY(2px);
  box-shadow: none;
}

.button.secondary {
  background: var(--grey-tint);
  box-shadow: 0 2px 0 var(--grey);
  color: var(--ink);
}

.button.secondary:hover {
  background: #dbdad9;
  color: var(--ink);
}

.button.quiet {
  background: transparent;
  box-shadow: none;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  padding: 0 0.5rem;
}

.button.quiet:hover {
  background: transparent;
  color: var(--blue-dark);
  text-decoration-thickness: 3px;
}

.bar .button.quiet,
.bar .button.quiet:hover {
  color: var(--white);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.quiet:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--blue);
  box-shadow: 0 0 0 6px var(--white), 0 0 0 8px var(--ink);
}

label {
  font-weight: 700;
}

.hint {
  color: var(--grey);
  font-size: 0.95rem;
}

.error {
  color: var(--red);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  /* 16px or larger, so iOS does not zoom the page on focus. */
  font: 400 1.0625rem/1.4 var(--font);
  appearance: none;
}

input:focus,
textarea:focus {
  outline: 3px solid var(--blue);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--ink);
}

input[aria-invalid="true"] {
  border-color: var(--red);
}

/* Off-screen field that only automated form fillers complete. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Landing */

.home {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(1rem, 3vh, 2.5rem);
}

.pitch {
  display: grid;
  gap: clamp(0.9rem, 2.4vh, 1.5rem);
  min-width: 0;
}

.pitch h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, min(4.6vw, 7.5vh), 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.45;
}

.signup {
  display: grid;
  gap: 0.3rem;
  max-width: 34rem;
  padding-left: 1rem;
  border-left: 0.3rem solid var(--blue);
}

.signup.invalid {
  border-left-color: var(--red);
}

.signup .row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.signup .row input {
  flex: 1;
  min-width: 0;
}

.confirmation {
  max-width: 34rem;
  padding: 1rem 1.15rem;
  background: var(--blue);
  color: var(--white);
}

.confirmation h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.integrations {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  border-top: 0.3rem solid var(--ink);
  background: var(--grey-tint);
}

.integrations h2 {
  font-size: 1.2rem;
  line-height: 1.2;
}

.integrations li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.integrations .lead {
  padding: 0.75rem 0;
  font-size: 1.3rem;
  font-weight: 700;
}

/* The one-line summary of planned banks, used where the full list will not fit. */
.planned {
  display: none;
  color: var(--grey);
  font-size: 0.95rem;
}

.legal {
  flex: none;
  padding-block: 0.7rem max(0.7rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--grey-tint);
  color: var(--grey);
  font-size: 0.85rem;
  line-height: 1.4;
}

.legal p {
  max-width: 60rem;
}

.legal .company {
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.legal a {
  color: var(--blue);
}

@media (max-width: 820px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: clamp(0.9rem, 2.5vh, 1.5rem);
  }

  .integrations {
    padding: 0.75rem 1rem;
    gap: 0.4rem;
  }

  /* On a phone the planned banks collapse into one line of text. */
  .integrations li:not(.lead) {
    display: none;
  }

  .integrations .lead {
    padding: 0.4rem 0;
    font-size: 1.15rem;
  }

  .planned {
    display: block;
  }

  .signup .row {
    flex-direction: column;
  }
}

/* Short screens drop the planned banks, then the supporting text. */
/* On a phone the footer keeps the company and its site; the address is one tap away there. */
@media (max-width: 820px) {
  .legal .contact {
    display: none;
  }

  .legal {
    font-size: 0.8rem;
  }
}

@media (max-width: 820px) and (max-height: 860px) {
  .planned,
  .integrations h2 {
    display: none;
  }

  .integrations .lead {
    border-top: 0;
    padding: 0.15rem 0;
  }
}

@media (max-width: 820px) and (max-height: 640px) {
  .lede,
  .signup .hint {
    display: none;
  }

  .home {
    gap: 0.7rem;
    padding-block: 0.7rem;
  }

  .pitch {
    gap: 0.7rem;
  }

  .pitch h1 {
    font-size: 1.6rem;
  }

  .phase .wrap {
    padding-block: 0.35rem;
  }

  .integrations {
    padding: 0.4rem 0.75rem;
    border-top-width: 0.2rem;
  }

  .signup .row {
    gap: 0.45rem;
  }

  .legal {
    font-size: 0.78rem;
  }
}

@media (max-height: 500px) {
  .integrations,
  .lede,
  .phase,
  .signup .hint,
  .legal .contact {
    display: none;
  }

  .home {
    padding-block: 0.5rem;
  }

  .pitch {
    gap: 0.5rem;
  }

  .pitch h1 {
    font-size: 1.5rem;
  }

  .legal {
    padding-block: 0.35rem;
    font-size: 0.75rem;
  }
}

/* Admin: sign in and password change */

.gate {
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.card {
  display: grid;
  gap: 1rem;
  width: min(100%, 26rem);
  max-height: 100%;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 2px solid var(--ink);
  border-top-width: 0.5rem;
  background: var(--white);
}

.card h1 {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.card .note {
  color: var(--grey);
}

.field {
  display: grid;
  gap: 0.25rem;
}

.field small {
  color: var(--grey);
  font-size: 0.9rem;
}

.alert {
  padding: 0.7rem 0.9rem;
  border: 0.25rem solid var(--red);
  color: var(--red);
  font-weight: 700;
}

.alert.good {
  border-color: var(--blue);
  background: var(--blue-tint);
  color: var(--ink);
  font-weight: 600;
}

/* Admin: panel */

.wide-bar {
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
}

.account {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.account .who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9cccd;
  font-size: 0.95rem;
}

/* Shown on every section while agents are stopped, so it cannot be missed. */
.stopped {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.6rem;
  padding: 0.5rem max(var(--gutter), env(safe-area-inset-right)) 0.5rem
    max(var(--gutter), env(safe-area-inset-left));
  background: var(--red);
  color: var(--white);
}

.stopped .button.quiet,
.stopped .button.quiet:hover {
  min-height: 2rem;
  margin-left: auto;
  color: var(--white);
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
}

.workspace > main {
  min-height: 0;
  overflow: hidden;
}

.workspace > main.scroll {
  overflow-y: auto;
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 1.25rem 0 1rem max(var(--gutter), env(safe-area-inset-left));
  border-right: 1px solid var(--line);
  background: var(--grey-tint);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.section {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-left: 0.3rem solid transparent;
  background: transparent;
  color: var(--ink);
  font: 500 1.0625rem/1.2 var(--font);
  text-align: left;
  cursor: pointer;
}

.section:hover {
  background: #e6e5e3;
}

.section[aria-selected="true"] {
  border-left-color: var(--blue);
  background: var(--white);
  font-weight: 700;
}

.section:focus-visible {
  outline-offset: -3px;
  box-shadow: none;
}

.view {
  display: grid;
  width: 100%;
  max-width: 62rem;
}

.chat {
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--gutter);
}

.messages .empty {
  margin: auto;
  max-width: 30rem;
  color: var(--grey);
  text-align: center;
}

.bubble {
  max-width: min(85%, 42rem);
  padding: 0.65rem 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.user {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
}

.bubble.agent {
  align-self: flex-start;
  border-left: 0.3rem solid var(--ink);
  background: var(--grey-tint);
}

.bubble.notice {
  align-self: center;
  color: var(--grey);
  font-size: 0.95rem;
  text-align: center;
}

.bubble.pending {
  color: var(--grey);
}

.drafts {
  max-height: 38vh;
  margin-inline: var(--gutter);
  padding: 0.85rem 1rem;
  border-left: 0.3rem solid var(--blue);
  background: var(--blue-tint);
}

.drafts h2 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.draft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid #b8c9e6;
}

.draft .amount {
  font-weight: 700;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

.draft .to {
  color: var(--grey);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.draft .actions {
  display: flex;
  gap: 0.5rem;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem var(--gutter) max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.composer textarea {
  flex: 1;
  max-height: 8rem;
  resize: none;
}

.sheet {
  padding: var(--gutter);
  align-content: start;
  gap: 1.75rem;
}

.sheet section {
  display: grid;
  gap: 0.6rem;
}

.sheet .heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sheet h2 {
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.rows li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.97rem;
}

.rows .when,
.rows .where {
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

.rows .what {
  overflow-wrap: anywhere;
}

.rows .bad {
  color: var(--red);
  font-weight: 700;
}

.rows .empty {
  display: block;
  color: var(--grey);
}

.sheet .note {
  max-width: 44rem;
  color: var(--grey);
}

.rows.facts li {
  grid-template-columns: 11rem minmax(0, 1fr);
}

.rows.facts .label {
  font-weight: 700;
}

.rows.facts .detail {
  display: block;
  color: var(--grey);
  font-size: 0.92rem;
}

.rows.accounts li {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.rows .name {
  font-weight: 700;
}

.rows .sub {
  display: block;
  color: var(--grey);
  font-size: 0.9rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.rows .amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.rows .amount.out {
  font-weight: 400;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  max-width: 44rem;
}

.grid-form .wide {
  grid-column: 1 / -1;
}

select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 2.2rem 0.4rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--white)
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) no-repeat right 1.05rem center / 0.45rem 0.45rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: right 1.1rem center, right 0.65rem center;
  background-size: 0.45rem 0.45rem;
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--font);
  appearance: none;
}

select:focus {
  outline: 3px solid var(--blue);
  outline-offset: 0;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 400;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 2.25rem;
  min-height: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
}

.check input:checked {
  background: var(--white)
    linear-gradient(var(--ink), var(--ink)) center / 1.15rem 1.15rem no-repeat;
}

.tag.dark {
  background: var(--ink);
  color: var(--white);
}

.button.danger {
  background: var(--red);
}

.button.danger:hover {
  background: #7d0a15;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

code {
  padding: 0.05rem 0.3rem;
  background: var(--grey-tint);
  font: 0.92em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.plain {
  display: grid;
  gap: 0.4rem;
  max-width: 44rem;
  color: var(--grey);
}

.plain li {
  padding-left: 1rem;
  border-left: 0.2rem solid var(--line);
}

/* Overview */

.rows.facts.linked li {
  grid-template-columns: 11rem minmax(0, 1fr) auto;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 44rem;
}

.tile {
  display: grid;
  gap: 0.1rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 0;
  border-top: 0.3rem solid var(--ink);
  background: var(--grey-tint);
  color: var(--ink);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
}

.tile:hover {
  background: var(--blue-tint);
  border-top-color: var(--blue);
}

.tile .count {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.tile .name {
  font-size: 1rem;
}

/* Board */

#board-list,
#board-card {
  display: grid;
  gap: 1.75rem;
}

#board-card > section {
  display: grid;
  gap: 0.75rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.column {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 0.3rem solid var(--ink);
}

.column h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.card-tile {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-left: 0.3rem solid var(--blue);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.card-tile:hover {
  background: var(--blue-tint);
}

.card-tile .title {
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.card-tile .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
  color: var(--grey);
  font-size: 0.9rem;
}

.card-tile .late {
  color: var(--red);
  font-weight: 700;
}

.card-tile .next {
  color: var(--grey);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.button.back {
  padding-left: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.post {
  display: grid;
  gap: 0.3rem;
  max-width: 44rem;
}

.post small {
  color: var(--grey);
  font-size: 0.9rem;
}

.post textarea {
  resize: vertical;
}

.thread {
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
  margin-top: 0.5rem;
}

.thread li:not(.empty) {
  padding: 0.75rem 0.9rem;
  border-left: 0.3rem solid var(--ink);
  background: var(--grey-tint);
}

.thread .who {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  color: var(--grey);
  font-size: 0.9rem;
}

.thread .actor {
  color: var(--ink);
  font-weight: 700;
}

.thread .text {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.thread .empty,
.rows .empty.bad {
  color: var(--grey);
}

.rows .empty.bad {
  color: var(--red);
  font-weight: 700;
}

/* Control */

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 44rem;
}

.inline-form .field {
  flex: 1 1 12rem;
}

/* Data */

.rows.tables li {
  grid-template-columns: minmax(0, 1fr) auto 6rem;
}

.rows.tables .where,
.rows.tables .button {
  justify-self: end;
}

.rows.tables .tag {
  justify-self: start;
}

.grid-scroll {
  max-height: 60vh;
  border: 1px solid var(--line);
  overflow: auto;
}

table {
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

td {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}

/* The page shown while returning from the bank. */
.waiting {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 30rem);
}

.waiting h1 {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

@media (max-width: 860px) {
  /* On a phone the sections become one strip that slides sideways. */
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sections {
    flex-direction: row;
    gap: 0;
    padding: 0 max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .sections::-webkit-scrollbar {
    display: none;
  }

  .section {
    flex: none;
    width: auto;
    padding: 0 0.85rem;
    border-left: 0;
    border-bottom: 0.3rem solid transparent;
    white-space: nowrap;
  }

  .section[aria-selected="true"] {
    border-bottom-color: var(--blue);
  }

  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .rows li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rows .when {
    grid-column: 1 / -1;
  }

  .rows.facts li,
  .rows.facts.linked li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 0.75rem;
  }

  .rows.facts .label {
    grid-column: 1 / -1;
  }

  .rows.facts:not(.linked) li {
    grid-template-columns: minmax(0, 1fr);
  }

  .rows.accounts li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rows.accounts li .button {
    grid-column: 1 / -1;
    justify-self: start;
    padding-left: 0;
  }

  .rows.tables li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rows.tables .what {
    grid-column: 1 / -1;
  }

  .rows.tables .where,
  .rows.tables .button {
    justify-self: end;
  }

  .grid-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile .count {
    font-size: 1.7rem;
  }

  .tile {
    padding: 0.65rem 0.75rem;
  }

  .composer .button {
    padding: 0 0.8rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bubble.pending {
    animation: breathe 1.4s ease-in-out infinite;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.45;
  }
}
