/* Teamable.dev — public site.
   Same restrained system as the product: warm neutrals, one clay accent used
   only for primary actions, hairline borders, small radii, no gradients. */

:root {
  --ac: #b8543f;
  --ac-hover: #c8604a;
  --ac-quiet: rgba(184, 84, 63, .1);
  --ac-line: rgba(184, 84, 63, .38);
  --ok: #4f8f62;
  --warn: #a3762c;
  --info: #4a7391;
  --bad: #a8443c;

  --bg: #101011;
  --bg-2: #16161a;
  --surface: #1a1a1e;
  --surface-2: #202024;
  --line: #32323a;
  --line-soft: #26262c;
  --text: #e8e8ea;
  --text-2: #a5a5ad;
  --text-3: #74747e;

  --r: 5px;
  --r-lg: 8px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f6f6f4; --bg-2: #fbfbfa; --surface: #ffffff; --surface-2: #f2f2ef;
  --line: #d9d9d4; --line-soft: #e6e6e1;
  --text: #1b1b1c; --text-2: #55555d; --text-3: #83838c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, canvas { max-width: 100%; }

.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ── layout ────────────────────────────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 680px; }

.nav {
  height: 56px; display: flex; align-items: center; gap: 22px;
  border-bottom: 1px solid var(--line-soft); background: var(--bg-2);
  position: sticky; top: 0; z-index: 20;
}
.nav .wrap { display: flex; align-items: center; gap: 22px; width: 100%; }
.nav__links { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); }
.nav__links a:hover { color: var(--text); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.brand__mark {
  width: 23px; height: 23px; border-radius: var(--r); background: var(--ac);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}

.foot {
  border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 26px 0 50px;
  color: var(--text-3); font-size: 12.5px;
}
.foot .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.foot a:hover { color: var(--text); }
.foot__spacer { flex: 1; }

/* ── type ──────────────────────────────────────────────────────────────────── */
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.022em; font-weight: 600; margin: 0 0 12px; }
h2 { font-size: 20px; letter-spacing: -.015em; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.lede { font-size: 15.5px; color: var(--text-2); max-width: 62ch; margin: 0 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; height: 23px; padding: 0 9px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-2); margin-bottom: 18px;
}

.section { padding: 62px 0 0; }
.section__head { margin-bottom: 20px; }

/* ── buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 30px; padding: 0 13px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: background .12s, border-color .12s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn--primary { background: var(--ac); border-color: var(--ac); color: #fff; }
.btn--primary:hover { background: var(--ac-hover); border-color: var(--ac-hover); }
.btn--lg { height: 36px; padding: 0 18px; font-size: 14px; }
.btn--sm { height: 25px; padding: 0 9px; font-size: 12px; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── cards ─────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
.card--pad { padding: 16px 18px; }
.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px;
  border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft);
  font-size: 11px; color: var(--text-2); white-space: nowrap;
}
.chip--ac { background: var(--ac-quiet); border-color: var(--ac-line); color: #e29079; }
.chip--ok { background: rgba(79,143,98,.1); border-color: rgba(79,143,98,.3); color: #6faa80; }
.chip--warn { background: rgba(163,118,44,.1); border-color: rgba(163,118,44,.3); color: #b98f43; }

/* ── pricing ───────────────────────────────────────────────────────────────── */
.toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; margin-bottom: 26px;
}
.toggle button {
  height: 28px; padding: 0 14px; border: 0; background: var(--bg-2);
  color: var(--text-3); cursor: pointer; font-size: 12.5px; border-right: 1px solid var(--line-soft);
}
.toggle button:last-child { border-right: 0; }
.toggle button.is-active { background: var(--surface-2); color: var(--text); }

.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.tier {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 18px;
}
.tier.is-featured { border-color: var(--ac-line); }
.tier__badge {
  position: absolute; top: -9px; left: 18px; background: var(--ac); color: #fff;
  font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 3px; letter-spacing: .03em;
}
.tier { position: relative; }
.tier__name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tier__blurb { font-size: 12.5px; color: var(--text-3); min-height: 34px; margin-bottom: 14px; }
.tier__price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 3px; }
.tier__amount { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tier__per { font-size: 12px; color: var(--text-3); }
.tier__save { font-size: 11.5px; color: var(--ok); min-height: 17px; margin-bottom: 14px; }
.tier__cta { margin-bottom: 16px; }
.tier__features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.tier__features li { display: flex; gap: 8px; align-items: flex-start; }
.tier__features li::before { content: "·"; color: var(--ac); font-weight: 700; }

.faq { display: flex; flex-direction: column; gap: 0; }
.faq details {
  border-bottom: 1px solid var(--line-soft); padding: 13px 0;
}
.faq summary { cursor: pointer; font-weight: 550; font-size: 13.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--ac); font-weight: 700; }
.faq details[open] summary::before { content: "− "; }
.faq p { margin: 9px 0 0; color: var(--text-2); font-size: 13px; max-width: 70ch; }

/* ── forms ─────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; height: 32px; padding: 0 10px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r); outline: none;
}
.field textarea { height: auto; min-height: 70px; padding: 8px 10px; }
.field input:focus { border-color: var(--text-3); }
.hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.alert {
  border-radius: var(--r); padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px;
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text-2);
}
.alert--bad { border-color: rgba(168,68,60,.38); color: #d08a83; }
.alert--ok { border-color: rgba(79,143,98,.35); color: #6faa80; }
.alert--warn { border-color: rgba(163,118,44,.35); color: #b98f43; }

/* ── auth modal ────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(8,8,10,.66); }
.modal__box {
  position: relative; width: min(380px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;
}
.modal__box h2 { margin-bottom: 4px; }
.modal__tabs { display: flex; gap: 14px; margin: 0 0 16px; font-size: 13px; }
.modal__tabs button {
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 0 0 4px;
  color: var(--text-3); cursor: pointer;
}
.modal__tabs button.is-active { color: var(--text); border-bottom-color: var(--ac); }

/* ── dashboard ─────────────────────────────────────────────────────────────── */
.stat b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--text-3); }
.meter { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--ac); }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.row:last-child { border-bottom: 0; }
.row__spacer { flex: 1; }

/* ── steps ─────────────────────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 12px; }
.step { display: flex; gap: 12px; }
.step__n {
  counter-increment: step; flex: 0 0 auto; width: 22px; height: 22px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  display: grid; place-items: center; font-size: 11px; color: var(--text-2); font-weight: 600;
}
.step__n::before { content: counter(step); }

@media (max-width: 900px) {
  .tiers, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .tiers, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}


/* ── app shell (added with the Forge) ──────────────────────────────────────── */
.nav__links a.is-active { color: var(--text); }
.btn--danger { background: transparent; border-color: rgba(168,68,60,.5); color: #d08a83; }
.btn--danger:hover { background: rgba(168,68,60,.12); border-color: #a8443c; }
.btn--icon { width: 30px; padding: 0; }
.modal__box--wide { width: min(640px, 100%); }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.or { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: var(--text-3); font-size: 11.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 6px; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 12px;
  font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 360px;
}
.toast--ok { border-color: rgba(79,143,98,.5); }
.toast--bad { border-color: rgba(168,68,60,.6); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--text-3);
  cursor: pointer; font-size: 13px; white-space: nowrap; margin-bottom: -1px;
}
.tabs a.is-active, .tabs button.is-active { color: var(--text); border-bottom-color: var(--ac); }
.tabs .count { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 8px; background: var(--surface-2); font-size: 10.5px; margin-left: 5px; color: var(--text-2); }

.page-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 30px 0 18px; }
.page-head h1 { margin: 6px 0 4px; font-size: 28px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card__h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 550; }
.card__h .row__spacer { flex: 1; }
.card__b { padding: 12px 14px; }
.empty { padding: 22px 14px; color: var(--text-3); font-size: 12.5px; text-align: center; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 11px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: 10px; font-weight: 600; flex: 0 0 auto; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); margin-right: 5px; }
.status-dot.ok { background: var(--ok); }
.status-dot.warn { background: var(--warn); }
.status-dot.bad { background: var(--bad); }
.field input[type=checkbox], .field input[type=radio] { width: auto; height: auto; margin-right: 6px; }
.field--inline { display: flex; align-items: center; gap: 8px; }
.field--inline > label { margin: 0; }
pre.code { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 12px; font: 12px/1.5 var(--mono); overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; }
kbd { font: 10.5px var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }

/* build cards (Explore + dashboard) */
.bcard { display: block; padding: 14px 16px; }
.bcard:hover { border-color: var(--text-3); }
.bcard__t { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.bcard__d { font-size: 12.5px; color: var(--text-2); min-height: 34px; margin-bottom: 8px; }
.bcard__f { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }

/* the Forge */
.forge { display: grid; grid-template-columns: 220px 1fr; gap: 12px; min-height: 60vh; }
.forge__threads { display: flex; flex-direction: column; gap: 2px; }
.forge__threads a { display: block; padding: 7px 9px; border-radius: var(--r); font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forge__threads a:hover { background: var(--surface-2); }
.forge__threads a.is-active { background: var(--surface-2); color: var(--text); }
.forge__main { display: flex; flex-direction: column; min-height: 60vh; }
.forge__log { flex: 1; overflow-y: auto; padding: 4px 2px; display: flex; flex-direction: column; gap: 14px; max-height: 62vh; }
.msg { display: flex; gap: 10px; }
.msg__body { min-width: 0; flex: 1; }
.msg__meta { font-size: 11px; color: var(--text-3); margin-bottom: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg__text { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.msg__text pre { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 12px; font: 12px/1.5 var(--mono); overflow: auto; white-space: pre; }
.msg__text code { font: 12px var(--mono); background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.msg__text pre code { background: none; padding: 0; }
.msg--assistant .avatar { background: var(--ac-quiet); color: #e29079; }
.thinking { font-size: 11.5px; color: var(--text-3); font-style: italic; border-left: 2px solid var(--line); padding-left: 8px; margin-bottom: 6px; white-space: pre-wrap; max-height: 120px; overflow: auto; }
.composer { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 10px; }
.composer textarea { width: 100%; min-height: 64px; max-height: 240px; padding: 9px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); resize: vertical; outline: none; }
.composer textarea:focus { border-color: var(--text-3); }
.composer__row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.composer__row select { height: 28px; padding: 0 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 12px; max-width: 260px; }
.cursor::after { content: "▍"; color: var(--ac); animation: blink 1s steps(2) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* task board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.col__h { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; padding: 4px 2px 8px; }
.col__h .count { margin-left: auto; }
.task { padding: 10px 11px; margin-bottom: 8px; cursor: pointer; }
.task:hover { border-color: var(--text-3); }
.task__t { font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.task__m { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.spark { color: #d3a24b; font-weight: 600; font-variant-numeric: tabular-nums; }

/* mediator report */
.report { border-left: 3px solid var(--line); padding: 8px 12px; background: var(--bg-2); border-radius: 0 var(--r) var(--r) 0; font-size: 12.5px; }
.report--ok { border-left-color: var(--ok); }
.report--conflicts { border-left-color: var(--warn); }
.report--unclear { border-left-color: var(--text-3); }
.report ul { margin: 6px 0 0; padding-left: 18px; }
.report li { margin-bottom: 4px; }

@media (max-width: 900px) {
  .two, .three { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge { grid-template-columns: 1fr; }
  .forge__threads { flex-direction: row; overflow-x: auto; }
  .forge__threads a { flex: 0 0 auto; max-width: 180px; }
}
@media (max-width: 620px) {
  .board { grid-template-columns: 1fr; }
  .page-head .actions { margin-left: 0; }
}
