/* London Refusals — Editorial Dark Design System */

:root {
    /* Surface */
    --bg: #0a0b0e;
    --surface: #14151a;
    --surface-2: #1c1d23;
    --surface-3: #25262e;

    /* Borders */
    --border: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.1);

    /* Text */
    --text: #fafafa;
    --text-2: #a0a1a7;
    --text-3: #62646b;
    --text-4: #3f4147;

    /* Brand */
    --brand: #f4ead3;
    --action: #fafafa;
    --action-text: #0a0b0e;

    /* Functional */
    --positive: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #93c5fd;

    /* Type */
    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    font-feature-settings: 'ss01', 'cv11';
}

/* Typography */
.font-serif { font-family: var(--font-serif); font-optical-sizing: auto; }
.font-mono { font-family: var(--font-mono); }
.tnum { font-feature-settings: 'tnum'; }

.headline {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-optical-sizing: auto;
    font-variation-settings: "SOFT" 50, "WONK" 0;
}

.kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* Backgrounds */
.bg-base { background: var(--bg); }
.bg-surface { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }
.bg-elevated { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); }

.grain {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.02) 1px, transparent 0);
    background-size: 22px 22px;
}

.noise::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
    z-index: 1;
}

/* Borders */
.border-subtle { border: 1px solid var(--border); }
.border-strong { border: 1px solid var(--border-strong); }
.divide-subtle > * + * { border-top: 1px solid var(--border); }

/* Components */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 999px;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--action);
    color: var(--action-text);
}
.btn-primary:hover { background: var(--text-2); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); }

.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    background: transparent;
    color: var(--text-3);
    border-radius: 8px;
}
.btn-icon:hover { color: var(--text); background: var(--surface); }

/* Input */
.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.input::placeholder { color: var(--text-4); }
.input:focus { border-color: var(--text-3); background: var(--surface-2); }

/* Stat */
.stat-num {
    font-feature-settings: 'tnum';
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Header */
.app-header {
    position: sticky; top: 0;
    z-index: 50;
    background: rgba(10, 11, 14, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

/* Nav link */
.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    transition: color 0.15s;
    text-decoration: none;
    padding: 6px 0;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }

/* Logo mark */
.logo-mark {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: var(--brand);
    color: var(--action-text);
    border-radius: 6px;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 13px;
    font-feature-settings: 'ss01';
}

/* Badge */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid var(--border);
}
.badge-positive { background: rgba(74, 222, 128, 0.1); color: var(--positive); border-color: rgba(74, 222, 128, 0.2); }
.badge-warning { background: rgba(251, 191, 36, 0.1); color: var(--warning); border-color: rgba(251, 191, 36, 0.2); }
.badge-danger { background: rgba(248, 113, 113, 0.1); color: var(--danger); border-color: rgba(248, 113, 113, 0.2); }
.badge-info { background: rgba(147, 197, 253, 0.1); color: var(--info); border-color: rgba(147, 197, 253, 0.2); }
.badge-brand { background: rgba(244, 234, 211, 0.08); color: var(--brand); border-color: rgba(244, 234, 211, 0.15); }

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

/* Scrollbar */
.scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }
.scroll-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.scroll-thin::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease-out backwards; }

@keyframes barGrow {
    from { width: 0; }
}
.bar-grow { animation: barGrow 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

/* Utilities */
.divider {
    height: 1px;
    background: var(--border);
}
.divider-vertical {
    width: 1px;
    background: var(--border);
}

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Command palette */
.cmdk-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.cmdk {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
    overflow: hidden;
}

/* Category dot colors */
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

.cat-design { background: #93c5fd; }
.cat-amenity { background: #fbbf24; }
.cat-parking { background: #c4b5fd; }
.cat-greenbelt { background: #4ade80; }
.cat-heritage { background: #fb923c; }
.cat-housing { background: #67e8f9; }
.cat-env { background: #86efac; }
.cat-overdev { background: #fb7185; }
.cat-trees { background: #bef264; }
.cat-fire { background: #f87171; }
.cat-flood { background: #7dd3fc; }
.cat-land { background: #c084fc; }
.cat-policy { background: #e2e8f0; }
