*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --background: #f8f6f2;
    --surface-soft: #efebe4;
    --text: #30312e;
    --muted: #707369;
    --border: #ddd6cb;
    --accent: #6d8c7d;
    --accent-strong: #4f6f62;
    --code: #e9e2d8;
    --code-text: #3f423b;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    width: min(100% - 2rem, 50rem);
    margin: 0 auto;
    padding: 4.5rem 0;
}

main.utilization-page {
    width: min(100% - 2rem, 68rem);
}

.hero {
    padding-bottom: 2.25rem;
}

.hero.compact {
    padding-bottom: 1.5rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 4.25rem);
    font-weight: 500;
    line-height: 1;
}

h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 650;
}

.lede {
    max-width: 42rem;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.usage,
.projects {
    padding: 2rem 0;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem 0 1.5rem;
}

.metric {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.metric .metric-label {
    margin-bottom: 0.35rem;
    color: var(--accent-strong);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.65rem;
    line-height: 1.1;
}

.utilization-section {
    padding: 1.5rem 0;
}

.bar-list {
    display: grid;
    gap: 0.85rem;
}

.bar-row-heading {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.bar-row-heading span:first-child {
    color: var(--text);
    font-weight: 650;
}

.bar-track,
.inline-bar {
    overflow: hidden;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--border);
}

.bar-fill,
.inline-bar span {
    display: block;
    height: 100%;
    background: var(--accent-strong);
}

.utilization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.utilization-table th,
.utilization-table td {
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.utilization-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.utilization-table td:nth-child(2),
.utilization-table td:nth-child(3):not(:last-child) {
    white-space: nowrap;
}

.utilization-table a {
    color: var(--accent-strong);
    font-weight: 650;
    text-decoration: none;
}

.utilization-table a:hover {
    text-decoration: underline;
}

.objects-table td:last-child {
    overflow-wrap: anywhere;
}

.shared-layer-table td:nth-child(4),
.shared-layer-table td:nth-child(5),
.shared-layer-table td:nth-child(6) {
    white-space: nowrap;
}

.shared-layer-table td:last-child {
    overflow-wrap: anywhere;
}

.inline-bar {
    width: min(12rem, 30vw);
}

.usage-grid,
.usage-grid > div {
    min-width: 0;
}

.command {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    min-width: 4.25rem;
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(250, 250, 247, 0.24);
    border-radius: 6px;
    background: rgba(250, 250, 247, 0.08);
    color: #fafaf7;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
}

.copy-button:hover {
    background: rgba(250, 250, 247, 0.14);
}

pre {
    margin: 0;
    padding: 0.9rem 5.25rem 0.9rem 0.9rem;
    border-radius: 8px;
    background: var(--code);
    color: var(--code-text);
    font-size: 0.84rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

p code {
    padding: 0.08rem 0.28rem;
    border-radius: 5px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.95em;
}

.empty {
    margin: 1rem 0 0;
    color: var(--muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    margin: 0 0.5rem 0.5rem 0;
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--accent-strong);
    font-weight: 650;
    text-decoration: none;
}

.project-link:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

body > a {
    display: block;
    width: min(100% - 2rem, 54rem);
    margin: 0.75rem auto;
    color: var(--accent-strong);
    font-weight: 650;
}

.projects > a:not(.project-link) {
    display: block;
    margin: 0.75rem 0;
    color: var(--accent-strong);
    font-weight: 650;
}

@media (max-width: 42rem) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .bar-row-heading {
        display: block;
    }

    .utilization-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .inline-bar {
        width: 8rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --background: #1f211e;
        --surface-soft: #2a2d28;
        --text: #eee9df;
        --muted: #c8bfb1;
        --border: #45483f;
        --accent: #9bb8a8;
        --accent-strong: #bfd8c9;
        --code: #11130f;
        --code-text: #eee9df;
    }

    .copy-button {
        border-color: rgba(238, 233, 223, 0.24);
        background: rgba(238, 233, 223, 0.08);
        color: #eee9df;
    }

    .copy-button:hover {
        background: rgba(238, 233, 223, 0.14);
    }
}
