/* Duka's page. The look is DLNE-Sec's green/Matrix theme (src/renderer/chat/theme-matrix.css and chrome.css): the same
   palette, the same JetBrains Mono, the same glow, panel and chip shapes, with the matrix rain (rain.js) behind it.
   Everything on the page is real text; the animation only changes what is visible (terminal.js). */
:root {
  --bg: #07090e;
  --surface: #0b1214;
  --panel: #111c1f;
  --border: #16432f;
  --text: #d8f5e6;
  --text-dim: #7fae95;       /* the app's #6f9c86, lightened a step so small text keeps 6:1 on the dark panels */
  --accent: #00ff9c;
  --accent-soft: #3ee08f;
  --accent-low: #1f6f4a;
  --amber: #f0c46a;          /* the app's "correction" colour: used for what is unconfirmed */
  --glow: 0 0 15px rgba(0, 255, 156, 0.4);
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; min-height: 100vh; background: #05070a; color: var(--text);
  font-family: var(--mono); font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%;
}
::selection { background: rgba(0, 255, 156, 0.28); color: #eafff3; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 156, 0.18); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
a { color: var(--accent); }
a:hover { text-shadow: var(--glow); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
em { color: var(--accent-soft); font-style: normal; font-weight: 700; }
strong { color: #eafff3; }

/* The rain: one fixed canvas, under everything */
#rain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.3; }
body::before { /* the app's soft green wash from the top */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(130% 90% at 50% 0%, rgba(0, 255, 156, 0.08), rgba(0, 0, 0, 0) 55%);
}
.top, main, .foot { position: relative; z-index: 1; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: #04110b; padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(5, 7, 10, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); text-shadow: var(--glow); text-decoration: none; white-space: nowrap; }
.brand-pr { opacity: 0.8; }
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: 0.85rem; }
.top nav a { color: var(--text-dim); text-decoration: none; padding: 6px 0; }
.top nav a:hover { color: var(--accent); }
.back { font-size: 0.85rem; text-decoration: none; border: 1px solid var(--accent-low); border-radius: 14px; padding: 4px 14px; color: var(--accent-soft); white-space: nowrap; background: var(--bg); }
.back:hover { border-color: var(--accent); box-shadow: var(--glow); }

main { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }
.block { padding-top: 64px; }

/* Hero */
.hero { padding-top: clamp(36px, 7vw, 84px); }
.eyebrow { text-shadow: 0 0 8px #05070a; margin: 0 0 14px; color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.04em; }
h1 { margin: 0 0 12px; font-size: clamp(2.5rem, 9vw, 5.6rem); line-height: 1.02; letter-spacing: 0.02em; color: var(--accent); font-weight: 700; }
.glow { text-shadow: 0 0 18px rgba(0, 255, 156, 0.55), 0 0 42px rgba(0, 255, 156, 0.25); }
.tagline { text-shadow: 0 0 10px #05070a, 0 0 4px #05070a; margin: 0 0 34px; max-width: 44rem; font-size: clamp(1.05rem, 2.4vw, 1.4rem); line-height: 1.5; color: var(--text); }
.fine { margin: 14px 0 0; color: var(--text-dim); font-size: 0.82rem; }
.lede { margin: -6px 0 22px; color: var(--text-dim); }

/* The window (the app's .win / .titlebar / .chip) */
.win {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: radial-gradient(130% 90% at 50% 0%, rgba(0, 255, 156, 0.06), rgba(0, 0, 0, 0) 55%), rgba(7, 9, 14, 0.9);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 156, 0.07);
}
.titlebar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(0, 255, 156, 0.05), transparent); }
.tb-brand { font-weight: 700; letter-spacing: 0.12em; color: var(--accent); text-shadow: var(--glow); margin-right: 4px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.route { font-size: 11px; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.chip { background: var(--bg); color: var(--accent-soft); border: 1px solid var(--accent-low); border-radius: 12px; font: inherit; font-size: 11px; padding: 2px 10px; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--accent); box-shadow: var(--glow); }
.chip-go { color: #04110b; background: var(--accent); border-color: var(--accent); font-weight: 700; }

/* The terminal. Each line keeps its full text; hanging indents keep wrapped text under the text, not the tag. */
.term { padding: 16px 18px 18px; font-size: 0.9rem; line-height: 1.55; overflow-wrap: anywhere; }
.tline { --h: 2.5ch; position: relative; white-space: pre-wrap; padding-left: var(--h); text-indent: calc(var(--h) * -1); margin: 0 0 3px; }
.tline[data-t="say"], .tline.you { --h: 7ch; margin-top: 7px; }
.tline[data-t="boot"] { --h: 8ch; margin: 0; }
.tline[data-t="out"] { --h: 2.5ch; color: var(--text); }
.tline.think { --h: 8ch; color: var(--text-dim); font-style: italic; margin-top: 7px; }
.tline.note { --h: 2.5ch; color: var(--text-dim); margin-bottom: 8px; }
.tag { display: inline-block; width: var(--h); text-indent: 0; text-align: left; color: var(--accent); font-style: normal; }
.tag.ok { color: var(--accent); }
.tag.scope { color: var(--amber); }
.tag.who { color: var(--accent-soft); font-weight: 700; }
.tline.you .tag { color: var(--text-dim); }
.tline.unconf { color: var(--amber); }
.tline.unconf .tag { color: var(--amber); }
.tline.flag { --h: 6ch; margin-top: 8px; color: #eafff3; font-weight: 700; text-shadow: var(--glow); }
.tline.flag .tag { color: var(--accent); }
.tline[data-t="cmd"] { color: #eafff3; margin-top: 6px; }
.tline.say { color: var(--text); }

/* Typing: the hidden rest is invisible but still text. Lines start unseen only while the intro will animate (early.js). */
.off { opacity: 0; }
.js .tline { opacity: 0; }
.js .tline.on { opacity: 1; }
.cursor { display: inline-block; width: 0; position: relative; }
.cursor::before { content: ""; position: absolute; left: 0; bottom: -0.22em; width: 0.6em; height: 1.1em; background: var(--accent); box-shadow: var(--glow); }
.cursor.idle::before { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.reduced .cursor, .reduced .needs-motion { display: none; }
html:not(.js) .cursor { display: none; }

/* Sections */
.sec { margin: 0 0 22px; font-size: clamp(1.15rem, 3vw, 1.5rem); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); font-weight: 700; }
.pr { color: var(--accent); margin-right: 0.5ch; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { background: rgba(11, 18, 20, 0.9); border: 1px solid var(--border); border-radius: 8px; padding: 18px 18px 20px; transition: border-color 0.2s, box-shadow 0.2s; }
.card:hover { border-color: var(--accent-low); box-shadow: 0 0 22px rgba(0, 255, 156, 0.1); }
.card h3 { margin: 0 0 10px; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.card p { margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--text); }

.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.uses li { display: flex; gap: 16px; align-items: flex-start; background: rgba(11, 18, 20, 0.9); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.uses h3 { margin: 0 0 4px; font-size: 1rem; color: #eafff3; }
.uses p { margin: 0; font-size: 0.9rem; color: var(--text); }
.u-tag { flex: none; width: 13ch; text-align: center; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); border: 1px solid var(--accent-low); border-radius: 12px; padding: 2px 10px; margin-top: 3px; background: var(--bg); }
.uses .soon { border-style: dashed; }
.uses .soon .u-tag { color: var(--amber); border-color: rgba(240, 196, 106, 0.5); }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery .wide { grid-column: 1 / -1; }
.gallery a { display: block; }
.gallery a:focus-visible { outline: 2px solid var(--accent, #00ff9c); outline-offset: 2px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: 8px 12px; font-size: 0.8rem; color: var(--text-dim); }

.dlne-card { background: rgba(11, 18, 20, 0.9); border: 1px solid var(--border); border-radius: 8px; padding: 22px 22px 8px; max-width: 52rem; }
.dlne-card p { margin: 0 0 16px; }
.btn { display: inline-block; text-decoration: none; background: var(--bg); color: var(--accent); border: 1px solid var(--accent-low); border-radius: 6px; padding: 10px 20px; letter-spacing: 0.05em; font-weight: 500; }
.btn:hover { border-color: var(--accent); box-shadow: var(--glow); text-shadow: none; }
.btn-go { background: var(--accent); color: #04110b; border-color: var(--accent); font-weight: 700; }
.btn-go:hover { box-shadow: 0 0 24px rgba(0, 255, 156, 0.6); }

.cta { text-align: center; padding: 90px 0 30px; }
.cta h2 { margin: 0 0 12px; font-size: clamp(2rem, 7vw, 4rem); color: var(--accent); line-height: 1.05; }
.cta p { margin: 0 auto 22px; max-width: 40rem; }

.foot { max-width: 1120px; margin: 0 auto; padding: 24px 20px 70px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.82rem; text-align: center; }
.foot p { margin: 0 0 8px; }
.foot a { color: var(--accent-soft); }

.rain-toggle { position: fixed; right: 14px; bottom: 14px; z-index: 30; background: rgba(5, 7, 10, 0.9); color: var(--accent-soft); border: 1px solid var(--accent-low); border-radius: 12px; font: inherit; font-size: 11px; padding: 4px 12px; cursor: pointer; }
.rain-toggle:hover { border-color: var(--accent); box-shadow: var(--glow); }

@media (max-width: 760px) {
  .top nav { display: none; }
  .back { margin-left: auto; }
  .top-in { padding: 8px 14px; }
  main { padding: 0 14px 30px; }
  .block { padding-top: 48px; }
  .term { padding: 12px 12px 14px; font-size: 0.8rem; }
  .titlebar { padding: 7px 10px; }
  .tb-right { margin-left: 0; width: 100%; }
  .route { margin-left: auto; }
  .uses li { flex-direction: column; gap: 8px; }
  .u-tag { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .cursor, .needs-motion { display: none; }
  .cursor.idle::before { animation: none; }
}
