/* Penland LLC — shared stylesheet. No external dependencies. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --bg-sunk: #eceef1;
  --fg: #16191d;
  --fg-muted: #565d66;
  --fg-faint: #7b838d;
  --rule: #d9dde2;
  --accent: #1f4e79;
  --accent-fg: #ffffff;
  --accent-soft: #e8eff6;
  --radius: 10px;
  --maxw: 1080px;
  --readw: 46rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --bg-alt: #1b1f24;
    --bg-sunk: #23282e;
    --fg: #e8eaed;
    --fg-muted: #a6adb6;
    --fg-faint: #858d97;
    --rule: #2e343b;
    --accent: #7aaddd;
    --accent-fg: #0f1216;
    --accent-soft: #1e2833;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Constrain prose to a readable measure while keeping the container's left
   edge, so text columns line up with the full-width sections above them. */
.wrap.read > * { max-width: var(--readw); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 2rem 0 0.75rem; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-top: 0; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p, li { color: var(--fg); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.35rem; }
li { margin-bottom: 0.4rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--fg-faint); font-weight: 500; }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.93rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; }

/* ---------- hero ---------- */

.hero { padding: 3.5rem 0 2.75rem; border-bottom: 1px solid var(--rule); }
.hero p.lede {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 42rem;
  margin-bottom: 0;
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

/* ---------- sections & cards ---------- */

section { padding: 2.75rem 0; }
section + section { border-top: 1px solid var(--rule); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.08rem; }
.card p { color: var(--fg-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.card .card-link { margin-top: auto; font-size: 0.93rem; font-weight: 600; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.6rem;
  align-self: flex-start;
}

/* ---------- callout ---------- */

.callout {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }

.consent-box {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-sunk);
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.consent-box > :last-child { margin-bottom: 0; }
.consent-box .checkbox-row { display: flex; gap: 0.6rem; align-items: flex-start; }
.consent-box .checkbox-row::before {
  content: "☐";
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--fg-muted);
}

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--fg-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- legal docs ---------- */

.legal { padding: 2.5rem 0 3.5rem; }
.legal h2 { margin-top: 2.5rem; }
.legal .updated { color: var(--fg-faint); font-size: 0.9rem; margin-bottom: 2rem; }
.legal code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-sunk); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  padding: 2.25rem 0 2.75rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.site-footer .foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.site-footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 0 0 0.6rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--fg-muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.legal-line {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--fg-faint);
}
.legal-line strong { color: var(--fg-muted); }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }
