/* =========================================================================
   V11b · DOTTED  ·  man page + dot-density ASCII portrait
   Amber-phosphor terminal palette, IBM Plex Mono everywhere, content shaped
   as a Unix man page (NAME / SYNOPSIS / DESCRIPTION / OPTIONS / FILES /
   AUTHOR / SEE ALSO) with a dot-density ASCII portrait and a top(1)-style
   process table. The medium constraint: text-only terminal, fixed-width
   columns, ASCII art for everything that wants to be a picture.
   ========================================================================= */

:root {
  --bg:        #0A0805;
  --bg-2:      #14110C;
  --bg-3:      #1C1810;
  --fg:        #E8A028;     /* amber phosphor */
  --fg-strong: #FFC560;
  --fg-mid:    #A87024;
  --fg-muted:  #6B4818;
  --fg-faint:  #443014;
  --hl:        #FFFFFF;     /* used very sparingly */
  --ok:        #5CD679;     /* one green for "running" */
  --warn:      #E55C2F;     /* one red for errors */

  --mono:  'IBM Plex Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --vt:    'VT323', 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.dotted {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  padding: 0 0 60px;
  /* extra-soft phosphor glow */
  text-shadow: 0 0 1px rgba(232, 160, 40, 0.45);
  -webkit-font-smoothing: antialiased;
}

/* phosphor scanlines */
body.dotted::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 3px
  );
  mix-blend-mode: multiply;
}

/* CRT vignette */
body.dotted::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 50%, transparent 50%, rgba(0,0,0,0.6) 100%);
}

main, section, header { position: relative; z-index: 5; }

p, h1, h2, h3, h4, pre { margin: 0; padding: 0; }
em { font-style: italic; color: var(--fg-strong); }
b  { font-weight: 600; color: var(--fg-strong); }
a {
  color: var(--hl);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { background: var(--fg); color: var(--bg); }
::selection { background: var(--fg); color: var(--bg); }

.hl  { color: var(--hl); }
.dim { color: var(--fg-muted); }
.ok  { color: var(--ok); }
.warn{ color: var(--warn); }

/* =========================================================================
   TOP BAR (terminal status)
   ========================================================================= */

.tt-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 6px 16px;
  height: 26px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--fg-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-mid);
  text-transform: uppercase;
}
.tt-bar__c { text-align: center; color: var(--fg-strong); text-transform: none; letter-spacing: 0; font-size: 12px; }
.tt-bar__r { text-align: right; color: var(--fg); }

@media (max-width: 700px) {
  .tt-bar { grid-template-columns: 1fr; height: auto; padding: 4px 12px; gap: 2px; }
  .tt-bar__l, .tt-bar__r, .tt-bar__c { text-align: left; }
}

/* =========================================================================
   MAN PAGE BODY
   ========================================================================= */

.man {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
}

.man__head, .man__foot {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin: 0 0 28px;
  padding: 6px 0;
  border-bottom: 1px solid var(--fg-faint);
  white-space: pre;
  overflow-x: auto;
}
.man__foot { border-bottom: 0; border-top: 1px solid var(--fg-faint); margin: 24px 0 16px; padding: 8px 0; }

/* =========================================================================
   SECTION HEADS — like real man pages, ALL CAPS bold flushed left
   ========================================================================= */

.man__sec { margin-bottom: 36px; }
.man__h {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--hl);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px dotted var(--fg-faint);
}
.man__h-sub {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--fg-mid);
  text-transform: none;
  margin-left: 8px;
}

.man__body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: normal;
}
.man__body b { color: var(--fg-strong); }
.opt { color: var(--hl); font-weight: 500; }
.arg { color: var(--fg-mid); font-style: italic; }

@media (max-width: 600px) {
  .man { padding: 24px 14px 0; font-size: 13px; }
  .man__head, .man__foot { font-size: 12px; }
}

/* =========================================================================
   ASCII PORTRAIT
   ========================================================================= */

.ascii {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.0;
  color: var(--fg);
  white-space: pre;
  overflow-x: auto;
  padding: 18px 0;
  margin: 8px 0;
  border-top: 1px dotted var(--fg-faint);
  border-bottom: 1px dotted var(--fg-faint);
  text-align: center;
  text-shadow:
    0 0 2px rgba(232, 160, 40, 0.55),
    0 0 6px rgba(232, 160, 40, 0.18);
}

.ascii .eye {
  color: var(--hl);
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(255, 197, 96, 0.6);
  animation: flicker 6s steps(2, end) infinite;
}
.ascii .mo { color: var(--fg-strong); }

@keyframes flicker {
  0%, 92%   { opacity: 1; }
  93%, 94%  { opacity: 0.55; }
  95%, 100% { opacity: 1; }
}

.caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 0;
}

@media (max-width: 700px) {
  .ascii { font-size: 8px; }
}

/* =========================================================================
   TOP(1) PROCESS TABLE
   ========================================================================= */

.top {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg);
  white-space: pre;
  overflow-x: auto;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--fg-faint);
}
.top .th {
  color: var(--hl);
  font-weight: 600;
}

/* =========================================================================
   FILES TABLE
   ========================================================================= */

.files {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre;
  overflow-x: auto;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--fg-faint);
}

@media (max-width: 700px) {
  .top, .files { font-size: 10.5px; padding: 8px 10px; }
}

/* =========================================================================
   PROMPT (the cursor line at the bottom)
   ========================================================================= */

.prompt {
  margin-top: 24px;
  padding: 8px 0 0;
  font-family: var(--vt);
  font-size: 22px;
  color: var(--fg-strong);
  letter-spacing: 0.02em;
}
.prompt__p { color: var(--fg); }
.cursor {
  display: inline-block;
  color: var(--fg-strong);
  animation: blink 1.1s steps(2, end) infinite;
  margin-left: 2px;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
