/* JWelkin · Console theme */

:root {
  --bg: #0c0d10;
  --panel: #111316;
  --rule: #232427;
  --rule-2: #2a2c30;
  --fg: #d8d4cc;
  --fg-strong: #ebe7dd;
  --muted: #6b6960;
  --muted-2: #8b8a82;
  --accent: #c2c75c;     /* prompt yellow-green */
  --accent-2: #76ccd6;   /* arg cyan */
  --accent-3: #b8a05c;   /* opt amber */
  --warm: #c2410c;       /* burnt sienna for emphasis */
  --error: #f07a52;      /* readable warm red for error text */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.65;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: var(--accent); }

.console { min-height: 100vh; }
.scan { max-width: 980px; margin: 0 auto; padding: 36px 48px 96px; position: relative; }

/* Window chrome */
.titlebar { display: flex; align-items: center; gap: 14px; padding: 0 0 14px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; font-size: 12px; }
.titlebar .dots { display: flex; gap: 6px; }
.titlebar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule-2); }
.titlebar .path { color: var(--muted); }
.titlebar .path b { color: var(--fg); font-weight: 500; }
.titlebar .right { margin-left: auto; color: var(--muted); }

/* Command palette */
.palette { border: 1px solid var(--rule); background: var(--panel); border-radius: 6px; padding: 10px 14px; margin-bottom: 36px; display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.palette .prompt { color: var(--accent); }
.palette .typed { color: var(--fg); }
.palette .cursor { width: 8px; height: 16px; background: var(--accent); display: inline-block; vertical-align: middle; animation: blink 1s steps(2) infinite; }
.palette .hint { margin-left: auto; color: var(--muted); font-size: 11px; }
.palette .hint a { color: var(--fg); }
.palette .hint kbd { background: #1b1d20; border: 1px solid var(--rule-2); padding: 1px 5px; border-radius: 3px; color: #a8a59c; font-family: inherit; font-size: 10px; margin: 0 1px; }
.palette .hint .kbd-btn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.palette .hint .kbd-btn:hover kbd { border-color: var(--accent); color: var(--fg); }
.palette .hint .kbd-btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
@keyframes blink { 50% { background: transparent; } }

/* Manpage running header */
.manhead { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; border-bottom: 1px dashed var(--rule); padding-bottom: 8px; margin-bottom: 28px; }
.manhead b { color: var(--fg); font-weight: 500; }

/* Section headers */
h1 { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; margin: 32px 0 14px; }
h1::before { content: '## '; color: var(--accent); }

/* Name block */
.name { font-size: 22px; color: var(--fg-strong); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.name span { color: var(--warm); }
.tag { color: var(--muted-2); font-size: 13px; margin: 0 0 24px; }

/* Synopsis */
.synopsis { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 8px; }
.synopsis div { font-size: 13px; line-height: 1.85; }
.synopsis .cmd { color: var(--accent); }
.synopsis .arg { color: var(--accent-2); }
.synopsis .opt { color: var(--accent-3); }
.synopsis .com { color: var(--muted); }

/* Prose */
p { margin: 0 0 1em; max-width: 76ch; }
.prose p { margin-bottom: 1em; }
.prose a { color: var(--accent); }

/* Services table */
table.svc { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
table.svc th, table.svc td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px dashed var(--rule); }
table.svc th { font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-2); }
table.svc td.cmd { color: var(--accent); width: 22%; }
table.svc td.dur { color: var(--accent-2); width: 14%; white-space: nowrap; }
table.svc td.body { color: var(--fg); }

/* Authors */
.authors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 0; }
.authors .a { border: 1px solid var(--rule); border-radius: 4px; padding: 14px 16px; background: var(--panel); }
.authors .a .h { color: var(--accent); font-size: 12px; margin-bottom: 6px; }
.authors .a .n { color: var(--fg-strong); font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.authors .a .y { color: var(--muted); font-size: 11px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.authors .a .b { color: #a8a59c; font-size: 12px; line-height: 1.55; }

/* Contact */
.contact { margin-top: 12px; background: var(--panel); border: 1px solid var(--rule); padding: 18px 22px; border-radius: 6px; }
.contact .row { display: flex; align-items: center; gap: 10px; margin: 4px 0; font-size: 13px; }
.contact .row .k { color: var(--muted); width: 96px; }
.contact .row .v { color: var(--fg); }
.contact .row .v.c a { color: var(--accent); }

/* Contact dialog (⌘K) */
dialog.mail { padding: 0; width: min(580px, calc(100vw - 32px)); background: var(--panel); color: var(--fg); border: 1px solid var(--rule-2); border-radius: 6px; font: inherit; }
dialog.mail::backdrop { background: rgba(5, 6, 8, 0.72); }
.mail form { padding: 18px 22px; }
.mail-head { border-bottom: 1px dashed var(--rule); padding-bottom: 10px; margin-bottom: 14px; }
.mail-head .prompt { color: var(--accent); }
.mail-head .arg { color: var(--accent-2); }
.mail .field { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; }
.mail .field .k { flex: none; width: 64px; color: var(--accent-3); }
.mail input, .mail select, .mail textarea { flex: 1; min-width: 0; background: var(--bg); color: var(--fg); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 8px; font: inherit; }
.mail textarea { resize: vertical; }
.mail input::placeholder, .mail textarea::placeholder { color: var(--muted); }
.mail input:focus, .mail select:focus, .mail textarea:focus { outline: none; border-color: var(--accent); }
.mail .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mail .status { display: block; margin-top: 12px; font-size: 12px; }
.mail .status:empty { display: none; }
.mail .status.ok { color: var(--accent); }
.mail .status.ok::before { content: '✓ '; }
.mail .status.err { color: var(--error); }
.mail .status.err::before { content: '✗ '; }
.mail-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.mail-foot .hint { margin-right: auto; color: var(--muted); font-size: 11px; }
.mail-foot .hint kbd { background: #1b1d20; border: 1px solid var(--rule-2); padding: 1px 5px; border-radius: 3px; color: #a8a59c; font-family: inherit; font-size: 10px; }
.mail-foot button { font: inherit; font-size: 12px; padding: 5px 14px; border-radius: 4px; border: 1px solid var(--rule-2); background: transparent; color: var(--muted-2); cursor: pointer; }
.mail-foot button[type="submit"] { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 600; }
.mail-foot button:disabled { opacity: 0.6; cursor: progress; }
.mail-foot button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* Status pill */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--accent); border: 1px solid #2a3010; background: rgba(194,199,92,0.08); padding: 3px 9px; border-radius: 999px; letter-spacing: 0.04em; margin-left: 6px; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* Status bar */
.statusbar { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; flex-wrap: wrap; gap: 8px; }
.statusbar .left b { color: var(--accent); font-weight: 500; }

/* Responsive */
@media (max-width: 720px) {
  .scan { padding: 24px 20px 60px; }
  .authors { grid-template-columns: 1fr; }
  table.svc, table.svc thead, table.svc tbody, table.svc tr, table.svc td, table.svc th { display: block; width: 100%; }
  table.svc thead { display: none; }
  table.svc tr { border-bottom: 1px dashed var(--rule); padding: 10px 0; }
  table.svc td { padding: 2px 0; border: 0; }
  table.svc td.cmd { font-weight: 600; }
  .palette .hint { width: 100%; margin-left: 0; }
  .mail form { padding: 16px; }
  .mail .field { flex-direction: column; align-items: stretch; gap: 2px; }
  .mail .field .k { width: auto; }
}
