:root {
    --sand-50: #fbf7ef;
    --sand-100: #f4ebda;
    --sand-200: #e6d5bb;
    --sand-300: #cfb58b;
    --ink-900: #1b2430;
    --ink-700: #445064;
    --ink-500: #6b7280;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #0a4541;
    --amber-600: #c0812f;
    --amber-100: #fff4db;
    --rose-700: #b42318;
    --rose-100: #fff0ef;
    --mint-100: #eaf8f5;
    --mint-700: #117864;
    --slate-950: #0f172a;
    --white: #ffffff;
    --shadow-lg: 0 28px 80px rgba(20, 27, 44, 0.12);
    --shadow-md: 0 16px 40px rgba(20, 27, 44, 0.1);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-900);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(15, 118, 110, 0.12), transparent 28%),
        radial-gradient(circle at 90% 0%, rgba(192, 129, 47, 0.18), transparent 26%),
        linear-gradient(180deg, #f2e6cf 0%, #f8f3e8 24%, #fcfaf5 100%);
}

code,
pre { font-family: Consolas, "Courier New", monospace; }

.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 20px 56px;
}

.masthead,
.workspace {
    display: grid;
    gap: 24px;
}

.masthead {
    grid-template-columns: 1.3fr 0.7fr;
    align-items: stretch;
    margin-bottom: 24px;
}

.workspace {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    align-items: start;
}

.masthead-copy,
.masthead-panel,
.builder-panel,
.review-card {
    border: 1px solid rgba(207, 181, 139, 0.78);
    background: rgba(255, 252, 246, 0.9);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
}

.masthead-copy {
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.masthead-copy::after {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.16), transparent 70%);
}

.eyebrow,
.panel-kicker,
.section-step,
.note-kicker,
.fact-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.eyebrow,
.section-step { color: var(--amber-600); }
.panel-kicker,
.fact-label,
.note-kicker { color: var(--teal-700); }

h1,
h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    margin-top: 16px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.04;
    max-width: 12ch;
}

h2 {
    font-size: 1.55rem;
    line-height: 1.1;
}

.lede,
.section-heading p,
.journey-item p,
.action-hint,
.field small,
.toggle-copy small,
.service-note,
.status-list,
.alert,
.preview-label { color: var(--ink-700); }

.lede {
    margin: 18px 0 0;
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.75;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.welcome-banner {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 248, 235, 0.95));
    color: var(--ink-900);
}

.welcome-banner strong {
    font-size: 1rem;
}

.welcome-banner span {
    color: var(--ink-700);
    line-height: 1.65;
}

.fact-card {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 248, 235, 0.88);
    border: 1px solid rgba(230, 213, 187, 0.9);
}

.fact-card strong {
    display: block;
    margin-top: 8px;
    font-size: 0.98rem;
}

.masthead-panel { padding: 28px; }

.panel-header {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

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

.journey-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(230, 213, 187, 0.95);
    background: linear-gradient(180deg, rgba(255, 251, 244, 0.95), rgba(247, 239, 225, 0.95));
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.journey-item.is-complete {
    border-color: rgba(17, 120, 100, 0.38);
    box-shadow: 0 10px 24px rgba(17, 120, 100, 0.1);
}

.journey-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--ink-900);
    color: var(--white);
    font-weight: 700;
}

.journey-item.is-complete .journey-number {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
}

.journey-item strong {
    display: block;
    margin-bottom: 4px;
}

.journey-item p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.builder-panel { padding: 26px; }

.wizard-form,
.review-panel {
    display: grid;
    gap: 20px;
}

.form-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 211, 184, 0.95);
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(251, 246, 237, 0.98));
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.section-heading {
    display: grid;
    gap: 6px;
    margin-bottom: 20px;
}

.section-heading.compact { margin-bottom: 14px; }

.section-heading p {
    margin: 0;
    line-height: 1.6;
}

.field-grid {
    display: grid;
    gap: 16px;
}

.field-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 8px;
}

.field > span { font-weight: 700; }

.field input,
.field textarea {
    width: 100%;
    border: 1px solid rgba(207, 181, 139, 0.88);
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink-900);
    border-radius: 14px;
    padding: 14px 15px;
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field textarea {
    min-height: 118px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.62);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
}

.field input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f3efe6;
}

.field small {
    font-size: 0.88rem;
    line-height: 1.55;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.toggle-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid rgba(207, 181, 139, 0.88);
    border-radius: var(--radius-md);
    background: rgba(255, 248, 235, 0.8);
}

.toggle-card input {
    margin-top: 4px;
    transform: scale(1.2);
}

.toggle-copy strong,
.toggle-copy small { display: block; }
.toggle-copy strong { margin-bottom: 5px; }

.service-note {
    border-radius: var(--radius-md);
    border: 1px dashed rgba(17, 120, 100, 0.32);
    background: rgba(234, 248, 245, 0.7);
    padding: 16px 18px;
    line-height: 1.65;
}

.compact-note {
    align-self: stretch;
}

.service-checklist,
.status-list,
.alert-list {
    margin: 12px 0 0;
    padding-left: 18px;
}

.service-checklist li,
.status-list li,
.alert-list li { margin-bottom: 8px; }

.action-card {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 250, 240, 0.9));
}

.action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.primary-button,
.copy-button {
    border: 0;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button {
    padding: 15px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
    color: var(--white);
    font-weight: 700;
    font-size: 0.98rem;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
}

.primary-button:hover,
.copy-button:hover { transform: translateY(-1px); }

.action-hint {
    margin: 0;
    max-width: 48ch;
    line-height: 1.6;
}

.review-panel {
    position: sticky;
    top: 20px;
}

.review-card { padding: 24px; }

.preview-stack,
.result-grid {
    display: grid;
    gap: 12px;
}

.preview-item,
.result-chip {
    padding: 15px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(230, 213, 187, 0.92);
    background: rgba(255, 250, 242, 0.92);
}

.preview-item.emphasis {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(255, 251, 245, 0.95));
    border-color: rgba(15, 118, 110, 0.22);
}

.preview-label,
.result-chip span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.preview-item strong,
.result-chip strong {
    font-size: 1rem;
    line-height: 1.45;
    word-break: break-word;
}

.status-list { line-height: 1.65; }

.command-block {
    margin-top: 16px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--slate-950);
    color: #dbe4f5;
}

.command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.command-block pre {
    margin: 0;
    padding: 18px;
    font-size: 0.86rem;
    line-height: 1.65;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-button {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-weight: 700;
}

.copy-button.is-copied {
    background: rgba(17, 120, 100, 0.42);
}

.execution-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
}

.result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-chip.wide {
    grid-column: 1 / -1;
}

.alert {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.alert-danger {
    background: var(--rose-100);
    border: 1px solid rgba(180, 35, 24, 0.18);
    color: var(--rose-700);
}

.alert-success {
    background: var(--mint-100);
    border: 1px solid rgba(17, 120, 100, 0.18);
    color: var(--mint-700);
}

@media (max-width: 1100px) {
    .masthead,
    .workspace,
    .quick-facts,
    .toggle-grid,
    .field-grid.two-column,
    .result-grid {
        grid-template-columns: 1fr;
    }

    .review-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 20px 14px 40px;
    }

    .masthead-copy,
    .masthead-panel,
    .builder-panel,
    .review-card,
    .form-card {
        padding: 20px;
        border-radius: 22px;
    }

    h1 { max-width: none; }

    .action-row,
    .command-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
