@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap");

/* Sourceflow components. Class prefix: sf-. Every value comes from tokens. */

body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 26px; background: var(--surface); color: var(--ink); }
.sf-pad { padding: var(--space-6); }
.sf-stack { display: flex; flex-direction: column; gap: var(--space-6); }
.sf-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* Links */
.sf-link, .sf-prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sf-link:hover, .sf-prose a:hover { color: var(--source-strong); text-decoration-thickness: 2px; }

/* Focus: one ring everywhere */
.sf-btn:focus-visible, .sf-link:focus-visible, .sf-input:focus-visible, .sf-check input:focus-visible + .sf-check__box, .sf-nav a:focus-visible, .sf-prose a:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* Button */
.sf-btn { font: inherit; font-weight: 600; font-size: 16px; line-height: 1; min-height: var(--control-height); padding: 0 calc(var(--space-4) + var(--space-1)); border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); text-decoration: none; }
.sf-btn:hover { border-color: var(--ink); }
.sf-btn--primary { background: var(--source); border-color: var(--source); color: var(--on-source); }
.sf-btn--primary:hover { background: var(--source-strong); border-color: var(--source-strong); }
.sf-btn--quiet { background: transparent; border-color: transparent; color: var(--link); padding: 0 var(--space-2); text-decoration: underline; text-underline-offset: 3px; }
.sf-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Text field */
.sf-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.sf-field__label { font-weight: 600; font-size: 16px; line-height: 22px; }
.sf-field__label .sf-opt { font-weight: 400; color: var(--ink-muted); }
.sf-input { font: inherit; min-height: var(--control-height); padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); width: 100%; box-sizing: border-box; }
.sf-input::placeholder { color: var(--ink-muted); }
.sf-field__help { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.sf-field--error .sf-input { border-color: var(--danger); border-width: 2px; padding-left: calc(var(--space-4) - 1px); }
.sf-field__error { font-size: 14px; line-height: 20px; color: var(--danger); font-weight: 600; }

/* SMS consent checkbox: unchecked by default, never required, disclosure adjacent */
.sf-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); max-width: var(--measure); }
.sf-check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.sf-check__control { position: relative; width: 24px; height: 24px; margin-top: 1px; }
.sf-check__box { display: block; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); }
.sf-check input:checked + .sf-check__box { background: var(--source); border-color: var(--source); }
.sf-check input:checked + .sf-check__box::after { content: ""; display: block; width: 6px; height: 12px; margin: 3px 0 0 7px; border: solid var(--on-source); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.sf-check__text { font-size: 14px; line-height: 22px; color: var(--ink); }
.sf-check__text a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* Tag */
.sf-tag { display: inline-flex; align-items: center; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px var(--space-2); border-radius: var(--radius-sm); background: var(--source-soft); color: var(--source); }
.sf-tag--signal { background: var(--signal-soft); color: var(--signal); }

/* Eyebrow */
.sf-eyebrow { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); margin: 0; }

/* Mono keyword */
.sf-kbd { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500; padding: 0 var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-sunken); }

/* Site header */
.sf-header { background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.sf-header__inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-8); min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.sf-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.sf-logo svg { display: block; height: 32px; width: auto; }
.sf-logo__word { font-family: var(--font-sans); font-size: 26px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.sf-logo__source { font-weight: 700; color: var(--ink); }
.sf-logo__flow { font-weight: 600; color: var(--source); }
.sf-nav { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; }
.sf-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.sf-nav a:hover { border-bottom-color: var(--line-strong); }
.sf-nav a[aria-current="page"] { color: var(--source); border-bottom-color: var(--source); }

/* Site footer */
.sf-footer { background: var(--surface-sunken); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.sf-footer__inner { max-width: var(--page-max); margin: 0 auto; padding: var(--space-12) var(--space-8) var(--space-8); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-8); }
.sf-footer h2 { font-family: var(--font-sans); font-size: 13px; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0 0 var(--space-3); }
.sf-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.sf-footer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sf-footer address { font-style: normal; }
.sf-footer__legal { max-width: var(--page-max); margin: 0 auto; padding: var(--space-4) var(--space-8) var(--space-8); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }

/* Policy page */
.sf-prose { max-width: var(--measure); font-size: 16px; line-height: 26px; }
.sf-prose h1 { font-family: var(--font-serif); font-size: 40px; line-height: 46px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 var(--space-2); text-wrap: balance; }
.sf-prose h2 { font-family: var(--font-serif); font-size: 28px; line-height: 34px; font-weight: 600; margin: var(--space-12) 0 var(--space-3); }
.sf-prose p { margin: 0 0 var(--space-4); }
.sf-prose .sf-meta { color: var(--ink-muted); font-size: 14px; }
.sf-required { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.sf-required h2 { margin-top: 0; }
