/* CommentBox hosted dashboard. Brand: Signal #4353FF, Ink #0F1115. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/fonts/inter-latin.woff2') format('woff2'); }
:root { --signal: #4353ff; --signal-hover: #3442e6; --ink: #0f1115; --ink-80: rgb(15 17 21 / 0.8); --ink-64: rgb(15 17 21 / 0.64); --ink-12: rgb(15 17 21 / 0.12); --ink-6: rgb(15 17 21 / 0.06); --ink-3: rgb(15 17 21 / 0.03); --white: #fff; --radius: 12px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ink-3); color: var(--ink); font: 400 16px/1.55 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--signal); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 2rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1rem; margin-top: 8px; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.top { background: var(--white); border-bottom: 1px solid var(--ink-6); }
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo img { height: 36px; width: auto; display: block; }
.top-inner #signout { margin-left: auto; }
.by { margin: 0 auto 0 0; color: var(--ink-64); font-size: 14px; font-weight: 500; }
main.wrap { padding-top: 40px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 8px; color: var(--signal); font-size: 14px; font-weight: 600; }
.muted { color: var(--ink-64); } .small { font-size: 14px; }
.card { background: var(--white); border: 1px solid var(--ink-12); border-radius: var(--radius); padding: 24px; margin: 0 0 20px; }
.narrow { max-width: 480px; margin: 24px auto; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
input, select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--ink-12); border-radius: 8px; font: inherit; background: var(--white); margin-bottom: 14px; }
input[readonly] { background: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 10px; font: 600 15px/1 'Inter', system-ui, sans-serif; cursor: pointer; border: 1px solid transparent; text-decoration: none; }
.btn-primary { background: var(--signal); color: var(--white); } .btn-primary:hover { background: var(--signal-hover); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--ink-12); } .btn-ghost:hover { border-color: var(--ink-64); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ink-6); color: var(--ink-80); white-space: nowrap; }
.badge.active { background: rgb(67 83 255 / 0.12); color: var(--signal); }
.badge.past_due, .badge.canceled, .badge.expired { background: rgb(200 60 40 / 0.1); color: #a33a24; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Code and keys: neutral mono fields, not coloured panels. */
pre { margin: 0; padding: 11px 12px; background: var(--ink-3); color: var(--ink); border: 1px solid var(--ink-12); border-radius: 8px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--mono); }
code { font-family: var(--mono); font-size: 13px; }
.btn-danger { background: #a33a24; color: var(--white); } .btn-danger:hover { background: #8c2f1c; }
/* Messages, not fields: tinted, with an accent bar on the left. */
.notice { margin: 0 0 24px; padding: 12px 16px; background: rgb(67 83 255 / 0.07); border-left: 3px solid var(--signal); border-radius: 0 8px 8px 0; }
.notice.error { background: rgb(200 60 40 / 0.07); border-left-color: #a33a24; }
.notice.billing-off { background: var(--ink-6); border-left-color: var(--ink-64); }
.intro { margin-bottom: 24px; } .intro p:last-child { margin: 0; }
.planbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--ink-12); }
.planbar p { margin: 0; font-weight: 600; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 4px; }
.plan { display: flex; flex-direction: column; align-items: flex-start; margin: 0; }
.plan p { margin: 0 0 20px; } .plan .btn { margin-top: auto; }
.plan.highlight { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
#plans > .small { margin: 20px 0 0; }
.help { margin: -8px 0 14px; font-size: 13px; color: var(--ink-64); }
.project { display: flex; flex-direction: column; }
.project > * { min-width: 0; }
/* Install, Connection to agent or backend and Plan: each block under its own heading, divided by a line. */
.block { padding: 24px 0 0; margin: 24px 0 0; border-top: 1px solid var(--ink-12); }
.block > h3 { margin: 0 0 14px; font-size: 1.0625rem; }
.label { margin: 0 0 6px; font-size: 14px; font-weight: 500; }
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.copyrow input { margin: 0; font-size: 14px; }
.copyrow .btn { min-width: 84px; }
.install .copyrow + .label { margin-top: 16px; }
.key { margin: 0; } .key .help { margin: 8px 0 0; }
.until { margin: 0 0 4px; font-weight: 600; }
.buy .muted.small { margin: 0 0 14px; }
.buy .more { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--ink-12); }
/* A project that is not active leads with its Plan block (the pay button). */
.project.needs-pay > .buy { order: -1; margin: 0 0 4px; padding: 0; border-top: 0; }
.project > .head { order: -2; }
.settings { margin: 0 0 24px; padding: 16px; border: 1px solid var(--ink-12); border-radius: 10px; background: var(--ink-3); }
.settings .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.settings .row input { margin: 0; }
.settings .help { margin: 6px 0 0; }
.settings .rotate { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ink-12); }
.dialog-wrap { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgb(15 17 21 / 0.4); }
.dialog { width: 100%; max-width: 440px; background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: 0 12px 40px rgb(15 17 21 / 0.2); }
.dialog h2 { margin: 0 0 8px; } .dialog p { margin: 0 0 20px; } .dialog .small:empty { display: none; } .dialog .small { margin: 12px 0 0; color: #a33a24; }
.project .head { flex-wrap: wrap; }
.project .title { min-width: 0; } .project .title h2 { margin: 0; overflow-wrap: anywhere; } .project .title p { margin: 4px 0 0; overflow-wrap: anywhere; }
.project .side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.project.collapsed > :not(.head):not(.buy), .project.collapsed:not(.needs-pay) > .buy { display: none; }
.project.collapsed .head { margin-bottom: 0; } .project.collapsed .buy { margin: 16px 0 0; }
.project.collapsed.needs-pay > .buy > h3 { display: none; }
#new-wrap { margin-bottom: 20px; }
.foot { border-top: 1px solid var(--ink-6); padding: 24px 0 40px; color: var(--ink-64); font-size: 14px; }
@media (max-width: 640px) {
  .grid2, .plans { grid-template-columns: minmax(0, 1fr); } .by { display: none; }
  h1 { font-size: 1.625rem; } .card { padding: 20px; }
  .project .side { margin-left: 0; width: 100%; justify-content: space-between; }
  .plan .btn, #new-project .actions .btn, .buy .actions .btn, .dialog .btn, #new-open { width: 100%; }
  .copyrow, .settings .row { grid-template-columns: minmax(0, 1fr); } .copyrow .btn, .settings .btn { width: 100%; }
}
/* CommentBox settings block. */
.cbs { --cbs-accent: var(--signal, #4353ff); --cbs-ink: #0f1115; --cbs-muted: rgb(15 17 21 / 0.64); --cbs-line: rgb(15 17 21 / 0.12); --cbs-soft: rgb(15 17 21 / 0.04); color: var(--cbs-ink); }
.cbs, .cbs *, .cbs *::before, .cbs *::after { box-sizing: border-box; }
.cbs-section { padding: 20px 0; border-top: 1px solid var(--cbs-line); }
.cbs-section:first-child { border-top: 0; padding-top: 0; }
.cbs-section:last-child { padding-bottom: 0; }
.cbs h3 { font-size: 1rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.cbs p { margin: 0; }
.cbs .cbs-hint { color: var(--cbs-muted); font-size: 14px; margin: 0 0 14px; }
.cbs .cbs-note { font-size: 14px; color: var(--cbs-muted); margin-top: 10px; }
.cbs .cbs-note:empty { display: none; }
.cbs .cbs-note.err { color: #a33a24; }
.cbs .cbs-note.ok { color: #1f7a4d; }
.cbs fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cbs .cbs-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 12px 16px; }
.cbs .cbs-row > legend { float: left; padding: 0; font-weight: 600; font-size: 1rem; }
.cbs .cbs-seg { display: inline-flex; background: var(--cbs-soft); border: 1px solid var(--cbs-line); border-radius: 10px; padding: 3px; gap: 3px; justify-self: start; }
.cbs .cbs-seg label { position: relative; display: flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 500; margin: 0; cursor: pointer; white-space: nowrap; color: var(--cbs-muted); }
.cbs .cbs-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; border: 0; pointer-events: none; }
.cbs .cbs-seg label:has(input:checked) { background: #fff; color: var(--cbs-ink); box-shadow: 0 1px 2px rgb(15 17 21 / 0.12), 0 0 0 1px var(--cbs-line); }
.cbs .cbs-seg label:has(input:focus-visible) { outline: 2px solid var(--cbs-accent); outline-offset: 1px; }
.cbs .cbs-row .cbs-hint { grid-column: 2; margin: 0; }
.cbs .cbs-warn { margin-top: 12px; font-size: 14px; color: #a33a24; }
.cbs label.cbs-field { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.cbs input[type=text], .cbs input[type=url], .cbs input[type=password], .cbs select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--cbs-line); border-radius: 8px; font: inherit; font-size: 15px; background: #fff; color: inherit; margin: 0; }
.cbs input[readonly] { background: var(--cbs-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.cbs .cbs-form { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 12px; align-items: end; }
.cbs .cbs-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 14px; }
.cbs .cbs-fields .cbs-hint { margin: 6px 0 0; }
.cbs .cbs-fields .cbs-wide { grid-column: 1 / -1; }
.cbs .cbs-authset { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; font-size: 14px; }
.cbs .cbs-authset .cbs-btn { min-height: 32px; padding: 0 12px; font-size: 14px; }
.cbs .cbs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; border: 1px solid var(--cbs-line); background: #fff; color: var(--cbs-ink); white-space: nowrap; }
.cbs .cbs-btn:hover { border-color: var(--cbs-muted); }
.cbs .cbs-btn.primary { background: var(--cbs-accent); border-color: transparent; color: #fff; }
.cbs .cbs-btn.primary:hover { filter: brightness(0.94); }
.cbs .cbs-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cbs .cbs-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cbs .cbs-link { margin-top: 14px; padding: 14px; border: 1px solid var(--cbs-line); border-radius: 10px; background: var(--cbs-soft); }
.cbs .cbs-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.cbs .cbs-copied { font-size: 14px; color: var(--cbs-accent); font-weight: 500; }
.cbs .cbs-link .cbs-hint { margin: 8px 0 0; }
.cbs ul.cbs-list { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--cbs-line); border-radius: 10px; }
.cbs ul.cbs-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 16px; align-items: center; padding: 10px 10px 10px 14px; border-top: 1px solid var(--cbs-line); font-size: 14px; }
.cbs ul.cbs-list li:first-child { border-top: 0; }
.cbs .cbs-name { font-weight: 600; overflow-wrap: anywhere; }
.cbs .cbs-meta { color: var(--cbs-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbs .cbs-empty { margin-top: 16px; font-size: 14px; color: var(--cbs-muted); }
.cbs .cbs-last { margin: 0 0 14px; font-size: 14px; color: var(--cbs-muted); }
.cbs .cbs-give { padding: 16px; border: 1px solid var(--cbs-line); border-radius: 10px; background: var(--cbs-soft); }
.cbs .cbs-give h4 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.cbs .cbs-prompt { margin: 0 0 12px; padding: 12px; background: #fff; color: var(--cbs-ink); border: 1px solid var(--cbs-line); border-radius: 8px; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.cbs .cbs-give .cbs-again { font-size: 14px; color: var(--cbs-muted); margin: 0 0 12px; }
.cbs .cbs-steps { margin: 10px 0 20px; }
.cbs .cbs-token { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; margin: 0 0 12px; overflow-wrap: anywhere; }
.cbs .cbs-modes { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--cbs-line); }
.cbs .hidden, .cbs [hidden] { display: none !important; }
@media (max-width: 640px) {
  .cbs .cbs-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cbs .cbs-row .cbs-hint { grid-column: 1; }
  .cbs .cbs-seg { display: flex; flex-direction: column; justify-self: stretch; }
  .cbs .cbs-form, .cbs .cbs-fields, .cbs .cbs-copy { grid-template-columns: minmax(0, 1fr); }
  .cbs ul.cbs-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .cbs ul.cbs-list li .cbs-name { grid-column: 1 / -1; }
  .cbs ul.cbs-list li .cbs-meta { grid-column: 1; white-space: normal; }
  .cbs ul.cbs-list li .cbs-btn { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
}
/* CommentBox agent instruction cards. */
.cb-modes { --cbm-ink: var(--cbs-ink, #0f1115); --cbm-muted: var(--cbs-muted, rgb(15 17 21 / 0.64)); --cbm-line: var(--cbs-line, rgb(15 17 21 / 0.12)); --cbm-soft: var(--cbs-soft, rgb(15 17 21 / 0.04)); color: var(--cbm-ink); }
.cb-modes .cb-modes-heading { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.cb-modes .cb-modes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cb-modes .cb-modes-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--cbm-line); border-radius: 10px; min-width: 0; }
.cb-modes .cb-modes-title { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cb-modes .cb-modes-default { font-size: 12px; font-weight: 500; color: var(--cbm-muted); border: 1px solid var(--cbm-line); border-radius: 999px; padding: 1px 8px; }
.cb-modes .cb-modes-line { margin: 0; font-size: 13px; color: var(--cbm-muted); }
.cb-modes .cb-modes-text { flex: 1; margin: 4px 0 0; padding: 10px; background: var(--cbm-soft); color: var(--cbm-ink); border: 0; border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-modes .cb-modes-actions { margin: 4px 0 0; display: flex; align-items: center; gap: 10px; }
.cb-modes .cb-modes-copy { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--cbm-line); border-radius: 8px; background: #fff; color: var(--cbm-ink); font: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; }
.cb-modes .cb-modes-copy:hover { border-color: var(--cbm-muted); }
.cb-modes .cb-modes-copied { font-size: 13px; color: var(--cbs-accent, #4353ff); font-weight: 500; }
.cb-modes [hidden] { display: none !important; }
@media (max-width: 640px) { .cb-modes .cb-modes-list { grid-template-columns: minmax(0, 1fr); } }
