:root {
  --ink: #1B3A4B;
  --teal: #2E5A73;
  --mist: #7EB6C9;
  --paper: #F7F4EE;
  --ground: #07080a;
  --panel: #0e1114;
  --raised: #14181d;
  --line: #243038;
  --mute: #8a96a0;
  --ok: #3d9b7a;
  --warn: #c4a15a;
  --fail: #c45a5a;
  --ext: #b8874a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--paper); }
body {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}
h1, h2, .display { font-family: "Newsreader", "Source Serif 4", Georgia, serif; font-weight: 500; }
a { color: var(--mist); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: grid; grid-template-rows: auto 1fr auto; min-height: 100%; }
.top {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: rgba(7,8,10,.88); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand strong { display: block; font-size: 14px; letter-spacing: .04em; }
.brand small { display: block; color: var(--mute); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.search {
  flex: 1; max-width: 420px; position: relative;
}
.search input {
  width: 100%; background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px 8px 34px; outline: none;
}
.search input:focus { border-color: var(--mist); }
.search .hint { position: absolute; left: 12px; top: 9px; color: var(--mute); font-size: 12px; }
.chips { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.chip {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--mute);
}
.chip.ok { color: var(--ok); border-color: #245844; }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 0; }
.side {
  border-right: 1px solid var(--line); background: var(--panel);
  padding: 16px 10px 40px; overflow: auto;
}
.group { color: var(--mute); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 14px 10px 6px; }
.nav-btn {
  width: 100%; text-align: left; background: transparent; border: 0;
  color: #c9d4da; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.nav-btn:hover { background: var(--raised); }
.nav-btn.active { background: #17303a; color: var(--paper); }
.nav-btn .tag { font-size: 9px; color: var(--mist); letter-spacing: .08em; }
.main { overflow: auto; padding: 28px 32px 80px; }
.tool { display: none; max-width: 1180px; }
.tool.active { display: block; }
.kicker { color: var(--mist); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 6px; }
h2 { font-size: 32px; margin: 0 0 8px; letter-spacing: -0.02em; }
.lede { color: #c5cfcf; max-width: 62ch; line-height: 1.5; margin: 0 0 18px; }
.leftover {
  border-left: 2px solid var(--ext); padding: 8px 12px; color: #d9c7a2;
  font-size: 13px; margin: 0 0 22px; background: #16110a;
}
.tool-card {
  max-width: 1180px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 22px;
}
.tool-card .aha { color: var(--paper); margin: 0 0 8px; line-height: 1.45; }
.tool-card .tech { color: #c5cfcf; margin: 0 0 8px; line-height: 1.5; font-size: 13px; max-width: 78ch; }
.tool-card .avenue { color: var(--mute); margin: 0; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
label.lbl { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 0 0 6px; }
textarea, input[type=text], input[type=number], input[type=password], select {
  width: 100%; background: var(--ground); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; outline: none;
}
textarea { min-height: 280px; resize: vertical; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.45; }
textarea.short { min-height: 140px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn {
  background: var(--ink); color: var(--paper); border: 1px solid #2a5568;
  border-radius: 8px; padding: 9px 14px; cursor: pointer;
}
.btn:hover { background: var(--teal); }
.btn.ghost { background: transparent; }
.btn.warn { background: #3a2a12; border-color: #6a4a20; color: #e6d2a8; }
.out {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px;
  white-space: pre-wrap; word-break: break-word; min-height: 120px;
}
.ok { color: #8ee0bf; }
.fail { color: #f0a3a3; }
.pill { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); padding: 2px 7px; border-radius: 999px; margin-right: 6px; }
.drop {
  border: 1px dashed #3a4c56; border-radius: 10px; padding: 16px; text-align: center; color: var(--mute); cursor: pointer;
}
.drop.hot { border-color: var(--mist); color: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.erd { width: 100%; min-height: 360px; background: #0b0d10; border-radius: 10px; overflow: auto; }
.foot {
  border-top: 1px solid var(--line); padding: 10px 20px; color: var(--mute);
  font-size: 11px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: var(--paper);
  padding: 10px 14px; border-radius: 8px; display: none; z-index: 40;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.result-box { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: #0b0d10; min-height: 180px; }
.result-box.pass { border-color: #245844; }
.result-box.nopass { border-color: #5a3030; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: block; position: absolute; inset: 56px 0 auto 0; z-index: 15; max-height: 70vh; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .main { padding: 18px 16px 80px; }
}
