:root {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #121212;
    background-color: #f5f7fa;
    --bg: #f5f7fa;
    --panel: #ffffff;
    --panel-border: #d7dee4;
    --text: #121212;
    --muted: #5b6772;
    --nav: #132635;
    --nav-soft: #20384a;
    --accent: #267a65;
    --accent-strong: #17614e;
    --danger: #9b1c1c;
    --shadow: 0 1px 4px rgba(15, 45, 64, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
}

[hidden] {
    display: none !important;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--nav);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
}

.brand {
    align-items: center;
    color: #ffffff;
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.brand-mark img {
    display: block;
    height: 2.5rem;
    width: 2.5rem;
}

.brand small {
    color: #b9c6d1;
    display: block;
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.side-nav {
    display: grid;
    gap: 1.25rem;
}

.side-nav section {
    display: grid;
    gap: 0.35rem;
}

.side-nav h2 {
    color: #a9bac7;
    font-size: 0.72rem;
    letter-spacing: 0;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.nav-link {
    border-radius: 0.35rem;
    color: #d8ecf9;
    display: block;
    padding: 0.55rem 0.65rem;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    background: var(--nav-soft);
    color: #ffffff;
}

.nav-link.active {
    box-shadow: inset 3px 0 0 var(--accent);
    font-weight: 700;
}

.sidebar-note {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #b9c6d1;
    font-size: 0.85rem;
    margin: auto 0 0;
    padding-top: 1rem;
}

.content-shell {
    min-width: 0;
}

.top-bar {
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--panel-border);
    color: var(--text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 4rem;
    padding: 0 1.5rem;
}

.top-bar span {
    color: var(--muted);
    display: block;
    font-size: 0.85rem;
    margin-top: 0.1rem;
}

.account-menu {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.account-menu span {
    color: var(--muted);
    font-weight: 700;
    margin: 0;
}

.account-menu button {
    white-space: nowrap;
}

.login-page {
    min-height: 100vh;
}

.login-shell {
    align-items: center;
    display: grid;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: 420px;
    padding: 1.5rem;
    width: 100%;
}

.login-brand {
    align-items: center;
    color: var(--text);
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.login-brand small {
    color: var(--muted);
    display: block;
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.login-home-link {
    border-top: 1px solid var(--panel-border);
    margin: 1.25rem 0 0;
    padding-top: 1rem;
}

.login-home-link a {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.login-home-link a:hover {
    text-decoration: underline;
}

.content {
    max-width: 1180px;
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.25rem;
}

.page-header h2 {
    font-size: 1.65rem;
    margin: 0 0 0.25rem;
}

.page-header p {
    margin: 0.25rem 0;
}

.section-tabs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: -0.25rem 0 1.25rem;
}

.section-tabs a {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    color: #273744;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    text-decoration: none;
}

.section-tabs a:hover {
    border-color: #8ac3b7;
    color: var(--accent-strong);
}

.muted {
    color: var(--muted);
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #b9c6d1;
    border-radius: 0.5rem;
    color: var(--muted);
    margin: 0;
    padding: 1rem;
}

.card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.card-header h3 {
    margin-bottom: 0;
}

.card-header p {
    margin: 0.2rem 0 0;
}

.collapsible-section {
    padding: 0;
}

.collapsible-section[open] {
    padding-bottom: 1rem;
}

.collapsible-section-summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    padding: 1rem;
}

.collapsible-section-summary::-webkit-details-marker {
    display: none;
}

.collapsible-section-summary h3 {
    margin: 0;
}

.collapsible-section-summary p {
    margin: 0.2rem 0 0;
}

.summary-action {
    background: #eef3f7;
    border: 1px solid #c9d4dd;
    border-radius: 999px;
    color: #273744;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
}

.summary-action::before {
    content: "Open";
}

.collapsible-section[open] .summary-action::before {
    content: "Close";
}

.readiness-panel-compact[open] .summary-action::before {
    content: "Close";
}

.collapsible-section > .stacked-form,
.collapsible-section > .template-workspace,
.collapsible-section > .body-diff,
.collapsible-section > .empty-state {
    margin: 0 1rem;
}

.toast {
    align-items: flex-start;
    background-color: #f2fbf6;
    border: 1px solid #8ac39c;
    border-radius: 0.4rem;
    box-shadow: 0 12px 30px rgba(15, 45, 64, 0.18);
    color: #1f5c2d;
    display: flex;
    gap: 1rem;
    max-width: min(560px, calc(100vw - 2rem));
    padding: 0.8rem 0.9rem;
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 20;
}

.toast.is-hidden {
    display: none;
}

.toast-close {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.1rem 0.2rem;
}

.toast-close:hover {
    background: transparent;
}

.status-banner {
    background-color: #fff7e6;
    border: 1px solid #e0a82e;
    border-radius: 0.35rem;
    color: #6f4a00;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.status-banner-danger {
    background-color: #fff1f1;
    border-color: #d86b6b;
    color: #7f1d1d;
}

.polling-status-strip {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
}

.polling-status-strip > div {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.polling-status-strip strong {
    color: #273744;
}

.polling-status-strip dl {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin: 0;
}

.polling-status-strip dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.polling-status-strip dd {
    font-weight: 700;
    margin: 0 0.25rem 0 0;
}

.polling-status-strip .metadata-line {
    flex-basis: 100%;
    margin: 0;
}

.live-processing-panel {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.live-processing-panel dl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin: 0;
}

.live-processing-panel dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-processing-panel dd {
    font-weight: 700;
    margin: 0.15rem 0 0;
}

.live-indicator {
    align-items: center;
    color: var(--accent-strong);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.4rem;
    white-space: nowrap;
}

.live-indicator::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 0.55rem;
    width: 0.55rem;
}

.live-panel-meta {
    align-items: flex-end;
    display: grid;
    gap: 0.25rem;
    justify-items: end;
}

.next-run-note {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--panel);
    border-radius: 0.5rem;
    border: 1px solid rgba(215, 222, 228, 0.75);
    box-shadow: var(--shadow);
    overflow-x: auto;
    padding: 1rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--panel-border);
    padding: 0.5rem;
    vertical-align: top;
}

th {
    background-color: #eef3f7;
    color: #273744;
    font-size: 0.85rem;
    white-space: nowrap;
}

.draft-outcomes-table .table-action {
    background: #ffffff;
    box-shadow: 1px 0 0 var(--panel-border);
    left: 0;
    position: sticky;
    white-space: nowrap;
    width: 1%;
    z-index: 1;
}

.draft-outcomes-table th.table-action {
    background: #eef3f7;
    z-index: 2;
}

button {
    background-color: var(--nav);
    border: none;
    border-radius: 0.25rem;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 0.85rem;
}

button:hover {
    background-color: var(--nav-soft);
}

.button-link,
.button-secondary,
.button-subtle,
.button-danger {
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
}

.button-link {
    background: var(--nav);
    color: #ffffff;
}

.button-secondary {
    background: #eef3f7;
    color: #273744;
}

.button-subtle {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 0.86rem;
    padding: 0.4rem 0.65rem;
}

.button-danger {
    background: #7f1d1d;
    color: #ffffff;
}

.button-link:hover,
.button-secondary:hover,
.button-subtle:hover,
.button-danger:hover {
    filter: brightness(0.94);
    text-decoration: none;
}

.button-link:hover {
    background: var(--nav-soft);
    color: #ffffff;
}

.button-secondary:hover {
    background: #dfe8ef;
    color: #273744;
}

.button-subtle:hover {
    background: #f6f8fa;
    color: #273744;
}

.button-danger:hover {
    background: #6f1a1a;
    color: #ffffff;
}

.subtle-action-group {
    border-top: 1px solid var(--panel-border);
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.subtle-note {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0.45rem 0 0;
}

button:disabled {
    background-color: #5b6772;
    cursor: wait;
}

.is-hidden {
    display: none;
}

.stacked-form {
    display: grid;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.form-grid p {
    margin: 0;
}

.full-width {
    grid-column: 1 / -1;
}

.form-field {
    display: grid;
    gap: 0.35rem;
}

label {
    font-weight: 700;
}

input,
select,
textarea {
    border: 1px solid #b9c6d1;
    border-radius: 0.25rem;
    color: #121212;
    font: inherit;
    padding: 0.6rem;
    width: 100%;
}

textarea {
    min-height: 14rem;
    resize: vertical;
}

.actions {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.field-validation,
.validation-summary {
    color: var(--danger);
    font-weight: 600;
}

.form-status {
    align-self: center;
    color: var(--muted);
    font-weight: 700;
}

.form-status.has-unsaved-changes {
    color: #6f4a00;
}

.status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.attention-panel {
    align-items: center;
    background: #fff7e6;
    border: 1px solid #e0a82e;
    border-radius: 0.5rem;
    color: #6f4a00;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
}

.attention-panel h3 {
    margin: 0 0 0.25rem;
}

.attention-panel p {
    margin: 0;
}

.readiness-panel-header {
    align-items: flex-start;
}

.readiness-panel-compact {
    padding: 0;
}

.readiness-overview-summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    padding: 1rem;
}

.readiness-overview-summary::-webkit-details-marker {
    display: none;
}

.readiness-overview-summary h3 {
    margin: 0;
}

.readiness-overview-summary p {
    margin: 0.2rem 0 0;
}

.readiness-overview-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.readiness-count {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.25rem 0.55rem;
    white-space: nowrap;
}

.readiness-count strong {
    color: var(--text);
}

.readiness-panel-compact .readiness-list {
    border-top: 1px solid var(--panel-border);
    padding: 1rem;
}

.readiness-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}

.readiness-summary span {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.4rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.45rem 0.6rem;
}

.readiness-summary strong {
    color: var(--text);
}

.readiness-list {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.readiness-item {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.75rem;
}

.readiness-item > div {
    flex: 1 1 12rem;
    min-width: 0;
}

.readiness-item-title {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.readiness-item h4 {
    margin: 0;
}

.readiness-item p {
    color: var(--muted);
    line-height: 1.4;
    margin: 0.3rem 0 0;
    overflow-wrap: anywhere;
}

.readiness-item a {
    flex: 0 0 auto;
    font-weight: 700;
    overflow-wrap: anywhere;
    white-space: normal;
}

.dashboard-runs-panel {
    margin-bottom: 1rem;
}

.dashboard-runs-header .button-secondary {
    flex: 0 0 auto;
}

.table-pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    padding-top: 0.75rem;
}

.table-pager button {
    font-size: 0.85rem;
    padding: 0.45rem 0.7rem;
}

.compact-list {
    margin-top: 0.25rem;
    padding-left: 1.25rem;
}

.draft-preview,
.metadata-preview {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.25rem;
    overflow-x: auto;
    padding: 1rem;
    white-space: pre-wrap;
}

.draft-preview {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
}

.draft-html-preview {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 0.35rem;
    overflow: hidden;
}

.draft-html-preview-frame {
    border: 0;
    display: block;
    min-height: 36rem;
    width: 100%;
}

.metadata-preview {
    font-size: 0.85rem;
}

.details-list {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0.5rem;
    margin: 0;
}

.details-list dt {
    font-weight: 700;
}

.details-list dd {
    margin: 0;
}

.metric {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
}

.metric-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 0.75rem;
}

.metric-tile {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.metric-tile span {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-tile strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 0.2rem;
}

.usage-chart-shell {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.usage-chart {
    display: block;
    min-width: 720px;
    width: 100%;
}

.chart-axis {
    stroke: #9aabba;
    stroke-width: 1;
}

.chart-label,
.chart-date-label {
    fill: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.chart-bar {
    rx: 2;
}

.chart-bar-prompt {
    fill: #267a65;
}

.chart-bar-completion {
    fill: #174f78;
}

.chart-cost-line {
    fill: none;
    stroke: #a15c00;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.chart-failure-dot {
    fill: var(--danger);
}

.chart-legend {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.legend-swatch,
.legend-line,
.legend-dot {
    display: inline-block;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.legend-swatch {
    border-radius: 0.15rem;
    height: 0.75rem;
    width: 0.75rem;
}

.legend-input {
    background: #267a65;
}

.legend-output {
    background: #174f78;
}

.legend-line {
    background: #a15c00;
    height: 0.18rem;
    width: 1.3rem;
}

.legend-dot {
    background: var(--danger);
    border-radius: 999px;
    height: 0.55rem;
    width: 0.55rem;
}

.badge {
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0.35rem 0.35rem 0;
    max-width: 100%;
    padding: 0.25rem 0.55rem;
    white-space: normal;
}

.badge-success {
    background: #e9f8ef;
    border-color: #87c89b;
    color: #1f5c2d;
}

.badge-warning {
    background: #fff7e6;
    border-color: #e0a82e;
    color: #6f4a00;
}

.badge-danger {
    background: #fff1f1;
    border-color: #d86b6b;
    color: #7f1d1d;
}

.badge-neutral {
    background: #eef3f7;
    border-color: #c9d4dd;
    color: #273744;
}

.badge-info {
    background: #eaf5ff;
    border-color: #94bde1;
    color: #174f78;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chip {
    background: #eef3f7;
    border: 1px solid #c9d4dd;
    border-radius: 999px;
    color: #273744;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    white-space: normal;
}

.chip-danger {
    background: #fff1f1;
    border-color: #d86b6b;
    color: #7f1d1d;
}

.chip-warning {
    background: #fff7e6;
    border-color: #e0a82e;
    color: #6f4a00;
}

.text-action {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.text-action:hover {
    text-decoration: underline;
}

.settings-list {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.settings-list div {
    align-items: center;
    border-bottom: 1px solid #edf1f5;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 0.65rem;
}

.settings-list dt {
    color: var(--muted);
    font-weight: 700;
}

.settings-list dd {
    font-weight: 700;
    margin: 0;
    text-align: right;
}

.settings-control-form {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.8rem;
}

.toggle-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.toggle-row span {
    display: grid;
    gap: 0.2rem;
}

.toggle-row small {
    color: var(--muted);
    font-weight: 400;
}

.toggle-row input[type="checkbox"] {
    flex: 0 0 auto;
    height: 1.1rem;
    width: 1.1rem;
}

.disclosure {
    margin-top: 0.35rem;
}

.disclosure summary {
    color: var(--accent-strong);
    cursor: pointer;
    font-weight: 700;
}

.disclosure-content {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.65rem;
    overflow-wrap: anywhere;
}

.outcome-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.details-list-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.details-list-compact dt {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.details-list-compact dd {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.decision-workflow-card {
    overflow: visible;
}

.decision-workflow-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
}

.decision-source-panel {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-left: 5px solid #9aabba;
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.9rem;
}

.decision-source-panel.is-playbook {
    background: #eaf5ff;
    border-color: #94bde1;
    border-left-color: #174f78;
}

.decision-source-panel.is-template {
    background: #f2fbf6;
    border-color: #87c89b;
    border-left-color: var(--accent);
}

.decision-source-panel h4 {
    margin: 0;
}

.decision-source-panel p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0.3rem 0 0;
}

.decision-source-panel small {
    color: #273744;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.4rem;
    overflow-wrap: anywhere;
}

.decision-timeline {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.decision-step {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
    position: relative;
}

.decision-step + .decision-step::before {
    background: #c9d4dd;
    content: "";
    height: calc(100% + 0.75rem);
    left: 1rem;
    position: absolute;
    top: -0.75rem;
    width: 2px;
}

.decision-step-marker {
    align-items: center;
    background: #273744;
    border: 3px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px #c9d4dd;
    color: #ffffff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    position: relative;
    width: 2rem;
    z-index: 1;
}

.decision-step-body {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    min-width: 0;
    padding: 0.8rem;
}

.decision-step-collapsed {
    padding: 0;
}

.decision-step-summary {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    list-style: none;
    padding: 0.8rem;
}

.decision-step-summary::-webkit-details-marker {
    display: none;
}

.decision-step-summary span:first-child {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.decision-step-summary small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.decision-step-summary::before {
    color: var(--accent-strong);
    content: "+";
    flex: 0 0 auto;
    font-weight: 800;
    line-height: 1.2;
    order: 3;
}

.decision-step-collapsed[open] .decision-step-summary::before {
    content: "-";
}

.decision-step-collapsed > .decision-step-detail,
.decision-step-collapsed > .decision-facts {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
}

.decision-step-collapsed > .decision-facts {
    margin-bottom: 0.8rem;
}

.decision-step-heading,
.reply-path-option-header,
.template-candidate-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.decision-step-heading h4,
.reply-path-panel h4,
.template-candidate-strip h4 {
    margin: 0;
}

.decision-step-body p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0.35rem 0 0;
}

.decision-step-detail {
    color: #273744 !important;
    font-weight: 600;
}

.decision-facts {
    border-top: 1px solid var(--panel-border);
    display: grid;
    gap: 0.3rem 0.75rem;
    grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
    margin: 0.7rem 0 0;
    padding-top: 0.65rem;
}

.decision-facts dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.decision-facts dd {
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.decision-fact-link {
    color: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
}

.decision-fact-link:hover {
    text-decoration: underline;
}

#policy-flags,
#missing-data {
    scroll-margin-top: 1rem;
}

.reply-path-panel {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
}

.reply-path-options {
    display: grid;
    gap: 0.65rem;
}

.reply-path-option {
    border: 1px solid var(--panel-border);
    border-left: 4px solid #9aabba;
    border-radius: 0.45rem;
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem;
}

.reply-path-option.is-selected {
    background: #f2fbf6;
    border-color: #87c89b;
    border-left-color: var(--accent);
}

.reply-path-option p,
.reply-path-option small {
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

.reply-path-option small {
    display: block;
    font-size: 0.78rem;
}

.template-candidate-strip {
    border-top: 1px solid var(--panel-border);
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
}

.template-candidate-strip p {
    margin: 0.2rem 0 0;
}

.template-candidate-list {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.template-candidate {
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 0.45rem;
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.75rem;
}

.template-candidate.is-selected {
    border-color: #87c89b;
    box-shadow: inset 0 0 0 1px #87c89b;
}

.template-candidate strong {
    overflow-wrap: anywhere;
}

.template-candidate dl {
    display: grid;
    gap: 0.25rem 0.5rem;
    grid-template-columns: auto minmax(0, 1fr);
    margin: 0;
}

.template-candidate dt {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.template-candidate dd {
    font-size: 0.82rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.outcome-path-card {
    overflow: visible;
}

.outcome-path {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.outcome-path-step {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: 0.8rem;
    position: relative;
}

.outcome-path-step + .outcome-path-step::before {
    background: #c9d4dd;
    content: "";
    height: 2px;
    left: -0.75rem;
    position: absolute;
    top: 1.45rem;
    width: 0.75rem;
}

.outcome-path-step.needs-attention {
    background: #fffaf0;
    border-color: #e0a82e;
}

.outcome-path-marker {
    background: var(--accent);
    border: 3px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px #8ac3b7;
    height: 1.3rem;
    margin-top: 0.15rem;
    width: 1.3rem;
}

.outcome-path-step.needs-attention .outcome-path-marker {
    background: #a15c00;
    box-shadow: 0 0 0 1px #e0a82e;
}

.outcome-path-heading {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.outcome-path-heading h4 {
    margin: 0;
}

.outcome-path-step p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0.35rem 0 0;
}

.outcome-path-step small {
    color: #273744;
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.45rem;
    overflow-wrap: anywhere;
}

.compare-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compare-panel {
    display: grid;
    grid-template-rows: auto auto minmax(12rem, 1fr);
}

.compare-panel-header {
    align-items: baseline;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.compare-panel-header h3 {
    margin: 0 0 0.75rem;
}

.compare-panel-meta {
    align-content: start;
}

@media (min-width: 861px) {
    .compare-panel-meta {
        min-height: 4.75rem;
    }
}

.body-diff {
    border: 1px solid var(--panel-border);
    border-radius: 0.35rem;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.88rem;
    overflow: auto;
}

.body-diff-line {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    line-height: 1.55;
    min-height: 1.55rem;
}

.body-diff-line + .body-diff-line {
    border-top: 1px solid rgba(215, 222, 228, 0.55);
}

.body-diff-marker {
    color: var(--muted);
    font-weight: 700;
    padding: 0 0.55rem;
    user-select: none;
}

.body-diff-text {
    padding: 0 0.65rem;
    white-space: pre-wrap;
}

.body-diff-line-added {
    background: #eef8f1;
}

.body-diff-line-added .body-diff-marker {
    color: #1f6b3a;
}

.body-diff-line-removed {
    background: #fff1f1;
}

.body-diff-line-removed .body-diff-marker {
    color: #9b1c1c;
}

.compact-kv {
    display: grid;
    gap: 0.3rem 0.75rem;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    margin: 0 0 0.75rem;
}

.compact-kv dt {
    color: var(--muted);
    font-weight: 700;
}

.compact-kv dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.stacked-meta {
    display: grid;
    gap: 1rem;
}

.metadata-line {
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.code-id {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.3rem;
    color: #273744;
    display: inline-block;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.82rem;
    max-width: 100%;
    overflow: hidden;
    padding: 0.12rem 0.35rem;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

a.code-id {
    color: #273744;
    text-decoration: none;
}

a.code-id:hover {
    border-color: #8ac3b7;
    color: var(--accent-strong);
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-row label {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.checkbox-row input {
    width: auto;
}

.split-panel {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.sub-panel {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.template-list {
    list-style: none;
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 0;
}

.template-list li {
    margin-bottom: 0.5rem;
}

.template-list a {
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid var(--panel-border);
    border-radius: 0.35rem;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.5rem;
    text-decoration: none;
}

.template-list a span {
    overflow-wrap: anywhere;
}

.template-list a small {
    flex: 0 0 auto;
}

.template-list a.active {
    background: #eef6f3;
    border-color: #8ac3b7;
    font-weight: 700;
}

.template-search {
    margin-bottom: 0.75rem;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.settings-editor-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
}

.signature-settings-stack {
    display: grid;
    gap: 1rem;
}

.signature-textarea {
    min-height: 5rem;
}

.signature-html-textarea {
    min-height: 9rem;
}

.template-workspace {
    display: grid;
    gap: 1rem;
    grid-template-columns: 320px minmax(0, 1fr);
}

.template-browser,
.template-editor {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.template-browser {
    align-self: start;
    position: sticky;
    top: 1rem;
}

.template-browser-header,
.template-editor-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.template-browser-header h4,
.template-editor-header h4 {
    margin: 0;
}

.template-editor-header p {
    margin: 0.2rem 0 0;
}

.template-summary {
    background: #eef6f3;
    border: 1px solid #8ac3b7;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
}

.template-summary p {
    margin: 0.35rem 0 0;
}

.template-metadata-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-textarea {
    min-height: 8rem;
}

.kb-context-preview {
    min-height: 24rem;
}

.rule-list {
    display: grid;
    gap: 1rem;
}

.playbook-summary-grid {
    border-bottom: 1px solid var(--panel-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.summary-label {
    color: var(--muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.rule-card {
    background: #f8fafc;
    border: 1px solid var(--panel-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.rule-card-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.rule-card-header h4 {
    margin: 0;
}

.rule-card-header p {
    margin: 0.2rem 0 0;
}

.rule-badges {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.rule-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 0.8fr 1.1fr 1.3fr 1fr;
    margin-top: 1rem;
}

.rule-detail-grid h5 {
    color: var(--muted);
    font-size: 0.78rem;
    margin: 0 0 0.4rem;
    text-transform: uppercase;
}

.rule-card-footer {
    border-top: 1px solid var(--panel-border);
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.runtime-note {
    margin: 0;
    overflow-wrap: anywhere;
}

.rule-note-grid {
    border-top: 1px solid var(--panel-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
    padding-top: 0.85rem;
}

.rule-note-grid h5 {
    color: var(--muted);
    font-size: 0.78rem;
    margin: 0 0 0.4rem;
    text-transform: uppercase;
}

.rule-note-grid ul {
    margin: 0;
    padding-left: 1.1rem;
}

.rule-note-grid li + li {
    margin-top: 0.35rem;
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .side-nav {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .content {
        padding: 1rem;
    }

    .live-processing-panel,
    .readiness-overview-summary,
    .readiness-item,
    .decision-workflow-layout,
    .outcome-path,
    .split-panel,
    .compare-grid,
    .settings-editor-grid,
    .template-workspace,
    .template-metadata-grid,
    .rule-detail-grid {
        display: block;
    }

    .rule-detail-grid section {
        margin-top: 1rem;
    }

    .reply-path-panel {
        margin-top: 1rem;
    }

    .decision-source-panel {
        display: block;
    }

    .outcome-path-step + .outcome-path-step {
        margin-top: 0.75rem;
    }

    .outcome-path-step + .outcome-path-step::before {
        height: 0.75rem;
        left: 1.4rem;
        top: -0.75rem;
        width: 2px;
    }

    .template-browser {
        margin-bottom: 1rem;
        position: static;
    }

    .live-panel-meta {
        align-items: flex-start;
        justify-items: start;
        margin-top: 0.75rem;
    }

    .readiness-overview-meta {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .live-indicator {
        margin-top: 0.75rem;
    }

    .readiness-item a {
        display: inline-block;
        margin-top: 0.5rem;
    }

    .live-panel-meta .live-indicator {
        margin-top: 0;
    }

    .details-list {
        grid-template-columns: 1fr;
    }

    .details-list-compact {
        grid-template-columns: 1fr 1fr;
    }

    .decision-facts,
    .template-candidate dl {
        grid-template-columns: 1fr;
    }

    .outcome-header,
    .compare-panel-header {
        display: block;
    }
}

.marketing-body {
    background: #ffffff;
    color: #10202d;
}

.marketing-page {
    --marketing-text: #10202d;
    --marketing-muted: #5d6b76;
    --marketing-soft: #eef4f7;
    --marketing-line: #d9e3e8;
    --marketing-accent: #267a65;
    --marketing-accent-strong: #17614e;
    --marketing-ink: #132635;
    background: #ffffff;
    color: var(--marketing-text);
    min-height: 100vh;
    overflow-x: hidden;
}

.marketing-header,
.marketing-hero,
.marketing-section,
.marketing-footer {
    margin: 0 auto;
    max-width: 1160px;
    width: min(calc(100% - 2rem), 1160px);
}

.marketing-header {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    padding: 1.35rem 0;
}

.marketing-brand,
.marketing-nav,
.marketing-hero-actions,
.marketing-footer {
    align-items: center;
    display: flex;
}

.marketing-brand {
    color: var(--marketing-ink);
    font-weight: 800;
    gap: 0.65rem;
    text-decoration: none;
}

.marketing-brand-mark {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
}

.marketing-brand-mark img {
    display: block;
    height: 2rem;
    width: 2rem;
}

.marketing-nav {
    gap: 1.25rem;
}

.marketing-nav a,
.marketing-footer a {
    color: var(--marketing-muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.marketing-nav a:hover,
.marketing-footer a:hover {
    color: var(--marketing-accent-strong);
}

.marketing-nav-cta {
    border: 1px solid var(--marketing-line);
    border-radius: 0.5rem;
    color: var(--marketing-ink);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.65rem 0.9rem;
    text-decoration: none;
}

.marketing-nav-cta:hover {
    border-color: #9ebdb4;
    color: var(--marketing-accent-strong);
}

.marketing-hero {
    align-items: center;
    display: grid;
    gap: 4rem;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    min-height: calc(100vh - 5.1rem);
    padding: 2.5rem 0 4rem;
}

.marketing-hero h1 {
    color: var(--marketing-ink);
    font-size: clamp(2.8rem, 4.45vw, 4.35rem);
    line-height: 1.03;
    margin: 0;
    max-width: 12.5ch;
}

.marketing-hero-text {
    color: var(--marketing-muted);
    font-size: 1.18rem;
    line-height: 1.65;
    margin: 1.5rem 0 0;
    max-width: 36rem;
}

.marketing-fit-line {
    color: var(--marketing-ink);
    font-size: 1rem;
    font-weight: 800;
    margin: 1rem 0 0;
    max-width: 36rem;
}

.marketing-hero-actions {
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.marketing-button {
    border-radius: 0.5rem;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
}

button.marketing-button {
    border-radius: 0.5rem;
    font-size: 0.98rem;
}

.marketing-button-primary {
    background: var(--marketing-accent);
    color: #ffffff;
}

.marketing-button-primary:hover {
    background: var(--marketing-accent-strong);
    color: #ffffff;
}

.marketing-button-secondary {
    background: #ffffff;
    border: 1px solid var(--marketing-line);
    color: var(--marketing-ink);
}

.marketing-button-secondary:hover {
    background: var(--marketing-soft);
    color: var(--marketing-ink);
}

.hero-product-shot {
    justify-self: end;
    margin: 0;
    max-width: 620px;
    width: 100%;
}

.hero-product-shot picture,
.hero-product-shot img {
    display: block;
}

.hero-product-shot img {
    border: 1px solid var(--marketing-line);
    border-radius: 0.85rem;
    box-shadow: 0 22px 60px rgba(19, 38, 53, 0.14);
    height: auto;
    width: 100%;
}

.low-risk-section {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    padding-bottom: 4rem;
    padding-top: 4rem;
    position: relative;
}

.low-risk-section::before,
.pricing-section::before,
.early-access-section::before {
    background-image: repeating-linear-gradient(135deg, rgba(45, 136, 113, 0.08) 0 1px, transparent 1px 18px);
    content: "";
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    position: absolute;
}

.low-risk-section::before {
    mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.pricing-section::before,
.early-access-section::before {
    mask-image: linear-gradient(90deg, #000 0, #000 28%, transparent 68%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 28%, transparent 68%);
}

.low-risk-section > *,
.pricing-section > *,
.early-access-section > * {
    position: relative;
}

.low-risk-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.low-risk-list article {
    background: #f7fafb;
    border: 1px solid var(--marketing-line);
    border-radius: 0.75rem;
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.marketing-feature-icon {
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.65rem;
    color: var(--marketing-accent-strong);
    display: inline-grid;
    flex: 0 0 auto;
    height: 2.25rem;
    place-items: center;
    position: relative;
    width: 2.25rem;
}

.marketing-feature-icon svg {
    fill: none;
    height: 1.15rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1.15rem;
}

.low-risk-list h3 {
    color: var(--marketing-ink);
    font-size: 1.05rem;
    margin: 0;
}

.low-risk-list p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.marketing-section {
    border-top: 1px solid var(--marketing-line);
    padding: 5rem 0;
    position: relative;
}

.marketing-section-copy {
    max-width: 42rem;
}

.marketing-section h2 {
    align-items: flex-start;
    color: var(--marketing-ink);
    display: flex;
    font-size: clamp(2rem, 4vw, 3.4rem);
    gap: 0.85rem;
    line-height: 1.05;
    margin: 0;
}

.section-title-icon {
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.75rem;
    color: var(--marketing-accent-strong);
    display: inline-grid;
    flex: 0 0 auto;
    height: clamp(2.25rem, 4vw, 3rem);
    margin-top: 0.1em;
    place-items: center;
    position: relative;
    width: clamp(2.25rem, 4vw, 3rem);
}

.section-title-icon svg {
    fill: none;
    height: 1.35rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1.35rem;
}

.marketing-section p {
    color: var(--marketing-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 1rem 0 0;
}

.fit-section {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 0.75fr) minmax(360px, 1.25fr);
}

.fit-columns {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fit-columns > div,
.faq-list article {
    border-top: 1px solid var(--marketing-line);
    padding-top: 1rem;
}

.fit-columns h3,
.faq-list h3 {
    color: var(--marketing-ink);
    font-size: 1.1rem;
    margin: 0;
}

.fit-columns ul {
    display: grid;
    gap: 0.8rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.fit-columns li {
    color: var(--marketing-muted);
    font-size: 1rem;
    line-height: 1.55;
    padding-left: 1.4rem;
    position: relative;
}

.fit-columns li::before {
    background: var(--marketing-accent);
    border-radius: 999px;
    content: "";
    height: 0.45rem;
    left: 0;
    position: absolute;
    top: 0.55rem;
    width: 0.45rem;
}

.workflow-review-section {
    align-items: center;
    display: grid;
    gap: 2.25rem;
    grid-template-columns: minmax(0, 0.68fr) minmax(520px, 1.42fr);
}

.workflow-review-diagram {
    background:
        linear-gradient(135deg, rgba(38, 122, 101, 0.08), transparent 44%),
        #ffffff;
    border: 1px solid var(--marketing-line);
    border-radius: 0.85rem;
    box-shadow: 0 20px 50px rgba(19, 38, 53, 0.1);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    position: relative;
}

.workflow-review-step {
    display: grid;
    gap: 1rem;
    grid-template-rows: auto 1fr;
    padding: 1.25rem;
    position: relative;
}

.workflow-review-step > div:last-child {
    align-self: start;
}

.workflow-review-step + .workflow-review-step {
    border-left: 1px solid var(--marketing-line);
}

.workflow-review-step + .workflow-review-step::before {
    background: #ffffff;
    border: 1px solid #b9d8ce;
    border-bottom: 0;
    border-left: 0;
    content: "";
    height: 0.8rem;
    left: -0.44rem;
    position: absolute;
    top: 4rem;
    transform: rotate(45deg);
    width: 0.8rem;
}

.workflow-step-visual {
    background: #f7fafb;
    border: 1px solid var(--marketing-line);
    border-radius: 0.7rem;
    aspect-ratio: 28 / 17;
    overflow: hidden;
    position: relative;
}

.workflow-step-visual img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.workflow-step-number {
    color: var(--marketing-accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.workflow-review-step h3 {
    color: var(--marketing-ink);
    font-size: 1.08rem;
    margin: 0.2rem 0 0;
}

.workflow-review-step p {
    color: var(--marketing-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.45rem 0 0;
}

.workflow-review-note {
    color: var(--marketing-accent-strong);
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0;
}

.pricing-section {
    display: grid;
    gap: 2rem;
    position: relative;
}

.pricing-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-card {
    background: #ffffff;
    border: 1px solid var(--marketing-line);
    border-radius: 0.75rem;
    display: grid;
    gap: 1.25rem;
    grid-template-rows: 1fr auto;
    padding: 1rem;
}

.pricing-card-featured {
    border-color: #8abdad;
    box-shadow: 0 18px 44px rgba(38, 122, 101, 0.14);
}

.pricing-card-trial {
    background: #f7fafb;
}

.pricing-card h3 {
    color: var(--marketing-ink);
    font-size: 1.1rem;
    margin: 0;
}

.pricing-card p {
    font-size: 0.96rem;
}

.pricing-price {
    color: var(--marketing-ink) !important;
    font-size: 1.85rem !important;
    font-weight: 900;
    line-height: 1.1 !important;
    margin-top: 0.8rem !important;
}

.pricing-price span {
    color: var(--marketing-muted);
    font-size: 0.95rem;
    font-weight: 800;
}

.pricing-yearly {
    color: var(--marketing-accent-strong) !important;
    font-size: 0.9rem !important;
    font-weight: 800;
    margin-top: 0.35rem !important;
}

.pricing-note {
    align-items: center;
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.75rem;
    color: var(--marketing-ink);
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.pricing-note > div {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
}

.pricing-note strong {
    color: var(--marketing-accent-strong);
}

.pricing-note-link {
    border: 1px solid #8abdad;
    border-radius: 0.55rem;
    color: var(--marketing-accent-strong);
    flex: 0 0 auto;
    font-weight: 800;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.pricing-note-link:hover,
.pricing-note-link:focus-visible {
    background: #ffffff;
}

.pricing-terms {
    font-size: 0.96rem !important;
    max-width: 58rem;
}

.safety-section,
.early-access-section {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.safety-section {
}

.safety-list {
    display: grid;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.safety-list li {
    border-top: 1px solid var(--marketing-line);
    color: var(--marketing-ink);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    padding-top: 1rem;
}

.safety-list-icons li {
    align-items: start;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto 1fr;
}

.safety-list-icons .marketing-feature-icon {
    margin-top: -0.1rem;
}

.not-for-line {
    color: var(--marketing-ink) !important;
    font-weight: 800;
}

.use-case-list {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 2rem;
}

.use-case-list article {
    background: #ffffff;
    border-top: 1px solid var(--marketing-line);
    color: var(--marketing-ink);
    padding: 1rem 1rem 0;
}

.use-case-list article + article {
    border-left: 1px solid var(--marketing-line);
}

.use-case-list h3 {
    color: var(--marketing-ink);
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
}

.use-case-list p {
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0.45rem 0 0;
}

.ecommerce-direction-note {
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.75rem;
    margin-top: 2rem;
    padding: 1rem 1.1rem;
    width: 100%;
}

.ecommerce-direction-note strong {
    color: var(--marketing-accent-strong);
    display: block;
    font-size: 1rem;
}

.ecommerce-direction-note p {
    font-size: 0.96rem;
    line-height: 1.55;
    margin: 0.35rem 0 0;
}

.faq-section {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
}

.faq-list {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-list p {
    font-size: 0.98rem;
    margin-top: 0.5rem;
}

.early-access-section {
    align-items: start;
    position: relative;
}

.marketing-success {
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.5rem;
    color: var(--marketing-accent-strong) !important;
    font-weight: 800;
    padding: 0.8rem;
}

.form-reassurance {
    color: var(--marketing-accent-strong) !important;
    font-size: 0.98rem !important;
    font-weight: 800;
}

.early-access-form {
    background: #f7fafb;
    border: 1px solid var(--marketing-line);
    border-radius: 0.75rem;
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.selected-plan-summary {
    background: #edf7f3;
    border: 1px solid #b9d8ce;
    border-radius: 0.65rem;
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem;
}

.selected-plan-summary span {
    color: var(--marketing-accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.selected-plan-summary strong {
    color: var(--marketing-ink);
    font-size: 1rem;
}

.selected-plan-summary p {
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
}

.marketing-honeypot {
    height: 0;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    width: 0;
}

.early-access-form textarea {
    min-height: 8rem;
}

.early-access-form button {
    justify-self: start;
}

.form-privacy-note {
    color: var(--marketing-muted);
    font-size: 0.9rem !important;
    margin: -0.25rem 0 0 !important;
}

.thank-you-page {
    align-items: center;
    display: grid;
    min-height: calc(100vh - 5.1rem);
    padding: 4rem 0;
}

.thank-you-panel {
    margin: 0 auto;
    max-width: 680px;
    text-align: center;
}

.thank-you-panel h1 {
    color: var(--marketing-ink);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 1.02;
    margin: 0;
}

.thank-you-panel p {
    color: var(--marketing-muted);
    font-size: 1.08rem;
    line-height: 1.65;
    margin: 1rem auto 0;
    max-width: 34rem;
}

.thank-you-panel .marketing-button {
    margin-top: 2rem;
}

.marketing-footer {
    border-top: 1px solid var(--marketing-line);
    color: var(--marketing-muted);
    font-weight: 700;
    justify-content: space-between;
    padding: 1.5rem 0 2rem;
}

.marketing-footer-brand {
    color: var(--marketing-ink);
}

.back-to-top-button {
    align-items: center;
    background: var(--marketing-accent);
    border: 1px solid #1f6f5b;
    border-radius: 999px;
    bottom: 1.25rem;
    box-shadow: 0 16px 34px rgba(19, 38, 53, 0.18);
    color: #ffffff;
    display: inline-flex;
    height: 2.85rem;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 1.25rem;
    text-decoration: none;
    transform: translateY(0.4rem);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
    width: 2.85rem;
    z-index: 20;
}

.back-to-top-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top-button:hover {
    background: var(--marketing-accent-strong);
}

.back-to-top-button span {
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    height: 0.7rem;
    transform: translateY(0.15rem) rotate(45deg);
    width: 0.7rem;
}

@media (max-width: 900px) {
    .marketing-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .marketing-nav {
        order: 3;
        width: 100%;
    }

    .marketing-hero,
    .low-risk-section,
    .fit-section,
    .workflow-review-section,
    .safety-section,
    .faq-section,
    .early-access-section {
        grid-template-columns: 1fr;
    }

    .marketing-hero {
        gap: 2.5rem;
        min-height: 0;
        padding-top: 2rem;
    }

    .marketing-hero h1 {
        max-width: 12ch;
    }

    .marketing-hero > *,
    .marketing-hero-copy,
    .workflow-review-diagram,
    .hero-product-shot {
        min-width: 0;
    }

    .low-risk-list,
    .workflow-review-diagram,
    .fit-columns,
    .use-case-list,
    .faq-list,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .workflow-review-step + .workflow-review-step {
        border-left: 0;
        border-top: 1px solid var(--marketing-line);
    }

    .workflow-review-step + .workflow-review-step::before {
        left: 2rem;
        top: -0.44rem;
        transform: rotate(135deg);
    }

    .use-case-list article + article {
        border-left: 0;
    }

    .hero-product-shot {
        justify-self: start;
        max-width: 680px;
        width: 100%;
    }

    .pricing-card {
        grid-template-rows: auto;
    }
}

@media (max-width: 560px) {
    .marketing-page * {
        min-width: 0;
    }

    .marketing-header,
    .marketing-hero,
    .marketing-section,
    .marketing-footer {
        margin-left: 1rem;
        margin-right: 1rem;
        max-width: none;
        width: auto;
    }

    .marketing-nav {
        display: grid;
        gap: 0.45rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
    }

    .marketing-nav a:nth-child(5) {
        display: none;
    }

    .marketing-nav a {
        background: #f7fafb;
        border: 1px solid var(--marketing-line);
        border-radius: 0.45rem;
        color: var(--marketing-ink);
        font-size: 0.86rem;
        line-height: 1.2;
        padding: 0.5rem;
        text-align: center;
    }

    .marketing-hero {
        padding-top: 1.25rem;
    }

    .marketing-nav-cta {
        max-width: none;
        width: 100%;
        text-align: center;
    }

    .marketing-hero h1 {
        font-size: 2.35rem;
        max-width: 11.5ch;
    }

    .marketing-hero-text {
        font-size: 1rem;
        max-width: 19rem;
    }

    .marketing-fit-line {
        font-size: 0.95rem;
        line-height: 1.45;
        max-width: 18.5rem;
    }

    .hero-product-shot {
        margin-top: -0.5rem;
    }

    .hero-product-shot img {
        border-radius: 0.65rem;
    }

    .marketing-button,
    .marketing-hero-actions,
    .early-access-form button {
        width: auto;
    }

    .marketing-button {
        align-items: center;
        display: flex;
    }

    .pricing-note {
        align-items: stretch;
    }

    .pricing-note-link {
        text-align: center;
        width: 100%;
    }

    .marketing-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        padding-right: 0;
    }

    .marketing-section {
        padding: 3.5rem 0;
    }

    .marketing-footer {
        align-items: flex-start;
        display: grid;
        gap: 0.75rem;
    }

    .back-to-top-button {
        bottom: 1rem;
        height: 2.65rem;
        right: 1rem;
        width: 2.65rem;
    }
}
