:root {
    --bg: #000;
    --surface: #111418;
    --surface-2: #1a1f25;
    --border: #2a2f36;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --accent: #4ea1ff;
    --accent-hover: #6db3ff;
    --danger: #ff6464;
    --success: #30d158;
    --warn: #ffcc00;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-text-size-adjust: 100%;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

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

.nav {
    display: flex;
    gap: 18px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
}
.nav a {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}
.nav a:hover { color: var(--text); }

input, button, select, textarea {
    font-family: inherit;
    font-size: 1.1rem;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
}

button {
    background: var(--accent);
    color: #00111f;
    border-color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}
button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.ghost {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border);
}
button.ghost:hover { background: var(--surface); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}
.card h2 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.metric {
    background: var(--surface-2);
    border-radius: 8px;
    padding: 10px 12px;
}
.metric .label {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.metric .value {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 4px;
}
.metric .value.big { font-size: 2.4rem; }
.metric .value.accent { color: var(--accent); }
.metric .value.warn   { color: var(--warn); }
.metric .value.danger { color: var(--danger); }
.metric .value.success { color: var(--success); }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.row > * { flex: 0 0 auto; }
.field { margin: 12px 0; }
.field label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hint  { color: var(--muted); font-size: 0.85rem; margin: 8px 0; }
.stamp { color: var(--muted); font-size: 0.8rem; }

.stale { color: var(--danger); }
.fresh { color: var(--success); }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

@media (max-width: 600px) {
    main { padding: 12px; }
    .metric .value { font-size: 1.3rem; }
    .metric .value.big { font-size: 2rem; }
}
