:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --text: #172026;
    --muted: #60717d;
    --line: #d9e2e7;
    --brand: #126b5d;
    --brand-dark: #0b4d43;
    --accent: #d98634;
    --danger: #b42318;
    --success: #087443;
    --shadow: 0 18px 45px rgba(23, 32, 38, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.search-panel,
.result-panel,
.history-panel,
.alert {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(340px, 480px);
    gap: 32px;
    align-items: end;
    padding: 32px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
}

h2 {
    margin-bottom: 0;
    font-size: 24px;
}

h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.lead,
.muted,
.empty-state,
.form-message {
    color: var(--muted);
}

.lead {
    max-width: 640px;
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.5;
}

.search-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.input-row {
    display: flex;
    gap: 10px;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 14px;
    color: var(--text);
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(18, 107, 93, 0.14);
}

button {
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    padding: 0 20px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

button:hover {
    background: var(--brand-dark);
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.form-message {
    min-height: 20px;
    margin: 10px 0 0;
    font-size: 14px;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.alert {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 16px;
    border-color: #f5c2bd;
    color: var(--danger);
}

.result-panel,
.history-panel {
    margin-top: 22px;
    padding: 26px;
}

.hidden {
    display: none;
}

.company-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.status-pill,
.mini-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(8, 116, 67, 0.12);
    color: var(--success);
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.data-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.data-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.data-grid strong {
    overflow-wrap: anywhere;
}

.content-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.text-block {
    color: var(--muted);
    line-height: 1.5;
}

.clean-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.clean-list li {
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    color: var(--muted);
    line-height: 1.4;
}

.section-title {
    margin-bottom: 18px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

td strong,
td span {
    display: block;
}

td span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 820px) {
    .search-panel,
    .content-columns,
    .data-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        padding: 24px;
    }

    .input-row,
    .company-heading {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
