/* ============================================================
   Design tokens — grayscale only
   ============================================================ */
:root {
  --black: #111111;
  --ink: #1a1a1a;
  --ink-soft: #5a5a5a;
  --gray-100: #f4f4f4;
  --gray-200: #e6e6e6;
  --gray-300: #d0d0d0;
  --gray-500: #8a8a8a;
  --white: #ffffff;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--black);
  line-height: 1.2;
  margin: 0 0 0.55em 0;
  font-weight: 600;
}

h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; }
h2 { font-size: 1.25rem; margin-top: 1.6em; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1.1em 0; max-width: 68ch; }

ul, ol { max-width: 68ch; }
li { margin-bottom: 0.4em; }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  background: var(--black);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================================================
   Top bar — logo only, no nav here
   ============================================================ */
.top-bar {
  border-bottom: 1px solid var(--gray-300);
  padding: 18px 28px;
}

.top-bar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-link:hover { text-decoration: none; }

.logo-mark {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* ============================================================
   Body layout — sidebar + content
   ============================================================ */
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  align-items: start;
}

.sidebar {
  border-right: 1px solid var(--gray-300);
  padding: 36px 24px 60px 28px;
  position: sticky;
  top: 0;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}

.sidebar nav li { margin-bottom: 2px; }

.sidebar nav a {
  display: block;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.94rem;
  border-left: 2px solid transparent;
}

.sidebar nav a:hover {
  color: var(--black);
  background: var(--gray-100);
}

.sidebar nav a[aria-current="page"] {
  color: var(--black);
  font-weight: 600;
  border-left: 2px solid var(--black);
  background: var(--gray-100);
}

.content {
  padding: 40px 40px 80px 40px;
  min-width: 0;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb span[aria-current] { color: var(--ink); }

.content > p:first-of-type { font-size: 1.02rem; }

hr.rule {
  border: none;
  border-top: 1px solid var(--gray-300);
  margin: 2em 0;
}

/* Simple content components, grayscale only */
.field-list {
  list-style: none;
  margin: 0 0 1.2em 0;
  padding: 0;
  max-width: none;
}
.field-list li {
  padding: 10px 0;
  border-top: 1px solid var(--gray-200);
}
.field-list li:last-child { border-bottom: 1px solid var(--gray-200); }

.table-wrap { overflow-x: auto; margin-bottom: 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; max-width: none; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--gray-300); }
th { font-family: var(--serif); font-weight: 600; border-bottom: 2px solid var(--black); }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--black);
  color: var(--black);
  font-size: 0.92rem;
  text-decoration: none;
}
.btn:hover { background: var(--black); color: var(--white); }

ol.steps { padding-left: 1.2em; }
ol.steps > li { margin-bottom: 0.9em; }
ol.steps ul { margin-top: 0.4em; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--gray-300);
  padding: 28px;
  margin-top: 40px;
}
.site-footer .top-bar-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--gray-300);
    padding: 20px 24px;
  }
  .sidebar nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar nav a { border-left: none; border-bottom: 2px solid transparent; padding: 8px 10px; }
  .sidebar nav a[aria-current="page"] { border-left: none; border-bottom: 2px solid var(--black); }
  .content { padding: 28px 24px 60px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
