/* Tennar Institute — Correspondence Terminal v1 */

.correspondence-shell {
    padding-bottom: 42px;
}

.correspondence-hero,
.ct-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
    gap: 28px;
    align-items: start;
}

.correspondence-hero {
    padding: 18px 0 30px;
    border-bottom: 1px solid var(--hairline);
}

.correspondence-hero h1 {
    margin: 10px 0 12px;
    color: var(--paper);
    font-family: var(--serif);
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 0.94;
}

.correspondence-hero .intro {
    max-width: 730px;
}

.ct-status-card,
.ct-form,
.ct-incident-panel,
.ct-protocol-panel,
.ct-response {
    border: 1px solid var(--hairline);
    background:
        linear-gradient(145deg, rgba(216, 144, 53, 0.08), transparent 42%),
        var(--panel);
    box-shadow: 0 18px 52px var(--shadow);
}

.ct-status-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    color: var(--ink-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.6;
}

.ct-status-card::before {
    content: "CT-17";
    position: absolute;
    right: -8px;
    bottom: -26px;
    color: rgba(216, 144, 53, 0.11);
    font-family: var(--mono);
    font-size: 5.2rem;
    font-weight: 700;
    letter-spacing: -0.12em;
}

.ct-status-card > * {
    position: relative;
}

.ct-status-kicker,
.section-kicker {
    margin: 0;
    color: var(--amber);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ct-status-main {
    margin: 10px 0 14px;
    color: var(--green);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 0 12px var(--green-soft);
}

.ct-status-line {
    margin: 7px 0;
}

.ct-lamp {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.ct-layout {
    padding: 32px 0;
}

.ct-form {
    padding: clamp(20px, 4vw, 34px);
}

.ct-form-heading h2,
.ct-incident-panel h2,
.ct-protocol-panel h2,
.ct-response h2 {
    margin: 8px 0 9px;
    color: var(--paper);
    font-family: var(--serif);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 400;
}

.ct-form-heading > p:last-child {
    margin: 0 0 24px;
    color: var(--ink-muted);
}

.ct-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.ct-field {
    display: grid;
    gap: 7px;
    margin: 0 0 15px;
    color: var(--paper-deep);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.015em;
}

.ct-field b {
    color: var(--red);
}

.ct-field input,
.ct-field textarea,
.ct-field select {
    width: 100%;
    border: 1px solid rgba(216, 144, 53, 0.32);
    border-radius: 0;
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    color: var(--ink);
    font: 0.92rem/1.45 var(--mono);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ct-field input,
.ct-field select {
    min-height: 44px;
    padding: 10px 12px;
}

.ct-field textarea {
    min-height: 190px;
    padding: 12px;
    resize: vertical;
}

.ct-field input::placeholder,
.ct-field textarea::placeholder {
    color: rgba(184, 161, 123, 0.6);
}

.ct-field input:focus,
.ct-field textarea:focus,
.ct-field select:focus {
    border-color: var(--amber);
    background: rgba(216, 144, 53, 0.06);
    box-shadow: 0 0 0 3px rgba(216, 144, 53, 0.1);
}

.ct-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 20px;
    margin-top: 22px;
    padding-top: 21px;
    border-top: 1px dashed var(--hairline);
}

.ct-submit {
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid rgba(108, 255, 158, 0.65);
    background: rgba(108, 255, 158, 0.08);
    color: var(--green);
    cursor: pointer;
    font: 700 0.78rem var(--mono);
    letter-spacing: 0.07em;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ct-submit:hover,
.ct-submit:focus-visible {
    border-color: var(--green);
    background: rgba(108, 255, 158, 0.16);
    transform: translateY(-2px);
}

.ct-submit:disabled {
    cursor: progress;
    opacity: 0.58;
    transform: none;
}

.ct-privacy-note {
    max-width: 390px;
    margin: 0;
    color: var(--ink-dim);
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.55;
}

.ct-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.ct-side-stack {
    display: grid;
    gap: 18px;
}

.ct-incident-panel,
.ct-protocol-panel {
    padding: 22px;
}

.ct-incident-status {
    margin: 18px 0 12px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.88rem;
    line-height: 1.55;
    text-shadow: 0 0 12px var(--green-soft);
}

.ct-incident-detail {
    margin: 12px 0 0;
    color: var(--ink-muted);
    font-family: var(--mono);
    font-size: 0.74rem;
    line-height: 1.6;
}

.ct-meter {
    height: 11px;
    overflow: hidden;
    border: 1px solid rgba(179, 58, 44, 0.42);
    background: rgba(0, 0, 0, 0.45);
}

.ct-meter span {
    display: block;
    width: 8%;
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
    box-shadow: 0 0 14px rgba(216, 144, 53, 0.45);
    transition: width 440ms ease;
}

.ct-protocol-panel ul {
    display: grid;
    gap: 11px;
    margin: 18px 0 0;
    padding-left: 19px;
    color: var(--ink-muted);
    font-family: var(--mono);
    font-size: 0.76rem;
    line-height: 1.55;
}

.ct-response {
    margin: 0 0 32px;
    padding: clamp(20px, 4vw, 32px);
}

.ct-response[hidden] {
    display: none;
}

.ct-response.is-error {
    border-color: rgba(179, 58, 44, 0.62);
    background:
        linear-gradient(145deg, rgba(179, 58, 44, 0.14), transparent 48%),
        var(--panel);
}

.ct-response-body {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.9rem;
    line-height: 1.7;
}

.ct-response-body p {
    margin: 0 0 10px;
}

.ct-response-meta {
    margin: 18px 0 0;
    color: var(--amber);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

@media (max-width: 760px) {
    .correspondence-hero,
    .ct-layout {
        grid-template-columns: 1fr;
    }

    .ct-grid {
        grid-template-columns: 1fr;
    }

    .correspondence-hero {
        padding-top: 6px;
    }
}
