/* ComposeBI licence site. The palette is ComposeBI's own (web/index.html --obi-*). */
:root {
  --bg: #0f1218; --panel: #161a23; --ink: #1f2430; --line: #2a3140;
  --text: #e6e9ef; --muted: #8a93a6; --accent: #4f8cff; --accent-soft: #7aa8ff;
  --ok: #3ccf7a; --error: #ff6b7a; --warn: #f5b942;
  --radius: 12px; --wrap: 1120px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f8fb; --panel: #ffffff; --ink: #eef2f6; --line: #d9dde6;
          --text: #1b2130; --muted: #5d6679; --accent: #2f6fe8; --accent-soft: #4f8cff; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }   /* clear the sticky header */
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
       -webkit-font-smoothing: antialiased; }
a { color: var(--accent-soft); text-underline-offset: 2px; }
@media (prefers-color-scheme: light) { a { color: var(--accent); } }
code { font: .92em ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--ink);
       border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
             backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px;
         color: var(--text); text-decoration: none; }
.mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff;
        display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--text); }

/* buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
       padding: 12px 20px; font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none;
       cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--accent-soft); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--text); }
.btn-block { width: 100%; }

/* hero */
.hero { padding: 72px 0 56px; background:
        radial-gradient(800px 400px at 85% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700;
           color: var(--accent-soft); margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 0 0 18px; }
.hl { color: var(--accent-soft); }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-art img { width: 100%; height: auto; display: block; }

/* sections */
.band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
        padding: 72px 0; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.section-lede { color: var(--muted); font-size: 17px; margin: 0 0 36px; max-width: 65ch; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature h3 { margin: 14px 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
       background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-soft); stroke-width: 1.8;
           stroke-linecap: round; stroke-linejoin: round; }

.free { padding: 72px 20px 24px; }
.free-head { text-align: center; }
.free-head .section-lede { margin-left: auto; margin-right: auto; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center;
         margin-bottom: 28px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan-accent { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h3 { margin: 0; font-size: 20px; }
.price { font-size: 36px; font-weight: 800; margin: 6px 0 8px; }
.plan > p { color: var(--muted); margin: 0 0 14px; }
.plan > p.price { color: var(--text); margin: 6px 0 8px; }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ul.ticks li { padding-left: 28px; position: relative; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 20%, transparent); }
ul.ticks li::after { content: ""; position: absolute; left: 5px; top: .55em; width: 6px; height: 3px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
/* what a plan does not include: a dash, not a tick */
ul.ticks li.no { color: var(--muted); }
ul.ticks li.no::before { background: color-mix(in srgb, var(--muted) 18%, transparent); }
ul.ticks li.no::after { top: .78em; left: 4px; width: 8px; height: 0; border-left: 0;
  border-bottom: 2px solid var(--muted); transform: none; }

.steps-band { padding: 48px 20px 80px; }
ol.steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
ol.steps li { display: flex; gap: 14px; align-items: flex-start; }
ol.steps span { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff;
                display: grid; place-items: center; font-weight: 700; font-size: 14px; }
ol.steps div { padding-top: 3px; }
.steps-band ol.steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* forms */
.form-page { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 80px;
             align-items: start; }
.form-page h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 12px; }
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin-top: 28px; }
.note h2 { font-size: 16px; margin: 0 0 4px; }
.note p { margin: 0; color: var(--muted); font-size: 15px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
form { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=file], select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-family: inherit; font-size: 16px; line-height: 1.3; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
fieldset.choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset.choice legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice-card { position: relative; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px;
               padding: 12px 14px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.choice-body b { font-size: 16px; }
.choice-body span { font-weight: 400; font-size: 13.5px; color: var(--muted); }
.choice-card input:checked + .choice-body { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.choice-card input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the company field only for a company key (no script needed) */
.form-card:has(#tier-private:checked) .company-field { display: none; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 14.5px; }
label.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { background: color-mix(in srgb, var(--error) 14%, transparent); border: 1px solid var(--error);
         border-radius: 10px; padding: 10px 12px; margin: 0; }

/* key page */
.key-page { padding-top: 56px; padding-bottom: 80px; }
.key-page h1 { font-size: 36px; margin: 0 0 20px; }
.key-box { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px dashed var(--accent);
           border-radius: var(--radius); padding: 16px 18px; }
.key { flex: 1; font: 600 21px/1.3 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: 1px;
       word-break: break-all; user-select: all; background: none; border: 0; padding: 0; }
.warn { border-left: 3px solid var(--warn); padding-left: 14px; }

/* documents (licence, privacy) */
.doc { max-width: 780px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 12px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px 16px; }
.summary h2 { margin-top: 18px; }
.notices { padding-left: 20px; }
.legal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px 20px;
         font-size: 15px; }
.legal h2 { font-size: 20px; }
.legal h3 { font-size: 16px; margin: 22px 0 6px; }
.legal p { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 20px; background: var(--panel); }
.foot-row { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.foot-row p { max-width: 520px; }
.brand-sm { font-size: 16px; }
.brand-sm .mark { width: 24px; height: 24px; font-size: 13px; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .hero-grid, .form-page { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps-band ol.steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .head-row .btn-sm { margin-left: auto; }
  .hero { padding-top: 40px; }
  .features, .plans, fieldset.choice { grid-template-columns: 1fr; }
  .foot-row { flex-direction: column; }
  .key-box { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* contact */
textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
           padding: 11px 13px; font-family: inherit; font-size: 16px; line-height: 1.4; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.key-sm { font-size: 16px; letter-spacing: 0; }
.thread { margin: 14px 0; }
.thread.reply { border-color: var(--accent); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; }
.note + .note { margin-top: 18px; }

/* ---------------------------------------------------------------- admin */
.admin .top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px;
              border-bottom: 1px solid var(--line); background: var(--panel); }
.admin main { max-width: 920px; margin: 0 auto; padding: 32px 16px 48px; }
.admin main.wide { max-width: 1180px; }
.admin h1 { font-size: 28px; margin: 0 0 8px; }
.admin nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.admin nav a { margin-left: 18px; text-decoration: none; }
.admin form:not(.inline):not(.row) { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.button { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
          padding: 10px 16px; font: inherit; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--accent-soft); }
.button.danger { background: var(--error); }
form.inline { display: inline; margin: 0 0 0 18px; }
button.linkish { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.big { font-size: 28px; font-weight: 700; }
.tag { font-size: 12px; border: 1px solid var(--error); color: var(--error); border-radius: 6px; padding: 1px 6px; }
.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); border: 1px solid var(--ok); border-radius: 8px;
      padding: 10px 12px; }
form.row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
form.row input { flex: 1 1 200px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 12px 0 20px; }
.actions form { margin: 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 10px; margin: 8px 0; }
code.secret { word-break: break-all; }
ul.codes { columns: 2; font-size: 18px; }
.pager a { margin: 0 10px; }
@media (max-width: 720px) { .admin table { display: block; overflow-x: auto; } }
