/*
  PayApps marketing site. Hand-written CSS, no build step, system fonts, no url() (strict CSP).

  Tokens follow apps/grants' approach (docs/DESIGN.md there): one brand hue for actions and links,
  one accent used sparingly, warm stone neutrals. Contrast checked on white:
    brand-700 #1d3a5c 11.6:1 · neutral-900 #1f1c19 17.0:1 · neutral-700 #443f39 10.4:1 ·
    neutral-600 #57514a 7.8:1 · neutral-900 on accent-300 #f2b134 9.0:1.
  The accent (hi-vis amber) is a background only, never text on white.
*/
:root {
  --brand-50: #eef3f8;
  --brand-100: #d7e2ee;
  --brand-600: #27496f;
  --brand-700: #1d3a5c;
  --brand-800: #162d48;
  --accent-100: #fdf0d2;
  --accent-300: #f2b134;
  --neutral-0: #ffffff;
  --neutral-50: #faf9f7;
  --neutral-100: #f4f2ee;
  --neutral-200: #e8e4de;
  --neutral-300: #d6d0c7;
  --neutral-600: #57514a;
  --neutral-700: #443f39;
  --neutral-900: #1f1c19;
  /* Roles, so dark mode can move links and buttons apart (one hue cannot be both a dark-surface
     link and a white-text button). */
  --link: var(--brand-700);
  --link-hover: var(--brand-800);
  --focus: var(--brand-600);
  --btn: var(--brand-700);
  --btn-hover: var(--brand-800);
  --on-btn: #ffffff;
  --ex-fill: var(--brand-600);
  color-scheme: light dark;
  --radius: 10px;
  --wrap: 68rem;
  --font:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/*
  Dark mode: the same roles on warm near-black surfaces. Contrast on the card surface #1f1d1b:
    neutral-900 #f4f2ee 15.0:1 · neutral-700 #d6d0c7 11.0:1 · neutral-600 #b3aca2 7.5:1 ·
    link #9fc3ec 9.2:1 (8.9:1 on the band) · white on btn #2f6299 6.3:1, on hover #3a72ad 5.0:1 ·
    neutral-900 on accent-100 #4a3b14 9.7:1 (docs/reports/polish-2026-11-27-payapps-site.md).
*/
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --brand-50: #18212c;
    --brand-100: #283647;
    --accent-100: #4a3b14;
    --neutral-0: #1f1d1b;
    --neutral-50: #161514;
    --neutral-100: #1b1a18;
    --neutral-200: #35322e;
    --neutral-300: #4a4640;
    --neutral-600: #b3aca2;
    --neutral-700: #d6d0c7;
    --neutral-900: #f4f2ee;
    --link: #9fc3ec;
    --link-hover: #c4dbf5;
    --focus: #9fc3ec;
    --btn: #2f6299;
    --btn-hover: #3a72ad;
    --ex-fill: #6f9fd6;
  }
}
  :root:where([data-theme="dark"]) {
    --brand-50: #18212c;
    --brand-100: #283647;
    --accent-100: #4a3b14;
    --neutral-0: #1f1d1b;
    --neutral-50: #161514;
    --neutral-100: #1b1a18;
    --neutral-200: #35322e;
    --neutral-300: #4a4640;
    --neutral-600: #b3aca2;
    --neutral-700: #d6d0c7;
    --neutral-900: #f4f2ee;
    --link: #9fc3ec;
    --link-hover: #c4dbf5;
    --focus: #9fc3ec;
    --btn: #2f6299;
    --btn-hover: #3a72ad;
    --ex-fill: #6f9fd6;
  }


* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--neutral-50);
  color: var(--neutral-700);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  color: var(--neutral-900);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-top: 0.4em;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.narrow {
  max-width: 44rem;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--neutral-0);
  padding: 0.5rem 1rem;
  z-index: 10;
}

/* header / footer */
.site-header {
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-200);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--neutral-900);
  text-decoration: none;
}

.logo-mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand-700) 0 60%, var(--accent-300) 60% 100%);
}

nav[aria-label="Main"] {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

nav[aria-label="Main"] a:not(.btn) {
  color: var(--neutral-700);
  text-decoration: none;
  font-weight: 600;
}

nav[aria-label="Main"] a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  background: var(--neutral-100);
  border-top: 1px solid var(--neutral-200);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.fine,
.provisional {
  color: var(--neutral-600);
  font-size: 0.9rem;
}

/* buttons */
.btn {
  display: inline-block;
  background: var(--btn);
  color: var(--on-btn);
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--btn-hover);
  color: var(--on-btn);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.link-strong {
  font-weight: 700;
}

/* sections */
.hero {
  background: var(--neutral-0);
  border-bottom: 6px solid var(--accent-300);
  padding: 4rem 0 3.5rem;
}

.page-head {
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-200);
  padding: 3rem 0 2rem;
}

.eyebrow {
  display: inline-block;
  background: var(--accent-100);
  color: var(--neutral-900);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lede {
  font-size: 1.2rem;
  max-width: 44rem;
}

.section {
  padding: 3rem 1rem;
}

.band {
  background: var(--brand-50);
  border-top: 1px solid var(--brand-100);
  border-bottom: 1px solid var(--brand-100);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.card,
.plan,
.feature {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.steps {
  padding-left: 1.4rem;
  max-width: 48rem;
}

.steps li {
  margin-bottom: 0.8rem;
}

.feature {
  margin-bottom: 1.25rem;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.note {
  border-left: 4px solid var(--accent-300);
  background: var(--neutral-0);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}

/* pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.price {
  margin: 0.25rem 0 0.75rem;
}

.amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--neutral-900);
}

.per {
  color: var(--neutral-600);
}

.plan-annual,
.plan-limits {
  margin: -0.5rem 0 0.75rem;
  color: var(--neutral-600);
}

.plan-limits {
  margin-top: 0;
  font-weight: 600;
}

.plan-summary {
  min-height: 3.2em;
}

/* faq */
.faq details {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.6rem;
}

.faq summary {
  font-weight: 700;
  color: var(--neutral-900);
  cursor: pointer;
}

.faq details p {
  margin: 0.6rem 0 0;
}

/* form */
.form {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.3rem;
}

.optional {
  font-weight: 400;
  color: var(--neutral-600);
}

input[type="email"],
input[type="text"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--neutral-900);
  background: var(--neutral-0);
  border: 1px solid var(--neutral-600);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.check input {
  margin-top: 0.35rem;
  width: 1.1rem;
  height: 1.1rem;
}

.check label {
  font-weight: 400;
  color: var(--neutral-700);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.prose {
  max-width: 44rem;
}

/* screenshots of the app (pages.ts appShots) */
.shots {
  display: grid;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1.5rem;
}

@media (min-width: 52rem) {
  .shots {
    grid-template-columns: minmax(0, 1fr) 15rem;
  }
}

/* Two laptop stills side by side: the job and the cash report. */
@media (min-width: 52rem) {
  .shots-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.shot {
  margin: 0;
  min-width: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 10px 28px -14px rgb(0 0 0 / 0.25);
  background: #ffffff;
}

/* On a phone the phone still comes first: the laptop one is too small to read until opened. */
@media (max-width: 51.99rem) {
  .shot-phone {
    order: -1;
  }
}

.shot-link {
  display: block;
  border-radius: var(--radius);
}

.shot-phone img {
  max-width: 15rem;
  margin-inline: auto;
  border-radius: 1.1rem;
}

.shot figcaption {
  color: var(--neutral-600);
  font-size: 0.92rem;
  margin-top: 0.7rem;
}

.feature .shot {
  margin-top: 1.25rem;
  max-width: 52rem;
}

/* hero worked example (src/site/example.ts) */
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.example {
  margin: 0;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 8px 24px -12px rgb(0 0 0 / 0.18);
  font-size: 0.92rem;
  min-width: 0;
}

.example figcaption {
  color: var(--neutral-600);
  margin-bottom: 0.75rem;
}

.ex-tag {
  display: inline-block;
  background: var(--accent-100);
  color: var(--neutral-900);
  border-radius: 999px;
  padding: 0 0.55rem;
  margin-right: 0.35rem;
  font-weight: 700;
  font-size: 0.8rem;
}

.ex-sheet {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ex-sheet th,
.ex-sheet td {
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid var(--neutral-200);
  text-align: right;
  white-space: nowrap;
}

.ex-sheet thead th {
  color: var(--neutral-600);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ex-sheet th:first-child {
  text-align: left;
  white-space: normal;
  font-weight: 600;
  color: var(--neutral-900);
}

.ex-sheet thead th:first-child {
  color: var(--neutral-600);
  font-weight: 700;
}

.ex-item {
  color: var(--neutral-600);
  font-weight: 700;
  margin-right: 0.2rem;
}

.ex-bar {
  display: inline-block;
  width: 2.6rem;
  height: 0.4rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: var(--neutral-200);
  vertical-align: middle;
  overflow: hidden;
}

.ex-fill {
  display: block;
  height: 100%;
  background: var(--ex-fill);
}

.ex-fill-0 {
  width: 0;
}
.ex-fill-1 {
  width: 10%;
}
.ex-fill-2 {
  width: 20%;
}
.ex-fill-3 {
  width: 30%;
}
.ex-fill-4 {
  width: 40%;
}
.ex-fill-5 {
  width: 50%;
}
.ex-fill-6 {
  width: 60%;
}
.ex-fill-7 {
  width: 70%;
}
.ex-fill-8 {
  width: 80%;
}
.ex-fill-9 {
  width: 90%;
}
.ex-fill-10 {
  width: 100%;
}

.ex-summary {
  margin: 0.85rem 0 0;
  font-variant-numeric: tabular-nums;
}

.ex-summary div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.3rem;
}

.ex-summary dt {
  color: var(--neutral-700);
}

.ex-summary dd {
  margin: 0;
  color: var(--neutral-900);
  font-weight: 600;
}

.ex-summary .ex-due {
  margin-top: 0.4rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}

.ex-due dt,
.ex-due dd {
  color: var(--neutral-900);
  font-weight: 800;
}

.ex-due dd {
  font-size: 1.15rem;
}

.ex-note {
  margin: 0.75rem 0 0;
  color: var(--neutral-600);
  font-size: 0.82rem;
}

@media (max-width: 40rem) {
  .hero {
    padding: 2.5rem 0;
  }

  .header-row {
    padding: 0.6rem 1rem;
  }

  /* cta-row-phone: a pair that wraps becomes two full-width buttons, not a ragged stack
     (platform/pages/cta-row-phone.test.mjs). */
  .cta-row > .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
