/* CP Data Hub demo. Red accent, white pages, dark type, generous space, quiet borders. */
:root {
  --red: #C8102E; --red-dark: #A50D25; --ink: #1A1A1A; --muted: #6B6B70; --line: #E8E8EC; --soft: #F5F5F7;
  --bg: #FFFFFF; --ok: #1A7F37; --warn: #B54708; --soft-red: #FBE9EC; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* header: brand stacked on the left, nav grouped by who it is for, account on the right */
.topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar .inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 12px 28px; flex-wrap: wrap; }
html { overflow-x: hidden; }
.brand { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand .cp { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: .2px; }
.brand .hub { font-weight: 700; font-size: 13px; color: var(--red); letter-spacing: .4px; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; gap: 22px; align-items: flex-end; }
.nav .group { display: flex; flex-direction: column; gap: 2px; }
.nav .group .who { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.nav .group .links { display: flex; gap: 14px; }
.nav a { color: var(--ink); font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { text-decoration: none; border-bottom-color: var(--line); }
.nav a.active { border-bottom-color: var(--red); font-weight: 600; }
.nav a.info::before { content: "i"; display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font-size: 10px; line-height: 13px; text-align: center; margin-right: 6px; font-weight: 700; font-family: Georgia, serif; vertical-align: 1px; }
.spacer { flex: 1; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.account select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 260px; }
.badge-demo { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
@media (max-width: 1560px) { .badge-demo { display: none; } }
@media (max-width: 1100px) { .nav { gap: 14px; } .nav .group .links { gap: 10px; } .nav a { font-size: 14px; } }

/* hover help: any element with data-tip shows a small card */
[data-tip] { position: relative; cursor: help; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; padding: 8px 11px; border-radius: 8px; width: max-content; max-width: 320px; white-space: normal; box-shadow: var(--shadow); font-weight: 400; text-transform: none; letter-spacing: 0; }
.nav [data-tip]:hover::after { left: 0; }

/* page kinds */
.kind { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.kind .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.kind.info .dot { background: var(--muted); }
.kind.admin .dot { background: var(--ink); }

/* layout */
.wrap { max-width: 1400px; margin: 0 auto; padding: 24px 28px 70px; }
.hero { padding: 20px 0 10px; }
.hero.top { display: flex; gap: 28px; align-items: flex-start; justify-content: space-between; }
.hero-text { flex: 1 1 560px; }
.stats.side { margin: 6px 0 0; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; flex: 0 0 340px; }
.stats.side .stat { min-width: 0; padding: 12px 14px; }
.stats.side .stat b { font-size: 24px; }
@media (max-width: 960px) { .hero.top { flex-direction: column; } .stats.side { flex-basis: auto; width: 100%; } }
.hero h1 { font-size: 38px; line-height: 1.12; margin: 0 0 8px; font-weight: 700; letter-spacing: -.3px; }
.hero p { font-size: 17px; color: var(--muted); margin: 0; max-width: 760px; }
.stats { display: flex; gap: 14px; margin: 26px 0 8px; flex-wrap: wrap; }
.stat { background: var(--soft); border-radius: 14px; padding: 16px 20px; min-width: 190px; }
.stat b { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; }
.stat span { color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; margin: 0 0 8px; font-weight: 700; }
.card h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.card .lead { color: var(--muted); margin: 0 0 10px; }
.product .price { font-weight: 700; margin-top: 10px; }
.product .scope { font-size: 14px; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--soft); margin-right: 6px; }
.tag.owned { background: #E6F4EA; color: var(--ok); }
.tag.freelance { background: #FFF4E5; color: var(--warn); }
.tag.third { background: var(--soft-red); color: var(--red); }

/* the guarantees strip: the product features CP should notice */
.guarantees { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0 6px; }
@media (max-width: 960px) { .guarantees { grid-template-columns: repeat(2, 1fr); } }
.guarantee { background: var(--soft); border-radius: 14px; padding: 14px 16px; }
.guarantee b { display: block; font-size: 15px; margin-bottom: 2px; }
.guarantee span { font-size: 13px; color: var(--muted); }

/* ask */
.ask textarea { width: 100%; font: inherit; font-size: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; min-height: 84px; resize: vertical; }
.ask textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.12); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
select.ctl, input.ctl { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.btn { background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn:disabled { opacity: .5; cursor: default; }
.status { font-size: 14px; color: var(--muted); }
.status.ok { color: var(--ok); } .status.bad { color: var(--red); font-weight: 600; }

.answer { font-size: 17px; line-height: 1.6; white-space: pre-wrap; }
.sources { margin-top: 10px; }
.src { padding: 14px 0; border-top: 1px solid var(--line); }
.src .title { font-weight: 700; }
.src .meta { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.src .excerpt { color: #333; }
.src .actions { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.attribution { font-size: 13px; color: var(--muted); }
.licence { font-size: 14px; color: var(--muted); }
.licence b { color: var(--ink); }
.note { font-size: 13px; color: var(--muted); }
.denied { color: var(--red); font-weight: 600; }

/* tables and tiles */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
table.plans th:first-child, table.plans td:first-child { color: var(--muted); width: 180px; }
table.plans td.yes { color: var(--ok); font-weight: 700; } table.plans td.no { color: var(--red); font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--soft); border-radius: 14px; padding: 14px 16px; }
.tile b { display: block; font-size: 26px; font-weight: 700; }
.tile span { font-size: 13px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; border-bottom: 1px solid var(--line); padding-top: 18px; }
.bars div { background: var(--red); width: 100%; position: relative; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.labels { display: flex; gap: 6px; font-size: 11px; color: var(--muted); }
.labels div { width: 100%; text-align: center; overflow: hidden; white-space: nowrap; }
pre { background: #1C1C1E; color: #EEE; padding: 14px 16px; border-radius: 12px; overflow: auto; font-size: 13px; }
code { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.footer { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* the licence strip: what this account may do, as a row of boxes above the ask window */
.licence-strip { display: flex; gap: 12px; margin: 14px 0 16px; flex-wrap: wrap; }
.lic { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; box-shadow: var(--shadow); }
.lic .lab { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.lic b { font-size: 17px; font-weight: 700; color: var(--ink); }
.lic.who { border-color: var(--red); } .lic.who b { color: var(--red); }
.lic.rule b { font-size: 15px; }
/* compare page: larger plan names and row labels */
table.plans th { font-size: 17px; color: var(--ink); font-weight: 700; padding: 12px 10px; }
table.plans td:first-child { font-size: 15px; font-weight: 600; color: var(--ink); width: 200px; }
table.plans td { font-size: 14.5px; padding: 12px 10px; }
