/* ==========================================================
   LaunchLLC stylesheet: public site, customer dashboard, admin.
   Mobile-first. Colours meet WCAG AA contrast on their backgrounds.
   ========================================================== */
:root {
  --ink: #10212b; --ink-2: #33454f; --muted: #5b6b75; --line: #dfe3e1; --line-2: #eceeec;
  --paper: #f7f5f0; --card: #ffffff; --tint: #eef4f3;
  --brand: #0f5e5f; --brand-dark: #0b4546; --brand-ink: #093a3b; --accent: #d9861a; --accent-soft: #fcf1e1;
  --good: #1f7a45; --good-soft: #e5f4ea; --warn: #8a5a00; --warn-soft: #fdf3dc; --bad: #b3261e; --bad-soft: #fbe7e6;
  --radius: 10px; --radius-lg: 16px; --shadow: 0 1px 2px rgba(16,33,43,.06), 0 4px 16px rgba(16,33,43,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; height: auto; }
p, li, dd, td, h1, h2, h3, label, .hint { overflow-wrap: break-word; }
code { overflow-wrap: anywhere; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .5em; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid transparent; font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
@media (max-width: 479px) { .btn { white-space: normal; text-align: center; line-height: 1.25; max-width: 100%; } }
.btn-primary { background: var(--accent); color: #1d1100; }
.btn-primary:hover { background: #c47612; color: #1d1100; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--tint); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: .92rem; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b9c2c0; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(15,94,95,.2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.hp { position: absolute; left: -5000px; }

/* Flash, pills */
.flash-wrap { margin-top: 16px; }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash-success { background: var(--good-soft); border-color: #b9dfc6; color: #15532f; }
.flash-error { background: var(--bad-soft); border-color: #f1bdb9; color: #8a1d17; }
.flash-info { background: var(--tint); border-color: #c5dcda; color: var(--brand-ink); }
.flash-warning { background: var(--warn-soft); border-color: #efd8a6; color: #6b4600; }
.banner-warn { background: var(--warn-soft); color: #6b4600; text-align: center; padding: 6px; font-size: .9rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill-good { background: var(--good-soft); color: var(--good); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-neutral { background: #eef0ef; color: var(--ink-2); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.2rem var(--display); color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; font: 700 1rem var(--font); }
.brand-light { color: #fff; }
.nav-toggle { display: inline-flex; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: 600 .9rem var(--font); }
.main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 16px; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a[aria-current] { color: var(--brand); }
.nav-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ccy-menu { position: relative; }
.ccy-menu summary { list-style: none; cursor: pointer; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: .9rem; }
.ccy-menu summary::-webkit-details-marker { display: none; }
.ccy-menu ul { position: absolute; left: 0; top: 44px; list-style: none; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; min-width: 120px; z-index: 60; }
.ccy-menu a { display: block; padding: 6px 10px; text-decoration: none; color: var(--ink); border-radius: 6px; }
.ccy-menu a:hover { background: var(--tint); }
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex; position: static; padding: 0; border: 0; align-items: center; gap: 20px; flex: 1; justify-content: flex-end; }
  .main-nav > ul { display: flex; gap: 20px; }
  .main-nav > ul a { padding: 6px 0; font-size: .95rem; }
  .nav-actions { margin: 0; }
  .ccy-menu ul { left: auto; right: 0; }
}

/* Sections & cards */
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-white { background: #fff; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }

/* Hero */
.hero { padding: 48px 0 40px; background: radial-gradient(1200px 400px at 90% -10%, #dcebe8 0, transparent 60%), var(--paper); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 72px 0 56px; } }
.hero h1 { margin-bottom: 16px; }
.hero-card { background: #fff; border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-card h2 { font-size: 1.25rem; font-family: var(--font); font-weight: 700; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; color: var(--ink-2); font-size: .92rem; }
.trust-row span { display: inline-flex; gap: 8px; align-items: center; }
.trust-row span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; }

/* Pricing */
.price-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .price-cards { grid-template-columns: repeat(3, 1fr); } }
.price-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: 0 8px 30px rgba(15,94,95,.15); }
.price-card .badge { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font: 700 2.4rem var(--display); margin: 6px 0 2px; }
.price-note { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.price-card .ticks { flex: 1; }
.compare-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .85rem; color: var(--ink-2); background: #fafbfa; font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.yes { color: var(--good); font-weight: 700; }
.no { color: #9aa5ab; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 16px 12px; color: var(--ink-2); }

/* Blog & prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.4em; font-size: 1.5rem; }
.prose ul { padding-left: 1.2em; }
.post-meta { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { background: var(--brand-ink); color: #dbe7e6; padding: 48px 0 24px; margin-top: 40px; }
.site-footer a { color: #e7f1f0; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid > div:first-child { grid-column: auto; } }
.footer-h { font: 700 .85rem var(--font); text-transform: uppercase; letter-spacing: .08em; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.muted-light { color: #b8cfcd; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 16px; font-size: .82rem; color: #b8cfcd; }

/* Error page */
.error-page { padding: 80px 16px; max-width: 640px; }

/* Order flow */
/* minmax(0,1fr) stops wide children (step pills, tables) from stretching the column past the screen.
   padding-top/bottom only, so the .container side gutter is kept on phones. */
.order-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); padding-top: 28px; padding-bottom: 48px; }
.order-layout > * { min-width: 0; }
@media (min-width: 960px) { .order-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.stepper { display: flex; gap: 6px; overflow-x: auto; list-style: none; padding: 0 0 6px; margin: 0 0 20px; }
.stepper li { flex: none; font-size: .8rem; padding: 6px 10px; border-radius: 999px; background: #e8ecea; color: var(--ink-2); }
.stepper li.done { background: var(--good-soft); color: var(--good); }
.stepper li.current { background: var(--brand); color: #fff; font-weight: 700; }
.stepper a { color: inherit; text-decoration: none; }
@media (min-width: 960px) { .summary { position: sticky; top: 84px; } }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; }
.summary .line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; background: #fff; cursor: pointer; font-weight: 400; }
.option:has(input:checked) { border-color: var(--brand); background: var(--tint); }
.option input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.option .opt-title { font-weight: 700; display: block; }
.option .opt-price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.option > span:not(.opt-price), .option > div { min-width: 0; flex: 1; }
@media (max-width: 479px) { .option { flex-wrap: wrap; } .option .opt-price { flex-basis: 100%; margin-left: 30px; white-space: normal; } }
.member-row { position: relative; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; }
.address-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f4f3; border: 1px dashed #aab7b5; border-radius: 8px; padding: 12px; word-break: break-all; font-size: .95rem; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .address-box { flex: 1; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.kv dd { margin-bottom: 8px !important; }
@media (min-width: 560px) { .kv { grid-template-columns: 160px minmax(0, 1fr); gap: 6px 12px; } .kv dd { margin-bottom: 0 !important; } }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* App shell (dashboard + admin) */
.app-shell { display: grid; min-height: calc(100vh - 64px); grid-template-columns: minmax(0, 1fr); }
.app-shell > * { min-width: 0; }
@media (min-width: 960px) { .app-shell { grid-template-columns: 240px minmax(0, 1fr); } }
.side-nav { background: #fff; border-right: 1px solid var(--line); padding: 16px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .94rem; }
.side-nav a:hover { background: var(--tint); }
.side-nav a[aria-current] { background: var(--brand); color: #fff; }
.side-nav .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 12px 6px; font-weight: 700; }
@media (max-width: 959px) {
  .side-nav { padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  /* One swipeable row of links on phones and tablets (admin groups are merged into the same row). */
  .side-nav > ul, .side-nav .nav-lists { display: flex; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .side-nav .nav-lists ul { display: contents; }
  .side-nav li { flex: none; } .side-nav .group { display: none; }
  .side-nav a { white-space: nowrap; }
}
.app-main { padding: 24px 16px 48px; min-width: 0; }
@media (min-width: 960px) { .app-main { padding: 28px 32px 56px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.7rem; margin: 0; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat .value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; }
.filters input, .filters select { min-height: 38px; padding: 6px 10px; }
.pagination { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px; }
.pagination a, .pagination .gap { padding: 6px 11px; border-radius: 6px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.pagination a.current { background: var(--brand); color: #fff; border-color: var(--brand); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.timeline .when { color: var(--muted); font-size: .85rem; }
.empty { text-align: center; padding: 28px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: inline; }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
/* Grid and flex children may shrink below their content width; wide tables then scroll inside their own box. */
.split > *, .cards > *, .grid-2 > *, .grid-3 > *, .stats > *, .balances > *, .price-cards > *, .hero-grid > *, .footer-grid > *, .page-head > * { min-width: 0; }
.card { min-width: 0; }
.card > table, .card > form > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Wallet: plain account-balance look */
.balances { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 640px) { .balances { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .balances { grid-template-columns: repeat(4, 1fr); } }
.balance-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.balance-card .ccy { font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.balance-card .amt { font-size: 1.6rem; font-weight: 700; margin: 4px 0; font-variant-numeric: tabular-nums; }
.balance-card .sub { color: var(--muted); font-size: .85rem; }
.amount-credit { color: var(--good); }
.amount-debit { color: var(--ink); }

/* Bar chart (admin KPIs) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bars .bar { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars-labels { display: flex; gap: 6px; font-size: .72rem; color: var(--muted); }
.bars-labels span { flex: 1; text-align: center; }

/* Small phones: compact top bar in the dashboard and admin (kept last so it overrides .nav-actions). */
.icon-xs { display: none; }
@media (max-width: 479px) {
  .hide-xs { display: none; }
  .icon-xs { display: inline-block; }
  .app-actions { flex-wrap: nowrap; gap: 6px; }
  .app-actions .btn-sm { padding: 6px 9px; white-space: nowrap; }
}