.tt-hp-calculator {
    --tt-bg: #0c1118;
    --tt-panel: #121a24;
    --tt-panel-soft: #17212d;
    --tt-border: rgba(255, 255, 255, 0.11);
    --tt-text: #f3f6f9;
    --tt-muted: #9eabb8;
    --tt-accent: #7B2434;
    --tt-accent-dark: #5F1827;
    --tt-error: #ff8d8d;
    --tt-radius: 14px;
    box-sizing: border-box;
    container-name: tt-hp;
    container-type: inline-size;
    width: 100%;
    max-width: 1180px;
    margin: 32px auto;
    padding: clamp(20px, 4vw, 48px);
    border: 1px solid var(--tt-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 0%, rgba(123, 36, 52, 0.09), transparent 32%),
        linear-gradient(145deg, #0e151e 0%, var(--tt-bg) 60%);
    color: var(--tt-text);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.tt-hp-calculator *,
.tt-hp-calculator *::before,
.tt-hp-calculator *::after {
    box-sizing: inherit;
}

.tt-hp-calculator__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.tt-hp-calculator__eyebrow {
    margin: 0 0 10px;
    color: var(--tt-accent);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.16em;
}

.tt-hp-calculator h2,
.tt-hp-calculator h3,
.tt-hp-calculator p {
    color: inherit;
}

.tt-hp-calculator h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    font-weight: 680;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.tt-hp-calculator__intro {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--tt-muted) !important;
    font-size: 1rem;
}

.tt-hp-calculator__version {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--tt-border);
    border-radius: 999px;
    color: var(--tt-muted);
    font-size: 0.75rem;
}

.tt-hp-calculator__input {
    width: 100%;
}

.tt-hp-calculator__outputs {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}

.tt-hp-calculator__panel,
.tt-hp-equivalent {
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    background: rgba(18, 26, 36, 0.86);
}

.tt-hp-calculator__panel {
    padding: clamp(18px, 3vw, 28px);
}

.tt-hp-calculator__section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.tt-hp-calculator__section-heading > span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid rgba(123, 36, 52, 0.42);
    border-radius: 50%;
    color: var(--tt-accent);
    font-size: 0.7rem;
    font-weight: 750;
}

.tt-hp-calculator__section-heading h3 {
    margin: 2px 0 0;
    font-size: 1.02rem;
    font-weight: 680;
}

.tt-hp-calculator__section-heading p {
    margin: 4px 0 0;
    color: var(--tt-muted) !important;
    font-size: 0.83rem;
}

.tt-hp-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tt-hp-field {
    display: block;
    min-width: 0;
    margin: 0 0 16px;
}

.tt-hp-field--full {
    width: 100%;
}

.tt-hp-field__label {
    display: block;
    margin-bottom: 7px;
    color: #dbe2e8;
    font-size: 0.79rem;
    font-weight: 650;
}

.tt-hp-field input,
.tt-hp-field select {
    width: 100%;
    min-height: 45px;
    margin: 0;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    outline: none;
    background: #0e151e;
    color: var(--tt-text);
    font: inherit;
    font-size: 0.91rem;
    box-shadow: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.tt-hp-field input {
    padding: 10px 12px;
}

.tt-hp-field select {
    padding: 9px 34px 9px 12px;
}

.tt-hp-field input:focus,
.tt-hp-field select:focus {
    border-color: rgba(123, 36, 52, 0.8);
    box-shadow: 0 0 0 3px rgba(123, 36, 52, 0.11);
}

.tt-hp-field__compound {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.tt-hp-field__compound input {
    border-radius: 8px 0 0 8px;
}

.tt-hp-field__compound select,
.tt-hp-field__unit-mirror {
    min-width: 78px;
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.tt-hp-field__unit-mirror {
    display: grid;
    min-height: 45px;
    padding: 0 12px;
    place-items: center;
    border: 1px solid var(--tt-border);
    border-left: 0;
    background: #17212d;
    color: var(--tt-muted);
    font-size: 0.84rem;
}

.tt-hp-ramp {
    margin: 4px 0 20px;
    padding: 16px;
    border: 1px solid var(--tt-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.018);
}

.tt-hp-switch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.tt-hp-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tt-hp-switch__control {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 22px;
    margin-top: 1px;
    border: 1px solid var(--tt-border);
    border-radius: 999px;
    background: #0b1118;
    transition: background 140ms ease, border-color 140ms ease;
}

.tt-hp-switch__control::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--tt-muted);
    content: "";
    transition: transform 140ms ease, background 140ms ease;
}

.tt-hp-switch input:checked + .tt-hp-switch__control {
    border-color: var(--tt-accent);
    background: rgba(123, 36, 52, 0.18);
}

.tt-hp-switch input:checked + .tt-hp-switch__control::after {
    transform: translateX(18px);
    background: var(--tt-accent);
}

.tt-hp-switch input:disabled + .tt-hp-switch__control {
    opacity: 0.45;
    cursor: not-allowed;
}

.tt-hp-switch strong,
.tt-hp-switch small {
    display: block;
}

.tt-hp-switch strong {
    color: #e7edf2;
    font-size: 0.86rem;
}

.tt-hp-switch small {
    margin-top: 2px;
    color: var(--tt-muted);
    font-size: 0.75rem;
}

.tt-hp-ramp__fields {
    margin-top: 16px;
}

.tt-hp-ramp__fields .tt-hp-field {
    margin-bottom: 0;
}

.tt-hp-form-message {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 141, 141, 0.32);
    border-radius: 8px;
    background: rgba(255, 141, 141, 0.08);
    color: var(--tt-error);
    font-size: 0.84rem;
}

.tt-hp-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.tt-hp-button:hover {
    transform: translateY(-1px);
}

.tt-hp-button--primary {
    width: 100%;
    background: var(--tt-accent);
    color: #ffffff;
}

.tt-hp-button--primary:hover {
    background: #963247;
}

.tt-hp-button--secondary {
    border-color: rgba(123, 36, 52, 0.4);
    background: rgba(123, 36, 52, 0.1);
    color: var(--tt-accent);
}

.tt-hp-button--ghost {
    border-color: var(--tt-border);
    background: transparent;
    color: #dce3e9;
}

.tt-hp-result {
    display: flex;
    min-height: 100%;
    flex-direction: column;
}

.tt-hp-result__hero {
    margin: 2px 0 18px;
    padding: 22px;
    border: 1px solid rgba(123, 36, 52, 0.2);
    border-radius: 11px;
    background:
        linear-gradient(145deg, rgba(123, 36, 52, 0.10), rgba(123, 36, 52, 0.02));
}

.tt-hp-result__hero p,
.tt-hp-result__hero span {
    margin: 0;
    color: var(--tt-muted) !important;
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

.tt-hp-result__hero strong {
    display: block;
    margin: 4px 0 1px;
    color: var(--tt-accent);
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 1;
}

.tt-hp-result__summary {
    margin-bottom: 18px;
    color: #d4dce3;
    font-size: 0.89rem;
}

.tt-hp-result__details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    margin: 0 0 18px;
    border-top: 1px solid var(--tt-border);
}

.tt-hp-result__details dt,
.tt-hp-result__details dd {
    margin: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--tt-border);
    font-size: 0.8rem;
}

.tt-hp-result__details dt {
    color: var(--tt-muted);
}

.tt-hp-result__details dd {
    padding-left: 16px;
    color: #edf2f6;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tt-hp-formula {
    margin-top: auto;
    padding: 13px;
    border-radius: 8px;
    background: #0b1118;
}

.tt-hp-formula span {
    display: block;
    margin-bottom: 6px;
    color: var(--tt-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tt-hp-formula code {
    display: block;
    overflow-wrap: anywhere;
    color: #e6edf3;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.76rem;
    white-space: normal;
}

.tt-hp-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.tt-hp-equivalent {
    margin-top: 0;
    padding: clamp(18px, 3vw, 28px);
}

.tt-hp-table-wrap {
    overflow-x: auto;
}

.tt-hp-equivalent table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: var(--tt-text);
    font-size: 0.84rem;
}

.tt-hp-equivalent th,
.tt-hp-equivalent td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--tt-border);
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.tt-hp-equivalent th {
    color: var(--tt-muted);
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tt-hp-equivalent tr.is-reference td {
    background: rgba(123, 36, 52, 0.08);
    color: var(--tt-accent);
    font-weight: 680;
}

.tt-hp-calculator__disclaimer {
    margin: 16px 2px 0 !important;
    color: var(--tt-muted) !important;
    font-size: 0.72rem;
}

.tt-hp-calculator [hidden] {
    display: none !important;
}

@media (max-width: 860px) {
    .tt-hp-calculator__outputs {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .tt-hp-calculator {
        margin: 16px auto;
        padding: 16px;
        border-radius: 12px;
    }

    .tt-hp-calculator__header {
        gap: 12px;
    }

    .tt-hp-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tt-hp-actions {
        flex-direction: column;
    }

    .tt-hp-button {
        width: 100%;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .tt-hp-calculator,
    .tt-hp-calculator * {
        visibility: visible;
    }

    .tt-hp-calculator {
        position: absolute;
        inset: 0 auto auto 0;
        max-width: none;
        margin: 0;
        border: 0;
        background: #fff;
        color: #111;
        box-shadow: none;
    }

    .tt-hp-calculator__form,
    .tt-hp-actions {
        display: none !important;
    }

    .tt-hp-calculator__outputs {
        display: block;
    }

    .tt-hp-calculator__panel,
    .tt-hp-equivalent {
        border-color: #ccc;
        background: #fff;
    }

    .tt-hp-result__hero,
    .tt-hp-formula {
        border-color: #ccc;
        background: #f6f6f6;
    }

    .tt-hp-calculator,
    .tt-hp-calculator h2,
    .tt-hp-calculator h3,
    .tt-hp-result__summary,
    .tt-hp-result__details dd,
    .tt-hp-formula code,
    .tt-hp-equivalent table {
        color: #111 !important;
    }

    .tt-hp-calculator__intro,
    .tt-hp-calculator__disclaimer,
    .tt-hp-result__details dt,
    .tt-hp-result__hero p,
    .tt-hp-result__hero span {
        color: #555 !important;
    }
}

/* v0.2 — consecutive heat-treatment cycles */
.tt-hp-calculator .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tt-hp-fields--constant:has([data-field="custom-constant"][hidden]) {
    grid-template-columns: 1fr;
}

.tt-hp-multiple__note {
    display: grid;
    gap: 4px;
    margin: 2px 0 18px;
    padding: 13px 14px;
    border-left: 3px solid var(--tt-accent);
    border-radius: 0 8px 8px 0;
    background: rgba(123, 36, 52, 0.075);
}

.tt-hp-multiple__note strong {
    color: #eef3f6;
    font-size: 0.82rem;
}

.tt-hp-multiple__note span,
.tt-hp-multiple__hint {
    color: var(--tt-muted);
    font-size: 0.75rem;
}

.tt-hp-multiple__units {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tt-hp-cycle-list {
    display: grid;
    gap: 12px;
    width: 100%;
    margin: 2px 0 14px;
}

.tt-hp-cycle-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--tt-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
}

.tt-hp-cycle-card.has-ramps {
    border-color: rgba(123, 36, 52, 0.28);
    background: rgba(123, 36, 52, 0.035);
}

.tt-hp-cycle-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.tt-hp-cycle-card__header strong {
    color: var(--tt-accent);
    font-size: 0.72rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tt-hp-cycle-card__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.tt-hp-cycle-field {
    display: block;
    min-width: 0;
}

.tt-hp-cycle-field > span {
    display: block;
    margin-bottom: 6px;
    color: var(--tt-muted);
    font-size: 0.67rem;
    font-weight: 680;
    letter-spacing: 0.02em;
}

.tt-hp-cycle-field--name { grid-column: span 3; }
.tt-hp-cycle-field--type { grid-column: span 2; }
.tt-hp-cycle-field--temperature { grid-column: span 2; }
.tt-hp-cycle-field--time { grid-column: span 2; }
.tt-hp-cycle-field--ramps { grid-column: span 1; }
.tt-hp-cycle-field--rates { grid-column: span 2; }

.tt-hp-cycle-input {
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid var(--tt-border);
    border-radius: 6px;
    outline: none;
    background: #0e151e;
    color: var(--tt-text);
    font: inherit;
    font-size: 0.76rem;
    box-shadow: none;
}

select.tt-hp-cycle-input {
    padding-right: 25px;
}

.tt-hp-cycle-input--number {
    font-variant-numeric: tabular-nums;
}

.tt-hp-cycle-input:focus {
    border-color: rgba(123, 36, 52, 0.75);
    box-shadow: 0 0 0 2px rgba(123, 36, 52, 0.1);
}

.tt-hp-cycle-input:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.tt-hp-rate-pair {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
    align-items: center;
    gap: 5px;
}

.tt-hp-rate-pair > span {
    color: var(--tt-muted);
    text-align: center;
}

.tt-hp-mini-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.tt-hp-mini-switch input {
    position: absolute;
    opacity: 0;
}

.tt-hp-mini-switch > span {
    position: relative;
    width: 30px;
    height: 17px;
    border: 1px solid var(--tt-border);
    border-radius: 999px;
    background: #0b1118;
}

.tt-hp-mini-switch > span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tt-muted);
    content: "";
    transition: transform 130ms ease, background 130ms ease;
}

.tt-hp-mini-switch input:checked + span {
    border-color: var(--tt-accent);
    background: rgba(123, 36, 52, 0.16);
}

.tt-hp-mini-switch input:checked + span::after {
    transform: translateX(13px);
    background: var(--tt-accent);
}

.tt-hp-mini-switch input:disabled + span,
.tt-hp-mini-switch input:disabled ~ em {
    cursor: not-allowed;
    opacity: 0.4;
}

.tt-hp-mini-switch em {
    color: var(--tt-muted);
    font-size: 0.68rem;
    font-style: normal;
}

.tt-hp-cycle-remove {
    display: grid;
    width: 31px;
    height: 31px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--tt-border);
    border-radius: 6px;
    background: transparent;
    color: var(--tt-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
}

.tt-hp-cycle-remove:hover:not(:disabled) {
    border-color: rgba(255, 141, 141, 0.5);
    color: var(--tt-error);
}

.tt-hp-cycle-remove:disabled {
    cursor: not-allowed;
    opacity: 0.25;
}

.tt-hp-cycle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tt-hp-multiple__hint {
    margin: 10px 0 18px !important;
}

.tt-hp-breakdown {
    margin-top: 20px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    background: rgba(18, 26, 36, 0.86);
}

.tt-hp-breakdown table {
    width: 100%;
    min-width: 940px;
    margin: 0;
    border-collapse: collapse;
    color: var(--tt-text);
    font-size: 0.79rem;
}

.tt-hp-breakdown th,
.tt-hp-breakdown td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--tt-border);
    text-align: left;
    vertical-align: top;
    font-variant-numeric: tabular-nums;
}

.tt-hp-breakdown th {
    color: var(--tt-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tt-hp-breakdown tr.is-dominant td {
    background: rgba(123, 36, 52, 0.065);
}

.tt-hp-breakdown tr.is-dominant td:first-child {
    box-shadow: inset 3px 0 0 var(--tt-accent);
}

@media (max-width: 680px) {
    .tt-hp-multiple__units {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tt-hp-cycle-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}


@container tt-hp (max-width: 900px) {
    .tt-hp-cycle-card__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .tt-hp-cycle-field--name,
    .tt-hp-cycle-field--type {
        grid-column: span 3;
    }

    .tt-hp-cycle-field--temperature,
    .tt-hp-cycle-field--time,
    .tt-hp-cycle-field--ramps {
        grid-column: span 2;
    }

    .tt-hp-cycle-field--rates {
        grid-column: span 6;
    }
}

@container tt-hp (max-width: 620px) {
    .tt-hp-cycle-card__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tt-hp-cycle-field--name,
    .tt-hp-cycle-field--type,
    .tt-hp-cycle-field--temperature,
    .tt-hp-cycle-field--time,
    .tt-hp-cycle-field--ramps,
    .tt-hp-cycle-field--rates {
        grid-column: span 1;
    }

    .tt-hp-cycle-field--rates {
        grid-column: 1 / -1;
    }
}

@container tt-hp (max-width: 480px) {
    .tt-hp-calculator__outputs {
        grid-template-columns: 1fr;
    }
}

@container tt-hp (max-width: 430px) {
    .tt-hp-cycle-card__grid {
        grid-template-columns: 1fr;
    }

    .tt-hp-cycle-field--rates {
        grid-column: auto;
    }
}

@media print {
    .tt-hp-breakdown {
        border-color: #ccc;
        background: #fff;
    }

    .tt-hp-breakdown,
    .tt-hp-breakdown table {
        color: #111 !important;
    }
}

/* v0.3.0 – tempering thickness, total-Hp basis and time-proportional profile */
.tt-hp-multiple__units--profile {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.tt-hp-cycle-card__grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.tt-hp-cycle-field--name,
.tt-hp-cycle-field--type,
.tt-hp-cycle-field--thickness,
.tt-hp-cycle-field--temperature,
.tt-hp-cycle-field--time,
.tt-hp-cycle-field--ramps {
    grid-column: auto;
}

.tt-hp-cycle-field--rates {
    grid-column: span 2;
}

.tt-hp-cycle-card.is-tempering {
    border-color: rgba(123, 36, 52, 0.34);
}

.tt-hp-cycle-card.is-tempering .tt-hp-cycle-field--thickness > span::after {
    margin-left: 4px;
    color: var(--tt-accent);
    content: "required";
    font-size: 0.58rem;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tt-hp-equivalent__heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.tt-hp-equivalent__basis {
    align-self: start;
    padding: 6px 9px;
    border: 1px solid rgba(123, 36, 52, 0.35);
    border-radius: 999px;
    background: rgba(123, 36, 52, 0.08);
    color: var(--tt-accent);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tt-hp-equivalent table {
    min-width: 0;
    table-layout: fixed;
}

.tt-hp-profile {
    margin-top: 20px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    background: rgba(18, 26, 36, 0.86);
}

.tt-hp-profile__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 9px;
    margin-bottom: 14px;
}

.tt-hp-profile__meta > div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
}

.tt-hp-profile__meta span,
.tt-hp-profile__meta strong {
    display: block;
}

.tt-hp-profile__meta span {
    margin-bottom: 2px;
    color: var(--tt-muted);
    font-size: 0.65rem;
    font-weight: 680;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.tt-hp-profile__meta strong {
    overflow-wrap: anywhere;
    color: var(--tt-text);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.tt-hp-profile__chart {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--tt-border);
    border-radius: 11px;
    background: #0b1118;
}

.tt-hp-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 300px;
}

.tt-hp-chart__background {
    fill: #0b1118;
}

.tt-hp-chart__grid {
    stroke: rgba(255, 255, 255, 0.085);
    stroke-width: 1;
}

.tt-hp-chart__axis {
    stroke: rgba(255, 255, 255, 0.34);
    stroke-width: 1.2;
}

.tt-hp-chart__tick,
.tt-hp-chart__axis-label,
.tt-hp-chart__cycle-label,
.tt-hp-chart__cycle-value {
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.tt-hp-chart__tick {
    fill: #9eabb8;
    font-size: 12px;
}

.tt-hp-chart__axis-label {
    fill: #cbd4dc;
    font-size: 13px;
    font-weight: 650;
}

.tt-hp-chart__cycle-band--0 {
    fill: rgba(255, 255, 255, 0.014);
}

.tt-hp-chart__cycle-band--1 {
    fill: rgba(123, 36, 52, 0.024);
}

.tt-hp-chart__profile-line {
    fill: none;
    stroke: #7B2434;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.tt-hp-chart__hold-line {
    stroke: #A94C60;
    stroke-linecap: round;
    stroke-width: 6;
}

.tt-hp-chart__separator {
    stroke: rgba(123, 36, 52, 0.24);
    stroke-dasharray: 5 6;
    stroke-width: 1;
}

.tt-hp-chart__cycle-label {
    fill: #f3f6f9;
    font-size: 13px;
    font-weight: 700;
}

.tt-hp-chart__cycle-value {
    fill: #9eabb8;
    font-size: 11px;
}

.tt-hp-profile__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 13px;
}

.tt-hp-profile__footer p {
    max-width: 820px;
    margin: 0 !important;
    color: var(--tt-muted) !important;
    font-size: 0.72rem;
}

.tt-hp-breakdown table {
    min-width: 1080px;
}

@container tt-hp (max-width: 720px) {
    .tt-hp-equivalent__heading {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tt-hp-equivalent__basis {
        grid-column: 2;
        justify-self: start;
        margin-top: -12px;
    }

    .tt-hp-profile__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .tt-hp-profile__footer .tt-hp-button {
        width: 100%;
    }
}

@container tt-hp (max-width: 430px) {
    .tt-hp-cycle-field--rates {
        grid-column: auto;
    }

    .tt-hp-chart-svg {
        min-width: 720px;
    }

    .tt-hp-profile__chart {
        overflow-x: auto;
    }
}

@media print {
    .tt-hp-profile {
        break-inside: avoid;
        border-color: #ccc;
        background: #fff;
    }

    .tt-hp-profile__chart {
        overflow: visible;
        border-color: #ccc;
        background: #fff;
    }

    .tt-hp-profile__footer .tt-hp-button {
        display: none !important;
    }

    .tt-hp-profile__meta > div {
        border-color: #ccc;
        background: #fff;
    }

    .tt-hp-profile__meta span,
    .tt-hp-profile__footer p {
        color: #555 !important;
    }

    .tt-hp-profile__meta strong {
        color: #111 !important;
    }
}


/* v0.4.0 – empirical rate rules and controlled-temperature release */
.tt-hp-rate-rule {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
    gap: 14px;
    align-items: stretch;
    margin: 15px 0 12px;
}

.tt-hp-rate-rule .tt-hp-field {
    margin-bottom: 0;
}

.tt-hp-rate-rule__summary {
    display: flex;
    align-items: center;
    min-height: 45px;
    padding: 11px 13px;
    border: 1px solid rgba(123, 36, 52, 0.24);
    border-radius: 8px;
    background: rgba(123, 36, 52, 0.055);
    color: #cbd4dc;
    font-size: 0.74rem;
}

.tt-hp-cycle-card.has-automatic-rates {
    border-color: rgba(134, 167, 189, 0.30);
}

.tt-hp-cycle-card.has-automatic-rates .tt-hp-cycle-field--thickness > span::after {
    margin-left: 4px;
    color: #86a7bd;
    content: "required for rate rule";
    font-size: 0.56rem;
    font-weight: 760;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.tt-hp-cycle-rate-note {
    margin: 10px 0 0 !important;
    padding-top: 9px;
    border-top: 1px solid var(--tt-border);
    color: var(--tt-muted) !important;
    font-size: 0.68rem;
    line-height: 1.45;
}

.tt-hp-cycle-input:disabled {
    background: rgba(134, 167, 189, 0.055);
    color: #b7c8d3;
    opacity: 1;
}

.tt-hp-chart__air-release {
    stroke: #86a7bd;
    stroke-width: 1.6;
    stroke-dasharray: 5 5;
}

.tt-hp-chart__air-label {
    fill: #86a7bd;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
}

@container tt-hp (max-width: 760px) {
    .tt-hp-rate-rule {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tt-hp-rate-rule {
        grid-template-columns: 1fr;
    }
}


/* v0.5 report metadata and report action */
.tt-hp-report-data {
    margin: 18px 0;
    border: 1px solid var(--tt-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.018);
}

.tt-hp-report-data summary {
    padding: 13px 16px;
    cursor: pointer;
    color: #e4ebf1;
    font-size: 0.84rem;
    font-weight: 700;
    list-style-position: inside;
}

.tt-hp-report-data summary span {
    margin-left: 6px;
    color: var(--tt-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.tt-hp-report-data[open] summary {
    border-bottom: 1px solid var(--tt-border);
}

.tt-hp-report-data__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 14px;
    padding: 16px;
}

.tt-hp-report-data__title,
.tt-hp-report-data__notes {
    grid-column: span 2;
}

.tt-hp-report-data textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    outline: none;
    background: #0e151e;
    color: var(--tt-text);
    font: inherit;
    font-size: 0.91rem;
}

.tt-hp-report-data textarea:focus {
    border-color: rgba(123, 36, 52, 0.8);
    box-shadow: 0 0 0 3px rgba(123, 36, 52, 0.11);
}

@media (max-width: 900px) {
    .tt-hp-report-data__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tt-hp-report-data__grid {
        grid-template-columns: 1fr;
    }

    .tt-hp-report-data__title,
    .tt-hp-report-data__notes {
        grid-column: auto;
    }
}


/* v0.6.0 – shared component data, logo, cycle duplication and burgundy identity */
.tt-hp-ramp-explainer {
    margin: -4px 0 20px;
    padding: 15px 16px;
    border: 1px solid rgba(123, 36, 52, 0.42);
    border-left: 4px solid var(--tt-accent);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(123, 36, 52, 0.14), rgba(123, 36, 52, 0.035));
}

.tt-hp-ramp-explainer > strong {
    display: block;
    margin-bottom: 8px;
    color: #f2dfe3;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.tt-hp-ramp-explainer > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tt-hp-ramp-explainer p {
    margin: 0 !important;
    color: var(--tt-muted) !important;
    font-size: 0.72rem;
    line-height: 1.48;
}

.tt-hp-ramp-explainer b {
    color: #e7edf2;
}

.tt-hp-project-data {
    margin: 2px 0 20px;
    border: 1px solid var(--tt-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.018);
}

.tt-hp-project-data summary {
    padding: 13px 16px;
    cursor: pointer;
    color: #e4ebf1;
    font-size: 0.84rem;
    font-weight: 700;
    list-style-position: inside;
}

.tt-hp-project-data summary span {
    margin-left: 7px;
    color: var(--tt-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.tt-hp-project-data[open] summary {
    border-bottom: 1px solid var(--tt-border);
}

.tt-hp-project-data__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 14px;
    padding: 16px;
}

.tt-hp-project-data__title,
.tt-hp-project-data__notes,
.tt-hp-logo-field {
    grid-column: span 2;
}

.tt-hp-project-data textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    outline: none;
    background: #0e151e;
    color: var(--tt-text);
    font: inherit;
    font-size: 0.91rem;
}

.tt-hp-project-data textarea:focus {
    border-color: rgba(123, 36, 52, 0.8);
    box-shadow: 0 0 0 3px rgba(123, 36, 52, 0.16);
}

.tt-hp-field__help,
.tt-hp-logo-field small {
    display: block;
    margin-top: 6px;
    color: var(--tt-muted);
    font-size: 0.67rem;
    line-height: 1.4;
}

.tt-hp-logo-field {
    min-width: 0;
    margin-bottom: 16px;
}

.tt-hp-logo-field__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tt-hp-logo-field input[type="file"] {
    min-width: 0;
    flex: 1 1 auto;
    padding: 8px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    background: #0e151e;
    color: var(--tt-muted);
    font-size: 0.75rem;
}

.tt-hp-logo-preview {
    display: grid;
    min-height: 72px;
    margin-top: 9px;
    padding: 9px 12px;
    place-items: center start;
    border: 1px dashed var(--tt-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.012);
}

.tt-hp-logo-preview span {
    color: var(--tt-muted);
    font-size: 0.72rem;
}

.tt-hp-logo-preview img {
    display: block;
    max-width: 210px;
    max-height: 70px;
    object-fit: contain;
}

.tt-hp-cycle-card__header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.tt-hp-cycle-duplicate {
    min-height: 31px;
    padding: 5px 10px;
    border: 1px solid rgba(123, 36, 52, 0.52);
    border-radius: 6px;
    background: rgba(123, 36, 52, 0.11);
    color: #dbaeb7;
    cursor: pointer;
    font: inherit;
    font-size: 0.67rem;
    font-weight: 700;
}

.tt-hp-cycle-duplicate:hover {
    border-color: var(--tt-accent);
    background: rgba(123, 36, 52, 0.22);
    color: #fff;
}

.tt-hp-equivalent__tools {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--tt-border);
}

.tt-hp-equivalent__tools .tt-hp-formula {
    margin-top: 0;
}

.tt-hp-equivalent__tools .tt-hp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.tt-hp-equivalent__tools .tt-hp-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
}

.tt-hp-result {
    justify-content: flex-start;
}

.tt-hp-chart__hold-line {
    stroke: #A94C60;
}

@media (max-width: 900px) {
    .tt-hp-ramp-explainer > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .tt-hp-project-data__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tt-hp-project-data__grid {
        grid-template-columns: 1fr;
    }

    .tt-hp-project-data__title,
    .tt-hp-project-data__notes,
    .tt-hp-logo-field {
        grid-column: auto;
    }

    .tt-hp-logo-field__controls,
    .tt-hp-cycle-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .tt-hp-cycle-card__header-actions {
        justify-content: space-between;
    }

    .tt-hp-equivalent__tools .tt-hp-actions {
        grid-template-columns: 1fr;
    }
}

@media print {
    .tt-hp-ramp-explainer,
    .tt-hp-project-data {
        display: none !important;
    }
}

/* v0.7.0 – resilient project grid, administrator-only logo and profiles for every mode */
.tt-hp-project-data__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 14px;
    align-items: start;
}

.tt-hp-project-data__grid > *,
.tt-hp-project-data__grid .tt-hp-field,
.tt-hp-project-data__grid input,
.tt-hp-project-data__grid select,
.tt-hp-project-data__grid textarea,
.tt-hp-project-data__grid .tt-hp-field__compound {
    min-width: 0;
    max-width: 100%;
}

.tt-hp-project-data__grid .tt-hp-field {
    width: 100%;
    margin: 0;
}

.tt-hp-project-data__grid .tt-hp-field__compound {
    grid-template-columns: minmax(0, 1fr) 84px;
}

.tt-hp-project-data__grid input[type="date"] {
    width: 100%;
    min-inline-size: 0;
}

.tt-hp-project-data__notes {
    grid-column: 1 / -1;
}

.tt-hp-project-data__notes textarea {
    min-height: 92px;
}

.tt-hp-single-profile {
    display: grid;
    gap: 15px;
}

.tt-hp-single-profile__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.tt-hp-single-profile__heading strong {
    color: #edf2f6;
    font-size: 0.86rem;
}

.tt-hp-single-profile__heading span {
    color: var(--tt-muted);
    font-size: 0.72rem;
    text-align: right;
}

.tt-hp-single-profile .tt-hp-rate-rule,
.tt-hp-single-profile .tt-hp-field,
.tt-hp-single-profile .tt-hp-switch {
    margin: 0;
}

.tt-hp-single-profile .tt-hp-ramp__fields {
    margin-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tt-hp-single-profile .tt-hp-ramp__fields > * {
    min-width: 0;
}

.tt-hp-single-profile input:disabled,
.tt-hp-single-profile select:disabled {
    opacity: 0.78;
    cursor: not-allowed;
}

@container tt-hp (max-width: 780px) {
    .tt-hp-project-data__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tt-hp-single-profile .tt-hp-ramp__fields {
        grid-template-columns: 1fr 1fr;
    }

    .tt-hp-single-profile [data-single-profile-base-field] {
        grid-column: 1 / -1;
    }
}

@container tt-hp (max-width: 520px) {
    .tt-hp-project-data__grid,
    .tt-hp-single-profile .tt-hp-ramp__fields {
        grid-template-columns: 1fr;
    }

    .tt-hp-project-data__notes,
    .tt-hp-single-profile [data-single-profile-base-field] {
        grid-column: auto;
    }

    .tt-hp-single-profile__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .tt-hp-single-profile__heading span {
        text-align: left;
    }
}

.tt-hp-calculator,
.tt-hp-calculator *,
.tt-hp-calculator *::before,
.tt-hp-calculator *::after {
    box-sizing: border-box;
}

@container tt-hp (max-width: 760px) {
    .tt-hp-calculator__outputs {
        grid-template-columns: 1fr;
    }
}

.tt-hp-calculator__outputs > *,
.tt-hp-equivalent,
.tt-hp-result {
    min-width: 0;
}

/* v0.8.0 – stable section badges and compact profile metadata */
.tt-hp-calculator__section-heading > span {
    flex: 0 0 29px;
    width: 29px;
    min-width: 29px;
    height: 29px;
    min-height: 29px;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    line-height: 1;
}

.tt-hp-profile__meta {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@container tt-hp (max-width: 900px) {
    .tt-hp-profile__meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container tt-hp (max-width: 620px) {
    .tt-hp-profile__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container tt-hp (max-width: 390px) {
    .tt-hp-profile__meta {
        grid-template-columns: 1fr;
    }
}


/* v0.9.0 – cycle-specific rate rules, ramp tooltip and simplified output tools */
.tt-hp-cycle-field--rate-rule {
    min-width: 0;
}


.tt-hp-mini-switch--help {
    position: relative;
    outline: none;
}

.tt-hp-mini-switch--help::after {
    position: absolute;
    z-index: 50;
    left: 50%;
    bottom: calc(100% + 10px);
    width: min(330px, 78vw);
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: #080d13;
    color: #e8edf1;
    box-shadow: 0 12px 32px rgba(0,0,0,.42);
    content: attr(data-tooltip);
    font-size: .71rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    text-align: left;
    white-space: normal;
    transform: translate(-50%, 5px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.tt-hp-mini-switch--help:hover::after,
.tt-hp-mini-switch--help:focus::after,
.tt-hp-mini-switch--help:focus-within::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.tt-hp-equivalent__tools [data-formula][hidden] {
    display: none !important;
}

.tt-hp-equivalent__tools .tt-hp-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@container tt-hp (max-width: 760px) {
    .tt-hp-equivalent__tools .tt-hp-actions {
        grid-template-columns: 1fr;
    }
}

/* Keep the remaining action buttons balanced when optional exports are hidden. */
.tt-hp-equivalent__tools .tt-hp-actions {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}


/* v0.10.0 – manufacturing / operation lifecycle stage */
.tt-hp-cycle-field--lifecycle {
    min-width: 0;
}

.tt-hp-cycle-card.is-operation {
    border-color: rgba(45, 131, 197, 0.46);
    background:
        linear-gradient(90deg, rgba(45, 131, 197, 0.055), rgba(45, 131, 197, 0.012));
}

.tt-hp-cycle-card.is-operation .tt-hp-cycle-card__header strong {
    color: #67B6EC;
}

.tt-hp-breakdown tbody tr.is-operation td {
    background: rgba(45, 131, 197, 0.055);
}

.tt-hp-breakdown tbody tr.is-operation td:first-child {
    box-shadow: inset 3px 0 0 #2D83C5;
}


/* v1.0 – material selection and critical Hp assessment */
.tt-hp-material-selector .tt-hp-field__help {
    display: block;
    margin-top: 7px;
    line-height: 1.45;
}

.tt-hp-material-check {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--tt-border);
    border-left: 4px solid #287A52;
    border-radius: 8px;
    background: rgba(40, 122, 82, 0.08);
    color: #DCE8E1;
    font-size: 0.82rem;
    line-height: 1.48;
}

.tt-hp-material-check.is-exceeded {
    border-color: rgba(255, 141, 141, 0.42);
    border-left-color: #D94A4A;
    background: rgba(217, 74, 74, 0.10);
    color: #FFD2D2;
}

.tt-hp-material-check strong {
    color: inherit;
}


/* v1.0 – grouped material catalogue */
.tt-hp-material-selector select optgroup {
    color: #d7dde3;
    font-weight: 700;
}

.tt-hp-material-selector select option {
    color: #f3f6f9;
    font-weight: 400;
}


/* v1.0.1 – stacked equivalent-condition comparison in the web view */
.tt-hp-equivalent__comparison {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.tt-hp-equivalent__comparison.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.tt-hp-equivalent__card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--tt-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.016);
}

.tt-hp-equivalent__card--limit {
    border-top: 3px solid var(--tt-accent);
}

.tt-hp-equivalent__card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tt-hp-equivalent__card-kicker,
.tt-hp-equivalent__card-header small {
    display: block;
    color: var(--tt-muted);
    font-size: 0.68rem;
}

.tt-hp-equivalent__card-kicker {
    font-weight: 720;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tt-hp-equivalent__card-header h4 {
    margin: 3px 0 0;
    color: var(--tt-text);
    font-size: 0.95rem;
}

.tt-hp-equivalent__card-header small {
    margin-top: 3px;
}

.tt-hp-equivalent__card .tt-hp-equivalent__basis {
    flex: 0 0 auto;
}

.tt-hp-equivalent__card th:nth-child(1),
.tt-hp-equivalent__card td:nth-child(1) {
    width: 30%;
}

.tt-hp-equivalent__card th:nth-child(2),
.tt-hp-equivalent__card td:nth-child(2) {
    width: 42%;
}

.tt-hp-equivalent__card th:nth-child(3),
.tt-hp-equivalent__card td:nth-child(3) {
    width: 28%;
}

.tt-hp-equivalent__card th,
.tt-hp-equivalent__card td {
    padding: 9px 8px;
}

@media (max-width: 900px) {
    .tt-hp-equivalent__comparison,
    .tt-hp-equivalent__comparison.is-single {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .tt-hp-equivalent__card-header {
        display: block;
    }

    .tt-hp-equivalent__card .tt-hp-equivalent__basis {
        display: inline-block;
        margin-top: 8px;
    }

    .tt-hp-equivalent__card table {
        min-width: 430px;
    }
}


/* v1.1 – ASME B31.1 Grade 91 assessment */
.tt-hp-b31-input {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(123, 36, 52, 0.55);
    border-left: 4px solid #7B2434;
    border-radius: 10px;
    background: rgba(123, 36, 52, 0.055);
}

.tt-hp-b31-input__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.tt-hp-b31-input__heading strong,
.tt-hp-b31-input__heading span {
    display: block;
}

.tt-hp-b31-input__heading > div > span {
    margin-top: 3px;
    color: var(--tt-muted);
    font-size: 0.78rem;
}

.tt-hp-b31-input__tag {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid rgba(123, 36, 52, 0.65);
    border-radius: 999px;
    color: #d98a99;
    font-size: 0.72rem;
    font-weight: 700;
}

.tt-hp-b31-input__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.tt-hp-check-field {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-height: 45px;
    padding: 10px 11px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
    background: #0e151e;
    cursor: pointer;
}

.tt-hp-check-field input {
    margin-top: 3px;
    accent-color: #7B2434;
}

.tt-hp-check-field strong,
.tt-hp-check-field small {
    display: block;
}

.tt-hp-check-field strong {
    font-size: 0.79rem;
}

.tt-hp-check-field small {
    margin-top: 3px;
    color: var(--tt-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

.tt-hp-b31-input__note {
    margin-top: 12px;
    color: var(--tt-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.tt-hp-b31-result {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(123, 36, 52, 0.5);
    border-radius: 10px;
    background: rgba(123, 36, 52, 0.045);
}

.tt-hp-b31-result__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.tt-hp-b31-result__header span {
    display: block;
    color: var(--tt-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tt-hp-b31-result__header h4 {
    margin: 2px 0 0;
    color: var(--tt-text);
    font-size: 1rem;
}

.tt-hp-b31-result__header > strong {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.tt-hp-b31-result .is-pass {
    color: #69c48d;
}

.tt-hp-b31-result .is-fail {
    color: #ff9c9c;
}

.tt-hp-b31-result .is-warning {
    color: #e4be68;
}

.tt-hp-b31-result p {
    color: var(--tt-muted) !important;
    font-size: 0.76rem;
}

.tt-hp-b31-result table {
    table-layout: auto;
}

.tt-hp-b31-result th,
.tt-hp-b31-result td {
    min-width: 110px;
    font-size: 0.72rem;
}

.tt-hp-b31-result td span {
    color: #dce3e9;
}

.tt-hp-b31-result td small {
    color: var(--tt-muted);
}

.tt-hp-b31-result tr.is-fail td {
    background: rgba(180, 35, 24, 0.08);
}

.tt-hp-b31-result__reference {
    margin: 10px 0 0 !important;
}

@media (max-width: 900px) {
    .tt-hp-b31-input__grid {
        grid-template-columns: 1fr;
    }

    .tt-hp-b31-input__heading {
        flex-direction: column;
    }
}


/* v1.1.1 – Grade 91 code-check embedded in the B31.1 settings block */
.tt-hp-b31-result--embedded {
    margin-top: 16px;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid rgba(123, 36, 52, 0.42);
    border-radius: 0;
    background: transparent;
}

.tt-hp-b31-result--embedded .tt-hp-b31-result__header {
    margin-bottom: 8px;
}

.tt-hp-b31-result--embedded .tt-hp-table-wrap {
    margin-top: 12px;
    border: 1px solid var(--tt-border);
    border-radius: 8px;
}

.tt-hp-b31-result--embedded table {
    margin: 0;
}

.tt-hp-b31-result--embedded .tt-hp-b31-result__reference {
    margin-bottom: 0 !important;
}


/* v1.1.2 – Hp illustration scope clarification */
.tt-hp-profile__scope-note {
    display: grid;
    grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
    gap: 18px;
    margin: 0 0 16px;
    padding: 13px 15px;
    border: 1px solid rgba(123, 36, 52, 0.5);
    border-left: 4px solid #7B2434;
    border-radius: 8px;
    background: rgba(123, 36, 52, 0.055);
}

.tt-hp-profile__scope-note strong {
    color: #e8edf2;
    font-size: 0.78rem;
}

.tt-hp-profile__scope-note span {
    color: var(--tt-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .tt-hp-profile__scope-note {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}


/* v1.2 – single cumulative-cycle workflow */
.tt-hp-calculator__form > input[type="hidden"] {
    display: none !important;
}

.tt-hp-multiple {
    margin-top: 4px;
}

.tt-hp-multiple__note {
    margin-top: 0;
}
