/* Emily Companion by Robson: shared styles for the static pages in this folder.
   Plain CSS, no build step. Robson design tokens first, then components.
   Edit freely; every page loads this one file. */

:root {
  --robson-navy: #1A365D;
  --robson-blue: #2D5A87;
  --robson-light: #3D7AB5;
  --robson-teal: #319795;
  --robson-green: #B3D335;
  --robson-orange: #DD6B20;
  --robson-red: #C53030;
  --robson-purple: #6B46C1;
  --robson-bg: #F7FAFC;
  --robson-card: #F0F4F8;
  --gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB; --gray-300: #D1D5DB; --gray-400: #9CA3AF;
  --gray-500: #6B7280; --gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937; --gray-900: #111827;
  --tint-green-bg: #DCFCE7; --tint-green-border: #22C55E; --tint-green-fg: #166534;
  --tint-lime-bg: #F2F8DD; --tint-lime-border: #B3D335; --tint-lime-fg: #5B6E10;
  --tint-blue-bg: #DBEAFE; --tint-blue-border: #3B82F6; --tint-blue-fg: #1E40AF;
  --tint-teal-bg: #CCFBF1; --tint-teal-fg: #115E59;
  --tint-yellow-bg: #FEF9C3; --tint-yellow-border: #EAB308; --tint-yellow-fg: #854D0E;
  --tint-orange-bg: #FFEDD5; --tint-orange-fg: #9A3412;
  --tint-red-bg: #FEE2E2; --tint-red-border: #EF4444; --tint-red-fg: #991B1B;
  --border-default: var(--gray-200); --border-input: var(--gray-300); --border-subtle: var(--gray-100);
  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --max: 1440px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--robson-bg); color: var(--gray-800);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--robson-blue); }
h1, h2, h3, h4 { color: var(--robson-navy); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--gray-500); }
.small { font-size: 0.875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--robson-teal); margin-bottom: 0.75rem; }
.mono { font-family: var(--font-mono); }
.sr-only { 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; padding: 8px 12px; border-radius: var(--radius-md); z-index: 100; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 48px 0; }
@media (min-width: 768px) { .section { padding: 72px 0; } }
.narrow { max-width: 760px; }

/* header */
.site-header { background: var(--robson-navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--robson-green); }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { color: rgba(255,255,255,0.85); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-md); font-weight: 500; }
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,0.1); color: #fff; }
.menu-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius-md); padding: 8px 12px; font: inherit; }
@media (min-width: 640px) { .nav { display: flex; } .menu-btn { display: none; } }
.nav-mobile { display: none; padding: 8px 0 16px; }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; color: #fff; text-decoration: none; padding: 10px 4px; border-top: 1px solid rgba(255,255,255,0.1); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius-md); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, color .15s; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-teal { background: var(--robson-teal); color: #fff; }
.btn-teal:hover { background: #2a807e; }
.btn-navy { background: var(--robson-navy); color: #fff; }
.btn-navy:hover { background: #142a49; }
.btn-lime { background: var(--robson-green); color: #33400a; }
.btn-lime:hover { background: #a3c22a; }
.btn-outline { background: #fff; color: var(--robson-navy); border-color: var(--border-input); }
.btn-outline:hover { background: var(--gray-50); }
.btn-ghost { background: transparent; color: var(--robson-navy); }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.05rem; padding: 14px 24px; }

/* cards, grids */
.card { background: #fff; border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card.accent { border-top: 4px solid var(--robson-teal); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.split { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 768px) { .split { grid-template-columns: 1.1fr 0.9fr; } .split.rev { grid-template-columns: 0.9fr 1.1fr; } }

/* hero */
.hero { background: linear-gradient(180deg, var(--robson-navy) 0%, #234a7a 100%); color: #fff; padding: 56px 0 48px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,0.88); max-width: 620px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.hero .fine { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.chat-mock { background: #fff; color: var(--gray-800); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-mock .top { background: var(--gray-50); border-bottom: 1px solid var(--border-default); padding: 10px 14px; display: flex; justify-content: space-between; font-size: .8rem; color: var(--gray-500); }
.chat-mock .body { padding: 14px; display: grid; gap: 10px; }
.bubble { padding: 10px 12px; border-radius: var(--radius-lg); max-width: 92%; font-size: .95rem; }
.bubble.user { background: var(--tint-blue-bg); color: var(--tint-blue-fg); justify-self: end; }
.bubble.emily { background: var(--robson-card); }
.chip { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: var(--radius-full); background: var(--tint-lime-bg); color: var(--tint-lime-fg); margin-right: 6px; }
.meter { height: 8px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--robson-teal); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { background: rgba(255,255,255,0.12); color: #fff; padding: 6px 10px; border-radius: var(--radius-full); font-size: .8rem; }

/* pricing */
.pricing { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pricing { grid-template-columns: repeat(4, 1fr); } }
.tier { display: flex; flex-direction: column; gap: 10px; position: relative; }
.tier.featured { border-color: var(--robson-teal); box-shadow: var(--shadow-md); }
.tier .price { font-size: 2rem; font-weight: 800; color: var(--robson-navy); }
.tier .price small { font-size: .9rem; font-weight: 500; color: var(--gray-500); }
.tier ul { padding-left: 18px; margin: 0; }
.tier li { margin-bottom: 6px; }
.tier .spacer { flex: 1; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); }
.pill-teal { background: var(--tint-teal-bg); color: var(--tint-teal-fg); }
.pill-lime { background: var(--tint-lime-bg); color: var(--tint-lime-fg); }
.pill-gray { background: var(--gray-100); color: var(--gray-600); }
.pill-green { background: var(--tint-green-bg); color: var(--tint-green-fg); }
.pill-red { background: var(--tint-red-bg); color: var(--tint-red-fg); }
.pill-yellow { background: var(--tint-yellow-bg); color: var(--tint-yellow-fg); }
.pill-blue { background: var(--tint-blue-bg); color: var(--tint-blue-fg); }

/* FAQ */
.faq details { border-top: 1px solid var(--border-default); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--robson-navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--robson-teal); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }

/* footer */
.site-footer { background: var(--robson-navy); color: rgba(255,255,255,0.8); padding: 32px 0; font-size: .9rem; }
.site-footer a { color: #fff; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; color: var(--gray-700); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--radius-md); font: inherit; font-size: 16px; background: #fff; }
.input:focus { outline: 2px solid var(--robson-light); outline-offset: 1px; }
.hint { font-size: .875rem; color: var(--gray-500); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: #fff; cursor: pointer; }
.choice.on { border-color: var(--robson-teal); box-shadow: var(--shadow-md); }
.choice.off { opacity: .6; cursor: not-allowed; }
.choice input { margin-top: 4px; width: 18px; height: 18px; }
.choice .title { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--robson-navy); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* stepper */
.steps { display: flex; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: #fff; font-size: .9rem; color: var(--gray-500); }
.steps li .n { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gray-100); color: var(--gray-600); font-size: .8rem; font-weight: 700; }
.steps li.cur { border-color: var(--robson-navy); background: var(--robson-navy); color: #fff; }
.steps li.cur .n { background: var(--robson-green); color: #33400a; }
.steps li.done { border-color: var(--tint-green-border); background: var(--tint-green-bg); color: var(--tint-green-fg); }
.steps li.done .n { background: var(--tint-green-border); color: #fff; }
@media (max-width: 639px) { .steps li span.label { display: none; } .steps li.cur span.label { display: inline; } }

/* summary panel */
.summary { position: sticky; top: 80px; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border-subtle); }
.summary .line.total { border-bottom: 0; font-weight: 800; color: var(--robson-navy); font-size: 1.1rem; }
.trust { display: grid; gap: 8px; font-size: .9rem; color: var(--gray-600); margin-top: 14px; }
.trust div::before { content: "\2713 "; color: var(--robson-teal); font-weight: 700; }

/* banners and states */
.banner { padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid; margin-bottom: 16px; }
.banner.info { background: var(--tint-blue-bg); border-color: var(--tint-blue-border); color: var(--tint-blue-fg); }
.banner.ok { background: var(--tint-green-bg); border-color: var(--tint-green-border); color: var(--tint-green-fg); }
.banner.warn { background: var(--tint-yellow-bg); border-color: var(--tint-yellow-border); color: var(--tint-yellow-fg); }
.banner.err { background: var(--tint-red-bg); border-color: var(--tint-red-border); color: var(--tint-red-fg); }
.banner.neutral { background: var(--gray-50); border-color: var(--border-default); color: var(--gray-700); }
.state { text-align: center; padding: 40px 16px; color: var(--gray-500); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--gray-200); border-top-color: var(--robson-teal); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* settings layout */
.settings { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .settings { grid-template-columns: 220px 1fr; } }
.side { background: var(--robson-navy); border-radius: var(--radius-lg); padding: 12px; display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 768px) { .side { flex-direction: column; align-self: start; position: sticky; top: 80px; } }
.side a { color: rgba(255,255,255,0.8); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-md); white-space: nowrap; }
.side a.cur { background: rgba(255,255,255,0.13); color: #fff; font-weight: 600; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.tabs button { white-space: nowrap; min-height: 40px; padding: 8px 14px; border-radius: var(--radius-full); border: 1px solid var(--border-default); background: #fff; color: var(--gray-600); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--robson-navy); border-color: var(--robson-navy); color: #fff; }
.kv { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(4, 1fr); } }
.progress { height: 10px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--robson-teal); border-radius: var(--radius-full); transition: width .3s ease; }
.progress span.hot { background: var(--robson-orange); }
.kv .k { font-size: .8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; }
.kv .v { font-size: 1.35rem; font-weight: 800; color: var(--robson-navy); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 120px; }
.bars > div { background: var(--robson-teal); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars > div.peak { background: var(--robson-orange); }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t th, table.t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
table.t th { color: var(--gray-500); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-input); border-radius: var(--radius-md); overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; }
.qty output { min-width: 44px; text-align: center; font-weight: 700; }

/* modal */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; background: rgba(17,24,39,0.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px; z-index: 60; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal .card { width: 100%; max-width: 480px; }

/* sticky bottom CTA on phones */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border-default); padding: 10px var(--gutter); display: flex; gap: 8px; z-index: 40; }
.sticky-cta .btn { flex: 1; }
@media (min-width: 768px) { .sticky-cta { display: none; } }
body.has-sticky { padding-bottom: 76px; }
@media (min-width: 768px) { body.has-sticky { padding-bottom: 0; } }

@media (min-width: 1536px) { body { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .spinner { animation: none; } }
