/* stresser.rest — deep navy + electric lime theme */

:root {
  --bg:   oklch(0.06 0.018 250);
  --bg2:  oklch(0.10 0.016 250);
  --bg3:  oklch(0.14 0.014 250);

  --border:  oklch(0.22 0.012 250);
  --border2: oklch(0.30 0.010 250);

  --lime:   oklch(0.82 0.22 135);
  --lime2:  oklch(0.91 0.16 135);
  --cyan:   oklch(0.74 0.16 195);
  --cyan2:  oklch(0.84 0.12 195);
  --yellow: oklch(0.86 0.17 90);

  --text:  oklch(0.93 0.006 250);
  --text2: oklch(0.62 0.009 250);
  --text3: oklch(0.40 0.009 250);

  --link:       oklch(0.74 0.16 195);
  --link-hover: oklch(0.84 0.12 195);

  --r:  40px;
  --r2: 10px;
  --r3: 6px;

  --lime-grad: linear-gradient(135deg, var(--lime) 0%, var(--cyan) 100%);
  --card-bg: linear-gradient(160deg, oklch(0.12 0.016 250 / .92), oklch(0.08 0.014 250 / .96));

  --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle grid lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.22 0.012 250 / .18) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.22 0.012 250 / .18) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
  body { animation: fadeUp .4s ease-out both; }
}

a, button, .card, details summary {
  transition: transform .15s, opacity .15s, border-color .18s, background .18s;
}
a:active, .card:active { transform: scale(.975); opacity: .78; }

/* ── Layout ── */
.wrap    { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-sm { max-width: 780px;  margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ── */
header {
  background: oklch(0.07 0.018 250 / .9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: .8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-size: 1.3rem; font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: -.2px; font-family: var(--font); }
.logo span { color: var(--lime); }
nav { display: flex; gap: .05rem; flex-wrap: wrap; }
nav a { color: var(--text2); text-decoration: none; font-size: .78rem; padding: .25rem .55rem; border-radius: var(--r); font-family: var(--font-sans); }
nav a:hover, nav a.active { color: var(--lime); background: oklch(0.82 0.22 135 / .08); }

/* ── Terminal tag ── */
.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  background: oklch(0.82 0.22 135 / .1);
  border: 1px solid oklch(0.82 0.22 135 / .3);
  border-radius: 4px;
  font-family: var(--font);
  font-size: .72rem;
  padding: .18rem .65rem;
  color: var(--lime);
  letter-spacing: .04em;
  margin-bottom: 1.5rem;
}
.tag::before { content: '> '; opacity: .5; }

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -20% -20%;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, oklch(0.82 0.22 135 / .10) 0%, transparent 60%),
    radial-gradient(ellipse 35% 30% at 80% 70%, oklch(0.74 0.16 195 / .07) 0%, transparent 55%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.3px;
  margin-bottom: .9rem;
  font-family: var(--font-sans);
  background: linear-gradient(160deg, var(--text) 20%, oklch(0.55 0.009 250) 130%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-wrap: balance;
}
.hero h1 em {
  background: var(--lime-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}
.hero p.lead { font-size: 1.05rem; color: var(--text2); max-width: 600px; margin: 0 auto 2rem; }

/* ── Terminal block in hero ── */
.terminal {
  background: oklch(0.10 0.016 250);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 1rem 1.25rem;
  font-family: var(--font);
  font-size: .83rem;
  text-align: left;
  max-width: 560px;
  margin: 0 auto 2rem;
  position: relative;
}
.terminal-bar { display: flex; gap: .35rem; margin-bottom: .7rem; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; }
.terminal-bar .r { background: oklch(0.56 0.23 22); }
.terminal-bar .y { background: var(--yellow); }
.terminal-bar .g { background: var(--lime); }
.terminal-line { color: var(--text2); margin-bottom: .2rem; }
.terminal-line .prompt { color: var(--lime); margin-right: .5rem; }
.terminal-line .val   { color: var(--cyan); }
.terminal-line .ok    { color: var(--lime); }
.terminal-line .warn  { color: var(--yellow); }
.terminal-cursor { display: inline-block; width: 8px; height: 1em; background: var(--lime); opacity: .8; vertical-align: middle; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Badge row ── */
.badge-row { display: flex; justify-content: center; gap: .45rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.badge {
  background: oklch(0.14 0.014 250 / .8);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .71rem;
  padding: .2rem .7rem;
  color: var(--text2);
  font-family: var(--font-sans);
  letter-spacing: .02em;
}
.badge.lime   { border-color: var(--lime);   color: var(--lime2); }
.badge.cyan   { border-color: var(--cyan);   color: var(--cyan2); }
.badge.yellow { border-color: var(--yellow); color: var(--yellow); }

/* ── TOC ── */
.toc {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lime);
  border-radius: 0 var(--r2) var(--r2) 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  backdrop-filter: blur(10px);
}
.toc h2 { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--lime); margin-bottom: .7rem; font-family: var(--font); }
.toc ol  { padding-left: 1.25rem; }
.toc li  { margin: .28rem 0; }
.toc a   { color: var(--link); text-decoration: none; font-size: .88rem; }
.toc a:hover { color: var(--link-hover); }

/* ── Sections ── */
.section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }

h2.section-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-sans);
}
h2.section-title .hl {
  font-family: var(--font);
  color: var(--lime);
  font-size: 1rem;
  opacity: .7;
  font-weight: 400;
}
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.6rem 0 .5rem; color: var(--text); }
p  { margin: .7rem 0; color: var(--text2); }
p strong { color: var(--text); }
ul, ol { padding-left: 1.4rem; color: var(--text2); }
li { margin: .3rem 0; }

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .8rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.2rem 1.3rem;
  backdrop-filter: blur(10px);
}
.card:hover { border-color: var(--lime); transform: translateY(-2px); }
.card h3 { font-size: .92rem; margin: 0 0 .4rem; font-family: var(--font); color: var(--lime); }
.card p  { font-size: .85rem; margin: 0; }
.card.cyan-h:hover { border-color: var(--cyan); }
.card.cyan-h h3 { color: var(--cyan); }

/* ── Stat tiles ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: .7rem;
  margin: 1.5rem 0;
}
.stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.1rem 1.2rem;
  text-align: center;
}
.stat.lime  { border-color: oklch(0.82 0.22 135 / .45); }
.stat.cyan  { border-color: oklch(0.74 0.16 195 / .45); }
.stat.yel   { border-color: oklch(0.86 0.17 90  / .45); }
.stat-val { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-family: var(--font); }
.stat-val.lime  { color: var(--lime); }
.stat-val.cyan  { color: var(--cyan); }
.stat-val.yel   { color: var(--yellow); }
.stat-label { font-size: .71rem; color: var(--text3); margin-top: .22rem; text-transform: uppercase; letter-spacing: .07em; font-family: var(--font-sans); }

/* ── Callout ── */
.callout {
  border-left: 2px solid var(--lime);
  background: oklch(0.82 0.22 135 / .06);
  border-radius: 0 var(--r3) var(--r3) 0;
  padding: .9rem 1.2rem;
  margin: 1.4rem 0;
}
.callout.cyan   { border-color: var(--cyan);   background: oklch(0.74 0.16 195 / .06); }
.callout.yellow { border-color: var(--yellow); background: oklch(0.86 0.17 90  / .06); }
.callout p { color: var(--text); margin: 0; font-size: .92rem; }

/* ── Table ── */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border-radius: var(--r2); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
thead tr { background: var(--bg3); }
th { text-align: left; padding: .6rem 1rem; color: var(--lime); font-size: .71rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font); }
td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2); }
td strong { color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: oklch(0.14 0.014 250 / .6); }

/* ── Code / formula ── */
code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font);
  font-size: .83em;
  padding: .08em .35em;
  color: var(--lime2);
}
.formula {
  background: oklch(0.09 0.018 250);
  border: 1px solid var(--border2);
  border-left: 2px solid var(--lime);
  border-radius: 0 var(--r2) var(--r2) 0;
  padding: 1rem 1.3rem;
  margin: 1.3rem 0;
  font-family: var(--font);
  font-size: .85rem;
  color: var(--lime2);
  overflow-x: auto;
  line-height: 1.9;
}
.formula .c { color: var(--text3); font-style: italic; font-family: var(--font-sans); font-size: .8rem; }
.formula .v { color: var(--cyan); }

/* ── FAQ ── */
.faq-list { margin: 1.4rem 0; }
details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  margin-bottom: .45rem;
  backdrop-filter: blur(8px);
  overflow: hidden;
}
details[open] { border-color: oklch(0.82 0.22 135 / .5); }
summary {
  padding: .9rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .91rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
summary::-webkit-details-marker { display: none; }
summary::before { content: '[ '; font-family: var(--font); color: var(--text3); }
summary::after  { content: ' +]'; font-family: var(--font); color: var(--text3); font-size: 1rem; }
details[open] summary::before { content: '[ '; color: var(--lime); }
details[open] summary::after  { content: ' -]'; color: var(--lime); }
details p { padding: 0 1.2rem .9rem; margin: 0; font-size: .89rem; color: var(--text2); }

/* ── Grad divider ── */
.grad-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime) 40%, var(--cyan) 60%, transparent);
  opacity: .2;
  margin: 1.5rem 0;
}

/* ── Two-col ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }

/* ── Links ── */
a { color: var(--link); }
a:hover { color: var(--link-hover); }

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.8rem;
  margin-top: 2rem;
}
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; }
.footer-col h3 { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--lime); margin-bottom: .7rem; font-family: var(--font); }
.footer-col a { display: block; color: var(--text2); text-decoration: none; font-size: .84rem; margin-bottom: .28rem; }
.footer-col a:hover { color: var(--link); }
.footer-bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); text-align: center; color: var(--text3); font-size: .76rem; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  nav { display: none; }
  .hero h1 { font-size: 1.85rem; }
  h2.section-title { font-size: 1.3rem; }
  .terminal { font-size: .77rem; }
}
@media (max-width: 450px) {
  .footer-inner { grid-template-columns: 1fr; }
}

::selection { background: var(--lime); color: oklch(0.06 0.018 250); }
