/* AI QC Infrastructure — shared component styles for every app.
   Tokens live in ca5five-tokens.css. Backgrounds are CSS gradients + one SVG
   (constellation.svg): vector, sharp at 4K and on high-DPI phones, no raster upscaling. */
@import url('/assets/ca5five-tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Cormorant+Garamond:wght@500;600&family=Rajdhani:wght@500;600;700&display=swap');

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.5; }
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(160, 124, 240, .10), transparent 60%),
    radial-gradient(900px 600px at -10% 10%, rgba(79, 156, 240, .08), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(201, 162, 74, .10), transparent 60%),
    url('/assets/constellation.svg');
  background-size: auto, auto, auto, cover;
  background-attachment: fixed, fixed, fixed, fixed;
  background-position: center, center, center, center;
}
@media (max-width: 760px) { body { background-attachment: scroll; } }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .03em; margin: 0 0 .5rem; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(1.15rem, 3.6vw, 1.45rem); color: var(--gold-hi); }
h3 { font-size: 1.02rem; color: var(--ink); }
p.lede { font-family: var(--serif); font-size: clamp(1.1rem, 3.4vw, 1.3rem); color: var(--muted); margin: 0 0 1rem; max-width: 62ch; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.eyebrow { font-family: var(--ui); text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; color: var(--gold); font-weight: 700; }
.five { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: .12em; color: var(--ink); }

/* header: one product per header, never a cross-app nav bar */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(10, 15, 26, .88); backdrop-filter: saturate(140%) blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-gold); }
header.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .08em; font-size: 1.02rem; min-height: var(--tap); }
.brand img { width: 26px; height: 30px; }
.brand small { color: var(--muted); font-family: var(--ui); letter-spacing: .04em; font-weight: 600; font-size: .8rem; }
nav.apps { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; align-items: center; }
nav.apps a { white-space: nowrap; color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: .93rem; min-height: var(--tap); display: inline-flex; align-items: center; }
nav.apps a.on, nav.apps a:hover { color: var(--bg); background: var(--gold); }
.search-box { position: relative; }
.search-box input { width: 170px; min-height: 40px; padding: 8px 12px; border-radius: 999px; }
.search-results { position: absolute; right: 0; top: calc(100% + 6px); width: min(360px, 92vw); background: var(--bg-2); border: 1px solid var(--line-gold); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; z-index: 30; }
.search-results a { display: block; padding: 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a:focus { background: var(--bg-3); }
@media (max-width: 640px) {
  nav.apps { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .search-box { width: 100%; order: 5; } .search-box input { width: 100%; }
}

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; }
button, .btn { font-family: var(--ui); font-weight: 700; font-size: .96rem; letter-spacing: .03em; border: 1px solid var(--gold); background: transparent; color: var(--gold-hi); padding: 10px 16px; min-height: var(--tap); border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s var(--ease), color .15s var(--ease); }
button.primary, .btn.primary, .tabs button.on { background: var(--gold-grad); color: var(--bg); border-color: transparent; }
button:hover, .btn:hover { box-shadow: var(--glow-gold); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { border-color: var(--line); color: var(--muted); }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.card { background: linear-gradient(180deg, rgba(22, 33, 58, .78), rgba(15, 23, 39, .92)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: var(--shadow); }
.card.gold { border-color: var(--line-gold); background: linear-gradient(180deg, rgba(201, 162, 74, .10), rgba(15, 23, 39, .92)); }
.stat { font-family: var(--display); font-size: 1.8rem; color: var(--gold-hi); }
.stat-label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

label { display: block; font-size: .82rem; color: var(--muted); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
input, select, textarea { width: 100%; background: rgba(10, 15, 26, .9); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; font: inherit; min-height: var(--tap); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; border: 1px solid currentColor; }
.ALLOW, .APPROVE, .GROUNDED, .PASS, .ok, .LOW { color: var(--ok); }
.WARN, .REVIEW, .ESCALATE, .warn, .MODERATE { color: var(--warn); }
.BLOCK, .DECLINE, .FAIL, .bad, .HIGH, .SEVERE { color: var(--bad); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: rgba(15, 23, 39, .9); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; min-width: 0; }
.item.v-BLOCK, .item.v-DECLINE { border-left-color: var(--bad); }
.item.v-WARN, .item.v-REVIEW { border-left-color: var(--warn); }
.item.v-ALLOW, .item.v-APPROVE { border-left-color: var(--ok); }
.item .meta { color: var(--muted); font-size: .88rem; }
.item ul { margin: 6px 0 0 18px; padding: 0; color: var(--muted); font-size: .92rem; }
.preview { overflow-wrap: anywhere; }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .76rem; letter-spacing: .08em; }
.scroll-x { overflow-x: auto; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 360px; }

.bar { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold-grad); }

#toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--bg-3); border: 1px solid var(--gold); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-sm); display: none; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.diag-summary { font-family: var(--display); font-size: 1.3rem; }
footer { color: var(--muted); font-size: .88rem; padding: 34px 16px 40px; text-align: center; border-top: 1px solid var(--line); margin-top: 28px; }
footer .parent { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-hi); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
footer .parent img { width: 18px; height: 21px; }
section.view { display: none; padding-bottom: 24px; }
section.view.on { display: block; }
.banner { border: 1px dashed var(--gold); color: var(--gold-hi); padding: 10px 12px; border-radius: var(--radius-sm); margin: 10px 0; font-size: .92rem; background: rgba(201, 162, 74, .05); }
.honest { border: 1px solid var(--line); border-left: 3px solid var(--force-researcher); background: rgba(79, 156, 240, .06); padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); font-size: .92rem; }
.disclaimer { border: 1px solid rgba(240, 100, 90, .5); border-left: 4px solid var(--bad); background: rgba(240, 100, 90, .07); padding: 12px 14px; border-radius: var(--radius-sm); font-size: .94rem; }
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line-gold); background: var(--bg-2); overflow: hidden; position: relative; }
@media (max-width: 560px) { .map { height: 330px; } }

/* test mode bar */
.testbar { background: #2a2110; border-bottom: 1px solid var(--gold); color: var(--gold-hi); font-size: .9rem; }
.testbar .wrap { padding-top: 6px; padding-bottom: 6px; }
.testbar select { width: auto; padding: 6px 8px; min-height: 36px; }

/* landing pages */
.hero { padding: 34px 0 14px; display: grid; gap: 18px; align-items: center; grid-template-columns: 1fr; }
.hero h1 { font-size: clamp(2rem, 8.5vw, 3.4rem); line-height: 1.06; }
@media (min-width: 820px) { .hero.with-shield { grid-template-columns: 1.4fr .8fr; } }
.hero .shield { width: min(260px, 60vw); justify-self: center; filter: drop-shadow(0 0 28px rgba(201, 162, 74, .25)); }
.persona { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.persona button { text-align: left; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); min-height: 120px; display: block; }
.persona button.on, .persona button:hover { border-color: var(--gold); background: var(--bg-3); }
.persona .t { display: block; font-family: var(--display); color: var(--gold-hi); font-size: 1.05rem; margin: 6px 0 4px; }
.persona .d { display: block; color: var(--muted); font-weight: 500; font-size: .92rem; letter-spacing: 0; }
.answer { border: 1px solid var(--gold); border-radius: 16px; padding: 18px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); }
.answer .big { font-family: var(--display); font-size: clamp(1.5rem, 6vw, 2.2rem); color: var(--gold-hi); line-height: 1.15; }
.gauge { font-family: var(--display); font-size: 3rem; line-height: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 6px 12px; border-radius: 999px; font-size: .9rem; border-color: var(--line); color: var(--muted); min-height: 40px; }
.chips button.on { border-color: transparent; color: var(--bg); background: var(--gold-grad); }
.locked { position: relative; border: 1px dashed var(--gold); border-radius: var(--radius); padding: 16px; text-align: center; background: var(--bg-2); }
.plans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.plans .card ul { padding-left: 18px; color: var(--muted); }
.verdict-BLOCK { border-color: var(--bad) !important; } .verdict-WARN { border-color: var(--warn) !important; } .verdict-ALLOW { border-color: var(--ok) !important; }

/* CA5FIVE blueprint + five forces */
.blueprint { display: grid; gap: 10px; counter-reset: step; }
@media (min-width: 900px) { .blueprint { grid-template-columns: repeat(5, 1fr); } }
.blueprint .step { position: relative; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line-gold); background: var(--gold-grad-soft); }
.blueprint .step b { display: block; font-family: var(--display); color: var(--gold-hi); margin: 4px 0; }
.blueprint .step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-hi); font-family: var(--display); }
.forces { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.force { border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); background: var(--bg-2); border-top: 3px solid var(--c); }
.force .name { font-family: var(--display); color: var(--c); font-size: 1.05rem; }
.force .duty { color: var(--muted); font-size: .9rem; }
.force-anchor { --c: var(--force-anchor); } .force-researcher { --c: var(--force-researcher); } .force-strategist { --c: var(--force-strategist); } .force-heart { --c: var(--force-heart); } .force-oracle { --c: var(--force-oracle); }
.values { display: flex; flex-wrap: wrap; gap: 8px; }
.values span { border: 1px solid var(--line-gold); border-radius: 999px; padding: 8px 16px; font-family: var(--display); letter-spacing: .1em; color: var(--gold-hi); background: rgba(201, 162, 74, .06); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 28px 0; opacity: .5; }

/* agent panel */
.agent .seats { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.agent .seat { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.agent .seat i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }

/* capture */
.capture video, .capture img { width: 100%; max-height: 360px; object-fit: contain; border-radius: var(--radius-sm); background: #000; border: 1px solid var(--line); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* disturbance score */
.score-ring { --p: 0; --col: var(--gold); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--col) calc(var(--p) * 1%), var(--bg-3) 0); }
.score-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; text-align: center; }
.score-ring b { font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.factor { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.factor .bar { grid-column: 1 / -1; }
.factor.off { opacity: .6; }
.src-ok { color: var(--ok); } .src-unavailable { color: var(--bad); } .src-disabled, .src-locked { color: var(--warn); }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* Cinematic background: each product's own picture behind every page (Craig, 2026-10-28). */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,rgba(10,15,26,.30) 0%,rgba(10,15,26,.62) 45%,rgba(10,15,26,.86) 100%),var(--site-art,url('/assets/art/ca5five.jpg')) center top/cover no-repeat}
body[data-site="oceanscout"]{--site-art:url('/assets/art/oceanscout.jpg')}
body[data-site="guardian"]{--site-art:url('/assets/art/guardian.jpg')}
body[data-site="trustlayer"]{--site-art:url('/assets/art/trustlayer.jpg')}
body[data-site="aiqc"]{--site-art:url('/assets/art/aiqc.jpg')}
.card{background:linear-gradient(180deg,rgba(22,33,58,.58),rgba(15,23,39,.74));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.card.gold{background:linear-gradient(180deg,rgba(201,162,74,.12),rgba(15,23,39,.74))}
header.top{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.product-tile{overflow:hidden;padding-top:0}
.product-tile .tile-art{display:block;width:calc(100% + 32px);margin:0 -16px 10px;aspect-ratio:16/9;object-fit:cover}

.about p{margin:.5rem 0;color:var(--ink)}
.product-tile h3{margin:.2rem 0 .3rem;font-size:1.3rem}
.product-tile p{margin:0 0 12px;color:var(--muted)}
