/* ── THEME — matches HLStatsX.NET.Web site palette ── */
:root {
  --bg:            #D0D4DC;
  --surface:       #EAECF0;
  --surface-alt:   #E0E3E8;
  --accent:        #D4D8E2;
  --highlight:     #3A5570;
  --text:          #181C28;
  --muted:         #5C6678;
  --border:        #AAAEBB;
  --nav-bg:        #161C28;
  --nav-text:      #8090A4;
  --surface-hover: #C8CED8;
  --radius:        8px;
  --radius-sm:     5px;
  --shadow:        0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:     0 4px 6px rgba(15,23,42,0.07), 0 2px 4px rgba(15,23,42,0.05);
  --green:         #166534;
  --yellow:        #92400e;
  --red:           #991b1b;
  --success:       #166534;
  --success-bg:    #DCFCE7;
  --warning:       #92400E;
  --warning-bg:    #FEF3C7;
  --info:          #1E3A5F;
  --info-bg:       #DBEAFE;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--highlight); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--highlight); }

/* ── TOPBAR ── */
.hero {
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 48px;
}
.hero-brand {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
a.hero-brand,
a.hero-brand:hover { color: #fff; text-decoration: none; }
.hero-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.hero-nav a {
  color: var(--nav-text);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.hero-nav a:hover,
.hero-nav a.active { background: rgba(255,255,255,0.07); color: #fff; }

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── PAGE HEADER ── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0 1rem;
}
.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}
.page-header .subtitle {
  color: var(--muted);
  font-size: 0.88rem;
}
.date-badge {
  display: inline-block;
  background: var(--accent);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 0.75rem;
  margin-top: 8px;
}
.prealpha-badge {
  display: inline-block;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 8px;
  margin-left: 6px;
  letter-spacing: 0.03em;
}

/* ── SECTION ── */
.section { margin-top: 2rem; }
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── PROGRESS CARDS ── */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.progress-card .label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.progress-card .pct {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 10px;
  color: var(--highlight);
}
.progress-card .pct.green  { color: var(--green); }
.progress-card .pct.yellow { color: var(--yellow); }
.progress-card .pct.accent { color: var(--highlight); }
.bar-track {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 100px; }
.bar-fill.green  { background: #16a34a; }
.bar-fill.yellow { background: #d97706; }
.bar-fill.accent { background: var(--highlight); }
.delta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── NEW CARDS ── */
.new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.new-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--highlight);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow);
}
.new-card.card-green { border-left-color: #16a34a; }
.new-card.card-red   { border-left-color: #b91c1c; }
.new-card.card-amber { border-left-color: #d97706; }
.new-card .icon    { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.new-card .feature { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.new-card .detail  { font-size: 0.78rem; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.new-card .php-ref { font-size: 0.72rem; color: var(--muted); font-family: 'Consolas', monospace; margin-top: 2px; }
.new-card .commit  {
  font-size: 0.7rem; font-family: 'Consolas', monospace; color: var(--muted);
  margin-top: 5px; background: var(--accent); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 5px; display: inline-block;
}

/* ── FEATURE TABLE ── */
.feature-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  background: var(--surface);
}
.feature-table thead th {
  background: var(--accent);
  text-align: left;
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.feature-table tbody tr:nth-child(odd)  { background: var(--surface); }
.feature-table tbody tr:nth-child(even) { background: var(--surface-alt); }
.feature-table tbody tr:hover { background: var(--surface-hover); }
.feature-table td {
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.feature-table tbody tr:last-child td { border-bottom: none; }
.feature-table .php-file {
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.pct-cell { font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.pct-cell.high   { color: var(--green); }
.pct-cell.mid    { color: var(--yellow); }
.pct-cell.low    { color: var(--red); }
.pct-cell.zero   { color: var(--muted); }
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── PRIORITY ITEMS ── */
.priority-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.priority-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
}
.priority-item.p1 { border-left-color: #b91c1c; }
.priority-item.p2 { border-left-color: #d97706; }
.priority-item.p3 { border-left-color: var(--highlight); }
.priority-item.p4 { border-left-color: #16a34a; }
.priority-item .num {
  font-size: 1rem;
  font-weight: 800;
  width: 28px;
  flex-shrink: 0;
  margin-top: 1px;
}
.priority-item.p1 .num { color: #b91c1c; }
.priority-item.p2 .num { color: #d97706; }
.priority-item.p3 .num { color: var(--highlight); }
.priority-item.p4 .num { color: #16a34a; }
.priority-item .title { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.priority-item .desc  { font-size: 0.8rem; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.priority-item .desc code {
  font-family: 'Consolas', monospace; font-size: 0.85em;
  background: var(--accent); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 4px;
}

/* ── COMPONENT STATUS ── */
.component-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.8;
}

/* ── FOOTER ── */
.footer {
  background: var(--nav-bg);
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 3rem;
  text-align: center;
  color: var(--nav-text);
  font-size: 0.78rem;
  padding: 0.75rem 1.5rem;
}
.footer a { color: var(--nav-text); text-decoration: none; }
.footer a:hover { text-decoration: underline; color: #fff; }
