.flagship {
    --green: #184d3d;
    --ink: #142e26;
    --muted: #52625a;
    --paper: #f8f8f1;
    --accent: #ebf1df;
    --surface: #fdfef9;
    --demo-line: #9bb584;
}

.business {
    --green: #254ba6;
    --ink: #172b51;
    --muted: #4c5f7c;
    --paper: #f5f7fc;
    --line: #d9e0ed;
    --accent: #e9effc;
    --surface: #fff;
    --demo-line: #9aafd9;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 20;
    transform: translateY(-150%);
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--green);
    border-radius: 6px;
}

.skip-link:focus { transform: translateY(0); }

.site-header { height: 78px; }
.site-header nav a, .account-nav > a:not(.button) { color: var(--muted); font-weight: 600; }
.button { border-radius: 9px; min-height: 44px; }
.button:hover { background: var(--ink); }
.button.secondary { border-color: var(--demo-line); }
.button.secondary:hover { background: var(--accent); color: var(--ink); }
.button:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: var(--green); }

.product-home {
    --green: #0b57d0;
    --ink: #1f1f1f;
    --muted: #444746;
    --paper: #f8fafd;
    --line: #dde3ea;
    --accent: #e8f0fe;
    --surface: #fff;
    --demo-line: #c4c7c5;
    --surface-muted: #f0f4f9;
    --page-gutter: max(clamp(20px, 4vw, 48px), calc((100vw - 1504px) / 2));
    font-family: "Segoe UI", Roboto, system-ui, sans-serif;
}

.product-home .site-header {
    margin: 0;
    padding-inline: var(--page-gutter);
    background: var(--surface);
}
.product-home .site-header nav { margin-left: auto; }
.product-home .brand-icon { border-radius: 8px; color: white; }
.product-home .button { border-radius: 6px; }
.product-home .button:not(.secondary):hover { background: #0842a0; }
.product-home .button.secondary { background: var(--surface); }
.product-home .button.secondary:hover { background: var(--surface-muted); }
.product-home .site-footer { padding-inline: var(--page-gutter); background: var(--surface-muted); }

.landing { padding-inline: var(--page-gutter); }
.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
    padding: clamp(48px, 6vw, 96px) 0 64px;
}
.landing-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--green);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.landing-kicker > span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.landing-hero h1 {
    margin-bottom: 20px;
    font-size: clamp(2.4rem, 4.3vw, 4rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.045em;
}
.landing-hero h1 em { font: inherit; color: var(--green); }
.landing-lede { max-width: 42rem; font-size: 1.125rem; line-height: 1.8; color: var(--muted); }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.landing-intro .microcopy { margin: 24px 0 0; font-size: .82rem; }
.landing-intro .microcopy span { margin-right: 5px; color: #137333; font-weight: 700; }

.idea-card {
    max-width: 37rem;
    margin-top: 24px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.idea-card label { display: block; font-size: .88rem; font-weight: 700; }
.idea-card textarea:not([type]) {
    width: 100%;
    margin: 8px 0;
    padding: 9px 12px;
    border: 1px solid var(--demo-line);
    border-radius: 6px;
    background: var(--surface);
}
.idea-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.idea-footer > span { color: var(--muted); font-size: .77rem; }
.idea-footer .button { padding-inline: 16px; }

.landing-demo { overflow: hidden; border: 1px solid var(--demo-line); border-radius: 12px; background: var(--surface); }
.demo-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-muted);
}
.demo-top h2 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: normal; }
.demo-top p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.demo-badge { padding: 4px 10px; border-radius: 20px; background: #e6f4ea; color: #137333; font-size: .75rem; font-weight: 700; }
.demo-question { padding: 18px 24px; }
.demo-count { font-size: .76rem; font-weight: 700; color: var(--green); }
.demo-question h3 { margin: 5px 0 12px; font-size: 1.25rem; font-weight: 650; }
.demo-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: .88rem;
}
.demo-option b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 5px; background: var(--accent); }
.demo-option span { margin-left: auto; }
.demo-option.is-selected { border-color: var(--green); background: var(--accent); }
.demo-caption {
    margin: 0;
    padding: 12px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    font-size: .75rem;
}

.flow-example { display: grid; justify-items: center; gap: 26px; padding: 20px 24px; }
.flow-node {
    width: min(100%, 240px);
    position: relative;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}
.flow-node > span { display: block; color: var(--green); font-size: .72rem; font-weight: 700; }
.flow-node > strong { display: block; font-size: .9rem; line-height: 1.3; }
.flow-start, .flow-end { text-align: center; }
.flow-split { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; position: relative; }
.flow-split .flow-node { width: 100%; }
.flow-split::before, .flow-split::after {
    content: '';
    position: absolute;
    inset: -13px 25% auto;
    border: 1px solid var(--green);
    height: 13px;
    border-bottom: 0;
}
.flow-split::after { inset: auto 25% -13px; border-bottom: 1px solid var(--green); border-top: 0; }
.flow-start::after, .flow-end::before {
    content: '';
    position: absolute;
    left: 50%;
    height: 14px;
    border-left: 1px solid var(--green);
}
.flow-start::after { top: 100%; }
.flow-end::before { bottom: 100%; }

.landing-templates, .landing-workflow { padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--line); }
.landing-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 24px; }
.landing-section-heading h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.375rem); font-weight: 650; letter-spacing: -.03em; }
.landing-section-heading .landing-kicker { margin-bottom: 10px; }
.landing-link { color: var(--green); font-size: .9rem; font-weight: 700; }
.template-grid, .landing-workflow ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.template-grid > a, .landing-workflow li { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.template-grid > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.template-grid > a:hover { border-color: var(--green); background: var(--accent); text-decoration: none; }
.template-symbol, .landing-workflow li > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--green);
    font-weight: 700;
}
.template-arrow { color: var(--green); }
.template-grid h3, .landing-workflow li h3 { font-size: 1.06rem; font-weight: 700; margin: 0 0 4px; }
.template-grid p, .landing-workflow li p { margin: 0; color: var(--muted); font-size: .875rem; }
.landing-workflow ol { padding: 0; margin: 0; list-style: none; }
.landing-workflow li > span { margin-bottom: 12px; }

.studio-grid, .public-form { border-radius: 16px; }
.studio-grid .preview-panel, .ai-strip { background: var(--accent); border-color: var(--line); }
.field-card { background: var(--surface); }
.field-toolbar .text-button { min-height: 36px; }
.rule-row > div > select, .rule-row > div > input { width: 100%; }
.rule-row > div > input { margin-top: 5px; }
.rule-row > div > input[hidden] { display: none; }
.rule-row .rule-answer { width: 100%; margin-top: 5px; }
.stats article, .response-card, .pricing-grid article { border-radius: 13px; }
.pricing-grid .featured, .empty-state, .share-card, .insights { background: var(--accent); border-color: var(--line); }

.response-experience { max-width: 750px; padding: clamp(22px, 5vw, 56px); box-shadow: 0 18px 42px #102c2010; }
.response-experience h1 { font-size: clamp(2.1rem, 4.7vw, 3.25rem); overflow-wrap: anywhere; }
.response-progress { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.response-progress p { margin: 0; font-weight: 700; }
.response-progress .text-button { min-height: 44px; text-align: right; text-decoration: underline; }
.response-experience progress { width: 100%; height: 8px; border: 0; border-radius: 20px; accent-color: var(--green); }
.response-experience progress::-webkit-progress-bar { background: var(--accent); border-radius: 20px; }
.response-experience progress::-webkit-progress-value { background: var(--green); border-radius: 20px; }
.response-experience #public-fields { margin-top: 24px; }
.response-experience .question-label { font-size: 1.25rem; line-height: 1.35; overflow-wrap: anywhere; }
.response-experience .question input, .response-experience .question textarea, .response-experience .question select { font-size: 1rem; }
.response-experience .choice { font-size: 1rem; min-height: 48px; cursor: pointer; border-radius: 9px; }
.response-experience .choice:has(input:checked) { border-color: var(--green); background: var(--accent); }
.response-experience input[type=radio], .response-experience input[type=checkbox] { accent-color: var(--green); }
.response-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.response-actions [hidden], .response-experience [hidden] { display: none; }
.response-experience .error:not([hidden]) { padding: 10px 12px; border-left: 3px solid #a13a2c; background: #fff2ee; }

@media (max-width: 900px) {
    .site-header nav { gap: 12px; font-size: .8rem; }
    .landing-hero { grid-template-columns: 1fr; }
    .landing-demo { width: 100%; max-width: 760px; }
}
@media (max-width: 760px) {
    .site-header { height: auto; }
    .site-header nav { flex-wrap: wrap; row-gap: 4px; }
    .site-header nav a { min-height: 30px; display: flex; align-items: center; }
    .landing-hero { padding: 44px 0; }
    .landing-lede { font-size: 1rem; }
    .landing-section-heading { align-items: start; flex-direction: column; }
    .template-grid, .landing-workflow ol { grid-template-columns: 1fr; gap: 12px; }
    .demo-top, .demo-question, .demo-caption, .flow-example { padding-inline: 16px; }
    .response-experience { margin-inline: 5%; }
}
@media (max-width: 400px) {
    .idea-footer .button { width: 100%; }
}

/* Integrations panel (dashboard) */
.integrations { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid rgba(0,0,0,.1); border-radius: 14px; }
.integrations h3 { margin-top: 0; }
.webhook-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.webhook-form label { flex-basis: 100%; font-weight: 600; }
.webhook-form input { flex: 1 1 18rem; min-width: 0; padding: .55rem .75rem; border: 1px solid rgba(0,0,0,.2); border-radius: 10px; }
.webhook-url { word-break: break-all; }
.webhook-secret { margin: .75rem 0; }
.webhook-secret code { word-break: break-all; }
.integrations .row-actions form { display: inline; }
.deliveries { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: .9rem; }
.deliveries caption { caption-side: top; text-align: left; font-weight: 600; padding-bottom: .4rem; }
.deliveries th, .deliveries td { padding: .4rem .5rem; border-bottom: 1px solid rgba(0,0,0,.08); text-align: left; vertical-align: top; }
@media (max-width: 640px) { .deliveries th:nth-child(4), .deliveries td:nth-child(4) { display: none; } }
.dropoff { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid rgba(0,0,0,.1); border-radius: 14px; }
.dropoff h3 { margin-top: 0; }
.dropoff-worst { padding: .6rem .8rem; border-radius: 10px; background: rgba(220,90,40,.09); }
.dropoff-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dropoff-table th, .dropoff-table td { padding: .45rem .5rem; border-bottom: 1px solid rgba(0,0,0,.08); text-align: left; vertical-align: middle; }
.dropoff-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dropoff-table tbody th { font-weight: 500; overflow-wrap: anywhere; }
.dropoff-table tr.worst th, .dropoff-table tr.worst td { background: rgba(220,90,40,.06); }
.dropoff-table .meter { width: 5rem; height: .5rem; vertical-align: middle; accent-color: #dc5a28; }
@media (max-width: 640px) { .dropoff-table .meter { display: none; } }
/* Richscripts Quick Tools family nav + next-step cards */
.family-nav { margin: 0 5% 24px; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.family-nav summary { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--green); }
.family-nav ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.family-nav li a, .family-nav li span { display: inline-flex; flex-direction: column; line-height: 1.35; }
.family-nav strong { color: var(--ink); font-size: 12px; }
.family-nav small { font-size: 11px; color: var(--muted); }
.family-nav li.current strong { color: var(--green); }
.family-nav li.current strong::after { content: " · you are here"; font-weight: 400; color: var(--muted); }
.product-home .family-nav { margin-inline: var(--page-gutter, 5%); }
@media (min-width: 1500px) { .family-nav { margin-inline: max(5%, calc((100vw - 1300px) / 2)); } }
.next-steps { margin-top: 22px; }
.next-steps h3 { font-size: 13px; letter-spacing: .5px; margin-bottom: 10px; }
.next-steps ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.next-steps li a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fffefb; text-decoration: none; }
.next-steps li a:hover { border-color: var(--green); text-decoration: none; }
.next-steps strong { display: block; font-size: 14px; color: var(--ink); }
.next-steps span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.next-steps small { display: block; font-size: 11px; color: var(--green); margin-top: 8px; }
.share-card .next-steps a { text-decoration: none; }
.faq section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.faq section h2 { font-size: 18px; letter-spacing: -.3px; margin: 0 0 6px; }
.faq section p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0; }
.faq a { text-decoration: underline; }
.faq .button { text-decoration: none; margin-top: 24px; }
