/* MaggotClaw Downloads, shared look (MaggotClaw App Standard section 1). Dark by default. */
:root, :root[data-theme="dark"] {
  --bg: #111316; --surface: #181A1F; --surface-2: #202329; --border: #2C3038;
  --text: #E8EAED; --muted: #A3A9B4; --subtle: #8B929E;
  --accent: #7C93F2; --accent-hover: #94A7F5; --focus: #94A7F5;
}
:root[data-theme="light"] {
  --bg: #F1F3EE; --surface: #FFFFFF; --surface-2: #E7ECE3; --border: #DCE3D6;
  --text: #14281D; --muted: #46564C; --subtle: #56665B;
  --accent: #236B34; --accent-hover: #1A5427; --focus: #2F86C4;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #F1F3EE; --surface: #FFFFFF; --surface-2: #E7ECE3; --border: #DCE3D6;
    --text: #14281D; --muted: #46564C; --subtle: #56665B;
    --accent: #236B34; --accent-hover: #1A5427; --focus: #2F86C4;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.55 Inter, "Segoe UI", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
header, main, footer { max-width: 1000px; width: 100%; margin: 0 auto; padding: 16px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font: 800 22px/1 "Bricolage Grotesque", "Segoe UI", sans-serif; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.theme { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.theme button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; min-height: 44px; min-width: 44px; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
main { flex: 1; }
h1 { font: 800 clamp(24px, 4vw, 36px)/1.15 "Bricolage Grotesque", "Segoe UI", sans-serif; letter-spacing: -0.02em; margin: 8px 0 16px; overflow-wrap: anywhere; }
nav.crumbs { color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
nav.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.meta { color: var(--subtle); font-size: 14px; margin: 0 0 12px; }
p { max-width: 62ch; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 0 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 600; height: 44px; }
th a { color: var(--muted); }
td a, th a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
td.kind, td.size, td.date { color: var(--muted); font-size: 14px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { .date { display: none; } th, td { padding: 0 8px; } }
footer { color: var(--subtle); font-size: 13px; }
footer a { color: var(--muted); }
.empty { color: var(--muted); height: 44px; }
