:root {
  color-scheme: dark;
  font: 100%/1.45 "DM Sans", system-ui, sans-serif;
  --bg: #0b1016;
  --surface: #141c25;
  --raised: #1b2632;
  --line: #2b3947;
  --ink: #edf2f7;
  --muted: #a4b3c2;
  --blue: #68d0fa;
  --green: #3ad5a3;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button { min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: .6rem 1rem; background: var(--green); color: #05291e; font-weight: 680; cursor: pointer; }
button:hover { background: #69e5bb; }
button:disabled { opacity: .56; cursor: wait; }
button.light { color: var(--blue); background: #102938; border-color: #275069; }
button.light:hover { background: #17394b; }
button.danger { color: #ffadb0; background: #321e26; border-color: #61333e; }
button.link { color: var(--blue); padding: .4rem 0; background: transparent; text-underline-offset: 4px; }
button.link:hover { text-decoration: underline; }
.glyph { display: block; width: 22px; height: 22px; flex: none; }
header { min-height: 68px; padding: 12px clamp(16px,2.5vw,38px); display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #10171e; border-bottom: 1px solid var(--line); }
.brand, #session, .row, .actions { display: flex; align-items: center; gap: 12px; }
.brand { min-width: 0; }
.brand b { letter-spacing: -.04em; font-size: 1.26rem; }
.brandname { overflow-wrap: anywhere; }
.mark { display: inline-grid; place-items: center; flex: none; width: 39px; height: 39px; border: 1px solid #316454; border-radius: 12px; background: #0e302a; color: #5be1b6; letter-spacing: -.09em; font-weight: 770; }
.logo { max-width: 85px; height: 40px; object-fit: contain; }
#session { justify-content: flex-end; font-size: .875rem; color: var(--muted); text-align: right; }
#session button { background: var(--raised); border-color: var(--line); color: var(--ink); }
#shell { display: grid; grid-template-columns: clamp(195px,17vw,240px) minmax(0,1fr); min-height: calc(100dvh - 68px); }
aside { background: #10171e; border-right: 1px solid var(--line); }
nav { display: grid; gap: 5px; position: sticky; top: 0; padding: 24px 12px; }
nav a { color: var(--muted); display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 13px; text-decoration: none; border-radius: 9px; font-size: .9375rem; line-height: 1.25; }
nav a:hover { background: var(--raised); color: var(--ink); }
nav a.current { background: #113a32; color: #70ecc1; box-shadow: inset 3px 0 var(--green); }
#menu-toggle { display: none; }
#content { width: 100%; min-width: 0; max-width: 1600px; margin: 0 auto; padding: clamp(20px,3vw,46px); }
.row,.actions { flex-wrap: wrap; }
.row { justify-content: space-between; }
.pagehead { padding-bottom: 19px; margin-bottom: 23px; border-bottom: 1px solid var(--line); }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(1.85rem,3.2vw,2.75rem); font-weight: 650; letter-spacing: -.055em; line-height: 1.12; }
h2 { font-size: 1.22rem; margin-bottom: 16px; font-weight: 640; letter-spacing: -.035em; }
h3 { font-size: 1.1rem; font-weight: 620; letter-spacing: -.025em; }
p { margin: 8px 0 15px; }
small,.meta,.empty { color: var(--muted); font-size: .895rem; }
.summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #101a23; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 28px; }
.summary a { position: relative; display: grid; grid-template-columns: auto 1fr; align-content: center; align-items: center; gap: 2px 12px; padding: 16px 20px; color: var(--muted); text-decoration: none; font-size: .91rem; }
.summary a + a { border-left: 1px solid var(--line); }
.summary a:hover { background: var(--raised); }
.summary a:focus-visible { outline-offset: -3px; }
.summary-icon { grid-row: span 2; display: grid; place-items: center; background: #103044; color: var(--blue); width: 40px; height: 40px; border-radius: 11px; }
.summary strong { color: var(--blue); font-size: 1.8rem; font-weight: 580; line-height: 1.12; font-variant-numeric: tabular-nums; }
.block-title { margin-bottom: 12px; }
.network-grid,.overview-lower { display: grid; gap: 14px; }
.network-grid { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 22px; }
.overview-lower { grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); }
.card,.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: clamp(17px,1.65vw,25px); min-width: 0; overflow-wrap: anywhere; }
.panel { margin-bottom: 16px; }
.card { display: flex; flex-direction: column; align-items: flex-start; }
.card p { margin: 3px 0 18px; color: var(--muted); font-size: .93rem; }
.card button { margin-top: auto; }
.network-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-bottom: 14px; flex-wrap: wrap; }
.social,.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--blue); background: #102e40; border: 1px solid #224557; }
.state,.pill { font-size: .82rem; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; line-height: 1.45; }
.state { background: #202a34; color: #b8c5d1; }
.state.linked { background: #103b30; color: #79e5bb; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill { color: #a3e1ff; background: #123d55; }
.accent { border-color: #284d48; }
.video-plan,.login-cover { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(115deg,#112824,#13242a); }
.video-plan::before,.login-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-radial-gradient(ellipse at 110% 115%, transparent 0 23px, #398d772c 24px 25px, transparent 26px 40px); }
.video-plan { display: flex; flex-direction: column; align-items: flex-start; }
.video-plan .feature-icon { order: -1; margin-bottom: 12px; color: var(--green); background: #13382f; border-color: #2d5a4b; }
.video-plan h2 { margin-bottom: 0; }
.video-plan p { color: #b9cec8; }
.video-plan button { margin-top: auto; }
.list { border-top: 1px solid var(--line); padding: 15px 0; }
.list:last-child { padding-bottom: 0; }
.list p,pre { white-space: pre-wrap; }
.list small { display: inline-block; margin-top: 3px; }
.list .row b { color: var(--ink); }
.actions,.metrics { gap: 8px; }
.metrics { display: flex; flex-wrap: wrap; }
.metrics span,#dualfields,.terms { background: #101a24; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.metrics b,#simulation { color: var(--blue); }
.entry { max-width: 760px; }
label { display: grid; gap: 6px; margin-bottom: 15px; font-size: .94rem; font-weight: 550; }
input,select,textarea { min-width: 0; max-width: 100%; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #3b4b5b; border-radius: 8px; background: #0c141d; color: var(--ink); }
input::placeholder,textarea::placeholder { color: #909faf; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%2368d0fa' stroke-width='1.7' fill='none'/%3E%3C/svg%3E"); background-size: 18px; background-position: right 11px center; background-repeat: no-repeat; }
select.short { width: auto; color: var(--blue); }
.panel > select,.panel > button { margin-bottom: 10px; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 17px; height: 17px; min-height: auto; accent-color: var(--green); }
.terms { min-width: 0; margin: 14px 0; padding: 14px; }
.terms legend { color: var(--blue); padding: 0 6px; }
#templates,#dualfields { margin-bottom: 14px; }
#simulation { display: block; white-space: pre-wrap; margin-top: 9px; }
.previewlogo { max-width: 100%; max-height: 100px; object-fit: contain; }
dialog { width: min(580px,94vw); max-height: 90dvh; overflow: auto; color: var(--ink); background: var(--surface); border: 1px solid #3e505e; border-radius: 16px; padding: clamp(18px,3vw,28px); }
dialog::backdrop { background: #03080dd9; }
#dialogerror { color: #ffadb0; }
#close { margin-top: 10px; }
#notice:empty,#demohint:empty { display: none; }
#notice:not(:empty) { background: #132c39; color: #c5edff; border-bottom: 1px solid #2b5267; padding: 10px 20px; position: sticky; top: 0; z-index: 3; }
#login { max-width: 850px; margin: clamp(32px,12vh,145px) auto; width: calc(100% - 36px); display: grid; grid-template-columns: 1fr 1.12fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.login-cover,#signin { padding: clamp(24px,3.6vw,50px); display: flex; flex-direction: column; justify-content: center; }
.login-cover { border-right: 1px solid var(--line); }
.login-cover .large { width: 68px; height: 68px; border-radius: 18px; font-size: 1.8rem; margin-bottom: 22px; }
.cover-logo { width: 160px; max-width: 90%; height: 75px; object-position: left center; margin-bottom: 22px; }
.login-cover p { color: #8fddc7; margin: 8px 0 0; }
#signin h2 { font-size: 1.55rem; margin-bottom: 21px; }
#demohint { margin-top: 14px; }
@media (min-width:701px) and (max-width:1090px) {
  #shell { grid-template-columns: 98px minmax(0,1fr); }
  nav { padding: 18px 6px; }
  nav a { flex-direction: column; text-align: center; gap: 4px; font-size: .81rem; padding: 9px 3px; }
  .summary a { padding: 15px 12px; }
}
@media (max-width:850px) { .summary-icon { display: none; } .summary a { grid-template-columns: 1fr; } }
@media (max-width:700px) {
  header { min-height: 60px; }
  #shell { display: block; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 14px; }
  #menu-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; background: transparent; border: 0; }
  #menu-toggle[aria-expanded="false"] + nav { display: none; }
  nav { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 5px 0 10px; }
  #content { padding: 20px 15px; }
  .overview-lower { grid-template-columns: 1fr; gap: 0; }
  .summary a { padding: 13px 9px; font-size: .81rem; }
  .summary { margin-bottom: 20px; }
  .summary strong { font-size: 1.5rem; }
  #login { grid-template-columns: 1fr; margin: 30px auto; }
  .login-cover { border: 0; border-bottom: 1px solid var(--line); }
  .login-cover .large { height: 48px; width: 48px; font-size: 1.2rem; margin-bottom: 12px; }
  .network-grid { grid-template-columns: repeat(auto-fit,minmax(min(170px,100%),1fr)); }
}
@media (max-width:520px) {
  .network-grid { grid-template-columns: 1fr; gap: 10px; }
  .card { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: center; }
  .network-heading { grid-column: 1/-1; margin-bottom: 10px; }
  .card h3,.card p { grid-column: 1; }
  .card p { margin: 3px 0 0; }
  .card button { grid-column: 2; grid-row: 2/4; margin: 0; }
  #session { gap: 6px; font-size: .79rem; max-width: 55%; }
  .brand { gap: 7px; }
  .pagehead { gap: 10px; }
}
#demo-open { margin-top: 8px; }
#audienceform .fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));gap:0 14px}
#ai-state{display:block;color:var(--blue);margin:0 0 12px}
#audience-output{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
#audienceform .actions{margin:15px 0}

.cq-banner{display:flex;align-items:center;gap:clamp(14px,4vw,48px);padding:16px clamp(14px,3vw,36px);border:1px solid #28544d;border-radius:16px;background:radial-gradient(ellipse at 12% 85%,#21483f 0,transparent 49%),linear-gradient(120deg,#102c2b,#101d2b);margin-bottom:18px}
.cq-banner h2{margin:0;color:#b2f4dc;font-size:clamp(1.35rem,3vw,2rem)}.cq-banner p{max-width:48ch;margin:.5rem 0}
.cq-portrait{width:clamp(82px,18vw,170px);flex-shrink:0}.cq-portrait img{display:block;width:100%;height:150px;object-fit:contain;animation:cqBob 3.6s ease-in-out infinite;transform-origin:50% 95%}.cq-portrait.still img{animation:none}
@keyframes cqBob{0%,100%{transform:translateY(1px) rotate(-2deg)}50%{transform:translateY(-4px) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.cq-portrait img{animation:none}}
.cq-link{color:var(--blue);display:inline-flex;align-items:center;min-height:44px}.cq-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:12px}
.cq-entry{margin:16px 0}.cq-entry summary{cursor:pointer;padding:.6rem 0;color:var(--green);font-weight:650}
#cq-record{display:grid;gap:10px}#cq-record button{justify-self:start}#cq-output,#cq-question,#cq-answer{width:100%}#cq-export{margin:1rem 0}#cq-scope{width:100%}

.cq-banner{padding-block:8px}.cq-portrait img{height:88px}.cq-portrait{width:96px}
.cq-chat-panel{border-color:#346354}.cq-account{max-width:32rem}
#cq-chat label{margin:0 0 6px}#cq-message{width:100%;min-height:72px;border-color:#548c9c;font-size:1rem}
.cq-send-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:8px}.cq-send-row button{min-width:96px}
#cq-thread{display:grid;gap:8px;max-height:min(29dvh,260px);overflow:auto;margin-bottom:14px}#cq-thread:empty{display:none}
.cq-bubble{background:#172d37;border-radius:10px;padding:8px 12px;justify-self:start;max-width:92%;overflow-wrap:anywhere}
.cq-bubble.mine{background:#16392f;justify-self:end}.cq-bubble b{color:var(--blue);font-size:.9rem}.cq-bubble.mine b{color:var(--green)}
.cq-bubble p{white-space:pre-wrap;margin:3px 0 0}#cq-feedback{color:var(--green);font-size:.9rem}#cq-feedback:not(:empty){margin-top:8px}

#cq-launcher{position:fixed;z-index:30;left:calc(100% - 86px);top:calc(100% - 86px);width:76px;height:76px;min-height:0;padding:2px;border-radius:50%;border:1px solid #489a81;background:radial-gradient(ellipse at 43% 35%,#235646,#112923 80%);box-shadow:0 4px 15px #0008;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;display:grid;place-items:center}
#cq-launcher img{display:block;width:94%;height:94%;object-fit:contain;pointer-events:none;transform-origin:50% 90%;animation:calf-step 3.9s ease-in-out infinite}
#cq-launcher.dragging{cursor:grabbing;border-color:var(--blue)}#cq-launcher.dragging img{animation:none;transform:rotate(-9deg)}#cq-launcher.still img{animation:none}
@keyframes calf-step{0%,50%,100%{transform:translateY(0) rotate(0)}14%{transform:translateY(-3px) rotate(-4deg)}28%{transform:translateY(0) rotate(3deg)}40%{transform:translateY(-2px) rotate(-2deg)}}
@media(prefers-reduced-motion:reduce){#cq-launcher img,#cq-launcher.dragging img{animation:none;transform:none}}
#cq-popover{position:fixed;z-index:31;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;background:#121f29;border:1px solid #387463;border-radius:15px;box-shadow:0 14px 40px #0009}
.cq-pophead{display:flex;justify-content:space-between;align-items:center;padding:6px 13px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#162c2a;z-index:1}.cq-pophead strong{color:#9ef1ce}.cq-pophead button{background:transparent;color:var(--blue);padding:4px 8px;min-height:40px}
#cq-floating-chat .panel{margin:0;border:0;padding:12px 14px;background:transparent}#cq-floating-chat h2{display:none}#cq-floating-chat #cq-thread{max-height:min(24dvh,190px)}#cq-inline-chat:empty{display:none}
@media(max-width:600px){#cq-launcher{width:65px;height:65px}}

.text-link { color:var(--blue); }
