/* Steady Ledger — steadyledger.online */

:root {
  --bg: #F7F6F3;
  --fg: #1A1A2E;
  --tint: #1B6B5A;
  --gold: #C4A265;
  --line: #D4D2CC;
  --dim: #6B6966;
  --card: #FFFFFF;
  --deep: #0F0F1A;
  --radius: 3px;
  --measure: 68ch;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: 'Literata', Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--tint);
  color: #fff;
  z-index: 1000;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.875rem;
}
.skip-link:focus { top: 0.5rem; }

/* ── Top accent bar ── */
.top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--tint), var(--gold));
}

/* ── Typography ── */
h1, h2, h3, h4, .nav, .btn, .tag, .faq-q, .footer {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
}

h2 {
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg);
}

h3 {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
}

p + p { margin-top: 1em; }
a { color: var(--tint); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 3px;
}

/* ── Layout ── */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.narrow { max-width: var(--measure); margin: 0 auto; }

section { padding: var(--gap) 0; }
section + section { border-top: 1px solid var(--line); }

/* ── Header ── */
.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo span { color: var(--tint); }

.nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--tint); }

/* ── Hero ── */
.hero {
  padding: clamp(3rem, 6vw, 6rem) 0 var(--gap);
  border-bottom: none;
}

.hero h1 { margin-bottom: 1rem; max-width: 18ch; }

.hero-sub {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  color: var(--dim);
  max-width: 52ch;
  line-height: 1.6;
  font-style: italic;
}

/* ── Lozenge divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: var(--gap) 0;
  color: var(--line);
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider::before { max-width: 120px; }
.divider::after { max-width: 120px; }
.lozenge {
  font-size: 0.625rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ── Article cards ── */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tint);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-left-color: var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.article-card .tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tint);
  margin-bottom: 0.5rem;
}

.article-card h3 { margin-bottom: 0.5rem; }

.article-card p {
  font-size: 0.9375rem;
  color: var(--dim);
  flex: 1;
}

.article-card .read-more {
  margin-top: 1rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tint);
  letter-spacing: 0.02em;
}

/* ── Standards list ── */
.standards-list {
  list-style: none;
  counter-reset: std;
  margin-top: 1.5rem;
}

.standards-list li {
  counter-increment: std;
  padding: 1rem 0 1rem 3.5rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.standards-list li:last-child { border-bottom: none; }

.standards-list li::before {
  content: counter(std, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.standards-list strong {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

/* ── Not-box ── */
.not-box {
  background: var(--card);
  border: 2px solid var(--fg);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1.5rem;
}

.not-box ul {
  list-style: none;
  margin-top: 1rem;
}

.not-box li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9375rem;
}

.not-box li:last-child { border-bottom: none; }

.not-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--dim);
  font-weight: 700;
}

/* ── FAQ ── */
.faq-list { margin-top: 1.5rem; }

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 2rem 1.25rem 0;
  text-align: left;
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  position: relative;
  line-height: 1.4;
}

.faq-q::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--tint);
  transition: transform 0.2s;
}

.faq-item.open .faq-q::after {
  content: '−';
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a-inner {
  padding: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--dim);
  line-height: 1.65;
}

/* ── Support block ── */
.support-block {
  background: var(--deep);
  color: #E8E6E1;
  padding: 2.5rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  text-align: center;
}

.support-block h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.support-block a {
  color: var(--gold);
  font-weight: 500;
}

/* ── Footer ── */
.footer {
  background: var(--deep);
  color: #9B9893;
  padding: 2.5rem 0;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.footer-links a {
  color: #9B9893;
  text-decoration: none;
  font-size: 0.8125rem;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy { width: 100%; text-align: center; margin-top: 1rem; color: #6B6966; }

/* ── Legal pages ── */
.legal-content {
  padding: var(--gap) 0;
}

.legal-content h1 {
  margin-bottom: 0.5rem;
}

.legal-content .updated {
  font-size: 0.875rem;
  color: var(--dim);
  margin-bottom: 2rem;
  font-style: italic;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.legal-content h3 {
  font-size: 1.0625rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content ul, .legal-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
}

.legal-content p {
  font-size: 0.9375rem;
}

/* ── Article page ── */
.article-header {
  padding: clamp(2rem, 4vw, 4rem) 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header .tag {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tint);
  display: block;
  margin-bottom: 0.75rem;
}

.article-header h1 { max-width: var(--measure); }

.article-meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--dim);
}

.article-body {
  padding: var(--gap) 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
  max-width: var(--measure);
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--gold);
  color: var(--dim);
  font-style: italic;
}

.article-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  max-width: var(--measure);
}

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-block h3 { margin-bottom: 0.5rem; }
.contact-block p { font-size: 0.9375rem; color: var(--dim); }
.contact-block ul { list-style: none; margin-top: 0.5rem; }
.contact-block li {
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  color: var(--dim);
}

/* ── 404 ── */
.four-oh-four {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.four-oh-four h1 {
  font-size: clamp(4rem, 8vw, 8rem);
  color: var(--line);
  line-height: 1;
  margin-bottom: 1rem;
}

.four-oh-four p { color: var(--dim); margin-bottom: 1.5rem; }

.four-oh-four a {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ── About specifics ── */
.about-section h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.about-section h2:first-child { margin-top: 0; }

.about-section ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.about-section li {
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
}

/* ── Utility ── */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-sm { font-size: 0.9375rem; }
.text-dim { color: var(--dim); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .nav { gap: 1rem; }
  .header .wrap { gap: 0.5rem; }
  .not-box { padding: 1.25rem; }
  .support-block { padding: 1.5rem; }
}

@media (max-width: 360px) {
  .nav { font-size: 0.8125rem; gap: 0.75rem; }
  .logo { font-size: 1.125rem; }
}
