/*
 * 22 System, shared styling for the hosted app pages (FAQ, support).
 * v2 design system: six tokens, no fills, radius 0, hairline dividers, sentence case.
 * See docs/design/DESIGN-SYSTEM.md.
 *
 * NOTE: privacy-policy/, terms/ and account-deletion/ still carry their own older inline styles
 * (#111 / #666 / #e3e3e3 and 8px radii). They pre-date the v2 brief and were left alone here to
 * keep this change reviewable, worth folding onto this stylesheet in a follow-up.
 */
:root {
  --main: #000000;
  --secondary: #ffffff;
  --dark-gray: #797979;
  --mid-gray: #cccccc;
  --light-gray: #f9f9f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--secondary);
  color: var(--main);
  /* Neue Haas Unica is the brand face, but its web licence doesn't cover embedding and the app
     ships with the system font meanwhile, so these pages use the system stack too, keeping the
     two-weight discipline (300 headings / 400 body) rather than the exact face. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 48px 20px 80px; }

h1 { font-size: 34px; line-height: 44px; font-weight: 300; margin: 0 0 4px; }
h2 { font-size: 24px; line-height: 34px; font-weight: 300; margin: 40px 0 8px; }
h3 { font-size: 16px; line-height: 24px; font-weight: 400; margin: 24px 0 4px; }

p, li { font-size: 14px; line-height: 20px; margin: 0 0 12px; }
ul { padding-left: 20px; }

.meta { color: var(--dark-gray); font-size: 12px; }
.muted { color: var(--dark-gray); }

/* Prefer a hairline to a container: every rule is 1px mid_gray. */
hr, .rule {
  border: 0;
  border-top: 1px solid var(--mid-gray);
  margin: 32px 0;
}

.section { border-top: 1px solid var(--mid-gray); padding-top: 24px; margin-top: 32px; }

a { color: var(--main); text-decoration: underline; text-underline-offset: 2px; }

/* Outbound links leave the site/app: up-right arrow, per the design system. Internal actions use
   a right-facing arrow instead: the direction is the only signal, so keep it consistent. */
a.outbound { display: inline-block; margin-right: 24px; text-decoration: none; }
a.outbound::after { content: " \2197"; padding-left: 6px; }
a.action { text-decoration: none; }
a.action::after { content: " \2192"; padding-left: 25px; }

/* Q&A blocks: hairline-separated, no cards, no radii. */
.qa { border-top: 1px solid var(--mid-gray); padding: 20px 0; }
.qa:last-of-type { border-bottom: 1px solid var(--mid-gray); }
.qa h3 { margin-top: 0; }

table { border-collapse: collapse; width: 100%; margin-top: 8px; font-size: 14px; }
th, td { text-align: left; border-bottom: 1px solid var(--mid-gray); padding: 8px 6px; vertical-align: top; }

code {
  background: var(--light-gray);
  border-radius: 0;
  padding: 1px 5px;
  font-size: 13px;
}

/* No fills anywhere: a callout is a ruled block, not a tinted box. */
.note { border-left: 1px solid var(--main); padding: 4px 0 4px 16px; margin: 16px 0; }

/* ───────────────────────── forms (account deletion, the site gate) ─────────────────────────
 *
 * These pages used to carry their own inline <style> block. The `_headers` CSP sends
 * `style-src 'self'`, which blocks an inline <style> outright, so on the live site they rendered
 * as unstyled Times New Roman. Nothing here is new design: it is the same shapes, moved into the
 * one stylesheet the CSP already allows, and retuned to the v2 tokens (no fills, radius 0).
 */
label { display: block; font-size: 12px; margin: 14px 0 6px; }

input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--mid-gray);
  border-radius: 0;
  font-size: 14px;
  font-family: inherit;
  background: var(--secondary);
  color: var(--main);
}
input:focus, textarea:focus { outline: 1px solid var(--main); outline-offset: -1px; }

button {
  margin-top: 18px;
  background: var(--main);
  color: var(--secondary);
  border: 1px solid var(--main);
  border-radius: 0;
  padding: 11px 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
button:disabled { opacity: .35; cursor: not-allowed; }

/* A field-level message, and a success block. Ruled, not tinted, like .note above. */
.err { color: var(--main); font-size: 12px; margin-top: 8px; min-height: 16px; }
.err:not(:empty) { border-left: 1px solid var(--main); padding-left: 12px; }
.ok { border-left: 1px solid var(--main); padding: 8px 0 8px 16px; margin-top: 16px; display: none; }

/* Stepped flows hide their later steps until the earlier one succeeds. These two classes are
 * toggled from JavaScript, and they MUST live here rather than as a style="" attribute: the CSP
 * blocks inline style attributes too, which is why step 2 of the deletion page was visible from
 * the start on the live site. */
.hidden { display: none; }
.shown { display: block; }

/* The draft banner on pages still waiting for counsel. */
.draft { border-left: 1px solid var(--main); padding: 8px 0 8px 16px; margin: 16px 0 28px; font-size: 12px; }

/* ───────────────────────── landing page ───────────────────────── */

.brand { width: 48px; height: 48px; display: block; margin-bottom: 24px; }

.lede { font-size: 18px; line-height: 28px; font-weight: 300; margin: 0 0 24px; }

/* Benefit blocks. Same hairline rhythm as .qa, two columns once there is room for them. */
.benefits { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
.benefit { border-top: 1px solid var(--mid-gray); padding: 20px 0; }
.benefit:last-child { border-bottom: 1px solid var(--mid-gray); }
.benefit h3 { margin-top: 0; }
.benefit p { margin-bottom: 0; }

@media (min-width: 640px) {
  .benefits { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  /* With two columns the last item is not reliably on the bottom row, so rule every cell and let
     the grid gap collapse the doubled lines. */
  .benefit:last-child { border-bottom: 0; }
  .benefits { border-bottom: 1px solid var(--mid-gray); }
}

/* The gate page is one short centred column: no nav, nothing to read, one field. */
.gate { max-width: 360px; padding-top: 18vh; }

/* The deletion page ends in a <footer> of links. Spaced by margin, not by a fill. */
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--mid-gray); font-size: 12px; color: var(--dark-gray); }
footer a { margin-right: 14px; }

/* ───────────────────────── site chrome: header and footer ─────────────────────────
 *
 * Shared by every page, moved here from landing.css on 3 Nov 2026 when the FAQ, support,
 * privacy, terms and deletion pages gained the same header and footer as the landing page.
 * They follow the Shopify store at 22system.com: circular mark, thin nav, a smaller cluster on
 * the right, and a footer of plain link columns. Someone arriving from 22system.com should not
 * feel they have left.
 *
 * The chrome is 1200px wide while a document's .wrap stays 720px, which is deliberate: the
 * reading column should not grow just because the header did.
 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--secondary);
  border-bottom: 1px solid var(--mid-gray);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* The circular 22 mark, as on the store. */
.site-mark { display: block; width: 44px; height: 44px; flex: 0 0 auto; }

.site-nav { display: flex; align-items: center; gap: 28px; flex: 1 1 auto; }
.site-nav a {
  font-size: 20px;
  font-weight: 300;
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The right-hand cluster is smaller than the main nav, as it is on the store. */
.site-nav-end { display: flex; align-items: center; gap: 20px; }
.site-nav-end a { font-size: 13px; font-weight: 400; }

/* Under 760px the secondary links go, rather than becoming a hamburger nobody will open on a page
   this short. The two that remain are the two a visitor actually came for. */
@media (max-width: 760px) {
  .site-header-inner { gap: 20px; padding: 16px 20px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 16px; }
  .site-nav-end { display: none; }
}


.site-footer { border-top: 1px solid var(--mid-gray); margin-top: 0; padding: 0; color: var(--main); }
.site-footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 64px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}
.footer-cols h4 { margin: 0 0 12px; font-size: 12px; font-weight: 400; color: var(--dark-gray); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0 0 8px; font-size: 13px; line-height: 20px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; text-underline-offset: 2px; }

.footer-base {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--mid-gray);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 12px;
  color: var(--dark-gray);
}

@media (max-width: 760px) {
  .site-footer-inner { padding: 32px 20px 48px; }
}
