/* Tightlatch marketing, trust and legal pages (SPEC 8.1 to 8.6, 8.8).
   Loaded after /site.css and reuses its color tokens. Mobile first, 16 px side gutters,
   no horizontal page scroll at 360 px, no external fonts, no inline styles (CSP style-src 'self'). */

:root {
  --surface: #f5f7fa;
  --accent-soft: #eaf1fd;
  --fill-bg: #fff1b8;
  --fill-fg: #4a3800;
  --sev-critical: #b3261e;
  --sev-high: #a8480a;
  --sev-medium: #7d5800;
  --sev-low: #1f5fd1;
  --sev-info: #5b6270;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #181b21;
    --accent-soft: #18233a;
    --fill-bg: #4a3b0a;
    --fill-fg: #ffe7a3;
    --sev-critical: #ff8a80;
    --sev-high: #ffb27a;
    --sev-medium: #f2cc6b;
    --sev-low: #8fb4ff;
    --sev-info: #a2a9b6;
  }
}

/* Layout */
.mk .page { padding-bottom: 24px; }
.wide .site-header, .wide .page, .wide .site-footer { max-width: 1000px; }
.measure { max-width: 44rem; }
.wide .page > section > p, .wide .page > section > ul, .wide .page > section > ol,
.wide .page > section > h3, .wide .page > .lede { max-width: 46rem; }
.mk main > h1:first-child { margin-top: 24px; }

/* Links and focus */
.mk a { color: var(--accent); text-underline-offset: 2px; }
.mk a:hover { text-decoration-thickness: 2px; }
.mk a:focus-visible, .mk button:focus-visible, .mk input:focus-visible,
.mk textarea:focus-visible, .mk summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus {
  left: 16px;
  z-index: 10;
  background: var(--bg);
  color: var(--fg);
  padding: 8px 12px;
  border: 2px solid var(--accent);
  border-radius: 8px;
}

/* Header */
.mk .site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.mk .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.15rem; color: var(--fg); min-height: 44px; }
.brand-mark { color: var(--accent); flex: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; font-size: 0.95rem; }
.mk .site-nav a { color: var(--fg); text-decoration: none; display: inline-block; padding: 10px 0; }
.mk .site-nav a:hover { color: var(--accent); text-decoration: underline; }
.mk .site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.mk .site-header a.nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.mk .site-header a.nav-cta:hover { background: var(--accent); color: var(--accent-fg); }
/* Phone: brand and the button on the first row, the links on the second.
   The 720 px pages keep that at every width: five links, the brand and the button do not fit in
   one 720 px row. The 1000 px (.wide) pages go to one row from 880 px, with room to spare for
   wider system fonts. */
.mk .brand { order: 1; margin-right: auto; }
.mk .site-header .nav-cta { order: 2; }
.mk .site-nav { order: 3; flex-basis: 100%; }
@media (min-width: 880px) {
  .mk.wide .site-nav { order: 2; flex-basis: auto; }
  .mk.wide .site-header .nav-cta { order: 3; }
}

/* Type */
.lede { font-size: 1.125rem; }
.mk h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.mk code { font-family: var(--mono); font-size: 0.9em; }
.mk p code, .mk li code, .mk dd code, .mk td code {
  background: var(--code-bg);
  padding: 0 4px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.mk pre code { background: none; padding: 0; font-size: inherit; }
.pre-tall { max-height: 520px; }
.hash { font-family: var(--mono); }

/* Buttons */
.mk .button, .mk a.button { min-height: 44px; font-weight: 600; color: var(--accent-fg); text-decoration: none; }
.mk .button:hover { filter: brightness(1.08); }

/* Hero */
.hero { padding: 16px 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); line-height: 1.12; letter-spacing: -0.01em; margin: 24px 0 16px; max-width: 26ch; }
.hero .lede { max-width: 40rem; }
.news {
  max-width: 40rem;
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 12px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-form { max-width: 40rem; margin-top: 24px; }
.hero-form label { margin-top: 0; }
.field-row { display: flex; flex-direction: column; gap: 10px; }
.field-row input { min-height: 48px; font-size: 1.05rem; }
.field-row button.primary { margin-top: 0; min-height: 48px; font-weight: 600; font-size: 1.05rem; }
.hero .price-line { margin-top: 12px; max-width: 40rem; }
.demo-link { margin-top: 4px; }
@media (min-width: 560px) {
  .field-row { flex-direction: row; }
  .field-row input { flex: 1; min-width: 0; }
  .field-row button.primary { flex: none; }
}

.trust-row {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-weight: 600;
}
.trust-row li { display: inline-flex; align-items: baseline; gap: 6px; }
.trust-row li::before { content: "\2713"; color: var(--ok); font-weight: 700; }

.risk-list li, .never-list li { margin: 6px 0; }

/* Numbered steps */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 48px; margin: 0 0 20px; min-height: 32px; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Panels and bands */
.panel { background: var(--surface); border-radius: var(--radius); padding: 4px 20px; margin: 16px 0 32px; }
.panel h2 { margin-top: 16px; }
.cta-band { background: var(--accent-soft); border-radius: var(--radius); padding: 8px 20px 12px; margin: 40px 0 16px; }
.cta-band h2 { margin-top: 16px; }

/* Pricing cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0 24px; }
@media (min-width: 820px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  scroll-margin-top: 16px;
}
.card-featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mk .card h2, .mk .card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.price { margin: 4px 0 8px; color: var(--muted); }
.price .amount { font-size: 2rem; font-weight: 700; color: var(--fg); margin-right: 4px; }
.card ul { padding-left: 20px; margin: 8px 0 16px; flex: 1; }
.card li { margin: 6px 0; }
.card .button { align-self: flex-start; }
.card-note { color: var(--muted); font-size: 0.92rem; margin: 8px 0 0; }

/* Definition lists */
.details-list dt { font-weight: 700; margin-top: 16px; }
.details-list dd { margin: 4px 0 0; }

/* On-page contents */
.toc { background: var(--surface); border-radius: var(--radius); padding: 8px 20px; margin: 16px 0 8px; }
.toc ol { margin: 8px 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.mk section[id], .mk h2[id], .mk h3[id] { scroll-margin-top: 16px; }

/* Collapsible boxes */
details.box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 16px 0; }
details.box > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
details.box[open] > summary { margin-bottom: 8px; }
.hash-line { margin-bottom: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0; }
.mk table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.mk th, .mk td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.mk th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: block; border: 0; padding: 4px 0; }
  table.stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
  }
}

/* Severity chips and the check list */
.chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.chip-critical { color: var(--sev-critical); }
.chip-high { color: var(--sev-high); }
.chip-medium { color: var(--sev-medium); }
.chip-low { color: var(--sev-low); }
.chip-info { color: var(--sev-info); }
.sev-table td:first-child { width: 7.5rem; }

.check-list, .soon-list { list-style: none; padding: 0; margin: 12px 0 24px; }
.check-list > li { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.check-list > li:last-child { border-bottom: 1px solid var(--line); }
.check-list p { margin: 6px 0; }
.check-id {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 6px;
  white-space: nowrap;
}
.sev-line { color: var(--muted); font-size: 0.95rem; }
.soon-list li { padding: 8px 0; border-top: 1px solid var(--line); }

/* Forms on trust pages */
.tool-form { max-width: 36rem; }
.mk textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  min-height: 96px;
}
.mk button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Legal pages */
mark.fill { background: var(--fill-bg); color: var(--fill-fg); padding: 0 3px; border-radius: 3px; font-weight: 600; }
.doc-meta { color: var(--muted); }
.legal-doc h2 { font-size: 1.2rem; margin-top: 28px; }
.legal-doc li { margin: 6px 0; }
.quote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--line); background: var(--surface); border-radius: 0 8px 8px 0; }

/* 404 */
.notfound h1 { margin-top: 40px; }

/* Footer */
.mk .site-footer { margin-top: 24px; }
.mk .site-footer nav { gap: 2px 16px; margin-bottom: 4px; }
.mk .site-footer nav a { display: inline-block; padding: 6px 0; }
.mk .site-footer a[aria-current="page"] { color: var(--fg); }
.mk .site-footer a { color: var(--muted); }
