/* JetBrains Mono (SIL OFL 1.1, fonts/OFL.txt), self-hosted: one variable file covers 400 and 700 */
@font-face{font-family:"JetBrains Mono";src:url("/fonts/jetbrains-mono-latin.woff2") format("woff2");font-weight:100 800;font-style:normal;font-display:block;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";src:url("/fonts/jetbrains-mono-symbols.woff2") format("woff2");font-weight:100 800;font-style:normal;font-display:block;unicode-range:U+2197,U+2502,U+25BE,U+25C6,U+25C7,U+276F}
  /* Layout: opencode's launch (wordmark, a centered prompt panel, a status line) in Blacklite ink + cyan; the first send docks the prompt */
  :root{
    --ink:#0A0E16; --ink-2:#111925; --ink-3:#18232F;
    --rule:#243241; --rule-2:#33465A; --rule-3:#47607A;
    --fg:#C6D3DB; --bright:#EDF5F7; --muted:#8195A4; --faint:#62778A;
    --accent:#2FD9E8; --accent-2:#7FF0F7;
    --mono:"JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    --fs:15px; --lh:1.45;
    color-scheme: dark;
  }
  [hidden]{display:none!important}
  html,body{height:100%}
  body{margin:0;background:var(--ink);color:var(--fg);font:400 var(--fs)/var(--lh) var(--mono);-webkit-font-smoothing:antialiased}
  ::selection{background:var(--accent);color:var(--ink)}
  a{color:inherit}
  button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:left}
  :focus-visible{outline:1px solid var(--accent);outline-offset:2px}
  .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

  .term{box-sizing:border-box;min-height:100%;max-width:calc(760px + 2 * clamp(16px,3vw,28px));margin:0 auto;padding-inline:clamp(16px,3vw,28px);padding-block:14px calc(10px + env(safe-area-inset-bottom,0px));display:grid;grid-template-rows:1fr auto}

  /* launch */
  .launch{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:0;padding-block:clamp(24px,20vh,220px) 8px;min-width:0}
  .logo{display:flex;align-items:center;gap:26px;margin-bottom:30px}
  .mark{width:112px;height:112px;display:block;flex:none}
  .word{display:block;height:auto;max-width:100%}
  h1{font:inherit;font-weight:700;color:var(--accent);margin:0;text-align:center;text-wrap:balance}
  .sub{margin:0;color:var(--muted);text-align:center}
  .dockhome{width:100%;margin-top:34px}
  .lead{margin:0 0 10px;color:var(--bright);font-weight:700}
  .lead button:hover{color:var(--accent)}

  /* the prompt panel: filled, an accent bar down the left that stops short, meta line inside */
  .prompt{position:relative;background:var(--ink-2);padding:14px 18px 16px 22px;display:grid;gap:14px}
  .prompt::before{content:"";position:absolute;left:0;top:0;bottom:7px;width:3px;background:var(--accent)}
  .prompt.email::before{background:var(--accent-2)}
  .pin{display:flex;align-items:flex-start;gap:0}
  .prompt textarea{flex:1;min-width:0;background:none;border:0;outline:0;color:var(--bright);font:inherit;line-height:var(--lh);caret-color:var(--fg);padding:0;resize:none;height:calc(1em * var(--lh));max-height:calc(6em * var(--lh));overflow-y:hidden}
  .prompt textarea::placeholder{color:var(--faint)}
  .prompt .blk{width:.6em;height:1.15em;margin-top:.15em;background:var(--fg);display:none;flex:none}
  .prompt.idle .blk{display:block;animation:blink 1.1s steps(1) infinite;margin-right:.2ch}
  .pmeta{display:flex;gap:1ch;align-items:baseline;flex-wrap:wrap;color:var(--faint)}
  .pmeta .to{color:var(--bright)}
  .pmeta .grow{flex:1}
  .pmeta button{color:var(--faint)}
  .pmeta button:hover{color:var(--accent)}
  .pmeta button,.addr{position:relative}
  .pmeta button::after{content:"";position:absolute;inset:-12px -6px}
  @keyframes blink{50%{opacity:0}}
  .keys{margin:8px 0 0;color:var(--faint);display:flex;justify-content:space-between;gap:0 2ch;min-height:1.45em}
  .keys .kk{display:flex;flex-wrap:wrap;gap:0 2ch}
  .keys .count{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
  .keys .count.hot b{color:var(--accent)}
  .keys b{color:var(--bright);font-weight:400}

  .trusted{margin:18px 0 0;color:var(--faint);text-align:center;display:flex;flex-wrap:wrap;justify-content:center;gap:0 1.2ch}
  .trusted .engrow{display:inline-flex;flex-wrap:wrap;gap:0 1ch;justify-content:center}
  .trusted .co{color:var(--bright);padding:0 2px}
  .trusted .co:hover,.trusted .co:focus-visible{background:var(--ink-3);outline:none}
  .trusted .sep{color:var(--rule-3)}

  /* session: after the first send the launch gives way to the transcript, the prompt docks at the bottom */
  .session{display:flex;flex-direction:column;justify-content:flex-end;gap:18px;padding-block:24px 4px;min-width:0}
  .shead{color:var(--faint)}
  .shead b{color:var(--muted)}
  .shead .labs{color:var(--accent)}
  /* talk: after the first send the masthead rises to the top and the transcript fills in above the prompt */
  .term.talk .launch{padding-top:clamp(12px,3vh,28px)}
  .chat{display:flex;flex-direction:column;justify-content:flex-end}
  .log{display:grid;gap:16px;margin:6px 0 18px}
  .turn{animation:rise .52s cubic-bezier(.25,1,.5,1)}
  .turn p{animation:fade .24s ease-out}
  @keyframes rise{from{opacity:0;transform:translateY(14px)}}
  @keyframes fade{from{opacity:0}}
  .log:empty{display:none}
  .turn{display:grid;gap:3px}
  .turn .band{display:flex;justify-content:space-between;gap:2ch;background:var(--ink-2);padding:6px 12px}
  .turn .band span{color:var(--bright);min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
  .turn .band time{color:var(--faint);white-space:nowrap}
  .turn p{margin:0;padding:0 12px;color:var(--muted)}
  .turn p b{color:var(--fg)}
  .turn .gl{color:var(--accent)}
  .turn .q,.turn .done{color:var(--faint)}

  /* status line, as opencode keeps the path and version at the bottom */
  .status{display:flex;justify-content:space-between;gap:2ch;flex-wrap:wrap;color:var(--faint);padding-top:10px}
  .status .r{display:flex;gap:1ch;flex-wrap:wrap}
  .status .sep{color:var(--rule-2)}
  .addr:hover{color:var(--accent)}

  /* sheets, unchanged from the approved build */
  dialog.sheet{width:min(calc(100% - 32px),620px);max-height:min(82vh,680px);box-sizing:border-box;margin:auto;background:var(--ink);color:var(--fg);border:1px solid var(--rule-3);border-radius:4px;padding:0;overflow:visible}
  dialog.sheet::backdrop{background:rgba(10,14,22,.74)}
  .frame{display:grid;gap:14px;padding:22px 18px 12px;max-height:min(82vh,680px);box-sizing:border-box;overflow-y:auto}
  dialog.sheet > .ttl{position:absolute;top:-.8em;left:12px;background:var(--ink);padding-inline:1ch;color:var(--bright);font-weight:700;z-index:1}
  dialog.sheet > .x{position:absolute;top:-.8em;right:12px;background:var(--ink);padding-inline:1ch;color:var(--faint);z-index:1}
  dialog.sheet > .x::after{content:"";position:absolute;inset:-12px -6px}
  dialog.sheet > .x:hover{color:var(--accent)}
  .sbody{display:grid;gap:14px}
  .frame .meta{margin:0;color:var(--faint)}
  .frame .meta b{color:var(--accent);font-weight:400}
  .frame .desc{margin:0;color:var(--fg);max-width:64ch}
  .frame .desc a{color:var(--accent);text-decoration:none;border-bottom:1px solid var(--rule-3)}
  .frame .desc a:hover{color:var(--accent-2);border-bottom-color:var(--accent-2)}
  .frame h3{font:inherit;font-weight:700;color:var(--muted);margin:2px 0 0;display:flex;align-items:center;gap:1ch}
  .frame h3::after{content:"";flex:1;border-top:1px solid var(--rule)}
  .frame ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
  .frame .li{display:grid;grid-template-columns:2ch minmax(0,1fr) auto auto;gap:0 .8ch;padding:2px 8px;margin-inline:-8px;align-items:baseline;text-decoration:none}
  .frame .li:hover,.frame .li:focus-visible{background:var(--ink-3);outline:none}
  .frame .li .g{color:var(--faint)}
  .frame .li .t{color:var(--bright);min-width:0}
  .frame .li .s{color:var(--faint);white-space:nowrap}
  .frame .li .s:empty{display:none}
  .frame .li .x{grid-column:4;color:var(--faint)}
  .frame a.li:hover .x,.frame a.li:focus-visible .x{color:var(--accent)}
  .frame a.li:hover .g{color:var(--accent)}
  .frame .nav{display:flex;justify-content:space-between;gap:2ch;border-top:1px solid var(--rule);padding-top:8px;color:var(--faint)}
  .frame .nav button{color:var(--muted)}
  .frame .nav button:hover{color:var(--accent)}

  /* every scroller gets the TUI bar: thin, square, no arrows, inset (Chrome and Safari; Firefox gets the standard properties) */
  ::-webkit-scrollbar{width:14px;height:14px}
  ::-webkit-scrollbar-track{background:transparent;margin-block:4px}
  ::-webkit-scrollbar-thumb{background:var(--rule-3);background-clip:padding-box;border:4px solid transparent;border-radius:0}
  ::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:padding-box}
  ::-webkit-scrollbar-button{display:none;width:0;height:0}
  ::-webkit-scrollbar-corner{background:transparent}
  @supports not selector(::-webkit-scrollbar){ *{scrollbar-width:thin;scrollbar-color:var(--rule-3) transparent} }
  .frame{padding-right:8px}
  @media (max-width:640px){
    .mark{width:72px;height:72px}
    :root{--fs:14px}
    .logo{gap:14px;margin-bottom:24px}
    .launch{padding-top:clamp(24px,12vh,120px)}
    .keys .kk{display:none}
    .frame .li{grid-template-columns:2ch minmax(0,1fr) auto}
    .frame .li .x{grid-column:3;grid-row:1}
    .frame .li .s{grid-column:2;white-space:normal}
    /* the status line stacks: path above, name and address below, clear of the gesture bar */
    .status{flex-direction:column;align-items:center;gap:2px;padding-top:16px;text-align:center}
    .status .r{justify-content:center}
  }
  @media (prefers-reduced-motion:reduce){ .prompt.idle .blk,.turn,.turn p{animation:none} }

/* production: honeypot, no-JS fallback, send-result actions */
.hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.no-js .dockhome,.no-js .trusted{display:none}
.nojs{margin-top:28px;text-align:center}
.nojs p{margin:0 0 10px}
.nojs ul{list-style:none;margin:0;padding:0;display:grid;gap:4px;color:var(--faint)}
.nojs a{color:var(--bright)}
.turn .act{color:var(--accent)}
.turn .act:hover{color:var(--accent-2)}
