* {
  box-sizing: border-box
}

:root {
  color-scheme: light;
  --ink: #0b2341;
  --muted: #506780;
  --blue: #006acb;
  --surface: #edf2f8;
  --line: #dbe4ee;
  --ok: #087154;
  --warn: #865600;
  --red: #ac3446;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #e1e9f1
}

body {
  margin: 0
}

button,
input,
textarea,
select {
  font: inherit
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent
}

button {
  cursor: pointer;
  color: inherit
}

button:disabled {
  opacity: .48;
  cursor: default
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #1495fa;
  outline-offset: 2px
}

button {
  min-height: 44px
}

a {
  color: var(--blue)
}

[hidden] {
  display: none !important
}

#app {
  min-height: 100dvh;
  max-width: 760px;
  margin: auto;
  background: var(--surface)
}

#top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: var(--ink);
  color: #fff
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .085em;
  font-weight: 750;
  font-size: 16px
}

.identity img {
  border-radius: 10px
}

.identity b {
  font-size: 10px;
  letter-spacing: .12em;
  border: 1px solid #46617e;
  padding: 4px 7px;
  border-radius: 6px;
  color: #bfeaff;
  margin-left: 3px
}

main {
  padding: 16px 16px calc(90px + env(safe-area-inset-bottom))
}

h1,
h2,
h3,
p {
  margin: 0
}

h1 {
  font-size: 26px;
  letter-spacing: -.04em;
  line-height: 1.2
}

h2 {
  font-size: 20px;
  line-height: 1.25
}

h3 {
  font-size: 16px
}

p {
  line-height: 1.46
}

.eyebrow,
.cap {
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--muted)
}

.eyebrow {
  margin-bottom: 5px
}

.muted,
small,
time {
  color: var(--muted);
  font-size: 13px
}

.icon {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.icon-btn,
.btn,
.tab,
.item,
.next,
.choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  font-weight: 650
}

.icon-btn {
  background: #e7eff7;
  color: var(--blue);
  border-radius: 13px;
  width: 44px;
  min-width: 44px;
  padding: 9px
}

.top-account {
  background: #1c3957;
  color: #c9e7fa
}

.btn {
  background: #e7eff7;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px
}

.btn.primary {
  background: var(--blue);
  color: #fff
}

.btn.block {
  width: 100%
}

.btn.outline {
  background: #fff;
  border: 1px solid var(--line)
}

.btn.sm {
  font-size: 13px
}

.btn.discard {
  color: var(--red);
  background: white
}

.btn.danger {
  background: var(--red);
  color: white
}

.hero,
.headrow,
.bar,
.line,
.between {
  display: flex;
  align-items: center;
  gap: 10px
}

.between,
.headrow,
.hero {
  justify-content: space-between
}

.headrow {
  margin: 2px 0 14px
}

.hero {
  background: linear-gradient(115deg, #102941, #0d4265);
  color: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden
}

.hero .eyebrow,
.hero small {
  color: #bddae9
}

.hero h1 {
  font-size: 24px
}

.hero-count {
  font-size: 40px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -.07em;
  color: #abedff
}

.hero small {
  display: block;
  margin-top: 4px
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--muted);
  margin: 10px 0
}

.search input {
  border: 0;
  background: transparent;
  padding: 12px 0;
  width: 100%;
  min-width: 0;
  outline: 0
}

.search:focus-within {
  outline: 2px solid var(--blue)
}

.card,
.panel,
.rowcard,
.empty {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 9px 0;
  overflow-wrap: anywhere
}

.card {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  width: 100%;
  min-height: 75px
}

.card:hover,
.choice:hover {
  border-color: #9dbbda
}

.card .copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px
}

.card .name {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.card strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums
}

.card .icon {
  color: #507192
}

.meta,
.tools,
.chips,
.filters {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap
}

.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px
}

.meta .icon {
  width: 14px;
  height: 14px
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: #edf2f7;
  color: #486079;
  font-weight: 650;
  font-size: 11px;
  border-radius: 7px
}

.chip.good {
  background: #e1f4ed;
  color: var(--ok)
}

.chip.warn {
  background: #fff0cf;
  color: var(--warn)
}

.chip.blue {
  background: #e1efff;
  color: #0359a1
}

.chip.bad {
  background: #fde8ec;
  color: var(--red)
}

.section {
  margin: 20px 0 7px;
  font-size: 14px;
  letter-spacing: .01em
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px
}

.fields {
  display: grid;
  gap: 13px
}

.field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 650
}

.field input,
.field textarea,
.field select,
.select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #b7c7d8;
  background: white;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px;
  font-size: 16px
}

.field textarea {
  min-height: 75px;
  resize: vertical
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--blue)
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px
}

.sheet-head h2 {
  font-size: 20px
}

.panel>*+*,
.rowcard>*+* {
  margin-top: 9px
}

.rowcard .between {
  align-items: flex-start
}

.rowcard .requested {
  font-size: 16px;
  font-weight: 650;
  white-space: pre-line
}

.offered {
  background: #f2f6fa;
  border-radius: 11px;
  padding: 10px 12px
}

.offered p {
  font-size: 14px
}

.numbers {
  display: flex;
  gap: 15px;
  flex-wrap: wrap
}

.numbers div {
  display: grid;
  gap: 2px
}

.numbers strong {
  font-size: 16px
}

.row-subtotal strong {
  color: var(--blue);
  font-variant-numeric: tabular-nums
}

.row-order {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  font-size: 14px;
  color: var(--muted)
}

.row-order select {
  flex: 1;
  min-width: 0;
  max-width: 17rem
}

.rowcard .btn {
  padding: 8px 12px
}

.filters {
  margin: 10px 0
}

.filters button {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 20px;
  font-size: 13px;
  padding: 5px 12px
}

.filters button.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink)
}

.notice,
#notice,
#sheet-error {
  padding: 11px 14px;
  background: #fff2cf;
  border-radius: 10px;
  font-size: 14px;
  color: #654600;
  overflow-wrap: anywhere
}

#notice {
  margin: 10px 16px 0
}

#notice.good {
  background: #def4ec;
  color: #145d45
}

#sheet-error {
  margin-top: 12px
}

.checkout {
  position: sticky;
  bottom: calc(70px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
  margin: 12px -4px 0;
  background: #fff;
  border: 1px solid #cfdae6;
  box-shadow: 0 4px 20px #102c511a;
  border-radius: 15px
}

.checkout strong {
  display: block;
  font-variant-numeric: tabular-nums
}

.checkout .btn {
  font-size: 14px
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px
}

.stat {
  padding: 10px 6px;
  text-align: center;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  font-size: 12px
}

.stat.active {
  border-color: var(--blue);
  color: var(--blue)
}

.stat b {
  display: block;
  font-size: 24px
}

.choice {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  padding: 11px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 4px 0;
  font-size: 14px
}

.choice span {
  display: grid;
  gap: 3px
}

.banner {
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted)
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  min-height: 44px
}

.check input {
  width: 21px;
  height: 21px
}

.link {
  display: inline-block;
  padding: 10px 2px;
  font-weight: 600;
  font-size: 14px
}

.login {
  max-width: 440px;
  margin: 7vh auto
}

.login h1 {
  margin: 5px 0 18px
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px
}

.section-head .section {
  margin: 0
}

.pagebuttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0
}

.section-head small {
  font-size: 11px
}

.detail-head {
  padding: 14px 0 4px
}

.detail-head .muted {
  margin: 5px 0
}

.grow {
  flex: 1
}

.stage {
  font-size: 12px;
  color: var(--muted)
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 10px 0
}

.tight {
  margin: 3px 0
}

details small {
  display: block;
  margin: 6px 0
}

.bar {
  flex-wrap: wrap
}

.spaced {
  margin-top: 12px
}

#nav {
  position: fixed;
  z-index: 4;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 5px 7px calc(5px + env(safe-area-inset-bottom))
}

.tab {
  background: transparent;
  border-radius: 12px;
  flex-direction: column;
  gap: 3px;
  padding: 5px 0;
  font-size: 11px;
  color: var(--muted);
  min-height: 51px
}

.tab[aria-current=page] {
  background: #e5f1ff;
  color: #005aa9
}

.tab-glyph {
  position: relative;
  display: flex
}

.badge {
  position: absolute;
  left: 15px;
  top: -4px;
  background: #0c589b;
  border: 1px solid white;
  border-radius: 8px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 13px;
  color: white;
  min-width: 14px
}

.tab .icon {
  width: 20px;
  height: 20px
}

dialog {
  width: min(100%, 520px);
  max-height: 87dvh;
  margin: auto auto 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  color: var(--ink);
  background: white;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain
}

dialog::backdrop {
  background: #08172c88
}

dialog:focus {
  outline: 0
}

.money {
  font-size: 28px;
  letter-spacing: -.04em
}

.list-heading {
  display: flex;
  gap: 8px;
  align-items: center
}

.list-heading .icon {
  color: var(--blue)
}

.loading {
  opacity: .66
}

@media(min-width:650px) {
  main {
    padding-left: 24px;
    padding-right: 24px
  }

  dialog {
    margin: auto;
    border-radius: 20px
  }

  #app {
    box-shadow: 0 0 40px #113f7012
  }

  .cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .cards-grid>.card {
    margin: 0
  }
}

@media(max-height:550px) {
  .checkout {
    position: static
  }

  dialog {
    max-height: 97dvh
  }

  .login {
    margin: 8px auto
  }
}
