:root {
  color-scheme: dark;
  --bg: #0a0d0e;
  --panel: #101517;
  --panel-2: #151b1d;
  --line: #2a3335;
  --text: #f1f5f2;
  --soft: #bdc8c3;
  --muted: #7f8b87;
  --accent: #a4cfb9;
  --accent-strong: #c4e1d2;
  --danger: #dc928b;
  --display: Bahnschrift, "Arial Narrow", "Segoe UI Variable", sans-serif;
  --body: "Segoe UI Variable", Aptos, "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(164,207,185,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 100% 52px;
  font-family: var(--body);
  line-height: 1.6;
  -webkit-tap-highlight-color: rgba(164,207,185,.15);
}
a { color: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 20; padding: 10px 14px;
  border-radius: 4px; color: #07100c; background: var(--accent-strong); font-weight: 800;
  transform: translateY(-160%); transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky; top: 0; z-index: 8; min-height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 10px 18px; border-bottom: 1px solid rgba(211,229,219,.12);
  background: rgba(10,13,14,.94); backdrop-filter: blur(18px);
  box-shadow: 0 14px 44px rgba(0,0,0,.22);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand img {
  width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #36413d;
  border-radius: 4px; object-fit: cover;
}
.brand strong { display: block; font-family: var(--display); font-size: 19px; line-height: 1; }
.brand span span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.nav { display: flex; align-items: center; gap: 6px; }

.btn {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 11px; border: 1px solid #303a3d; border-radius: 4px;
  color: var(--text); background: #141a1c; font-weight: 720; text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.btn:hover { transform: translateY(-1px); border-color: #53615d; background: #1a2224; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #07100c; border-color: var(--accent); background: var(--accent); }
.btn-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 86px; }
.hero, .intro {
  position: relative; min-height: 360px; display: grid; align-content: end;
  padding: 36px 0 46px; border-bottom: 1px solid var(--line);
}
.hero::before, .intro::before {
  content: "FIRSAY / FIELD MANUAL"; position: absolute; top: 0; left: 0;
  color: #779186; font-family: var(--mono); font-size: 10px;
}
.eyebrow { color: #8eb8a3; font-family: var(--mono); font-size: 10px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0; text-wrap: balance; }
h1 { max-width: 900px; margin: 10px 0 18px; font-size: 64px; line-height: 1.02; font-weight: 760; }
h2 { margin: 0 0 20px; font-size: 30px; line-height: 1.15; }
h3 { margin: 0 0 8px; font-size: 17px; }
p { margin: 0; color: var(--soft); text-wrap: pretty; }
.hero p, .intro p { max-width: 760px; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }

section { padding: 42px 0 48px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title p { max-width: 580px; font-size: 13px; }

.grid, .steps, .workflow-grid, .test-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px;
  border: 1px solid var(--line); background: var(--line);
}
.grid.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
.item { min-width: 0; padding: 22px; background: var(--panel); }
.item code { display: inline-block; margin-bottom: 26px; color: var(--accent); font-family: var(--mono); font-weight: 800; }
.item p { font-size: 13px; }
.item ul { margin: 16px 0 0; padding-left: 18px; color: var(--soft); }
.plan-action { width: 100%; margin-top: 22px; }

.notice { padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--panel); }
.notice + .notice { margin-top: 8px; }
.notice strong { display: block; margin-bottom: 5px; font-family: var(--display); }
.notice-danger { border-left-color: var(--danger); }

.checklist { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin: 0; padding: 1px; list-style: none; background: var(--line); }
.checklist li { position: relative; min-height: 74px; padding: 16px 18px 16px 48px; background: var(--panel); color: var(--soft); }
.checklist li::before { content: "□"; position: absolute; left: 18px; color: var(--accent); font-family: var(--mono); }
.prompt { margin-top: 12px; padding: 14px; border: 1px solid var(--line); background: #090d0e; color: var(--soft); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

.price { margin: 18px 0; color: var(--text); font-family: var(--display); font-size: 42px; font-variant-numeric: tabular-nums; }
.price small { color: var(--muted); font-family: var(--body); font-size: 13px; }
.recommended { position: relative; background: #14201a; box-shadow: inset 0 3px 0 var(--accent); }
.recommended::after { content: "RECOMMENDED"; position: absolute; top: 14px; right: 16px; color: #90b7a4; font-family: var(--mono); font-size: 9px; }

.billing-grid { display: grid; grid-template-columns: minmax(240px,.75fr) minmax(0,1.25fr); gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.billing-grid.single { grid-template-columns: 1fr; }
.billing-login-action { margin-top: 12px; }
.payment-panel { min-width: 0; padding: 22px; background: var(--panel); }
.payment-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.payment-field { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.payment-field:first-of-type { margin-top: 18px; }
.payment-field > span { color: var(--muted); font-size: 12px; }
.payment-value { min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 14px; }
.payment-value.address { font-size: 12px; }
.copy-button { min-width: 108px; }
.status-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border: 1px solid #56605c; border-radius: 4px; color: var(--soft); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.status-chip.paid { color: #bfe3cd; border-color: #477158; background: #102219; }
.status-chip.pending { color: #e1cf90; border-color: #675d35; background: #211e11; }
.status-chip.failed,.status-chip.expired { color: #e4aaa4; border-color: #6b4642; background: #241413; }
.payment-history { margin-top: 24px; }
.section-title.compact { align-items: center; margin-bottom: 10px; }
.section-title.compact h3 { margin: 0; }
.history-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); }
.history-wrap table { width: 100%; min-width: 720px; border-collapse: collapse; }
.history-wrap th,.history-wrap td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.history-wrap th { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.history-wrap tbody tr:last-child td { border-bottom: 0; }
.mono-cell { font-family: var(--mono); overflow-wrap: anywhere; }
.billing-footnote { margin-top: 15px; font-size: 12px; }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 18px 2px; cursor: pointer; font-family: var(--display); font-weight: 720; }
details p { max-width: 780px; padding: 0 2px 20px; }

footer { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 30px 0 8px; color: var(--muted); font-size: 12px; }
footer a { color: var(--soft); }

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

@media (max-width: 760px) {
  .topbar { position: relative; display: grid; grid-template-columns: 1fr; padding: 12px; }
  .nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .nav .btn { min-width: 0; width: 100%; padding-inline: 7px; text-align: center; font-size: 11px; }
  main { width: min(100% - 24px,1180px); padding: 32px 0 58px; }
  .hero, .intro { min-height: 320px; padding-bottom: 34px; }
  h1 { font-size: 42px; }
  .hero p, .intro p { font-size: 16px; }
  .steps, .grid, .grid.grid-3, .workflow-grid, .test-grid, .checklist, .billing-grid { grid-template-columns: 1fr; }
  .payment-field { grid-template-columns: 1fr; }
  .copy-button { width: 100%; }
  section { padding: 34px 0 38px; }
  .section-title { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
