/* Cloud Butler marketing site. Colours from brand/README.md. Works from 320 to 1440 px and wider. */
:root {
  --navy: #0B1F45;
  --navy-2: #112a5c;
  --navy-3: #1a3772;
  --cloud: #F6F3EB;
  --eight: #59C1F7;
  --eight-light: #1F8FD6;
  --muted-dark: #C9D3DE;
  --muted-light: #5A6B80;
  --ink: #0B1F45;
  --paper: #FBFAF7;
  --line: #E3E0D6;
  --ok: #1E7F4F;
  --warn: #9A5B00;
  --radius: 14px;
  --wrap: 1160px;
  --shadow: 0 1px 2px rgba(11, 31, 69, .06), 0 8px 24px rgba(11, 31, 69, .08);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--eight-light); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--eight); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
code, kbd { font: .92em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #EEF2F7; padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--navy); color: var(--cloud); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.06); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 52px; height: auto; }
/* Live-text wordmark until the new Cloud Butler logo lands (colours of the old wordmark: cloud + accent blue). */
.brand-word { color: var(--cloud); font-weight: 700; font-size: 1.3rem; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.brand-word-accent { color: var(--eight); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--muted-dark); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; transition: background .08s, color .08s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.site-nav .nav-cta { margin-left: 8px; color: var(--navy); }
.site-nav .nav-cta:hover { color: var(--navy); background: #8fd5fa; }
.nav-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--cloud); }
.nav-toggle:active { background: rgba(255,255,255,.12); }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ""; transition: transform .1s; }
.bars::before { position: absolute; top: -6px; } .bars::after { position: absolute; top: 6px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--navy); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 1rem; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 600 1rem/1 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: transform .06s, background .08s, box-shadow .08s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--eight); color: var(--navy); }
.btn-primary:hover { background: #8fd5fa; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--cloud); border-color: rgba(246,243,235,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.note { display: block; margin-top: 10px; font-size: .9rem; min-height: 1.4em; }
.note[data-tone="ok"] { color: var(--ok); }
.note[data-tone="info"] { color: var(--muted-light); }
.on-dark .note[data-tone="info"] { color: var(--muted-dark); }
.note[data-tone="error"] { color: #B3261E; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% -10%, var(--navy-3), transparent 60%), var(--navy); color: var(--cloud); padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 88px 0 104px; } }
.eyebrow { display: inline-block; color: var(--eight); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { color: #fff; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted-dark); max-width: 38em; }
.hero .works { color: var(--muted-dark); font-size: .9rem; margin-top: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.chat { display: grid; gap: 12px; font-size: .95rem; }
.bubble { padding: 12px 14px; border-radius: 14px; max-width: 92%; }
.bubble.you { background: var(--eight); color: var(--navy); justify-self: end; border-bottom-right-radius: 4px; font-weight: 500; }
.bubble.agent { background: rgba(255,255,255,.08); color: var(--cloud); border-bottom-left-radius: 4px; }
.approve { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--navy); border-radius: 14px; padding: 12px 14px; }
.approve strong { display: block; }
.approve small { color: var(--muted-light); }
.approve .tap { margin-left: auto; background: var(--navy); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.chat-caption { color: var(--muted-dark); font-size: .8rem; margin: 12px 2px 0; }

/* Sections */
section { padding: 64px 0; }
@media (min-width: 960px) { section { padding: 88px 0; } }
.section-head { max-width: 46em; margin-bottom: 32px; }
.section-head p { color: var(--muted-light); font-size: 1.08rem; }
.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.alt .card { background: var(--paper); box-shadow: none; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1em; margin: 0 0 1em; }
.card li { margin: .25em 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; letter-spacing: .02em; }
.badge.live { background: #E3F4EA; color: var(--ok); }
.badge.optional { background: #FFF3DC; color: var(--warn); }
.badge.soon { background: #E8EEF8; color: var(--navy-3); }
.badge.free { background: #E8EEF8; color: var(--navy); }
.badge.pro { background: var(--navy); color: #fff; }
.steps { counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; left: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: #E3F4EA; box-shadow: inset 0 0 0 5px #E3F4EA, inset 0 0 0 9px var(--ok); }

/* Pricing */
.billing { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.billing button { border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; font: 600 .95rem Inter, system-ui, sans-serif; color: var(--muted-light); cursor: pointer; min-height: 40px; transition: background .08s, color .08s; }
.billing button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.billing .save { color: var(--ok); font-weight: 700; margin-left: 4px; }
.billing button[aria-pressed="true"] .save { color: var(--eight); }
.plans { display: grid; gap: 16px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; max-width: 920px; } }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--eight-light); position: relative; }
.plan .ribbon { position: absolute; top: -13px; right: 18px; background: var(--eight-light); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { font-size: 2.6rem; font-weight: 700; line-height: 1; margin: 8px 0 4px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted-light); }
.price-sub { color: var(--muted-light); font-size: .92rem; min-height: 1.5em; }
.plan .checks { margin: 18px 0 24px; flex: 1; }
.fine { font-size: .88rem; color: var(--muted-light); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--eight-light); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: #33445c; }

/* Inner pages */
.page-hero { background: var(--navy); color: var(--cloud); padding: 44px 0 40px; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero p { color: var(--muted-dark); max-width: 44em; margin: 0; }
.draft-banner { background: #FFF3DC; color: #5c3800; border: 1px solid #F0D49A; border-radius: 12px; padding: 12px 16px; margin: 28px 0 0; font-size: .95rem; }
.prose { max-width: 780px; padding: 36px 0 72px; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; scroll-margin-top: 84px; }
.prose h3 { margin-top: 1.6em; scroll-margin-top: 84px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; background: #F3F1EA; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.updated { color: var(--muted-light); font-size: .92rem; }

/* Docs layout */
/* Vertical padding only: .docs sits on a .wrap, whose 16/28 px side gutter must stay. */
.docs { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 72px; }
@media (min-width: 1000px) { .docs { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; } }
.toc { font-size: .93rem; }
@media (min-width: 1000px) { .toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-light); margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
@media (max-width: 999px) { .toc ol { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: #33445c; }
.toc a:hover { background: #EEF2F7; color: var(--navy); }
.docs .prose { padding: 0; max-width: 820px; }
.docs .prose > h2:first-child { margin-top: 0; }
.urlbox { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin: 12px 0 4px; }
.urlbox code { flex: 1 1 260px; display: flex; align-items: center; padding: 10px 12px; font-size: .95rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.callout { border-left: 4px solid var(--eight-light); background: #F0F7FD; padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 1em 0 1.4em; }
.callout.warn { border-color: #D99A2B; background: #FFF8EA; }
.tool-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.tool-filter input { flex: 1 1 240px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.tool-filter input:focus { border-color: var(--eight-light); outline: none; box-shadow: 0 0 0 3px rgba(89,193,247,.35); }
.tool-count { color: var(--muted-light); font-size: .9rem; }
.tool-table td:first-child { white-space: nowrap; }
@media (max-width: 640px) {
  .tool-table thead { display: none; }
  .tool-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .tool-table td { display: block; border: 0; padding: 2px 0; }
  .tool-table td:first-child { white-space: normal; }
}
.empty-state { display: none; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted-light); text-align: center; }
.empty-state.show { display: block; }
.prompt-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.prompt-list li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }

/* Footer */
.site-footer { background: var(--navy); color: var(--muted-dark); padding: 48px 0 32px; font-size: .92rem; }
.footer-cols { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; margin-bottom: 28px; }
@media (min-width: 820px) { .footer-cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 820px) { .footer-brand { grid-column: auto; } }
.footer-brand img { width: 72px; }
.site-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.site-footer nav a { display: block; color: var(--muted-dark); text-decoration: none; padding: 4px 0; }
.site-footer nav a:hover { color: #fff; }
.legal-notice { font-size: .8rem; color: #9fb0c4; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; margin: 0 0 8px; }
.legal-notice + .legal-notice { border-top: 0; padding-top: 0; }
.card-title { font-size: 1.22rem; }
.mt { margin-top: 20px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.plan .badge { align-self: flex-start; }
.plan .checks { align-content: start; }
@media (max-width: 640px) {
  .tool-table td:nth-child(3), .tool-table td:nth-child(4) { display: inline-block; font-size: .8rem; font-weight: 600; background: #EEF2F7; border-radius: 999px; padding: 2px 10px; margin: 6px 6px 0 0; }
  .tool-table td:nth-child(3)::before { content: "Plan: "; font-weight: 500; }
}

/* Docs section (multi-page). */
.docs-nav a[aria-current="page"] { background: #E3EEF9; color: var(--navy); font-weight: 600; }
.on-page { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; margin: 0 0 8px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.on-page a { text-decoration: none; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 18px; }
.flow span:not([aria-hidden]) { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 500; }
.flow span[aria-hidden] { color: var(--muted-light); }
.steps li { margin: 4px 0; }
.prompt-area { margin-top: 8px; }
.prompt-table td:first-child { min-width: 220px; }
.prompt-table .prompt { margin: 0 0 6px; font-weight: 500; }
.prompt-table code { white-space: nowrap; }
.tool-group { scroll-margin-top: 88px; }
.tool-table tr[id] { scroll-margin-top: 88px; }
@media (max-width: 640px) {
  .tool-table td:nth-child(5) { font-size: .85rem; color: var(--muted-light); }
  .tool-table td:nth-child(5)::before { content: "Permission: "; font-weight: 500; }
  .prompt-table thead { display: none; }
  .prompt-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .prompt-table td { display: block; border: 0; padding: 2px 0; }
  .prompt-table td:nth-child(3)::before { content: "Tools: "; font-weight: 500; }
}
.prompt-area h2 { margin-top: 1.4em; scroll-margin-top: 88px; }
