/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    /* Light palette */
    --bg:            #f5f4f0;
    --surface:       #ffffff;
    --surface-alt:   #f9f8f6;
    --border:        #e4e1db;
    --header-bg:     #1c2b3a;
    --header-text:   #ffffff;
    --accent:        #2f6fad;
    --accent-hover:  #1d4f7c;
    --text-primary:  #1a1a1a;
    --text-muted:    #888580;
    --text-disabled: #b0aba4;
    --info-bg:       #eef4fb;
    --info-border:   #2f6fad;
    --info-title:    #1d4f7c;
    --shadow:        0 2px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    --radius:        10px;
    --radius-sm:     6px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #111318;
        --surface:       #1a1e26;
        --surface-alt:   #1e2330;
        --border:        #2a2f3d;
        --header-bg:     #0d1117;
        --header-text:   #e6eaf2;
        --accent:        #5a9fd4;
        --accent-hover:  #82bae8;
        --text-primary:  #dde2ec;
        --text-muted:    #6b7280;
        --text-disabled: #4a5060;
        --info-bg:       #151c2a;
        --info-border:   #3a6fa0;
        --info-title:    #7ab8e8;
        --shadow:        0 2px 20px rgba(0,0,0,0.35), 0 1px 6px rgba(0,0,0,0.2);
    }
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 40px 16px 64px;
    transition: background-color 0.25s, color 0.25s;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
    max-width: 920px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
    background: var(--header-bg);
    padding: 36px 40px 28px;
    border-bottom: 1px solid var(--border);
}

h1#title {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    font-size: 1.85rem;
    color: var(--header-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p#subtitle {
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ─── Info Box ───────────────────────────────────────────────────────────── */
.info-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--info-bg);
    border-left: 3px solid var(--info-border);
    margin: 28px 32px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-primary);
}

.info-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-text strong {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--info-title);
    margin-bottom: 4px;
}

/* ─── Table ──────────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 32px;
    font-size: 0.875rem;
}

thead tr {
    background: var(--header-bg);
}

th {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    padding: 10px 18px;
    text-align: left;
    border: none;
}

td {
    padding: 12px 18px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    border-right: none;
    border-left: none;
    border-top: none;
}

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

tbody tr {
    background: var(--surface);
    transition: background 0.15s;
}

tbody tr.alt-row {
    background: var(--surface-alt);
}

tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

/* ─── Week Cell ──────────────────────────────────────────────────────────── */
.week-cell {
    font-family: 'DM Mono', monospace;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.week-date {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 0.01em;
}

/* ─── Links ──────────────────────────────────────────────────────────────── */
a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Disabled / greyed links */
a.grey {
    color: var(--text-disabled);
    pointer-events: none;
    font-weight: 400;
    cursor: default;
}

/* Strikethrough for "Upload N" placeholders */
a.strikethrough {
    text-decoration: line-through;
    text-decoration-color: var(--text-disabled);
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

/* ─── Lists ──────────────────────────────────────────────────────────────── */
td ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

td ul li {
    font-size: 0.83rem;
    line-height: 1.4;
}

td ul li::before {
    content: "↗ ";
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-right: 1px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    body { padding: 16px 8px 48px; }
    header { padding: 24px 20px 18px; }
    .info-box { margin: 20px 16px; }
    th, td { padding: 10px 12px; }
    h1#title { font-size: 1.25rem; }
}