:root {
    --fg: #1a1a1a;
    --muted: #666;
    --bg: #fdfdfd;
    --card: #fff;
    --border: #e3e3e3;
    --accent: #0d3a78;
    --bin1: #2c7bb6;
    --bin2: #abd9e9;
    --bin3: #ffffbf;
    --bin4: #fdae61;
    --bin5: #d7191c;
}
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--fg);
    background: var(--bg);
    margin: 0;
    line-height: 1.55;
}
.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; }
header.site {
    border-bottom: 1px solid var(--border);
    background: #fff;
    padding: 18px 0;
    margin-bottom: 24px;
}
header.site .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
header.site h1 {
    margin: 0;
    font-size: 22px;
    color: var(--accent);
    letter-spacing: 0.5px;
}
header.site nav a {
    color: var(--accent);
    text-decoration: none;
    margin-left: 18px;
    font-size: 14px;
}
header.site nav a:hover { text-decoration: underline; }

h2 { color: var(--accent); margin-top: 36px; }
h3 { margin-top: 24px; }

.disclaimer {
    background: #fff8e1;
    border: 1px solid #f0d160;
    color: #5a4400;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 0 20px;
}

.headline {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    align-items: center;
    justify-content: space-between;
}
.headline .label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.headline .bin-value {
    font-size: 32px;
    font-weight: 700;
}
.headline .meta { font-size: 13px; color: var(--muted); }
.headline img.composite-spark {
    max-width: 480px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateY(-1px); }
.card .pillar-name { font-weight: 600; font-size: 15px; }
.card .pillar-key { font-size: 11px; color: var(--muted); font-family: monospace; }
.card .bin {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    align-self: flex-start;
}
.card .bin.bin1 { background: var(--bin1); }
.card .bin.bin2 { background: var(--bin2); color: #1a1a1a; }
.card .bin.bin3 { background: var(--bin3); color: #1a1a1a; }
.card .bin.bin4 { background: var(--bin4); }
.card .bin.bin5 { background: var(--bin5); }
.card .bin.none { background: #ccc; color: #555; }
.card .row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}
.card .arrow.up { color: #c0392b; }
.card .arrow.down { color: #1d6f42; }
.card .arrow.flat { color: var(--muted); }

table.history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}
table.history th, table.history td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
table.history th { background: #f6f7fa; }
table.history tr:nth-child(even) td { background: #fafbfd; }

.pillar-chart {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 16px;
}

footer {
    margin-top: 60px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

a { color: var(--accent); }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
       background: #f0f2f5; padding: 1px 5px; border-radius: 3px; font-size: 13px; }