@font-face {
  font-family: "Ember Mono";
  src: url("/fonts/AmazonEmberMono_Rg.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ember Mono";
  src: url("/fonts/AmazonEmberMono_Bd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ember Display";
  src: url("/fonts/AmazonEmberDisplay_Rg.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ember Display";
  src: url("/fonts/AmazonEmberDisplay_Md.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --- Color tokens (from ciphertext.blog, swappable) --- */
:root {
  --bg:            #fbfaf7;
  --surface:       #ffffff;
  --text:          #151316;
  --text-muted:    #4d4850;
  --text-faint:    #6b6470;
  --border:        #e7e1ea;
  --border-strong: #d5cdd9;
  --accent:        #7a63d2;
  --pq-yes:        #3f9b7a;   /* accent-2: sage */
  --pq-no:         #c95f73;   /* accent-3: rose */
  --shadow:        0 1px 2px rgba(15,10,20,0.06), 0 14px 40px rgba(15,10,20,0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f0e12;
    --surface:       #151420;
    --text:          #eeedf6;
    --text-muted:    #bdb8cc;
    --text-faint:    #9a93aa;
    --border:        #2a2636;
    --border-strong: #3a334a;
    --accent:        #b8a6ff;
    --pq-yes:        #7fd5b3;  /* mint */
    --pq-no:         #ff9fb0;  /* coral */
    --shadow:        0 1px 2px rgba(0,0,0,0.25), 0 18px 60px rgba(0,0,0,0.35);
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Ember Mono", ui-monospace, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 640px;
  padding: 2rem;
}

/* --- Header --- */
.prompt {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}

h1 {
  font-family: "Ember Display", sans-serif;
  font-weight: 500;
  font-size: 1.65rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

/* --- Dashboard grid --- */
.dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow);
}

.label {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* --- Hero (PQ status) card --- */
.hero {
  grid-column: 1 / -1;
  border-left: 4px solid var(--border-strong);
  padding: 1.25rem 1.5rem;
}

.hero-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hero.pq-yes {
  border-left-color: var(--pq-yes);
}
.hero.pq-yes .hero-value {
  color: var(--pq-yes);
}

.hero.pq-no {
  border-left-color: var(--pq-no);
}
.hero.pq-no .hero-value {
  color: var(--pq-no);
}

/* --- Loading state --- */
.loading .value,
.loading .hero-value {
  color: var(--text-faint);
}

/* --- Error --- */
.error {
  margin-top: 1rem;
  color: var(--pq-no);
  font-size: 0.85rem;
}

/* --- Footer --- */
footer {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.5;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .dash { grid-template-columns: 1fr; }
}
