/* Stylesheet of «Knack den Tresor». One stage, two columns: the neural tree (left) shows the
   progress, the panel (right) carries the chat. Stacks to one column below 860px. Single dark
   look by choice: the inpeek.ai dark surface, lead colours kept separate (teal = model,
   berry = the two filters, lime = success), gradient only on the "AI" in the title. */
@font-face{font-family:"Manrope";src:url("fonts/Manrope-Variable.woff2") format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("fonts/JetBrainsMono-Variable.woff2") format("woff2");font-weight:100 800;font-style:normal;font-display:swap}
:root{
  color-scheme:dark;
  --bg:#0b1220; --surface-1:#0e1626; --surface-2:#141d30;
  --fg:#e8edf5; --muted:#94a2b6; --hairline:rgba(255,255,255,.1);
  --teal:#39b2b9; --lime:#97d700; --berry:#a64d85; --berry-ink:#d593bd; --slate:#5a7080;
  --on-lime:#0b1220;
  --font-sans:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,"SF Mono",Consolas,monospace;
  --radius:18px;
}
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font-sans);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
#sky{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}

.shell{position:relative;z-index:1;min-height:100%;max-width:1120px;margin:0 auto;display:flex;flex-direction:column;gap:clamp(12px,3vw,28px);padding-block:20px 28px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.brand{font-weight:800;font-size:1.15rem;letter-spacing:-.02em;color:var(--fg);text-decoration:none}
.brand span{color:var(--teal)}
.brand:focus-visible,.link:focus-visible,.linkbtn:focus-visible{outline:2px solid var(--teal);outline-offset:3px;border-radius:4px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.proto{font-family:var(--font-mono);font-size:.7rem;color:var(--muted);border:1px dashed var(--hairline);border-radius:999px;padding:4px 12px}
.proto.live{color:var(--teal);border-color:var(--teal);border-style:solid}
@media (max-width:560px){.proto .wide{display:none}}

.stage{flex:1;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:clamp(20px,4vw,56px);align-items:center}
.tree-col{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
#tree{display:block;width:100%;height:min(62vh,520px)}
.tree-cap{margin:0;font-family:var(--font-mono);font-size:.74rem;color:var(--muted);text-align:center}
.panel{min-width:0;display:flex;flex-direction:column;gap:20px}
.panel.tight{gap:14px}
.panel.start{gap:18px}
@media (max-width:860px){
  .stage{grid-template-columns:minmax(0,1fr);align-items:start;gap:10px}
  #tree{height:150px}
}
/* Stacked layout on a short screen: in the chat the tree gives way, so the composer stays on the first screen. */
@media (max-width:860px) and (max-height:900px){
  .stage.chatting .tree-col{display:none}
}

.eyebrow{margin:0;font-family:var(--font-mono);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;color:var(--teal)}
h1{margin:0;font-size:clamp(2.1rem,5.2vw,3.4rem);line-height:1.02;font-weight:800;letter-spacing:-.03em;text-wrap:balance}
.ai{background:linear-gradient(90deg,var(--berry-ink),var(--teal) 55%,var(--lime));-webkit-background-clip:text;background-clip:text;color:transparent}
h2{margin:0;font-size:1rem;font-weight:700}
p{margin:0}
.lead{font-size:1.12rem;max-width:56ch;text-wrap:pretty}
.story{color:var(--muted);max-width:60ch;text-wrap:pretty}
.story b{color:var(--fg);font-weight:600}
.hint{font-family:var(--font-mono);font-size:.74rem;color:var(--muted)}
.block{display:flex;flex-direction:column;gap:10px}
.row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px}

.rewards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.reward{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;padding:12px 12px 14px;border:1px solid var(--hairline);border-radius:14px;background:var(--surface-1);cursor:pointer;transition:border-color .15s,background .15s,transform .15s}
.reward:hover{transform:translateY(-2px)}
.reward input{position:absolute;inset:0;margin:0;opacity:0;cursor:pointer}
.reward b{font-size:.98rem}
.reward .txt{font-size:.84rem;line-height:1.4;color:var(--muted)}
.reward.none{border-style:dashed}
.reward.on{border-color:var(--lime);border-style:solid;background:var(--surface-2)}
.reward.focus{outline:2px solid var(--teal);outline-offset:2px}
@media (max-width:560px){
  .rewards{grid-template-columns:minmax(0,1fr);gap:8px}
  .reward{padding:10px 14px 12px}
}

input[type=text]{min-width:0;font:inherit;color:var(--fg);background:var(--surface-1);border:1px solid var(--hairline);border-radius:12px;padding:12px 14px}
input[type=text]::placeholder{color:var(--slate)}
input[type=text]:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

.btn{font:inherit;font-weight:700;color:var(--on-lime);background:var(--lime);border:1px solid var(--lime);border-radius:999px;padding:13px 24px;cursor:pointer;transition:transform .15s,filter .15s}
.btn:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.07)}
.btn:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
.btn:disabled{opacity:.5;cursor:default}
.btn.ghost{color:var(--fg);background:transparent;border-color:var(--hairline)}
.btn.ghost:hover{border-color:var(--teal)}
.btn.small{padding:10px 18px}
@media (max-width:560px){.btn.small{padding:10px 14px}}
a.btn{display:inline-block;text-decoration:none}
.linkbtn{align-self:flex-start;font:inherit;font-size:.86rem;color:var(--muted);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}

.meta{display:flex;flex-wrap:wrap;gap:4px 20px;font-family:var(--font-mono);font-size:.78rem;color:var(--muted);font-variant-numeric:tabular-nums}
.meta b{color:var(--fg);font-weight:500}
.prompt-label{font-family:var(--font-mono);font-size:.74rem;color:var(--teal)}
.question{margin:0;font-size:clamp(1.3rem,3vw,1.75rem);font-weight:700;line-height:1.2;letter-spacing:-.01em;text-wrap:balance}

/* Protection layers of the current level: lit = active. */
.layers{position:relative;display:flex;flex-wrap:wrap;gap:6px}
.layerwrap{display:inline-flex}
.layer{font-family:var(--font-mono);font-size:.7rem;line-height:1.55;color:var(--muted);background:none;border:1px dashed rgba(255,255,255,.26);border-radius:999px;padding:3px 10px;cursor:help}
.layer.on{color:var(--berry-ink);border:1px solid var(--berry)}
.layer:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.layerinfo{position:absolute;left:0;top:calc(100% + 8px);z-index:5;max-width:min(100%,30rem);padding:10px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--hairline);box-shadow:0 14px 32px rgba(0,0,0,.5);color:var(--fg);font-size:.86rem;line-height:1.45;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s,visibility .12s}
.layerwrap:hover .layerinfo,.layer:focus-visible + .layerinfo,.layerwrap.open .layerinfo{opacity:1;visibility:visible}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.chat{display:flex;flex-direction:column;gap:10px;height:min(36vh,320px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--slate) transparent;padding:14px;background:var(--surface-1);border:1px solid var(--hairline);border-radius:var(--radius)}
.chat:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.msg{display:flex;flex-direction:column;gap:3px;max-width:88%;align-self:flex-start}
.msg .who{font-family:var(--font-mono);font-size:.68rem;color:var(--muted)}
.msg .txt{padding:10px 14px;border-radius:14px;background:var(--surface-2);border:1px solid var(--hairline);overflow-wrap:anywhere;white-space:pre-wrap}
.msg.me{align-self:flex-end;align-items:flex-end}
.msg.me .txt{background:transparent}
.msg.bot .who{color:var(--teal)}
.msg.bot.pending .txt{color:var(--muted)}
.msg.guard .who{color:var(--berry-ink)}
.msg.guard .txt{border-color:var(--berry);border-style:dashed;background:transparent;color:var(--muted)}
.msg.sys{align-self:center;max-width:100%}
.msg.sys .who{display:none}
.msg.sys .txt{font-family:var(--font-mono);font-size:.74rem;color:var(--muted);background:transparent;border-style:dashed;text-align:center}
.send{display:flex;gap:10px}
.send input{flex:1}
.coderow{display:flex;align-items:center;gap:10px}
.coderow input{flex:1 1 0;font-family:var(--font-mono)}
.coderow input:not(:placeholder-shown){text-transform:uppercase}

.verdict{display:flex;flex-direction:column;gap:6px}
.verdict .v{font-weight:700}
.verdict .v.ok{color:var(--lime)}
.verdict .why{color:var(--muted);max-width:60ch}

.report{background:var(--surface-2);border:1px solid var(--hairline);border-radius:var(--radius);overflow:hidden}
.bar4{display:grid;grid-template-columns:repeat(4,1fr);height:5px}
.bar4 i:nth-child(1){background:var(--teal)}
.bar4 i:nth-child(2){background:var(--lime)}
.bar4 i:nth-child(3){background:var(--berry)}
.bar4 i:nth-child(4){background:var(--slate)}
.report-head{display:flex;flex-direction:column;gap:4px;padding:18px 20px 0}
.rank{margin:0;font-size:clamp(1.5rem,4vw,2.1rem);font-weight:800;line-height:1.1;letter-spacing:-.02em;text-wrap:balance}
.report dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px 20px;margin:0;padding:16px 20px 20px;font-family:var(--font-mono);font-size:.82rem;font-variant-numeric:tabular-nums}
.report dt{color:var(--muted)}
.report dd{margin:0;overflow-wrap:anywhere}
.report dd.ok{color:var(--lime)}
.report dd.no{color:var(--berry-ink)}
.copytext{font-family:var(--font-mono);font-size:.74rem;color:var(--muted);overflow-wrap:anywhere;user-select:all}
.link{color:var(--teal);font-weight:600;text-decoration:none}
.link:hover{text-decoration:underline}
.closing{color:var(--muted)}
.closing b{color:var(--fg);font-weight:600}

/* Footer and the privacy page (datenschutz.html). */
.foot{display:flex;flex-wrap:wrap;gap:6px 16px;font-family:var(--font-mono);font-size:.7rem}
.foot a{color:var(--muted);text-underline-offset:3px}
.foot a:hover{color:var(--fg)}
.foot a:focus-visible{outline:2px solid var(--teal);outline-offset:3px;border-radius:4px}
#privacy .link{font-weight:500}
.legal{display:flex;flex-direction:column;gap:28px;max-width:68ch;padding-block:clamp(8px,4vw,32px)}
.legal h1{font-size:clamp(1.9rem,4.5vw,2.6rem)}
.legal p:not(.lead):not(.hint):not(.eyebrow),.legal li{color:var(--muted);text-wrap:pretty}
.legal li b{color:var(--fg);font-weight:600}
.legal ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:10px}
.legal .link{overflow-wrap:anywhere}

.fade{animation:fade .35s ease both}
@keyframes fade{from{opacity:.7;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .fade{animation:none}
  .btn,.reward,.layerinfo{transition:none}
}
