/* SweepsBoard public site (Task 84A.1). One stylesheet, no scripts.

   Design rules (docs/MARKETING_SITE.md, "Design rules"): the site is dark and built from the app's own
   design tokens (client/src/styles/designSystem.css), so the pages and the screenshots read as one
   product: graphite canvas and panels, white as the action colour, green only for money gained, red only
   for money lost, amber only for things that need attention. Text and headings are set in Libre
   Franklin, self-hosted from /fonts/ (SIL Open Font License); nothing loads from another origin.
   No gradients, glows, grid backdrops, blurs, pills, icon tiles or decorative shadows. */

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/libre-franklin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  /* The app's palette (designSystem.css) */
  --bg: #0a0a0c;
  --bg-alt: #0d0d10;
  --surface: #131316;
  --surface-raised: #19191d;
  --ink: #ececef;
  --ink-2: #a3a3ad;
  --ink-3: #8a8a94;
  --rule: rgba(255, 255, 255, 0.065);
  --rule-2: rgba(255, 255, 255, 0.11);
  --rule-3: rgba(255, 255, 255, 0.2);
  --action: #ececef;
  --action-hover: #ffffff;
  --on-action: #0a0a0c;
  --gain: #35d07f;
  --loss: #f06464;
  --warn: #f6a94a;
  --wrap: 1140px;
  --sans: "Libre Franklin", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- Base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  /* Short pages (contact, status, 404) keep the footer at the bottom of the window. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; text-decoration-color: var(--rule-3); }
a:hover { color: var(--action-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2 { font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 18px; color: var(--ink); }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3, h4 { font-weight: 700; font-size: 1.08rem; line-height: 1.3; margin: 0 0 6px; color: var(--ink); }
p, ul, ol, dl { margin: 0 0 16px; }
li { margin-bottom: 6px; }
strong { font-weight: 700; color: var(--ink); }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code, kbd { background: var(--surface-raised); border: 1px solid var(--rule-2); border-radius: 4px; padding: 1px 5px; }
pre { background: var(--surface); border: 1px solid var(--rule-2); border-radius: 8px; padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
pre code { background: none; border: 0; padding: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.gain { color: var(--gain); }
.neg { color: var(--loss); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); color: var(--ink); padding: 8px 14px; border: 1px solid var(--rule-2); border-radius: 6px; }
.skip-link:focus { left: 12px; }
.preview-banner, .status-banner { padding: 8px 24px; font-size: 0.875rem; border-bottom: 1px solid var(--rule-2); background: var(--surface-raised); color: var(--warn); }
.status-banner a { color: inherit; }

/* ---- Buttons: the app's own (white on graphite) ----------------------------------------------------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-secondary:hover { background: var(--surface-raised); color: var(--ink); }
.btn-small { padding: 8px 13px; font-size: 0.94rem; }

/* ---- Header -------------------------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; background: url("/favicon.svg") center / contain no-repeat; flex: none; }
.primary-nav { display: flex; gap: 24px; margin-right: auto; }
.primary-nav a, .header-login { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.primary-nav a:hover, .header-login:hover { color: var(--ink); }
.primary-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--ink); text-underline-offset: 0.5em; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 7px 12px; border: 1px solid var(--rule-2); border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(280px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--rule-2); border-radius: 12px; padding: 6px 0; display: flex; flex-direction: column; }
.menu-panel a { padding: 10px 18px; color: var(--ink); text-decoration: none; }
.menu-panel a:hover { background: var(--surface-raised); }
@media (max-width: 860px) {
  .primary-nav, .header-login, .header-actions > .btn { display: none; }
  .menu { display: block; }
  .header-actions { margin-left: auto; }
}

/* ---- Sections ------------------------------------------------------------------------------------ */
.section { padding: 88px 0; border-top: 1px solid var(--rule); }
.section.alt { background: var(--bg-alt); }
.section-intro { max-width: 640px; margin-bottom: 40px; }
.section-intro p { color: var(--ink-2); font-size: 1.08rem; }
/* A section's own heading across the full width: the heading on the left, its paragraph on the right,
   both starting at the top, so the right half of the page is not left empty above the content. */
@media (min-width: 961px) {
  .wrap:not(.two-col) > .section-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 64px; align-items: start; max-width: none; margin-bottom: 48px; }
  .wrap:not(.two-col) > .section-intro h2 { margin: 0; }
  .wrap:not(.two-col) > .section-intro p { margin: 0.35em 0 0; }
}
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 36em; }

/* ---- Inner pages ----------------------------------------------------------------------------------- */
.page-head { max-width: 760px; margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
/* Feature pages: the title on the left, the lead and the buttons on the right, above a full-width screen. */
.page-head.split { max-width: none; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; align-items: end; margin-bottom: 44px; }
.page-head.split h1 { margin-bottom: 0; }
.page-head.split .lead { font-size: 1.12rem; margin: 0; }
.page-head.split .actions { margin: 24px 0 0; }
@media (max-width: 960px) { .page-head.split { grid-template-columns: 1fr; } .page-head.split h1 { margin-bottom: 18px; } }
.page-end { padding-bottom: 96px; }
.steps { margin: 0; padding-left: 1.4em; }
.steps li { color: var(--ink-2); margin-bottom: 16px; padding-left: 6px; }
.steps li::marker { font-weight: 700; color: var(--ink); }
.catalog-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.catalog-row h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.catalog-row > div > p { color: var(--ink-2); }
@media (max-width: 960px) { .catalog-row { grid-template-columns: 1fr; gap: 32px; } }
.contact h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0; }
.contact p { color: var(--ink-2); }
.opening .fig { margin-top: 8px; }

/* ---- Home: opening ------------------------------------------------------------------------------- */
.opening { padding: 72px 0 56px; }
.opening > .wrap > h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); max-width: 13em; margin-bottom: 36px; }
.opening-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; margin-bottom: 64px; }
.opening .actions { margin-top: 26px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 30px 0 18px; }
.fine { font-size: 0.92rem; color: var(--ink-3); max-width: 34em; }
@media (max-width: 960px) { .opening-grid { grid-template-columns: 1fr; gap: 48px; } }

/* The statement: the four lines of the net profit formula for the sample workspace, set as a panel in
   the app's style (it matches the Stats screenshot further down). */
.statement { background: var(--surface); border: 1px solid var(--rule-2); border-radius: 12px; padding: 20px 24px 18px; }
.statement-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule-2); }
.statement-head strong { font-size: 1rem; }
.statement-head span { color: var(--ink-3); font-size: 0.88rem; }
.statement table { width: 100%; border-collapse: collapse; }
.statement th, .statement td { text-align: left; font-weight: 400; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.statement th b { display: block; font-weight: 600; color: var(--ink); }
.statement th small { display: block; color: var(--ink-3); font-size: 0.84rem; }
.statement td { text-align: right; white-space: nowrap; font-size: 1.05rem; padding-left: 18px; width: 7.5em; }
.statement tr.total th, .statement tr.total td { border-bottom: 0; padding-top: 16px; }
.statement tr.total td { font-weight: 750; font-size: 1.7rem; letter-spacing: -0.02em; line-height: 1.1; }
.statement .footnote { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 560px) {
  .statement { padding: 16px 16px 14px; }
  .statement td { width: auto; padding-left: 12px; font-size: 1rem; }
  .statement th small { font-size: 0.8rem; }
  .statement tr.total td { font-size: 1.35rem; }
}

/* ---- Figures (real screenshots) ------------------------------------------------------------------ */
.fig { margin: 0; }
.fig-link { display: block; border-radius: 12px; cursor: zoom-in; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--bg); }
.fig-link:hover img { border-color: var(--rule-3); }
.fig figcaption { margin-top: 12px; font-size: 0.92rem; color: var(--ink-3); }
.fig figcaption b { font-weight: 650; color: var(--ink-2); margin-right: 2px; }
.fig-sticky { position: sticky; top: 24px; }

/* ---- Home: a day, by the clock -------------------------------------------------------------------- */
.day-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.day { list-style: none; padding: 0; margin: 0; }
.day li { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 14px; padding: 0; margin: 0 0 22px; }
.day time { font-weight: 700; color: var(--ink); white-space: nowrap; }
.day p { margin: 0; color: var(--ink-2); }
@media (max-width: 960px) { .day-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---- Home: the books ----------------------------------------------------------------------------- */
.books-terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; margin: 0 0 48px; }
.books-terms div { border-top: 1px solid var(--rule-2); padding-top: 14px; }
.books-terms dt { font-weight: 700; }
.books-terms dd { margin: 4px 0 0; color: var(--ink-2); }
.aside-note { border-left: 2px solid var(--ink); padding: 2px 0 2px 18px; margin: 40px 0 0; max-width: 46em; }
.aside-note p { margin: 0; color: var(--ink-2); }
@media (max-width: 960px) { .books-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .books-terms { grid-template-columns: 1fr; gap: 18px; } }

/* ---- Features as an index: a ruled table, not a grid of tiles ------------------------------------- */
.index-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-3); }
.index-table th, .index-table td { text-align: left; vertical-align: top; padding: 16px 0; border-bottom: 1px solid var(--rule-2); }
.index-table th { width: 30%; padding-right: 24px; font-weight: 700; }
.prose + .index-table { margin-top: 36px; }
.index-table td { color: var(--ink-2); }
@media (max-width: 720px) {
  .index-table, .index-table tbody, .index-table tr, .index-table th, .index-table td { display: block; width: auto; }
  .index-table tr { padding: 14px 0; border-bottom: 1px solid var(--rule-2); }
  .index-table th, .index-table td { border: 0; padding: 0; }
  .index-table th { margin-bottom: 4px; }
}

/* ---- Lists --------------------------------------------------------------------------------------- */
.plain-list { margin: 0; padding-left: 1.2em; }
.plain-list li { color: var(--ink-2); margin-bottom: 12px; padding-left: 4px; }
.plain-list li::marker { color: var(--ink-3); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 64px; }
/* Two short sections side by side, each with its own heading (pricing: what is included, the trial). */
.col-head { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 28px; }
@media (max-width: 860px) { .two-col.pair { row-gap: 64px; } }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } .two-col > .section-intro { margin-bottom: 0; } }

/* ---- Demo invitation (Task 84A.3): a short row under the opening ----------------------------------- */
.section.demo-row { padding: 56px 0; }
.demo-row .wrap > .section-intro { margin-bottom: 0; }
.demo-row .section-intro p.actions { margin: 22px 0 0; }

/* ---- Price ----------------------------------------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.price-figure { font-weight: 800; font-size: clamp(3.2rem, 7vw, 5rem); letter-spacing: -0.04em; line-height: 1; margin: 0 0 10px; }
.price-figure small { font-weight: 500; font-size: 1.1rem; letter-spacing: 0; color: var(--ink-2); margin-left: 8px; }
.terms { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-3); }
.terms th, .terms td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
.terms th { width: 34%; font-weight: 650; padding-right: 18px; }
.terms td { color: var(--ink-2); }
.placeholder { display: inline-block; color: var(--warn); border: 1px dashed var(--warn); border-radius: 6px; padding: 0 8px; }
.price-figure .placeholder { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- Questions: all answers visible, no accordions ------------------------------------------------- */
.qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 64px; margin: 0 0 30px; }
.qa dt { font-weight: 700; margin-bottom: 4px; }
.qa dd { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .qa { grid-template-columns: 1fr; } }

/* ---- Closing ------------------------------------------------------------------------------------- */
.closing { padding: 88px 0 96px; border-top: 1px solid var(--rule); }
.closing h2 { max-width: 16em; }
.closing p { color: var(--ink-2); max-width: 36em; }
.closing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; align-items: start; }
.closing-steps { border-top: 1px solid var(--rule-2); padding-top: 22px; margin-top: 8px; }
.closing-steps li:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .closing-grid { grid-template-columns: 1fr; } }

/* ---- Document pages (help, legal, status) --------------------------------------------------------- */
.doc { padding-top: 56px; padding-bottom: 96px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); }
.prose h2 { font-size: 1.6rem; margin-top: 44px; letter-spacing: -0.02em; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong, .prose em { color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-weight: 600; }
.toc a { text-decoration-color: var(--rule-3); }
.breadcrumb { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-2); }
.notice { border: 1px solid var(--rule-2); border-left: 2px solid var(--warn); background: var(--surface); border-radius: 0 8px 8px 0; padding: 12px 18px; margin: 20px 0; }
.notice p { margin: 0; }
.legal-draft { border-left-color: var(--loss); }
/* Legal documents: the text column with a list of its sections beside it, so a long document can be
   scanned and the right side of the page is put to use. The text itself is unchanged. */
.legal-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 260px); justify-content: space-between; gap: 64px; align-items: start; }
.legal-toc { position: sticky; top: 24px; margin-top: 8px; padding-left: 20px; border-left: 1px solid var(--rule-2); font-size: 0.92rem; }
.legal-toc p { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.legal-toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.legal-toc a:hover { color: var(--ink); }
.legal-layout h2[id] { scroll-margin-top: 24px; }
@media (max-width: 1000px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-toc { display: none; } }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 12px 0 20px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rule-2); color: var(--ink-2); }
.legal-table th { color: var(--ink); border-bottom-color: var(--rule-3); }
@media (max-width: 720px) { .legal-table { display: block; overflow-x: auto; } }
.status-notice { border: 1px solid var(--rule-2); background: var(--surface); border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
.status-notice.is-open { border-color: var(--warn); }
.status-notice h3 { margin: 0 0 4px; }
.status-notice ol { list-style: none; padding: 0; margin: 12px 0 0; }
.status-notice li { margin: 0 0 10px; }
.status-update-meta { display: block; font-size: 0.875rem; color: var(--ink-3); }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.help-nav { align-self: start; display: flex; flex-direction: column; font-size: 0.95rem; }
.help-nav h2 { font-size: 0.95rem; font-weight: 700; letter-spacing: 0; margin: 0 0 8px; }
.help-nav a { color: var(--ink-2); text-decoration: none; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.help-nav a:hover { color: var(--ink); }
.help-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
@media (max-width: 860px) { .help-layout { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Footer -------------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule-2); padding: 40px 0 48px; font-size: 0.93rem; color: var(--ink-2); }
.footer-lines { display: grid; gap: 10px; margin-bottom: 28px; }
.footer-lines p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-lines span { font-weight: 700; color: var(--ink); min-width: 6.5em; }
.footer-lines a { color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.footer-lines a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; color: var(--ink-3); }
.footer-base p { margin: 0; max-width: 46em; }
