:root {
    --bg: #f5f1e8;
    --paper: #fffaf2;
    --panel: #fffdf8;
    --ink: #1f2430;
    --muted: #5b6472;
    --line: #d7c9ad;
    --accent: #8f3b1b;
    --accent-strong: #6e2b11;
    --soft-accent: #f2e4cd;
    --success: #256746;
    --error: #9b2c2c;
    --shadow: 0 22px 48px rgba(69, 43, 20, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(143, 59, 27, 0.16), transparent 28%),
        linear-gradient(180deg, #f7f3ea 0%, #efe6d5 100%);
}

code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95em;
}

.page-shell {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.hero-card,
.panel {
    background: var(--panel);
    border: 1px solid rgba(143, 59, 27, 0.16);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -5rem -5rem auto;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: rgba(143, 59, 27, 0.08);
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    color: var(--accent);
}

h1,
h2 {
    margin: 0;
    font-weight: 600;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.lede {
    max-width: 60rem;
    margin: 1rem 0 0;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--muted);
}

.panel {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.label-form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field span {
    font-weight: 600;
}

.field small {
    color: var(--muted);
}

input[type="file"],
input[type="text"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

.inline-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.4rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.toggle input {
    accent-color: var(--accent);
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
}

.compact input {
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
}

.primary-button {
    justify-self: start;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: white;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    box-shadow: 0 14px 28px rgba(111, 43, 17, 0.25);
}

.primary-button:hover:not(:disabled),
.primary-button:focus-visible:not(:disabled) {
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.split-panel {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0;
}

.summary-grid div {
    padding: 1rem;
    border-radius: 18px;
    background: var(--soft-accent);
}

.summary-grid dt {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.summary-grid dd {
    margin: 0.45rem 0 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
}

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

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

th,
td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(143, 59, 27, 0.12);
}

th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.empty-row td {
    color: var(--muted);
    text-align: center;
    padding: 1.3rem 1rem;
}

.status-message {
    margin: 0;
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(143, 59, 27, 0.14);
    color: var(--muted);
}

.status-message.success {
    color: var(--success);
    border-color: rgba(37, 103, 70, 0.2);
}

.status-message.error {
    color: var(--error);
    border-color: rgba(155, 44, 44, 0.2);
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 1rem, 1080px);
        padding-top: 1rem;
    }

    .hero-card,
    .panel {
        padding: 1.2rem;
        border-radius: 20px;
    }

    .inline-options,
    .split-panel,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading {
        align-items: start;
        flex-direction: column;
    }

    .primary-button {
        width: 100%;
        justify-self: stretch;
    }
}
