/* Shared design system for Bluefin605 app pages. Per-app files set only --accent. */
:root {
  --brand: #007BFF;
  --accent: var(--brand);
  --accent-contrast: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --surface: #ffffff;
  --text: #1a2230;
  --text-muted: #55607a;
  --border: #d9dee7;
  --link: #0056b3;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(16, 24, 40, .14);
  --gutter: 16px;
  --space: 1rem;
  --maxw: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --bg-alt: #161d28;
    --surface: #1b2330;
    --text: #e8ecf3;
    --text-muted: #a3adc2;
    --border: #2b3546;
    --link: #6cb2ff;
    --shadow: 0 8px 28px rgba(0, 0, 0, .55);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 3rem 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space); min-height: 60px; flex-wrap: wrap; }
.site-header .logo { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); text-decoration: none; }
.site-header .logo img { width: 32px; height: 32px; }
.site-header nav a { margin-left: 1rem; font-weight: 600; text-decoration: none; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.hero .sub { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 1.5rem; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-block; padding: .75rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-contrast); border: 2px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--accent); }

/* Screenshot frame */
.shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.shot img { width: 100%; }
.shot figcaption { padding: .5rem .8rem; font-size: .85rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.shot.phone { max-width: 260px; margin-left: auto; margin-right: auto; border-radius: 28px; border-width: 6px; border-color: var(--text); }

/* Features */
.features .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1.5rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.feature .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; font-size: 1.4rem; }
.feature h3 { margin: 0; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--text-muted); }
.feature .shot { margin-top: auto; }

/* How it works */
.how { background: var(--bg-alt); }
.how ol { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1.5rem; }
.how li { counter-increment: step; position: relative; padding-top: 3rem; }
.how li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); font-weight: 700; display: grid; place-items: center; }

/* CTA band */
.cta-band { background: var(--accent); color: var(--accent-contrast); text-align: center; }
.cta-band h2 { color: inherit; }
.cta-band .cta { justify-content: center; }
.cta-band .btn { background: var(--accent-contrast); color: var(--accent); border-color: var(--accent-contrast); }
.cta-band .btn.secondary { background: transparent; color: var(--accent-contrast); }

/* Help layout */
.help .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.help .toc { position: sticky; top: 1rem; font-size: .95rem; }
.help .toc ul { list-style: none; margin: 0; padding: 0; }
.help .toc a { display: block; padding: .35rem .6rem; border-radius: 6px; text-decoration: none; color: var(--text-muted); }
.help .toc a:hover { background: var(--bg-alt); color: var(--text); }
.help article { min-width: 0; }
.help article h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.help article h2:first-child { border-top: 0; margin-top: 0; }
.help code, .help pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-alt); border-radius: 6px; }
.help code { padding: .1em .35em; }
.help pre { padding: .9rem; overflow-x: auto; max-width: 100%; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--text-muted); font-size: .9rem; }

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  section { padding: 2rem 0; }
  .help .wrap { grid-template-columns: 1fr; gap: 1rem; }
  .help .toc { position: static; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
  .help .toc ul { display: flex; flex-wrap: wrap; gap: .25rem; }
}
