/* SelfEmployer — site stylesheet
   System-font stack only. No frameworks, no external resources.
   Colours are CSS custom properties so the theme can be swapped in one place. */

:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4a4a;
  --color-border: #dcd8cf;
  --accent: #1a5c46;
  --accent-contrast: #ffffff;
  --accent-tint: #e7efec;
  --focus-ring: #0b3d2e;
  --link: #144a38;
  --link-visited: #1a5c46;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14181a;
    --color-surface: #1c2224;
    --color-text: #ecebe6;
    --color-text-muted: #b9b6ac;
    --color-border: #3a423f;
    --accent: #4caf8c;
    --accent-contrast: #08150f;
    --accent-tint: #1f2e28;
    --focus-ring: #7fd6b3;
    --link: #7fd6b3;
    --link-visited: #a3e6cc;
  }
}

/* Manual theme override hooks, in case a toggle is added later */
:root[data-theme="light"] {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4a4a;
  --color-border: #dcd8cf;
  --accent: #1a5c46;
  --accent-contrast: #ffffff;
  --accent-tint: #e7efec;
  --focus-ring: #0b3d2e;
  --link: #144a38;
  --link-visited: #1a5c46;
}

:root[data-theme="dark"] {
  --color-bg: #14181a;
  --color-surface: #1c2224;
  --color-text: #ecebe6;
  --color-text-muted: #b9b6ac;
  --color-border: #3a423f;
  --accent: #4caf8c;
  --accent-contrast: #08150f;
  --accent-tint: #1f2e28;
  --focus-ring: #7fd6b3;
  --link: #7fd6b3;
  --link-visited: #a3e6cc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
  display: block;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Layout */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-header__inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-header__brand {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.site-header__brand:visited {
  color: var(--color-text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:visited {
  color: var(--color-text);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

section {
  margin-block: 2.5rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-top: 0;
}

h3 {
  font-size: 1.15rem;
  margin-top: 0;
}

p {
  margin: 0 0 1rem;
  color: var(--color-text);
}

.lede {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 0.25rem 0.25rem 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Timeline */

.timeline {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-left: 3px solid var(--color-border);
}

.timeline__item {
  position: relative;
  margin: 0 0 2rem 0;
  padding: 0 0 0 1.5rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -0.4375rem;
  top: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--color-bg);
}

.timeline__date {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-contrast);
  background: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.timeline__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.timeline__item p {
  margin: 0 0 0.5rem;
}

.timeline__source {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Teaser cards (homepage) */

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}

.card {
  display: block;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 0.375rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

.card:visited {
  color: var(--color-text);
}

.card:hover,
.card:focus-visible {
  border-color: var(--accent);
}

.card-block__link {
  display: inline-block;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Document templates (letters, forms) */

.doc-template {
  margin: 1.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 0.5rem;
}

.doc-template p {
  margin: 0 0 1rem;
}

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

.doc-template ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.doc-checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.doc-checklist li {
  margin: 0 0 0.5rem;
}

.doc-checklist li:last-child {
  margin-bottom: 0;
}

blockquote.guidance {
  border-left-style: dashed;
  font-style: italic;
}

/* Capture form */

.capture {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.capture__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.capture__field {
  flex: 1 1 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.capture__field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.capture__field input[type="email"] {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.capture__button {
  font: inherit;
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border: none;
  border-radius: 0.375rem;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  flex: 0 0 auto;
}

.capture__button:hover {
  filter: brightness(1.1);
}

.capture__small-print {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.capture__success {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  font-weight: 600;
}

.capture__success[hidden] {
  display: none;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer__inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Print */

@media print {
  .site-header,
  .capture,
  .site-footer form {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

@media (min-width: 30rem) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Source-check stamp under template-page H1s */
.stamp {
  font-size: 0.85rem;
  color: var(--muted, #5a6660);
  border-left: 3px solid var(--accent, #1a5c46);
  padding-left: 0.75rem;
  margin: 0.75rem 0 1.5rem;
}

/* Quick-answers FAQ block on the timeline hub */
.faq h3 {
  margin-bottom: 0.25rem;
}
.faq h3 + p {
  margin-top: 0.25rem;
}

.site-footer__links {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
