:root {
    color-scheme: light;
    --ink: #10243d;
    --muted: #54708c;
    --blue: #0757a6;
    --blue-light: #2488e6;
    --red: #0b77d9;
    --danger: #b4232e;
    --paper: #ffffff;
    --page: #f3f8ff;
    --line: #c6dbf2;
    --cream: #eef6ff;
    --green: #25764f;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
}

a {
    color: var(--blue);
}

.site-shell {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
}

.site-header {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
}

.brand-word {
    color: var(--blue);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.brand-word span {
    color: var(--blue-light);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a,
.button,
.box-actions a,
.nav-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.main-nav a:hover,
.button:hover,
.box-actions a:hover,
.nav-form button:hover {
    border-color: var(--red);
    color: var(--red);
}

.nav-form {
    margin: 0;
}

.site-main {
    padding: 12px 0 56px;
}

.hero-panel,
.work-panel,
.letterbox {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 24px rgba(31, 43, 53, 0.12);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 32px;
    min-height: 368px;
    padding: 40px;
    overflow: hidden;
}

.hero-copy {
    align-self: center;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
}

h2 {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.15;
}

.lead {
    max-width: 640px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 18px;
}

.actions,
.box-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
}

.button-primary:hover {
    border-color: var(--blue-light);
    color: #ffffff;
    background: var(--blue-light);
}

.hero-visual {
    display: grid;
    align-content: center;
    gap: 18px;
}

.mini-box,
.jmt-box-card {
    background: linear-gradient(135deg, var(--blue), #0a3d78);
    color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 14px 28px rgba(7, 87, 166, 0.18);
}

.mini-box {
    min-height: 176px;
    padding: 24px;
}

.box-title,
.box-count,
.box-text {
    display: block;
}

.box-title {
    font-size: 25px;
    font-weight: 700;
}

.box-count {
    margin-top: 10px;
    font-size: 54px;
    font-weight: 700;
    line-height: 1;
}

.box-text {
    color: #c7d7e4;
}

.mail-preview {
    border: 1px solid #c5d3de;
    border-radius: 6px;
    background: var(--cream);
    padding: 18px;
}

.mail-preview strong,
.mail-preview code {
    display: block;
}

.mail-preview code {
    margin-top: 8px;
    color: var(--blue);
    overflow-wrap: anywhere;
}

.download-panel {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 14px 28px rgba(7, 87, 166, 0.12);
}

.download-panel strong {
    color: var(--blue);
    font-size: 30px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.download-panel span {
    color: var(--muted);
}

.download-panel a {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.download-panel a:hover {
    color: var(--blue-light);
}

.download-label {
    color: var(--red) !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.setup-list li {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 4px 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbff;
    padding: 14px;
}

.setup-list span {
    display: inline-flex;
    grid-row: span 2;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 700;
}

.setup-list strong,
.setup-list em {
    display: block;
}

.setup-list em {
    color: var(--muted);
    font-style: normal;
}

.status-grid,
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.metric-grid {
    grid-template-columns: repeat(8, minmax(112px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.status-grid article,
.metric-grid article {
    min-height: 94px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    padding: 16px;
}

.status-grid span,
.metric-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    text-transform: capitalize;
}

.status-grid strong,
.metric-grid strong {
    display: block;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.status-grid .is-good strong {
    color: var(--green);
}

.status-grid .is-warning strong {
    color: var(--danger);
}

.work-panel,
.letterbox {
    padding: 26px;
}

.letterbox + .letterbox {
    margin-top: 20px;
}

.auth-panel {
    max-width: 640px;
}

.panel-header {
    margin-bottom: 18px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-grid article {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbff;
    padding: 18px;
}

.feature-grid strong {
    color: var(--blue);
    font-size: 18px;
}

.feature-grid span {
    color: var(--muted);
}

.slice-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.slice-list li {
    border-left: 4px solid var(--blue-light);
    background: #f8fafb;
    padding: 16px;
}

.slice-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
}

.slice-list strong,
.slice-list em {
    display: block;
}

.slice-list em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
}

.page-heading {
    margin-bottom: 22px;
}

.action-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.jmt-box-card {
    min-height: 190px;
    padding: 24px;
}

.jmt-box-card h2 {
    font-size: 30px;
}

.jmt-box-card p {
    color: #c7d7e4;
}

.box-count-small {
    display: block;
    margin: 10px 0 18px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
}

.jmt-box-card.add-box {
    background: #f7fbff;
    color: var(--blue);
    box-shadow: inset 0 0 0 1px var(--line);
}

.jmt-box-card.add-box p {
    color: var(--muted);
}

.message-table {
    width: 100%;
    border-collapse: collapse;
}

.message-table th,
.message-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.message-table tr.unread td {
    background: #f7fbff;
    font-weight: 700;
}

.message-table td span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.message-table th {
    color: var(--blue);
    font-size: 13px;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #e6edf2;
    color: var(--blue);
    font-size: 12px;
    text-transform: uppercase;
}

.status-approved {
    background: #e4f2e4;
    color: var(--green);
}

.status-rejected {
    background: #f5e4e6;
    color: var(--danger);
}

.message-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.message-actions form {
    margin: 0;
}

.inline-action,
.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-check {
    color: var(--muted);
    font-weight: 700;
}

.inline-check input {
    width: auto;
}

.message-body,
.message-meta {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 22px;
}

.message-body pre {
    min-height: 180px;
    margin: 18px 0 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffdf7;
    padding: 18px;
    white-space: pre-wrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
}

.from-line {
    color: var(--muted);
}

.message-meta dl,
.runtime-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 16px;
    margin: 22px 0 0;
}

.message-meta dt,
.runtime-details dt {
    color: var(--muted);
    font-weight: 700;
}

.message-meta dd,
.runtime-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.inbound-form {
    display: grid;
    gap: 16px;
}

.inbound-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.inbound-form .check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbound-form .check-row input {
    width: auto;
}

.inbound-form input,
.inbound-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
}

.form-error {
    border: 1px solid #e7b8bd;
    border-radius: 4px;
    background: #fff2f3;
    color: var(--danger);
    padding: 12px 14px;
}

.form-error p {
    margin: 0;
}

.form-error p + p {
    margin-top: 6px;
}

.form-success {
    display: grid;
    gap: 8px;
    border: 1px solid #b8d9bd;
    border-radius: 4px;
    background: #f1fbf2;
    color: var(--green);
    padding: 12px 14px;
}

.form-success code {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.settings-form {
    margin-top: 22px;
}

.code-block {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffdf7;
    padding: 16px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.runtime-details {
    margin-top: 28px;
}

.account-details {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.account-api-panel {
    margin-top: 20px;
}

.api-key-form {
    max-width: 520px;
    margin-bottom: 22px;
}

.api-key-table form {
    margin: 0;
}

.billing-grid {
    align-items: stretch;
}

.billing-plan {
    box-shadow: none;
}

.billing-plan-featured {
    border-color: var(--blue);
}

.billing-price {
    display: block;
    margin: 12px 0 18px;
    color: var(--blue);
    font-size: 30px;
    line-height: 1;
}

.billing-note {
    margin: 16px 0 0;
    color: var(--muted);
}

.billing-note code {
    color: var(--ink);
}

.roadmap-list {
    display: grid;
    gap: 14px;
}

.roadmap-list article {
    display: grid;
    grid-template-columns: 92px 1fr 130px;
    gap: 18px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 18px;
}

.roadmap-list span {
    color: var(--red);
    font-weight: 700;
}

.roadmap-list p {
    margin-bottom: 0;
    color: var(--muted);
}

.roadmap-list strong {
    justify-self: end;
    color: var(--blue);
}

@media (max-width: 860px) {
    .site-header,
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .hero-panel {
        padding: 26px;
    }

    .status-grid,
    .slice-list,
    .dashboard-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .action-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .roadmap-list article {
        grid-template-columns: 1fr;
    }

    .roadmap-list strong {
        justify-self: start;
    }
}
