:root {
  --md-primary-fg-color: #0A0A0A;
  --md-primary-fg-color--light: #1F1F1F;
  --md-primary-fg-color--dark: #000000;
  --md-accent-fg-color: #FF3D00;
}
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0A0A0A;
  --md-default-fg-color: #FAFAF7;
  --md-code-bg-color: #141414;
  --md-code-fg-color: #FAFAF7;
}

/* hero landing */
.doer-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem 2rem;
  gap: 1rem;
}
.doer-hero img { width: 140px; height: auto; }
.doer-hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 0.95;
}
.doer-hero h1 .accent { color: var(--md-accent-fg-color); }
.doer-hero .flow {
  font-family: var(--md-code-font-family, monospace);
  color: var(--md-default-fg-color--light);
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.doer-hero .tag {
  font-size: 1.25rem;
  max-width: 30ch;
  margin: 0.5rem auto 1rem;
}
.doer-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.doer-cta a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid var(--md-default-fg-color);
  color: var(--md-default-fg-color);
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.doer-cta a:hover { background: var(--md-default-fg-color); color: var(--md-default-bg-color); }
.doer-cta a.primary {
  background: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: #0A0A0A !important;
}
.doer-cta a.primary:hover { background: var(--md-default-fg-color); border-color: var(--md-default-fg-color); color: var(--md-default-bg-color) !important; }

/* ascii box */
.ascii-box {
  font-family: var(--md-code-font-family, monospace);
  white-space: pre;
  background: var(--md-code-bg-color);
  padding: 1.5rem;
  border-left: 4px solid var(--md-accent-fg-color);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* mobile-friendly tables */
.md-typeset table:not([class]) { font-size: 0.85rem; }

@media (max-width: 600px) {
  .doer-hero { padding: 2rem 1rem 1rem; }
  .doer-hero img { width: 100px; }
  .doer-hero .tag { font-size: 1.05rem; }
}

/* badges */
.doer-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}
.doer-badges img { height: 24px; }

/* grid cards (mkdocs-material feature) tighter */
.md-typeset .grid.cards > :is(ul, ol) > li,
.md-typeset .grid > .card {
  border-color: var(--md-default-fg-color--lightest);
  border-radius: 4px;
}
.md-typeset .grid.cards > :is(ul, ol) > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--md-accent-fg-color);
}

/* make code blocks in tables not break */
.md-typeset table code { white-space: nowrap; }

/* hero spacing on large screens */
@media (min-width: 1200px) {
  .doer-hero { padding: 4rem 1rem 3rem; }
  .doer-hero img { width: 160px; }
}

/* stronger mobile fixes */
@media (max-width: 600px) {
  /* Hero title compress */
  .doer-hero h1 { font-size: 2.5rem !important; letter-spacing: -0.02em; }
  .doer-hero .flow { font-size: 1rem; }
  .doer-hero .tag { font-size: 0.95rem; line-height: 1.5; }

  /* CTA buttons stack cleanly */
  .doer-cta {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0 1rem;
  }
  .doer-cta a { width: 100%; text-align: center; box-sizing: border-box; }

  /* ASCII box scrolls but smaller */
  .ascii-box { font-size: 0.7rem; padding: 1rem; }

  /* Badges smaller */
  .doer-badges img { height: 20px; }

  /* Tables don't overflow on tiny screens */
  .md-typeset table:not([class]) { font-size: 0.75rem; }
  .md-typeset table code { white-space: normal; word-break: break-word; }

  /* Code blocks can scroll horizontally on mobile */
  .md-typeset pre { font-size: 0.8rem; }
  .md-typeset code { word-break: break-word; }
}

/* extra tiny (<380px, old iphones SE etc.) */
@media (max-width: 380px) {
  .doer-hero h1 { font-size: 2rem !important; }
  .ascii-box { font-size: 0.6rem; padding: 0.75rem; }
}

/* ========================================= */
/* Fake terminal demo (pure CSS, no JS/asset) */
/* ========================================= */
.term {
  background: #0a0a0a;
  border-radius: 8px;
  padding: 0;
  margin: 1.5rem 0;
  font-family: var(--md-code-font-family, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  line-height: 1.55;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  color: #fafaf7;
}
.term-header {
  background: #1a1a1a;
  padding: 0.5rem 0.9rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  border-bottom: 1px solid #222;
}
.term-header .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #444;
}
.term-header .dot.red   { background: #ff5f56; }
.term-header .dot.amber { background: #ffbd2e; }
.term-header .dot.green { background: #27c93f; }
.term-header .title {
  margin-left: auto;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
}
.term-body {
  padding: 1rem 1.2rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .prompt { color: #FF3D00; font-weight: 700; }
.term-body .cmd    { color: #fafaf7; }
.term-body .out    { color: #9aa0a6; }
.term-body .ok     { color: #27c93f; }
.term-body .hl     { color: #FFBD2E; }
.term-body .cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: #FF3D00;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 600px) {
  .term { font-size: 0.7rem; }
  .term-body { padding: 0.75rem 0.9rem; }
}
