/* ==========================================================================
   AluminumBar.com: colour tokens and calculator-specific styles.
   Loaded after the Tool parent theme's stylesheets.
   ========================================================================== */

:root {
    /* Primary: dark anodized slate for the header and footer, steel blue for links */
    --primary-900: #17212c;
    --primary-800: #223040;
    --primary-700: #1f5f99;
    --primary-600: #2370b3;
    --primary-100: #e8f1f9;

    /* Accent: anodized red-orange, for key numbers and the result panels */
    --accent-600: #a3361b;
    --accent-500: #c2461f;
    --accent-100: #fcf0ea;

    /* Brushed metal: decoration on dark backgrounds only */
    --metal-300: #cfd8e1;
    --metal-500: #8d9aa8;

    /* Soft highlight: notes, the Amazon strip and the shop boxes */
    --highlight-300: #c9d3dd;
    --highlight-100: #f1f4f7;

    /* Surface and border */
    --surface-0: #ffffff;
    --surface-50: #f6f7f9;
    --surface-100: #eceff3;
    --border-200: #d7dde4;
    --border-300: #bec7d1;

    /* Ink: body text */
    --ink-900: #131a22;
    --ink-700: #34404d;
    --ink-500: #55616e;

    /* Text on dark backgrounds */
    --on-dark: #eef2f6;
    --on-dark-muted: #b8c3ce;

    --primary-900-rgb: 23 33 44;

    --focus-ring-on-dark: 3px solid #8cc4f2;
}

.brand__strong {
    color: var(--metal-300);
}

/* Home page head: brushed aluminum on the dark slate. */
.page-head--home {
    padding-block: 2.5rem 2rem;
    border-bottom: 0;
    background:
        repeating-linear-gradient(0deg, rgb(255 255 255 / 0.025) 0 1px, transparent 1px 3px),
        linear-gradient(170deg, rgb(207 216 225 / 0.16), transparent 55%),
        var(--primary-900);
    color: var(--on-dark);
}

.page-head--home .page-head__title {
    color: #ffffff;
}

.page-head--home .page-head__lead {
    color: var(--on-dark-muted);
}

/* Calculator extras ------------------------------------------------------- */

.field__help {
    color: var(--ink-500);
    font-size: 0.85rem;
    line-height: 1.45;
}

.tool textarea {
    width: 100%;
    min-height: 7rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border-300);
    border-radius: var(--radius);
    background: var(--surface-0);
    color: var(--ink-900);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
}

.tool textarea:hover {
    border-color: var(--ink-500);
}

.tool__more {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-200);
    border-radius: var(--radius);
    background: var(--surface-50);
}

.tool__more summary {
    color: var(--primary-700);
    font-weight: 700;
    cursor: pointer;
}

.tool__more[open] summary {
    margin-bottom: 0.75rem;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: start;
    min-height: 2.75rem;
    color: var(--ink-900);
    font-weight: 600;
    cursor: pointer;
}

.tool input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--primary-700);
}

/* Result tables (weight chart, alloy comparison) --------------------------- */

/* Let wide tables scroll inside their box instead of widening the page. */
.tool > * {
    min-width: 0;
}

.tool .table-wrap {
    margin-top: 0;
    border: 1px solid var(--border-200);
    border-radius: var(--radius);
}

.tool .table-wrap:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 2px;
}

.tool .result-table caption {
    padding: 0.6rem 0.6rem 0.2rem;
    color: var(--ink-900);
    font-weight: 700;
    text-align: left;
}

.tool .result-table th[scope="row"] {
    color: var(--ink-900);
    font-weight: 600;
}

.tool .result-table td.is-better {
    color: var(--accent-600);
    font-weight: 700;
}

.tool .result-table td.is-wrap {
    font-family: var(--font-sans);
    white-space: normal;
    min-width: 12rem;
}

/* Calculator card icons ---------------------------------------------------- */

.tool-card__icon {
    background: linear-gradient(180deg, #f4f7fa, #aab6c3 55%, #dfe5eb);
    color: var(--primary-900);
}

.tool-card__icon--weight::before { content: "lb"; font-size: 1rem; }
.tool-card__icon--chart::before { content: "kg/m"; font-size: 0.7rem; }
.tool-card__icon--busbar::before { content: "A"; font-size: 1.15rem; }
.tool-card__icon--deflection::before { content: "δ"; font-size: 1.3rem; }
.tool-card__icon--alloys::before { content: "6061"; font-size: 0.68rem; }
.tool-card__icon--expansion::before { content: "ΔL"; font-size: 0.95rem; }
.tool-card__icon--cutlist::before { content: "✂"; font-size: 1.2rem; }
.tool-card__icon--speeds::before { content: "rpm"; font-size: 0.8rem; }
