/* Nurvequest. The Nurve family's Signal look (Inter, near-white, one accent), for the product
   site and the console. Public forms have their own sheet, form.css, themed per form. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --panel: #f3f4f6;
  --sunk: #eceef1;
  --ink: #0e1013;
  --soft: #5d636d;
  --faint: #6f7680;
  --line: #e4e5e8;
  --line-strong: #d3d5da;
  --accent: #0b6e66;
  --accent-hover: #095a53;
  --accent-ink: #ffffff;
  --accent-soft: #e7f3f1;
  --accent-line: #b9dcd7;
  --ok: #0f7a52;
  --ok-soft: #e5f4ee;
  --warn: #7a5000;
  --warn-soft: #fff5de;
  --warn-line: #f1dca8;
  --danger: #b42d1b;
  --danger-soft: #fdeeeb;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(14,16,19,.05), 0 1px 1px rgba(14,16,19,.03);
  --shadow-lg: 0 1px 2px rgba(14,16,19,.05), 0 12px 32px rgba(14,16,19,.08);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --focus: 0 0 0 3px rgba(11,110,102,.35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e11;
    --surface: #13161a;
    --panel: #111317;
    --sunk: #1a1d22;
    --ink: #eceef1;
    --soft: #a1a7b0;
    --faint: #8a919b;
    --line: #23272e;
    --line-strong: #2f343c;
    --accent: #4cc3b6;
    --accent-hover: #6fd3c8;
    --accent-ink: #0c0e11;
    --accent-soft: #12302c;
    --accent-line: #24524c;
    --ok: #44c995;
    --ok-soft: #12291f;
    --warn: #f0c46a;
    --warn-soft: #2a2314;
    --warn-line: #4a3d1e;
    --danger: #ff7b68;
    --danger-soft: #2e1714;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
    --focus: 0 0 0 3px rgba(76,195,182,.4);
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 1.6rem;
  font-weight: 650;
}

h2 {
  font-size: 1.15rem;
  font-weight: 620;
  margin-top: 1.6em;
}

h3 {
  font-size: 1rem;
  font-weight: 620;
}

p {
  margin: 0 0 0.8em;
}

code, .mono {
  font-family: var(--mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 50;
}

.skip:focus {
  left: 8px;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted {
  color: var(--soft);
}

.nowrap {
  white-space: nowrap;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Bar: sticky, on every page. */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.bar__row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
}

.bar--app .bar__row {
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 680;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__mark {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.brand__ws {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.site .bar__nav {
  justify-content: flex-end;
  gap: 14px;
}

.bar__nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 520;
}

.bar__nav a:hover {
  color: var(--ink);
  background: var(--panel);
}

.bar__nav a[aria-current=page] {
  color: var(--ink);
  background: var(--sunk);
}

.site .bar__nav a.button {
  color: var(--accent-ink);
}

.bar__me {
  margin-left: auto;
}

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  cursor: pointer;
  color: var(--soft);
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary:hover {
  background: var(--panel);
  color: var(--ink);
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: grid;
}

.menu__panel a, .menu__panel .link {
  display: block;
  text-align: left;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  width: 100%;
}

.menu__panel a:hover, .menu__panel .link:hover {
  background: var(--panel);
}

.notice {
  margin: 0;
  padding: 8px 20px;
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.notice--warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-line);
}

/* Buttons and links that look like them. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.button--small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.button--quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button--quiet:hover {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-strong);
}

.button--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.button--danger:hover {
  filter: brightness(0.92);
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

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

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}

/* Fields. */
.fields {
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.fields fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.fields--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  max-width: none;
}

.fields--row label {
  flex: 1 1 220px;
}

label {
  display: grid;
  gap: 5px;
  font-weight: 560;
  font-size: 0.93rem;
}

.hint {
  font-weight: 400;
  color: var(--soft);
  font-size: 0.87rem;
}

input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--focus);
  outline: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 450;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.inline select {
  min-height: 32px;
  padding: 4px 8px;
  width: auto;
}

.problem {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius);
}

.done {
  background: var(--ok-soft);
  color: var(--ok);
  padding: 10px 12px;
  border-radius: var(--radius);
}

.copy {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--sunk);
  color: var(--ink);
  border-radius: 6px;
  word-break: break-all;
  user-select: all;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 560;
  white-space: nowrap;
}

.tag--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag--live {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.codes {
  columns: 2;
  list-style: none;
  padding: 0;
}

.qr {
  width: 196px;
  height: 196px;
  margin: 4px 0 12px;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Pages. */
.page {
  padding: 22px 20px 48px;
  max-width: 1120px;
  margin: 0 auto;
}

.page--narrow {
  max-width: 640px;
}

.app .page {
  margin: 0;
  max-width: 1180px;
}

.app .page--narrow {
  max-width: 720px;
}

.page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page__head h1 {
  margin: 0;
}

.page__head p {
  margin: 0;
}

.auth {
  padding-top: 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
}

.panel h2 {
  margin-top: 0;
}

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 18px;
  overflow-x: auto;
  overflow-y: hidden;
}

.tabs a {
  padding: 8px 12px;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-weight: 520;
}

.tabs a:hover {
  color: var(--ink);
}

.tabs a[aria-current=page] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  font-size: 0.82rem;
  color: var(--soft);
  font-weight: 560;
  background: var(--panel);
}

.table tr:last-child td {
  border-bottom: 0;
}

.table__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rows {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row__main {
  flex: 1;
  min-width: 0;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--soft);
}

.empty h2 {
  color: var(--ink);
  margin-top: 0;
}

@media (max-width: 720px) {
  .bar__row {
    gap: 10px;
  }
  .bar--app .bar__row {
    flex-wrap: wrap;
    padding: 6px 12px;
  }
  .bar--app .bar__nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
  }
  .brand__ws {
    max-width: 140px;
  }
  .page {
    padding: 16px 16px 40px;
  }
  .table thead {
    display: none;
  }
  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
  }
  .table td {
    border: 0;
    padding: 4px 12px;
  }
  .table__actions {
    justify-content: flex-start;
  }
}
/* Product page. */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 28px 0 24px;
}

.hero h1 {
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero p.lede {
  font-size: 1.1rem;
  color: var(--soft);
  max-width: 34em;
}

.hero__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero__form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 8px 0 28px;
}

.facts > div {
  background: var(--surface);
  padding: 16px 18px;
}

.facts h2 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.facts p {
  margin: 0;
  color: var(--soft);
  font-size: 0.93rem;
}

.foot {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  color: var(--soft);
  font-size: 0.9rem;
}

.foot__row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 20px;
}

.foot__row a {
  color: var(--soft);
  margin-left: 14px;
}

.prose {
  max-width: 720px;
}

.prose pre {
  background: var(--sunk);
  padding: 12px 14px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.87rem;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1em;
}

.prose th, .prose td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.docs {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}

.docs__nav {
  position: sticky;
  top: 64px;
  align-self: start;
  display: grid;
  gap: 2px;
}

.docs__nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 6px;
}

.docs__nav a[aria-current=page], .docs__nav a:hover {
  background: var(--panel);
  color: var(--ink);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero h1 {
    font-size: 1.85rem;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
  }
  .docs {
    grid-template-columns: 1fr;
  }
  .docs__nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
  }
}
/* A console page shown inside someone else's frame stays hidden (GAPS N2). */
html.framed body.app {
  display: none;
}

.hero__form-title {
  margin: 0;
}

/* Forms list and templates. */
.forms__title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: block;
}

.forms__title:hover {
  color: var(--accent);
}

.forms__meta {
  font-size: 0.87rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  line-height: 18px;
  text-align: center;
}

.templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.template {
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
  padding: 16px;
  min-height: 120px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.template:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lg);
}

.template__name {
  font-weight: 640;
}

.template__blurb {
  color: var(--soft);
  font-size: 0.92rem;
}

.template__count {
  font-size: 0.82rem;
  margin-top: auto;
}

/* A form's header and tabs, and the builder. */
.formhead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px 0;
}

.formhead__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.formhead__back {
  color: var(--soft);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 2px 6px;
  border-radius: 6px;
}

.formhead__back:hover {
  background: var(--panel);
  color: var(--ink);
}

.formhead__title {
  flex: 1 1 260px;
  max-width: 520px;
  font-size: 1.15rem !important;
  font-weight: 640 !important;
  border-color: transparent !important;
  background: transparent !important;
  padding: 4px 8px !important;
  min-height: 36px !important;
}

.formhead__title:hover {
  border-color: var(--line) !important;
}

.formhead__title:focus {
  border-color: var(--accent) !important;
  background: var(--surface) !important;
}

h1.formhead__title {
  margin: 0;
  padding: 4px 8px;
}

.formhead__saved {
  font-size: 0.87rem;
  min-width: 7em;
}

.formhead__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.formhead__actions form {
  margin: 0;
}

.tabs--form {
  border-bottom: 0;
  margin: 8px 0 0;
}

.done--bar, .problem--bar {
  margin: 0;
  border-radius: 0;
  padding: 8px 20px;
}

.page-builder .app__main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 53px);
}

.builder {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr) minmax(280px, 360px);
  min-height: 0;
  height: calc(100vh - 150px);
}

.builder__list, .builder__pane {
  overflow-y: auto;
  padding: 14px;
  background: var(--surface);
}

.builder__list {
  border-right: 1px solid var(--line);
}

.builder__pane {
  border-left: 1px solid var(--line);
}

.builder__preview {
  display: flex;
  flex-direction: column;
  background: var(--sunk);
  min-width: 0;
}

.builder__previewbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
}

.builder__preview iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
}

@media (max-width: 1100px) {
  .builder {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    height: auto;
  }
  .builder__preview {
    grid-column: 1/-1;
    grid-row: 2;
    height: 80vh;
  }
  .builder__pane {
    border-left: 0;
  }
  .builder__list {
    border-bottom: 1px solid var(--line);
    max-height: 70vh;
  }
  .builder__pane {
    border-bottom: 1px solid var(--line);
    max-height: 70vh;
  }
}
@media (max-width: 720px) {
  .builder {
    grid-template-columns: 1fr;
  }
  .builder__list, .builder__pane {
    max-height: none;
    border-right: 0;
  }
  .builder__preview {
    grid-row: auto;
  }
}
.blist__head {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.blist__head [aria-current=true] {
  border-color: var(--accent);
  color: var(--accent);
}

.bproblems {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-line);
}

.bproblems:hover {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn);
}

.blist {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 4px;
}

.bitem {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bitem--section {
  background: var(--panel);
  margin-top: 6px;
}

.bitem--ending, .bitem--welcome {
  background: var(--panel);
}

.bitem--trouble {
  border-color: var(--warn-line);
}

.bitem__main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
}

.bitem__main[aria-current=true] {
  box-shadow: inset 3px 0 0 var(--accent);
  background: var(--accent-soft);
}

.bitem__no {
  flex: none;
  width: 22px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-size: 0.87rem;
  padding-top: 1px;
}

.bitem__text {
  display: grid;
  min-width: 0;
}

.bitem__label {
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bitem__sub {
  color: var(--soft);
  font-size: 0.8rem;
}

.bitem__flag {
  margin-left: auto;
  color: var(--warn);
  font-weight: 700;
}

.bitem__tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2px;
}

.ibtn {
  min-width: 28px;
  min-height: 26px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--soft);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.ibtn:hover:not([disabled]) {
  background: var(--panel);
  color: var(--ink);
}

.ibtn[disabled] {
  opacity: 0.3;
  cursor: default;
}

.blist__foot {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.badd {
  position: relative;
}

.badd summary {
  list-style: none;
}

.badd summary::-webkit-details-marker {
  display: none;
}

.badd__menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  width: 230px;
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.badd__menu button {
  text-align: left;
  background: none;
  border: 0;
  padding: 7px 10px;
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.badd__menu button:hover, .badd__menu button:focus-visible {
  background: var(--panel);
}

.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pane__head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.builder__pane h3 {
  font-size: 0.92rem;
  margin: 18px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.bfield {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
}

.bfield label {
  font-size: 0.87rem;
}

.bfield .hint {
  margin-top: -2px;
}

.bfield--color {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.bfield--color .bfield {
  margin: 0;
}

.bfield input[type=color] {
  width: 56px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.brow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.builder__pane .check {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.conds, .jumps, .opts, .pay, .rules, .calcs {
  margin: 0 0 12px;
}

.conds__label {
  font-size: 0.87rem;
  font-weight: 560;
  margin: 0 0 6px;
}

.conds__match {
  font-size: 0.87rem;
  display: flex;
  gap: 6px;
  align-items: center;
}

.conds__match select {
  width: auto;
  min-height: 30px;
  padding: 2px 6px;
}

.cond {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 8px;
  margin: 0 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  position: relative;
}

.cond .ibtn {
  position: absolute;
  top: 4px;
  right: 4px;
}

.cond select, .cond input {
  min-height: 34px !important;
  padding: 4px 8px !important;
  font-size: 0.9rem;
}

.cond > select:first-child {
  padding-right: 30px !important;
}

.jump, .calc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin: 0 0 8px;
}

.calc__of {
  border: 0;
  padding: 0;
  margin: 0 0 6px;
}

.calc__of legend {
  font-size: 0.87rem;
  font-weight: 560;
  margin-bottom: 4px;
}

.calc__of .check {
  margin: 0 0 4px;
}

.opt, .item {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0 0 4px;
}

.opt input:first-child, .item input:first-child {
  flex: 1;
  min-height: 34px !important;
  padding: 4px 8px !important;
}

.opt__points, .item input[type=number] {
  width: 80px !important;
  flex: none;
  min-height: 34px !important;
  padding: 4px 8px !important;
}

.item .check {
  margin: 0 !important;
  font-size: 0.82rem;
  white-space: nowrap;
}

.item select {
  width: auto;
  min-height: 34px;
  padding: 2px 6px;
  font-size: 0.85rem;
}

.link--danger {
  color: var(--danger);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 12px;
}

.swatch {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
}

.swatch[aria-checked=true] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.swatch__chip {
  width: 34px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.swatch__chip[data-swatch=paper] {
  background: linear-gradient(135deg, #fbfbfa 50%, #0b6e66 50%);
}

.swatch__chip[data-swatch=slate] {
  background: linear-gradient(135deg, #eef1f5 50%, #3b5bdb 50%);
}

.swatch__chip[data-swatch=meadow] {
  background: linear-gradient(135deg, #f3f6ee 50%, #2f7d32 50%);
}

.swatch__chip[data-swatch=ember] {
  background: linear-gradient(135deg, #fbf5ef 50%, #c2410c 50%);
}

.swatch__chip[data-swatch=night] {
  background: linear-gradient(135deg, #101418 50%, #7dd3c0 50%);
}

.swatch__chip[data-swatch=plum] {
  background: linear-gradient(135deg, #f7f3f8 50%, #7e3a8c 50%);
}

.plist {
  padding-left: 18px;
}

.plist li {
  margin-bottom: 6px;
}

/* The inbox. */
.inbox {
  padding: 12px 20px 40px;
}

.inbox__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}

.inbox__filters select, .inbox__filters input:not([type=checkbox]) {
  width: auto !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  font-size: 0.9rem;
}

.inbox__filters input[type=search] {
  min-width: 200px;
}

.inbox__date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 450;
  font-size: 0.87rem;
  color: var(--soft);
}

.inbox__filters .check {
  font-size: 0.87rem;
}

.inbox__bulk {
  margin: 0 0 8px;
  font-size: 0.87rem;
}

.inbox__body {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.inbox__list {
  min-width: 0;
}

.inbox__detail {
  min-width: 0;
  position: sticky;
  top: 64px;
}

.inbox__hint {
  padding: 40px 0;
  text-align: center;
}

.inbox__more {
  margin-top: 10px;
}

@media (max-width: 860px) {
  .inbox__body {
    grid-template-columns: 1fr;
  }
  .inbox__body--open .inbox__list {
    order: 2;
  }
  .inbox__detail {
    position: static;
  }
}
.rlist {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.rlist__item {
  border-bottom: 1px solid var(--line);
}

.rlist__item:last-child {
  border-bottom: 0;
}

.rlist__item form {
  margin: 0;
}

.rlist__open {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.rlist__open:hover {
  background: var(--panel);
}

.rlist__item--open .rlist__open {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.rlist__who {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rlist__item--unread .rlist__who {
  font-weight: 680;
}

.rlist__item--unread .rlist__who::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: 1px;
}

.rlist__when {
  color: var(--soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.rlist__snip {
  grid-column: 1/-1;
  color: var(--soft);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rlist__tags {
  grid-column: 1/-1;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rlist__tags:empty {
  display: none;
}

.tag--star {
  background: #fff4d6;
  color: #7a5000;
}

.response {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.response__head h2 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  word-break: break-word;
}

.response__head > p {
  margin: 0 0 10px;
  font-size: 0.87rem;
}

.response__tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.response .notice {
  border-radius: var(--radius);
  margin: 0 0 12px;
}

.answers {
  margin: 0;
}

.answers__row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(140px, 34%) 1fr;
  gap: 12px;
}

.answers__row dt {
  color: var(--soft);
  font-size: 0.9rem;
}

.answers__row dd {
  margin: 0;
  word-break: break-word;
}

.answers__text {
  white-space: pre-wrap;
}

.answers__files {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 560px) {
  .answers__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.history {
  font-size: 0.88rem;
  color: var(--soft);
  padding-left: 18px;
}

.exporter {
  display: flex;
  gap: 6px;
  margin: 0;
}

.fields--wide {
  max-width: 640px;
}

/* Share and settings. */
.copyline {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 0 8px;
}

.copyline input {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.87rem !important;
}

textarea.code {
  font-family: var(--mono);
  font-size: 0.85rem;
  min-height: 64px;
}

.settings h2 {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.checks {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.checks legend {
  font-weight: 560;
  font-size: 0.93rem;
  margin-bottom: 4px;
}

.table--small td, .table--small th {
  padding: 6px 10px;
  font-size: 0.88rem;
}

.inline-form {
  margin: 0;
}

.steps {
  padding-left: 20px;
}

.steps li {
  margin-bottom: 6px;
}

/* Analytics. */
.analytics .tabs--small {
  margin-bottom: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 16px;
}

.stat {
  background: var(--surface);
  padding: 14px 16px;
  display: grid;
}

.stat__n {
  font-size: 1.6rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.stat__l {
  color: var(--soft);
  font-size: 0.87rem;
}

.chart svg {
  width: 100%;
  height: auto;
}

.bar-cell {
  display: inline-block;
  width: 120px;
  height: 8px;
  border-radius: 4px;
  background: var(--sunk);
  vertical-align: middle;
  margin-right: 6px;
  overflow: hidden;
}

.bar-cell__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.logo-field {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.logo-field__label {
  font-weight: 560;
  font-size: 0.93rem;
  display: grid;
}

.logo-field__img {
  max-height: 48px;
  max-width: 200px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  background: #fff;
}

.legal-placeholder {
  background: var(--warn-soft);
  color: var(--warn);
  padding: 8px 12px;
  border-radius: var(--radius);
}
