/* Diodes and Defines — brand tokens
   Palette: Silkscreen (graphite mask / silkscreen legend / copper pad)
   The accent has exactly one job: the junction in the mark, and ".com".
   Do not use it for buttons, links, headings, or backgrounds. */

:root {
  /* core */
  --dd-mask:        #1C1E1C;  /* soldermask graphite — primary ink & dark ground */
  --dd-silkscreen:  #DDDED4;  /* legend white — type on dark */
  --dd-copper:      #C0703A;  /* accent, on dark grounds only */
  --dd-copper-dark: #9A5322;  /* accent, on light grounds (AA on paper) */
  --dd-paper:       #EDEEE7;  /* light ground */

  /* derived neutrals — green-biased so they sit beside a bare board */
  --dd-ink-2:       #4A5150;
  --dd-ink-3:       #7E8682;
  --dd-rule:        #D2D6D0;
  --dd-rule-soft:   #E3E6E1;

  /* semantic — deliberately NOT the accent */
  --dd-ok:          #2F7D52;
  --dd-warn:        #B07A16;
  --dd-crit:        #B23A2C;

  /* type */
  --dd-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --dd-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --dd-disp: "Archivo", "IBM Plex Sans", Helvetica, Arial, sans-serif;

  /* the mark reads its accent from here */
  --dd-accent: var(--dd-copper-dark);

  color-scheme: light dark;
}

/* dark ground: swap ink/paper and use the lighter copper */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --dd-paper:  #141614;
    --dd-ink-2:  #A9B0AB;
    --dd-ink-3:  #79807B;
    --dd-rule:   #2B302D;
    --dd-rule-soft: #232725;
    --dd-accent: var(--dd-copper);
  }
}
:root[data-theme="dark"] {
  --dd-paper:  #141614;
  --dd-ink-2:  #A9B0AB;
  --dd-ink-3:  #79807B;
  --dd-rule:   #2B302D;
  --dd-rule-soft: #232725;
  --dd-accent: var(--dd-copper);
}

/* ---- logo helpers ---- */
.dd-mark { width: 2rem; height: 2rem; display: block; }          /* inline the SVG, it inherits color */
.dd-lockup { display: inline-flex; align-items: center; gap: .55em; }
.dd-wordmark {
  font-family: var(--dd-mono);
  font-weight: 500;
  letter-spacing: -.02em;
  white-space: nowrap;
  line-height: 1.1;
}
.dd-wordmark .dd-and { opacity: .40; }                            /* the word-space */
.dd-wordmark .dd-tld { color: var(--dd-accent); }
.dd-wordmark--solid .dd-and { opacity: 1; }
.dd-wordmark--solid .dd-tld { color: inherit; }                   /* etch / embroider / 1-color print */

/* Below 20px the mark goes single-colour: a 2px triangle in a second
   colour reads as a compression artifact, not as a junction. */
.dd-mark--small { --dd-accent: currentColor; }
