/* The demonstration page. Tokens from the UI lab's look as ported in ui/decent.css:
   paper by default, ink when the device asks for dark. */
:root {
  --bg: #ffffff;
  --bg-2: #f3f3f8;
  --bg-3: #e9e9f1;
  --text: #202050;
  --muted: #5c5c7a;
  --line: #e4e4ee;
  --accent: #f6a44b;
  --navy: #202050;
  --on-accent: #202050;
  --ok: #2e6b45;
  --ok-tint: #e7f1e9;
  --warn: #b06a1e;
  --warn-tint: #fbf0df;
  --bad: #b0432e;
  --bad-tint: #fbe8e3;
  --shadow: 0 18px 40px rgba(32, 32, 80, 0.14);
  --code: #f7f7fb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e14;
    --bg-2: #1a1a23;
    --bg-3: #24242f;
    --text: #ffffff;
    --muted: #a9a9ba;
    --line: rgba(255, 255, 255, 0.12);
    --ok: #7fd19a;
    --ok-tint: rgba(127, 209, 154, 0.14);
    --warn: #e8a24c;
    --warn-tint: rgba(246, 164, 75, 0.14);
    --bad: #f09a8a;
    --bad-tint: rgba(240, 154, 138, 0.14);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    --code: #15151d;
  }
}

* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  margin: 0;
}
button, input, textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}

.ribbon {
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand-sub {
  color: var(--muted);
  font-weight: 500;
}
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 999px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
}
.tab[aria-selected="true"] {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.who {
  font-size: 13px;
  color: var(--muted);
}
.who.member {
  color: var(--ok);
  font-weight: 600;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.headline {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}
.lede {
  color: var(--muted);
  margin: 8px 0 20px;
  max-width: 640px;
}
.fine {
  color: var(--muted);
  font-size: 13px;
}

.btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg);
}
.btn.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn.primary:disabled {
  opacity: 0.55;
  cursor: progress;
}
.btn.ghost {
  background: transparent;
}
@media (prefers-color-scheme: dark) {
  .btn.primary {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
  }
}

.search {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}
.field em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
.field input, .composer textarea {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  min-width: 0;
}
.field input:focus, .composer textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field #where {
  width: 130px;
  text-transform: uppercase;
}
.field.grow {
  flex: 1;
  min-width: 160px;
}
.audience {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.seg {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
}
.seg[aria-checked="true"] {
  background: var(--navy);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .seg[aria-checked="true"] {
    background: var(--accent);
    color: var(--on-accent);
  }
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 6px;
}
.examples-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chip {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  text-align: left;
}
.chip:hover {
  border-color: var(--accent);
}

.summary {
  margin: 26px 0 12px;
  font-weight: 600;
}
.summary .muted {
  color: var(--muted);
  font-weight: 400;
}
.summary.muted-line {
  margin-top: -6px;
  color: var(--muted);
  font-weight: 400;
}
.notice {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-2);
}
.notice.bad {
  background: var(--bad-tint);
  color: var(--bad);
}
.sellers {
  display: grid;
  gap: 14px;
}
.seller {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--bg);
}
.seller-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.seller h3 {
  font-size: 20px;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--warn-tint);
  color: var(--warn);
  padding: 2px 8px;
  border-radius: 999px;
}
.place {
  color: var(--muted);
  font-size: 13px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 4px;
  font-size: 14px;
}
.facts b {
  font-weight: 600;
}
.lines {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.line:last-child {
  border-bottom: 0;
}
.line-name {
  font-weight: 600;
}
.line-meta {
  color: var(--muted);
  font-size: 13px;
}
.price {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}
.price small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.price.withheld {
  color: var(--warn);
  font-weight: 600;
  font-size: 13px;
  white-space: normal;
  max-width: 180px;
}
.carries {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}
.carries-item {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: capitalize;
}
.carries-item + .lines {
  margin-top: 4px;
}
.more {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.store {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 4px;
}
.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 18px;
  white-space: pre-wrap;
}
.msg.user {
  align-self: flex-end;
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg.assistant {
  align-self: flex-start;
  background: var(--bg-2);
  border-bottom-left-radius: 6px;
}
.msg.error {
  background: var(--bad-tint);
  color: var(--bad);
}
.msg.pending {
  color: var(--muted);
  font-style: italic;
}
.calls {
  margin-top: 10px;
  white-space: normal;
}
.calls summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.call {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.call-head {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-3);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.call-json summary {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.call-credential {
  padding: 2px 12px 0;
  font-size: 12px;
  color: var(--muted);
  background: var(--code);
}
.call pre {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  max-height: 280px;
  overflow: auto;
  background: var(--code);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre;
}
.call-label {
  padding: 6px 12px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--code);
}
.composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
}
.composer textarea {
  flex: 1;
  resize: vertical;
}

.sheet {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  width: min(420px, 92vw);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}
.sheet::backdrop {
  background: rgba(14, 14, 20, 0.45);
}
.sheet h2 {
  font-size: 22px;
}
.sheet .field input {
  width: 100%;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.error {
  color: var(--bad);
  font-size: 13px;
}

@media (max-width: 640px) {
  .bar {
    gap: 10px;
  }
  .account {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .search {
    flex-direction: column;
    align-items: stretch;
  }
  .field #where {
    width: 100%;
  }
  .msg {
    max-width: 100%;
  }
}
