/* am0muk.github.io stylesheet */
/* Supports light/dark mode via prefers-color-scheme and responsive phone width */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --badge-decision: #0284c7;
  --badge-info: #64748b;
  --chart-grid: rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0b0f17;
    --bg-card: #131b26;
    --bg-card-alt: #1a2433;
    --border-color: #243142;
    --border-focus: #384860;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --danger: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: #7f1d1d;
    --success: #4ade80;
    --success-bg: rgba(34, 197, 94, 0.12);
    --badge-decision: #38bdf8;
    --badge-info: #94a3b8;
    --chart-grid: rgba(255, 255, 255, 0.08);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-meta {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.links-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-family: var(--font-mono);
}

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

a:hover {
  text-decoration: underline;
}

section {
  margin-bottom: 4rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.info-card.full-width {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.info-body {
  font-size: 0.95rem;
  color: var(--text-main);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .metrics-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.metric-val {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.metric-val.fail {
  color: var(--danger);
}

.metric-val.pass {
  color: var(--success);
}

.metric-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.chart-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.chart-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

@media (min-width: 640px) {
  .chart-container {
    height: 320px;
  }
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-card-alt);
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:last-child td {
  border-bottom: none;
}

.num {
  text-align: right;
  font-family: var(--font-mono);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.badge-decision {
  background: rgba(2, 132, 199, 0.15);
  color: var(--badge-decision);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.badge-info {
  background: rgba(100, 116, 139, 0.15);
  color: var(--badge-info);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-fail {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.callout {
  background: var(--bg-card-alt);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
}

.callout-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

footer {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-disclaimer {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.footer-contact {
  font-family: var(--font-mono);
}

/* Section C Alert Bot */
@media (min-width: 640px) {
  .bot-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sample-alerts-block {
  margin-bottom: 1.75rem;
}

.sample-alerts-caption {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.sample-alerts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.chat-card {
  flex: 1 1 20rem;
  max-width: 28rem;
}

.chat-bubble {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  white-space: pre-line;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
  word-break: break-word;
}

.bot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-family: var(--font-mono);
  margin-top: 1rem;
}

.bot-error-note {
  color: var(--danger);
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Section C: list of defects the checks caught */
.check-list {
  margin: 0;
  padding-left: 1.2rem;
}

.check-list li {
  margin-bottom: 0.6rem;
}

.check-list li:last-child {
  margin-bottom: 0;
}

/* long repo link must wrap on phone width */
.bot-links,
.bot-links a {
  overflow-wrap: anywhere;
}
