/* ==========================================================================
   Personal Lab Archive — shared index chrome
   Design tokens mirror the mockup. Light + dark via prefers-color-scheme.
   ========================================================================== */

:root {
  --surface-0: #f4f3f0;
  --surface-1: #eceae5;
  --surface-2: #ffffff;
  --border: #d9d6ce;
  --border-strong: #bdb9ae;
  --text: #26241f;
  --text-secondary: #5c584f;
  --text-muted: #8f8a7e;
  --accent: #1d9e75;
  --grass-0: var(--surface-1);
  --grass-1: #9fe1cb;
  --grass-2: #5dcaa5;
  --grass-3: #1d9e75;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo,
    Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-0: #17161a;
    --surface-1: #201f26;
    --surface-2: #26252e;
    --border: #35343d;
    --border-strong: #4a4954;
    --text: #ecebf2;
    --text-secondary: #b6b4c2;
    --text-muted: #83818f;
    --accent: #5dcaa5;
    --grass-0: #26252e;
    --grass-1: #2f5f50;
    --grass-2: #3f9377;
    --grass-3: #5dcaa5;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* header --------------------------------------------------------------- */
.head { margin-bottom: 20px; }
.head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.head-title { font-size: 22px; font-weight: 600; }
.head-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.head-motto {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* stats ---------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.stat {
  background: var(--surface-1);
  border-radius: 8px;
  padding: 10px 14px;
}
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-size: 22px; font-weight: 600; }

/* grass ---------------------------------------------------------------- */
.grass-wrap { margin: 18px 0 22px; }
.grass-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.grass {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
}
.grass-cell { aspect-ratio: 1; border-radius: 2px; }

/* cards ---------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.card-thumb { display: block; width: 100%; aspect-ratio: 20 / 9; }
.card-body { padding: 10px 12px; }
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.card-title { font-size: 14px; font-weight: 600; margin-top: 2px; }
.card-oneliner {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* footer --------------------------------------------------------------- */
.foot {
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.foot a { color: var(--text-secondary); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
