/* Poised Investments — shared styles for every page.
   Colours and sizes live in the :root variables below; change them there
   and the whole site follows. */

:root {
  /* Surfaces, darkest to lightest */
  --canvas: #07080a;
  --surface: #0d0d0d;
  --surface-elevated: #101111;
  --surface-card: #121212;
  --row-hover: #1a1b1e;

  /* Text */
  --ink: #f4f4f6;
  --body: #cdcdcd;
  --mute: #9c9c9d;
  --ash: #6a6b6c;

  /* Lines */
  --hairline: #242728;
  --hairline-strong: rgba(255, 255, 255, 0.16);

  /* Accents */
  --white: #ffffff;
  --on-white: #000000;
  --blue: #57c1ff;
  --green: #59d499;
  --yellow: #ffc533;
  --red: #ff6161;

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);      /* 40–64px */
  --section-head: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); /* 28–44px */
  --heading: 1.25rem;                                  /* 20px */
  --body-size: 1.0625rem;                              /* 17px */
  --small: 0.875rem;                                   /* 14px */

  /* Layout */
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-gap: clamp(72px, 9vw, 120px);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-feature-settings: "calt", "kern", "liga", "ss03";
  font-size: var(--body-size);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(87, 193, 255, 0.3); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--on-white); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--canvas); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.wordmark-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--white); color: var(--on-white); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav a { color: var(--mute); text-decoration: none; font-size: var(--small); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-white); }
@media (max-width: 720px) { .nav .nav-link { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 18px; font: 500 0.9375rem/1 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .1s, border-color .15s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--white); color: var(--on-white); }
.btn-primary:hover { background: #e8e8e8; }
.btn-secondary { background: var(--surface-elevated); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--hairline-strong); }
.btn-sm { padding: 7px 14px; font-size: var(--small); }

/* ---------- Sections ---------- */
.section { padding: var(--section-gap) 0 0; }
.section-head { font-size: var(--section-head); letter-spacing: -0.02em; line-height: 1.1; max-width: 20ch; }
.section-lead { color: var(--mute); margin-top: 12px; max-width: 56ch; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 0; text-align: center; }
.hero h1 { font-size: var(--display); line-height: 1.05; letter-spacing: -0.03em; max-width: 16ch; margin: 0 auto; }
.hero .lead { color: var(--mute); font-size: 1.1875rem; max-width: 46ch; margin: 20px auto 0; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Quick check (command-palette panel) ---------- */
.palette { max-width: 760px; margin: 56px auto 0; background: var(--surface-elevated); border: 1px solid var(--hairline); border-radius: var(--radius-lg); text-align: left; overflow: hidden; }
.palette-inputs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--hairline); }
.palette-field { padding: 14px 18px; display: grid; gap: 4px; }
.palette-field + .palette-field { border-left: 1px solid var(--hairline); }
.palette-field label { font-size: var(--small); color: var(--mute); }
.palette-field input { background: transparent; border: 0; color: var(--ink); font: 500 1.375rem/1.2 var(--font); font-feature-settings: "tnum"; padding: 0; width: 100%; }
.palette-field input:focus { outline: none; }
.palette-field:focus-within { background: var(--surface-card); }
.palette-list { list-style: none; margin: 0; padding: 8px; }
.palette-row { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 20px; align-items: center; padding: 12px; border-radius: 8px; font-feature-settings: "tnum"; }
.palette-row:hover { background: var(--row-hover); }
.palette-row .name { color: var(--ink); font-weight: 500; }
.palette-row .name small { display: block; color: var(--mute); font-weight: 400; font-size: var(--small); }
.palette-row .num { text-align: right; color: var(--body); white-space: nowrap; }
.palette-row .num small { display: block; color: var(--mute); font-size: 0.8125rem; }
.verdict { font-size: 0.8125rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; min-width: 76px; text-align: center; }
.verdict.go { color: var(--green); background: rgba(89, 212, 153, 0.12); }
.verdict.review { color: var(--yellow); background: rgba(255, 197, 51, 0.12); }
.verdict.nogo { color: var(--red); background: rgba(255, 97, 97, 0.12); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--hairline); background: var(--surface); font-size: 0.8125rem; color: var(--mute); }
.palette-foot details summary { cursor: pointer; color: var(--body); list-style: none; }
.palette-foot details summary::-webkit-details-marker { display: none; }
.palette-foot details[open] { flex-basis: 100%; }
.assumptions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.assumptions label { display: grid; gap: 4px; }
.assumptions input { background: var(--surface-elevated); border: 1px solid var(--hairline); color: var(--ink); border-radius: var(--radius-sm); padding: 7px 9px; font: 500 0.9375rem var(--font); font-feature-settings: "tnum"; }
.key { display: inline-block; background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 1px 6px; color: var(--body); font-size: 0.75rem; margin-left: 4px; }
@media (max-width: 600px) {
  .palette-inputs { grid-template-columns: 1fr; }
  .palette-field + .palette-field { border-left: 0; border-top: 1px solid var(--hairline); }
  .palette-row { grid-template-columns: 1fr auto auto; gap: 12px; }
  .palette-row .num.dwn { display: none; }
  .palette-row .num.ratio { display: none; }
  .palette-row .verdict { min-width: 64px; padding: 4px 6px; }
}

/* ---------- Tool cards ---------- */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.tool { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.tool h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
.tool .for { color: var(--mute); }
.tool ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tool li { padding-left: 22px; position: relative; color: var(--body); }
.tool li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.tool .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 800px) { .tools { grid-template-columns: 1fr; } }

/* ---------- Built-in list ---------- */
.checks { margin-top: 40px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 8px; }
.check { display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; padding: 16px; border-radius: 8px; align-items: baseline; }
.check:hover { background: var(--row-hover); }
.check dt { color: var(--ink); font-weight: 500; }
.check dd { margin: 0; color: var(--body); }
.check .tag { font-size: 0.8125rem; color: var(--mute); background: var(--surface-card); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 3px 8px; white-space: nowrap; }
@media (max-width: 760px) { .check { grid-template-columns: 1fr; gap: 6px; } .check .tag { justify-self: start; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.about-text { display: grid; gap: 16px; }
.about-text p { color: var(--body); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- FAQ ---------- */
.faq { margin-top: 32px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; color: var(--ink); font-weight: 500; font-size: 1.125rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; color: var(--mute); font-size: 1.25rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--body); max-width: 64ch; }

/* ---------- Closing call to action ---------- */
.closing { text-align: center; padding: var(--section-gap) 0; }
.closing h2 { font-size: var(--section-head); letter-spacing: -0.02em; line-height: 1.1; }
.closing .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 56px 0 40px; font-size: var(--small); color: var(--mute); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: var(--small); color: var(--ink); font-weight: 500; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--mute); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-note { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--ash); max-width: 90ch; font-size: 0.8125rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Simple text pages (privacy, disclaimer) ---------- */
.page { padding: clamp(48px, 7vw, 88px) 0 var(--section-gap); }
.page h1 { font-size: var(--section-head); letter-spacing: -0.02em; line-height: 1.1; }
.page .updated { color: var(--mute); margin-top: 8px; font-size: var(--small); }
.prose { max-width: 68ch; margin-top: 32px; display: grid; gap: 16px; }
.prose h2 { font-size: var(--heading); margin-top: 16px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Entrance motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .faq summary::after { transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Sign-up form before a tool (js/leads.js) ---------- */
.gate { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--surface-elevated); color: var(--body); }
.gate::backdrop { background: rgba(7, 8, 10, 0.88); }
.gate-form { display: grid; gap: 14px; padding: 28px; }
.gate h2 { font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.2; }
.gate-lead { color: var(--mute); font-size: 0.9375rem; }
.gate-field { display: grid; gap: 6px; font-size: var(--small); color: var(--mute); }
.gate-field input { background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px; color: var(--ink); font: 500 1rem var(--font); padding: 11px 12px; }
.gate-field input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.gate-consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.8125rem; color: var(--mute); line-height: 1.5; }
.gate-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--white); }
.gate-consent a, .gate-note a { color: var(--body); }
.gate-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gate-error { color: var(--red); font-size: var(--small); min-height: 1.2em; margin: -4px 0; }
.gate-submit { justify-content: center; width: 100%; padding: 12px 18px; }
.gate-note { text-align: center; font-size: var(--small); }

/* ---------- My Drive deals dialog (js/drive.js) ---------- */
.drive-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px)); padding: 24px; border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--surface-elevated); color: var(--body); font-family: var(--font); }
.drive-dialog::backdrop { background: rgba(7, 8, 10, 0.8); }
.drive-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drive-head h2 { font-size: 1.25rem; }
.drive-close { background: none; border: 1px solid var(--hairline); color: var(--body); border-radius: 999px; padding: 6px 12px; font: 500 0.875rem var(--font); cursor: pointer; }
.drive-note { color: var(--mute); font-size: 0.875rem; margin-top: 6px; }
.drive-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.drive-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hairline); }
.drive-list li b { display: block; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.drive-list li span { color: var(--mute); font-size: 0.8125rem; }
.drive-list .drive-empty { display: block; color: var(--mute); }
.drive-actions { display: flex; gap: 8px; flex-shrink: 0; }
.drive-open, .drive-view { font: 500 0.875rem/1 var(--font); padding: 8px 14px; border-radius: 999px; cursor: pointer; text-decoration: none; border: 1px solid var(--hairline); }
.drive-open { background: var(--white); color: var(--on-white); border-color: var(--white); }
.drive-view { background: transparent; color: var(--ink); }
.drive-open:disabled { opacity: .6; cursor: default; }
@media (max-width: 520px) { .drive-list li { flex-direction: column; align-items: stretch; } .drive-actions > * { flex: 1; text-align: center; } }
