/* Data center power and PUE calculator. Builds on subnet/tool.css for .calc,
   .lede, .result-grid, .examples and .tool-prose; everything here is specific
   to a form with five fields rather than one. */

/* Two modes, one card. The second is a different question about the same
   facility, not a different tool. */
.modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.mode-chip {
    background: var(--bg-raised, #080d16);
    border: 1px solid var(--border-solid, #182234);
    border-radius: var(--radius);
    padding: 0.4rem 0.9rem;
    color: var(--text-dim, #8e9bb0);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.mode-chip:hover {
    color: var(--text, #e8edf5);
}

.mode-chip[aria-pressed="true"] {
    background: var(--brand, #006efe);
    border-color: transparent;
    color: #fff;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.field-label {
    font-size: 0.85rem;
    color: var(--text-dim, #8e9bb0);
}

.field input,
.field select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 1.05rem;
    color: var(--text, #e8edf5);
    background: var(--bg, #02050b);
    border: 1px solid var(--border-solid, #182234);
    border-radius: var(--radius, 14px);
    -webkit-appearance: none;
    appearance: none;
}

/* The native select chrome is dropped so the control matches the inputs beside
   it, which means the caret has to be drawn back on — otherwise a dropdown is
   indistinguishable from a text field. Inlined as a data URI because the CSP
   allows data: for images and nothing else would load. */
.field select {
    font-family: var(--sans, system-ui, sans-serif);
    cursor: pointer;
    padding-right: 1.9rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%238e9bb0' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 9px 6px;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--brand-bright, #3d92ff);
    box-shadow: 0 0 0 3px #3d92ff33;
}

.field-hint {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-faint, #5b6779);
}

/* The price and the currency share a row; the currency is an afterthought and
   should not take a full column from the figures. */
.price-pair {
    display: flex;
    gap: 0.5rem;
}

.price-pair input {
    flex: 1;
    min-width: 0;
}

.price-pair select {
    flex: none;
    width: 4.6rem;
}

.form-note {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-faint, #5b6779);
}

/* The sentence the whole page is for: what the PUE multiplier does to the
   draw, said in words before it is said in a table. */
.headline {
    margin: 1.6rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-solid, #182234);
    border-left: 3px solid var(--brand-bright, #3d92ff);
    border-radius: var(--radius, 14px);
    font-size: 1rem;
    line-height: 1.6;
}

.headline strong {
    color: var(--text, #e8edf5);
}

/* A proportional bar drawn as SVG geometry rather than inline styles, because
   the site's CSP has no 'unsafe-inline' and a style attribute would be
   dropped without a word. */
.split-wrap {
    margin-top: 1.4rem;
}

.split {
    display: block;
    width: 100%;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg, #02050b);
}

.split-it { fill: var(--brand, #006efe); }
.split-overhead { fill: var(--pending, #f0a83c); }

.split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--text-dim, #8e9bb0);
}

.split-legend span::before {
    content: "";
    display: inline-block;
    width: 0.65em;
    height: 0.65em;
    border-radius: 2px;
    margin-right: 0.45em;
}

.legend-it::before { background: var(--brand, #006efe); }
.legend-overhead::before { background: var(--pending, #f0a83c); }

/* .result-grid comes from tool.css, which was written for a plain div holding
   short values. A real <dl> needs its default margin removed, and these rows
   carry a second unit underneath — so the columns are given more room before
   they are allowed to split, or "Cooling and other overhead" wraps onto three
   lines next to a value that has wrapped onto two. */
dl.result-grid {
    margin: 1.4rem 0 0;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.result dd .unit-second {
    display: block;
    font-size: 0.8rem;
    color: var(--text-faint, #5b6779);
}

.result.emphasis dd {
    font-size: 1.15rem;
    color: var(--brand-bright, #3d92ff);
}

.band {
    margin-top: 1.4rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius, 14px);
    background: var(--bg-raised, #080d16);
    border: 1px solid var(--border-solid, #182234);
}

.band-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.band-detail {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dim, #8e9bb0);
}

/* Every comparison figure on this page rests on an assumption, and the
   assumption is printed with it rather than in a footnote nobody reaches. */
.assumption {
    margin: 1.2rem 0 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-faint, #5b6779);
}

.assumption a {
    color: inherit;
}

@media (max-width: 420px) {
    .field input,
    .field select {
        font-size: 1rem;
    }

    .headline {
        font-size: 0.95rem;
    }
}
