/* ============================================================
   EC SINGLE CALCULATOR — v4.0
   Professional engineering application UI
   Requires: ec-tokens.css, ec-base.css
   ============================================================ */

/* ------------------------------------------------------------
   PAGE / RESET
------------------------------------------------------------ */
.ec-single-calculator,
.ec-single-calculator * {
    box-sizing: border-box;
}

.ec-single-calculator {
    background: var(--ec-bg-off);
    color: var(--ec-black);
}

.ec-single-calculator .ec-container {
    width: 100%;
    max-width: var(--ec-max-width);
    margin-inline: auto;
    padding-inline: 24px;
}

.ec-single-calculator .ec-calculator-content {
    max-width: var(--ec-max-width);
    margin: 0 auto;
    padding-top: 38px;
    padding-bottom: 88px;
}

body.single-calculator .entry-header,
body.single-calculator .ct-post-title,
body.single-calculator .ct-breadcrumbs {
    display: none !important;
}

body.single-calculator .ec-category-nav-wrap {
    display: none !important;
}

/* ------------------------------------------------------------
   ACCESSIBILITY
------------------------------------------------------------ */
.ec-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ec-calculator button:focus-visible,
.ec-calculator a:focus-visible,
.ec-calculator input:focus-visible,
.ec-calculator select:focus-visible,
.ec-calculator textarea:focus-visible,
.ec-single-calculator .ec-breadcrumbs a:focus-visible,
.ec-single-calculator .ec-single-kicker:focus-visible {
    outline: 2px solid var(--ec-red);
    outline-offset: 3px;
}

/* ------------------------------------------------------------
   HERO / TOOL IDENTITY
------------------------------------------------------------ */
.ec-single-hero {
    position: relative;
    overflow: hidden;
    padding: 26px 0 38px;
    border-bottom: 1px solid var(--ec-border);
    background:
        linear-gradient(rgba(15, 23, 42, .024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .024) 1px, transparent 1px),
        var(--ec-bg);
    background-size: 32px 32px, 32px 32px, auto;
}

.ec-single-hero::after {
    content: "";
    position: absolute;
    top: -180px;
    right: -110px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 46, 46, .075), transparent 68%);
    pointer-events: none;
}

.ec-breadcrumbs {
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

.ec-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: var(--ec-faint);
    font-size: var(--ec-font-sm);
    line-height: 1.4;
}

.ec-breadcrumbs-list a {
    color: var(--ec-muted);
    text-decoration: none;
    transition: color .15s ease;
}

.ec-breadcrumbs-list a:hover {
    color: var(--ec-red);
}

.ec-single-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 56px;
    align-items: end;
}

.ec-single-hero-copy {
    max-width: 850px;
}

.ec-single-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 10px;
    border: 1px solid var(--ec-red-border);
    border-radius: var(--ec-radius-pill);
    background: var(--ec-red-soft);
    color: var(--ec-red);
    font-size: var(--ec-font-xs);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}

.ec-single-title {
    max-width: 900px;
    margin: 0;
    color: var(--ec-black);
    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 850;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.ec-single-summary {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--ec-muted);
    font-size: 18px;
    line-height: 1.65;
}

.ec-single-trustline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    color: var(--ec-soft);
    font-size: var(--ec-font-sm);
    font-weight: 650;
}

.ec-single-trustline span:nth-child(even) {
    color: var(--ec-border-strong);
}

.ec-single-hero-meta {
    padding-left: 24px;
    border-left: 1px solid var(--ec-border);
}

.ec-tool-meta-row {
    display: grid;
    gap: 4px;
    padding: 11px 0;
    border-bottom: 1px solid var(--ec-border-light);
    font-size: var(--ec-font-md);
}

.ec-tool-meta-row:last-child {
    border-bottom: 0;
}

.ec-tool-meta-label {
    color: var(--ec-faint);
    font-size: var(--ec-font-xs);
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ec-tool-meta-row strong,
.ec-tool-meta-row a {
    color: var(--ec-slate);
    font-weight: 700;
    text-decoration: none;
}

.ec-tool-meta-row a:hover {
    color: var(--ec-red);
}

/* ------------------------------------------------------------
   CALCULATOR APPLICATION SHELL
------------------------------------------------------------ */
.ec-calculator {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    background: transparent;
}

.ec-workbench {
    overflow: hidden;
    border: 1px solid var(--ec-border);
    border-radius: 24px;
    background: var(--ec-bg);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03),
        0 12px 34px rgba(15, 23, 42, .075);
}

.ec-workbench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ec-border);
    background: var(--ec-bg);
}

.ec-workbench-heading {
    min-width: 0;
}

.ec-workbench-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--ec-red);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ec-workbench-title {
    margin: 0;
    color: var(--ec-black);
    font-size: 16px;
    font-weight: 760;
    line-height: 1.35;
    letter-spacing: -.012em;
}

.ec-workbench-method {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-pill);
    background: var(--ec-bg-subtle);
    color: var(--ec-muted);
    font-size: 11px;
    font-weight: 700;
}

.ec-workbench-method-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ec-success);
    box-shadow: 0 0 0 3px var(--ec-success-bg);
}

/* ------------------------------------------------------------
   APPLICATION GRID
   Important: results no longer stretch into a full-height dark wall.
------------------------------------------------------------ */
body.single-calculator .ec-calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    gap: 24px;
    align-items: start;
    max-width: none;
    margin: 0;
    padding: 24px;
    background: var(--ec-bg-subtle);
}

.ec-calc-inputs,
.ec-calc-result {
    min-width: 0;
}

.ec-calc-inputs {
    padding: 4px 4px 2px;
    border: 0;
    background: transparent;
}

.ec-calc-result {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    background: #111827;
    color: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .03) inset,
        0 18px 34px rgba(15, 23, 42, .16);
}

.ec-calc-result::before {
    content: "";
    position: absolute;
    top: -170px;
    right: -150px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 46, 46, .13), transparent 67%);
    pointer-events: none;
}

@media (min-width: 901px) {
    .ec-calc-result {
        position: sticky;
        top: calc(var(--ec-header-offset-desktop) + var(--ec-admin-bar) + 18px);
        align-self: start;
    }
}

/* ------------------------------------------------------------
   PANEL HEADERS
------------------------------------------------------------ */
.ec-panel-heading,
.ec-result-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.ec-panel-heading-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.ec-panel-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ec-border-light);
    border-radius: 9px;
    background: var(--ec-bg);
    color: var(--ec-faint);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
}

.ec-panel-index--dark {
    border-color: rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .64);
}

.ec-panel-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--ec-faint);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ec-panel-eyebrow--dark {
    color: rgba(255, 255, 255, .42);
}

.ec-panel-heading h2,
.ec-result-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 820;
    line-height: 1.22;
    letter-spacing: -.022em;
}

.ec-panel-heading h2 {
    color: var(--ec-black);
}

.ec-result-header h2 {
    color: #fff;
}

.ec-panel-heading > p {
    max-width: 220px;
    margin: 3px 0 0;
    color: var(--ec-soft);
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
}

.ec-result-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--ec-radius-pill);
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .58);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ec-result-live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #86efac;
}

/* ------------------------------------------------------------
   OPTIONAL ENGINEERING DIAGRAM
------------------------------------------------------------ */
.ec-calculator-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--ec-border-light);
    border-radius: 14px;
    background: var(--ec-bg);
}

.ec-calculator-diagram-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

/* ------------------------------------------------------------
   INPUT GROUPS — PROFESSIONAL APPLICATION SURFACES
------------------------------------------------------------ */
.ec-inputs-body {
    display: grid;
    gap: 13px;
}

.ec-input-block {
    position: relative;
    margin: 0;
    padding: 17px 18px 18px;
    border: 1px solid var(--ec-border-light);
    border-radius: 14px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 1px 1px rgba(15, 23, 42, .018);
}

.ec-input-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, .055), transparent);
    opacity: 0;
}

.ec-input-block h3 {
    max-width: none;
    margin: 0 0 14px;
    color: var(--ec-black);
    font-size: 13px;
    font-weight: 820;
    line-height: 1.3;
    letter-spacing: -.012em;
}

.ec-input-block > h3 + * {
    margin-top: 0;
}

.ec-input-label,
.ec-input-group > label,
.ec-input-block > label {
    display: block;
    margin: 0 0 6px;
    color: var(--ec-slate);
    font-size: 11px;
    font-weight: 720;
    line-height: 1.35;
}

.ec-input-label strong,
.ec-input-group > label strong,
.ec-input-block > label strong {
    color: var(--ec-black);
}

/* Standard input + unit component */
.ec-input-with-unit,
.ec-input-group {
    --ec-unit-width: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--ec-unit-width);
    gap: 0;
    align-items: stretch;
    width: 100%;
    margin-bottom: 10px;
}

.ec-input-group:last-child,
.ec-input-with-unit:last-child {
    margin-bottom: 0;
}

.ec-input-group > label {
    grid-column: 1 / -1;
}

.ec-input-with-unit input,
.ec-input-with-unit select,
.ec-input-group > .ec-input,
.ec-input-group > .ec-unit-select,
.ec-input.ec-input--numeric,
.ec-input.ec-input--select {
    height: 44px;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--ec-border-strong);
    background: #fff;
    color: var(--ec-black);
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.ec-input-with-unit input,
.ec-input-group > .ec-input,
.ec-input.ec-input--numeric,
.ec-input.ec-input--select {
    width: 100%;
    padding: 0 13px;
    border-radius: 10px 0 0 10px;
}

.ec-input-with-unit select,
.ec-input-group > .ec-unit-select {
    width: 100%;
    padding: 0 28px 0 11px;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background-color: var(--ec-bg-subtle);
    color: var(--ec-slate);
    font-size: 11px;
    font-weight: 720;
    cursor: pointer;
}

/* Standalone input/select fallback */
.ec-input-block > input:not([type="radio"]):not([type="checkbox"]),
.ec-input-block > select,
.ec-input-block > textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--ec-border-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ec-black);
    font-family: inherit;
    font-size: 13px;
}

.ec-input-with-unit input::placeholder,
.ec-input-group > .ec-input::placeholder,
.ec-input-block input::placeholder {
    color: #9aa4b2;
    opacity: 1;
}

.ec-input-with-unit:focus-within input,
.ec-input-with-unit:focus-within select,
.ec-input-group:focus-within > .ec-input,
.ec-input-group:focus-within > .ec-unit-select {
    border-color: rgba(207, 46, 46, .55);
}

.ec-input-with-unit:focus-within,
.ec-input-group:focus-within {
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(207, 46, 46, .08);
}

.ec-input-with-unit input:focus,
.ec-input-with-unit select:focus,
.ec-input-group > .ec-input:focus,
.ec-input-group > .ec-unit-select:focus {
    outline: none;
    box-shadow: none;
}

/* ------------------------------------------------------------
   RADIO / MODE SELECTORS — SELECTABLE APPLICATION CARDS
------------------------------------------------------------ */
.ec-radio-group {
    display: grid;
    gap: 8px;
}

.ec-radio-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--ec-border);
    border-radius: 10px;
    background: #fff;
    color: var(--ec-slate);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    cursor: pointer;
    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease,
        color .15s ease;
}

.ec-radio-option:hover {
    border-color: var(--ec-border-strong);
    background: var(--ec-bg-subtle);
}

.ec-radio-option:has(input[type="radio"]:checked),
.ec-radio-option.is-selected {
    border-color: rgba(207, 46, 46, .45);
    background: var(--ec-red-soft);
    color: var(--ec-black);
    box-shadow: 0 0 0 2px rgba(207, 46, 46, .055);
}

.ec-radio-option input[type="radio"] {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin: 0;
    margin-top: 0;
    accent-color: var(--ec-red);
}

/* ------------------------------------------------------------
   INPUT VALIDATION
------------------------------------------------------------ */
.ec-input--error {
    border-color: var(--ec-danger) !important;
    background: var(--ec-danger-bg) !important;
}

.ec-input-block--error {
    border-color: var(--ec-danger) !important;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, .08);
}

.ec-error {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid var(--ec-danger-light);
    border-radius: 9px;
    background: var(--ec-danger-bg);
    color: var(--ec-danger);
    font-size: 11px;
    line-height: 1.45;
}

/* ------------------------------------------------------------
   INPUT ACTIONS
------------------------------------------------------------ */
.ec-calc-input-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 18px;
}

.ec-calc-input-actions button {
    min-height: 46px;
    margin: 0;
    font-size: 12px;
    font-weight: 780;
}

.ec-calc-input-actions .ec-calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0 17px;
    border-radius: 10px;
    background: var(--ec-red);
    box-shadow: 0 5px 14px rgba(207, 46, 46, .16);
}

.ec-calc-input-actions .ec-calc-btn:hover {
    background: var(--ec-red-dark);
    box-shadow: 0 7px 18px rgba(207, 46, 46, .20);
}

.ec-action-arrow {
    font-size: 15px;
    line-height: 1;
}

.ec-reset-btn {
    min-width: 82px;
    padding: 0 15px !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--ec-slate) !important;
}

.ec-reset-btn:hover {
    border-color: var(--ec-border-strong) !important;
    background: var(--ec-bg-panel) !important;
    color: var(--ec-black) !important;
}

.ec-calc-utilities {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.ec-utility-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: var(--ec-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: color .15s ease;
}

.ec-utility-btn:hover {
    color: var(--ec-red);
}

.ec-utility-icon {
    font-size: 12px;
}

/* ------------------------------------------------------------
   RESULT EMPTY STATE
------------------------------------------------------------ */
.ec-result-empty-state {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 13px;
    background: rgba(255, 255, 255, .055);
}

.ec-result-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .075);
    color: rgba(255, 255, 255, .76);
    font-size: 17px;
    font-weight: 750;
}

.ec-result-empty-state strong,
.ec-result-empty-state span:not(.ec-result-empty-icon) {
    display: block;
}

.ec-result-empty-state strong {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 760;
}

.ec-result-empty-state div > span {
    color: rgba(255, 255, 255, .47);
    font-size: 10px;
    line-height: 1.45;
}

.ec-calc-result.has-result .ec-result-empty-state {
    display: none;
}

/* Hide placeholder result scaffolding before first calculation. */
.ec-calc-result:not(.has-result) .ec-result-primary,
.ec-calc-result:not(.has-result) .ec-result-secondary,
.ec-calc-result:not(.has-result) .ec-result-interpretation,
.ec-calc-result:not(.has-result) .ec-result-decision {
    display: none !important;
}

/* ------------------------------------------------------------
   PRIMARY RESULT
------------------------------------------------------------ */
.ec-result-primary {
    position: relative;
    z-index: 1;
    padding: 20px 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.ec-result-primary + .ec-result-primary {
    padding-top: 18px;
}

.ec-result-label {
    min-height: 1em;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, .52);
    font-size: 10px;
    font-weight: 760;
    line-height: 1.4;
    letter-spacing: .015em;
}

.ec-result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.ec-result-value {
    min-width: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.ec-result-primary:first-of-type .ec-result-value,
.ec-calc-result > .ec-result-primary:first-of-type .ec-result-value {
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 830;
    letter-spacing: -.04em;
}

.ec-result-unit {
    width: auto;
    min-width: 0;
    height: 34px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
    font-weight: 720;
}

.ec-result-unit-select {
    max-width: 110px;
    height: 34px;
    padding: 0 26px 0 9px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: #182235;
    color: rgba(255, 255, 255, .88);
    font-size: 10px;
    font-weight: 700;
}

.ec-result-note {
    margin-top: 9px;
    color: rgba(255, 255, 255, .44);
    font-size: 10px;
    line-height: 1.5;
}

/* ------------------------------------------------------------
   SECONDARY RESULTS
------------------------------------------------------------ */
.ec-result-secondary {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
    margin-top: 8px;
    padding: 4px 0 0;
}

.ec-result-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.ec-result-item:last-child {
    border-bottom: 0;
}

.ec-result-item-label {
    min-width: 0;
    color: rgba(255, 255, 255, .52);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
}

.ec-result-item-value {
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.35;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ec-result-item--block {
    grid-template-columns: 1fr;
}

.ec-result-item--block .ec-result-item-value {
    margin-top: 4px;
    text-align: left;
}

.ec-result-detail {
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(248, 113, 113, .30);
    border-radius: 10px;
    background: rgba(185, 28, 28, .09);
    color: #fca5a5;
    font-size: 10px;
    line-height: 1.5;
    white-space: pre-line;
}

/* ------------------------------------------------------------
   LIVE INTERPRETATION / DECISION
------------------------------------------------------------ */
.ec-result-interpretation,
.ec-result-decision {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 11px;
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
    font-weight: 620;
    line-height: 1.55;
}

.ec-result-interpretation.is-safe {
    border-color: rgba(74, 222, 128, .22);
    background: rgba(22, 163, 74, .11);
    color: #bbf7d0;
}

.ec-result-interpretation.is-limit,
.ec-result-interpretation.is-warning {
    border-color: rgba(251, 191, 36, .23);
    background: rgba(245, 158, 11, .10);
    color: #fde68a;
}

.ec-result-interpretation.is-unsafe,
.ec-result-interpretation.is-invalid {
    border-color: rgba(248, 113, 113, .25);
    background: rgba(185, 28, 28, .12);
    color: #fecaca;
}

/* ------------------------------------------------------------
   RESULT UTILITY BAR
------------------------------------------------------------ */
.ec-calc-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, .075);
}

.ec-result-utility-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: color .15s ease;
}

.ec-result-utility-btn:hover {
    color: #fff;
}

.ec-calc-result:not(.has-result) .ec-calc-actions {
    display: none;
}

/* ------------------------------------------------------------
   ENGINEERING PRO
------------------------------------------------------------ */
.ec-premium-block {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
}

.ec-premium-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    list-style: none;
    cursor: pointer;
}

.ec-premium-summary::-webkit-details-marker {
    display: none;
}

.ec-premium-summary-copy {
    min-width: 0;
}

.ec-premium-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #fbbf24;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ec-premium-summary strong {
    display: block;
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
    font-weight: 720;
    line-height: 1.4;
}

.ec-premium-summary-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .055);
    color: rgba(255, 255, 255, .58);
    font-size: 16px;
    line-height: 1;
    transition: transform .2s ease;
}

.ec-premium-block[open] .ec-premium-summary-arrow {
    transform: rotate(45deg);
}

.ec-premium-content {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, .075);
}

.ec-premium-content p {
    margin: 12px 0;
    color: rgba(255, 255, 255, .48);
    font-size: 10px;
    line-height: 1.55;
}

.ec-premium-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.ec-premium-btn {
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .73);
    font-size: 9px;
    font-weight: 680;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ec-premium-btn:hover {
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .075);
    color: #fff;
}

.ec-premium-btn--primary {
    grid-column: 1 / -1;
    border-color: rgba(251, 191, 36, .24);
    background: rgba(251, 191, 36, .065);
    color: rgba(255, 255, 255, .9);
}

/* ------------------------------------------------------------
   ENGINEERING REFERENCE WRAPPER
------------------------------------------------------------ */
.ec-calc-extra {
    width: 100%;
    max-width: 940px;
    margin: 72px auto 0;
}

.ec-documentation-header {
    max-width: 760px;
    margin-bottom: 42px;
}

.ec-documentation-header .ec-section-kicker {
    margin-bottom: 12px;
}

.ec-documentation-header > h2 {
    margin: 0;
    color: var(--ec-black);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 830;
    line-height: 1.14;
    letter-spacing: -.035em;
}

.ec-documentation-header > p {
    max-width: 720px;
    margin: 13px 0 0;
    color: var(--ec-muted);
    font-size: var(--ec-font-xl);
    line-height: 1.65;
}

/* ------------------------------------------------------------
   REFERENCE SECTIONS
------------------------------------------------------------ */
.ec-doc-section {
    margin-top: 46px;
}

.ec-doc-heading {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 15px;
}

.ec-doc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--ec-border);
    border-radius: 10px;
    background: var(--ec-bg);
    color: var(--ec-faint);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .03em;
}

.ec-doc-kicker {
    display: block;
    margin: 1px 0 3px;
    color: var(--ec-red);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ec-doc-heading h2 {
    margin: 0;
    color: var(--ec-black);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.025em;
}

/* ------------------------------------------------------------
   ALL ACF CONTENT FIELDS — ONE UNIFIED FORMULA STYLE
   formula_html
   usage_html
   interpretation_html
   example_html
   assumptions_html
   reference_html
   standards_html
   validation_html
   faq_html shell
------------------------------------------------------------ */
.ec-content-box,
.ec-reference-box,
.ec-formula-box,
.ec-usage-box,
.ec-interpretation-box,
.ec-example-box,
.ec-assumptions-box,
.ec-references-box,
.ec-standards-box,
.ec-validation-box,
.ec-faq-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px 26px;
    overflow-x: auto;
    border: 1px solid var(--ec-border-strong);
    border-radius: 16px;
    background:
        linear-gradient(rgba(15, 23, 42, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .018) 1px, transparent 1px),
        var(--ec-bg);
    background-size: 24px 24px, 24px 24px, auto;
    color: var(--ec-slate);
    font-family: inherit;
    font-size: var(--ec-font-size-content);
    line-height: 1.7;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .015);
}

/* Explicitly neutralize the old per-field special treatments. */
.ec-interpretation-box,
.ec-example-box,
.ec-assumptions-box,
.ec-usage-box,
.ec-references-box,
.ec-standards-box,
.ec-validation-box {
    border-left: 1px solid var(--ec-border-strong);
}

.ec-content-box > :first-child,
.ec-reference-box > :first-child {
    margin-top: 0;
}

.ec-content-box > :last-child,
.ec-reference-box > :last-child {
    margin-bottom: 0;
}

.ec-content-box p,
.ec-content-box li,
.ec-reference-box p,
.ec-reference-box li {
    line-height: 1.7;
}

.ec-content-box ul,
.ec-content-box ol,
.ec-reference-box ul,
.ec-reference-box ol {
    padding-left: 21px;
}

.ec-content-box li + li,
.ec-reference-box li + li {
    margin-top: 6px;
}

.ec-content-box h3,
.ec-reference-box h3 {
    max-width: none;
    margin: 24px 0 9px;
    color: var(--ec-black);
    font-size: 17px;
    font-weight: 760;
}

.ec-content-box h4,
.ec-reference-box h4 {
    margin: 19px 0 8px;
    color: var(--ec-black);
    font-size: 15px;
    font-weight: 760;
}

.ec-content-box table,
.ec-reference-box table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--ec-font-md);
}

.ec-content-box th,
.ec-content-box td,
.ec-reference-box th,
.ec-reference-box td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ec-border-light);
    text-align: left;
}

.ec-content-box th,
.ec-reference-box th {
    background: rgba(248, 250, 252, .86);
    color: var(--ec-black);
    font-weight: 760;
}

.ec-content-box code,
.ec-reference-box code {
    padding: 2px 5px;
    border: 1px solid var(--ec-border-light);
    border-radius: 5px;
    background: var(--ec-bg-subtle);
    color: var(--ec-black);
    font-size: .92em;
}

.ec-calc-formula-latex {
    color: var(--ec-black);
}

.ec-calc-formula-latex ul {
    margin-left: 18px;
}

.ec-calc-formula-latex li {
    margin-bottom: 6px;
}

/* ------------------------------------------------------------
   FAQ INSIDE THE SAME FORMULA-STYLE SHELL
------------------------------------------------------------ */
.ec-faq-shell .ec-faq-list {
    margin: 0;
}

.ec-faq-shell .ec-faq-item {
    margin: 0;
    padding: 17px 0;
    border: 0;
    border-bottom: 1px solid var(--ec-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ec-faq-shell .ec-faq-item:first-child {
    padding-top: 0;
}

.ec-faq-shell .ec-faq-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ec-faq-shell .ec-faq-q {
    color: var(--ec-black);
    font-size: 15px;
    font-weight: 760;
}

.ec-faq-shell .ec-faq-a {
    color: var(--ec-muted);
    font-size: var(--ec-font-size-content);
    line-height: 1.7;
}

/* Support category-style FAQ markup too. */
.ec-faq-shell .ec-accordion {
    border-top: 0;
}

.ec-faq-shell .ec-acc-item:last-child {
    border-bottom: 0;
}

/* ------------------------------------------------------------
   USER NOTES
------------------------------------------------------------ */
.ec-user-notes {
    margin-top: 42px;
    border: 1px solid var(--ec-border);
    border-radius: 14px;
    background: var(--ec-bg);
}

.ec-user-notes > summary {
    position: relative;
    padding: 14px 44px 14px 16px;
    list-style: none;
    color: var(--ec-slate);
    font-size: var(--ec-font-md);
    font-weight: 720;
    cursor: pointer;
}

.ec-user-notes > summary::-webkit-details-marker {
    display: none;
}

.ec-user-notes > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--ec-faint);
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.ec-user-notes[open] > summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.ec-user-notes-body {
    padding: 0 16px 16px;
}

.ec-user-notes textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 12px 13px;
    border: 1px solid var(--ec-border);
    border-radius: 10px;
    background: var(--ec-bg-subtle);
    color: var(--ec-black);
    font-family: inherit;
    font-size: var(--ec-font-size-content);
    line-height: 1.6;
}

/* ------------------------------------------------------------
   RELATED TOOLS
------------------------------------------------------------ */
.ec-related-tools {
    margin-top: 50px;
}

.ec-related-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ec-related-link {
    display: flex;
    min-width: 0;
    min-height: 190px;
    flex-direction: column;
    padding: 19px;
    border: 1px solid var(--ec-border);
    border-radius: 14px;
    background: var(--ec-bg);
    color: var(--ec-black);
    text-decoration: none;
    box-shadow: var(--ec-shadow-sm);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ec-related-link:hover {
    transform: translateY(-2px);
    border-color: var(--ec-red-border-md);
    box-shadow: var(--ec-shadow-md);
    color: var(--ec-black);
}

.ec-related-link::before {
    content: none;
}

.ec-related-link-kicker {
    margin-bottom: 9px;
    color: var(--ec-red);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ec-related-link strong {
    color: var(--ec-black);
    font-size: 16px;
    line-height: 1.32;
    letter-spacing: -.015em;
}

.ec-related-link-desc {
    display: -webkit-box;
    margin-top: 9px;
    overflow: hidden;
    color: var(--ec-muted);
    font-size: var(--ec-font-sm);
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ec-related-link-action {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--ec-red);
    font-size: var(--ec-font-sm);
    font-weight: 750;
}

/* ------------------------------------------------------------
   FEEDBACK / ENGINEERING NOTICE
------------------------------------------------------------ */
.ec-page-utility-footer {
    margin-top: 54px;
    padding-top: 22px;
    border-top: 1px solid var(--ec-border);
}

.ec-helpful {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--ec-slate);
    font-size: var(--ec-font-md);
}

.ec-helpful-label {
    font-weight: 700;
}

.ec-helpful-actions {
    display: flex;
    gap: 7px;
}

.ec-helpful button {
    min-width: 54px;
    padding: 7px 11px;
    border: 1px solid var(--ec-border);
    border-radius: 8px;
    background: var(--ec-bg);
    color: var(--ec-muted);
    font-size: var(--ec-font-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ec-helpful button:hover {
    border-color: var(--ec-border-strong);
    background: var(--ec-bg-subtle);
    color: var(--ec-black);
}

.ec-vote-count {
    display: none;
}

.ec-helpful.is-voted button {
    opacity: .45;
    pointer-events: none;
}

.ec-helpful.is-voted::after {
    content: "Thanks for your feedback.";
    margin-left: 4px;
    color: var(--ec-success);
    font-size: var(--ec-font-sm);
    font-weight: 650;
}

.ec-mini-disclaimer {
    max-width: 800px;
    margin-top: 22px;
    padding: 13px 15px;
    border-left: 2px solid var(--ec-border-strong);
    background: var(--ec-bg-subtle);
    color: var(--ec-soft);
    font-size: var(--ec-font-sm);
    line-height: 1.6;
}

.ec-mini-disclaimer strong {
    color: var(--ec-slate);
}

/* ------------------------------------------------------------
   LEGACY / ENGINE COMPATIBILITY
------------------------------------------------------------ */
.ec-calc-formula {
    color: var(--ec-slate);
    line-height: 1.7;
}

.ec-calc-formula ul {
    margin-left: 18px;
}

.ec-calc-formula li {
    margin-bottom: 6px;
}

.ec-calc-interpretation {
    max-width: 940px;
    margin: 48px auto 0;
}

.ec-calc-tagline {
    margin-bottom: 16px;
    color: var(--ec-muted);
    font-size: var(--ec-font-lg);
}

.ec-calculator-error {
    padding: 14px 16px;
    border: 1px solid var(--ec-danger-light);
    border-radius: 10px;
    background: var(--ec-danger-bg);
    color: var(--ec-danger);
    font-size: var(--ec-font-md);
}

.ec-preload .ec-input-block {
    position: relative;
    overflow: hidden;
}

/* ------------------------------------------------------------
   TABLET
------------------------------------------------------------ */
@media (max-width: 1080px) {
    .ec-single-hero-grid {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 36px;
    }

    body.single-calculator .ec-calc-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
        gap: 18px;
        padding: 20px;
    }

    .ec-calc-result {
        padding: 21px;
    }

    .ec-related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ------------------------------------------------------------
   NARROW TABLET / MOBILE
------------------------------------------------------------ */
@media (max-width: 900px) {
    .ec-single-hero {
        padding: 22px 0 30px;
    }

    .ec-breadcrumbs {
        margin-bottom: 22px;
    }

    .ec-single-hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ec-single-hero-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 15px 0 0;
        border-top: 1px solid var(--ec-border);
        border-left: 0;
    }

    .ec-tool-meta-row {
        padding: 8px 14px 8px 0;
        border-right: 1px solid var(--ec-border-light);
        border-bottom: 0;
    }

    .ec-tool-meta-row:last-child {
        border-right: 0;
    }

    .ec-single-calculator .ec-calculator-content {
        padding-top: 26px;
        padding-bottom: 64px;
    }

    .ec-workbench {
        border-radius: 20px;
    }

    body.single-calculator .ec-calc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ec-calc-result {
        position: static;
        width: 100%;
    }

    .ec-calc-extra {
        margin-top: 58px;
    }
}

/* ------------------------------------------------------------
   SMALL MOBILE
------------------------------------------------------------ */
@media (max-width: 640px) {
    .ec-single-calculator .ec-container {
        padding-inline: 16px;
    }

    .ec-single-title {
        font-size: clamp(30px, 9vw, 38px);
        letter-spacing: -.038em;
    }

    .ec-single-summary {
        margin-top: 14px;
        font-size: 16px;
        line-height: 1.58;
    }

    .ec-single-trustline {
        gap: 7px;
        margin-top: 18px;
        font-size: 11px;
    }

    .ec-single-hero-meta {
        grid-template-columns: 1fr;
    }

    .ec-tool-meta-row {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 0;
        border-right: 0;
        border-bottom: 1px solid var(--ec-border-light);
    }

    .ec-tool-meta-row:last-child {
        border-bottom: 0;
    }

    .ec-workbench-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px 18px;
    }

    body.single-calculator .ec-calc-grid {
        gap: 16px;
        padding: 16px;
    }

    .ec-calc-inputs {
        padding: 0;
    }

    .ec-calc-result {
        padding: 20px 18px;
        border-radius: 16px;
    }

    .ec-panel-heading,
    .ec-result-header {
        margin-bottom: 20px;
    }

    .ec-panel-heading {
        display: block;
    }

    .ec-panel-heading > p {
        max-width: none;
        margin: 10px 0 0 43px;
        text-align: left;
    }

    .ec-input-block {
        padding: 15px 14px 16px;
    }

    .ec-input-with-unit,
    .ec-input-group {
        --ec-unit-width: 88px;
    }

    .ec-calc-input-actions {
        grid-template-columns: 1fr;
    }

    .ec-reset-btn {
        width: 100%;
        min-height: 42px !important;
    }

    .ec-calc-utilities {
        justify-content: flex-start;
    }

    .ec-result-row {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 8px;
    }

    .ec-result-primary:first-of-type .ec-result-value,
    .ec-calc-result > .ec-result-primary:first-of-type .ec-result-value {
        font-size: 30px;
    }

    .ec-premium-actions,
    .ec-related-list {
        grid-template-columns: 1fr;
    }

    .ec-premium-btn--primary {
        grid-column: auto;
    }

    .ec-documentation-header {
        margin-bottom: 34px;
    }

    .ec-documentation-header > h2 {
        font-size: 27px;
    }

    .ec-documentation-header > p {
        font-size: 15px;
    }

    .ec-doc-section {
        margin-top: 38px;
    }

    .ec-doc-heading {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 11px;
    }

    .ec-doc-number {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .ec-doc-heading h2 {
        font-size: 19px;
    }

    .ec-content-box,
    .ec-reference-box {
        padding: 19px 18px;
        border-radius: 14px;
    }

    .ec-helpful {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .ec-mini-disclaimer {
        margin-top: 18px;
    }
}

/* ------------------------------------------------------------
   VERY SMALL MOBILE
------------------------------------------------------------ */
@media (max-width: 420px) {
    .ec-single-calculator .ec-container {
        padding-inline: 12px;
    }

    .ec-breadcrumbs-list {
        font-size: 10px;
    }

    .ec-single-title {
        font-size: 29px;
    }

    .ec-workbench {
        border-radius: 16px;
    }

    body.single-calculator .ec-calc-grid {
        padding: 12px;
    }

    .ec-input-with-unit,
    .ec-input-group {
        --ec-unit-width: 82px;
    }

    .ec-input-with-unit input,
    .ec-input-with-unit select,
    .ec-input-group > .ec-input,
    .ec-input-group > .ec-unit-select,
    .ec-input.ec-input--numeric,
    .ec-input.ec-input--select {
        font-size: 12px;
    }
}

/* ------------------------------------------------------------
   TOUCH
------------------------------------------------------------ */
@media (hover: none) {
    .ec-related-link:hover {
        transform: none;
        box-shadow: var(--ec-shadow-sm);
    }
}

/* ------------------------------------------------------------
   REDUCED MOTION
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .ec-single-calculator *,
    .ec-single-calculator *::before,
    .ec-single-calculator *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
