/* Labour Temple — docs site shared stylesheet
   Harvested from membership-checkout-flow.html / index.html (termina type system, stone palette). */

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

:root {
  --bg: #F8F6F2;
  --bg-card: #FFFFFF;
  --bg-dark: #1E1C1A;
  --ink: #1E1C1A;
  --ink-mid: #515051;
  --ink-soft: #8A8580;
  --stone: #C0BCAC;
  --stone-lt: #E8E4DC;
  --stone-dk: #8A7F6E;
  --border: #E0DDD6;
  --amber: #B7791F;
  --amber-bg: #FFF7E6;
  --amber-bd: #E8D4A8;
  --radius: 4px;
  --font-head: "termina", "Helvetica Neue", Arial, sans-serif;
  --font-body: "termina", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Fira Mono", ui-monospace, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top nav ─────────────────────────────────────────────────── */
nav.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-dark);
  color: var(--stone);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  height: 52px;
  border-bottom: 1px solid #3A3836;
}

nav.top .brand {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-lt);
  margin-right: auto;
  white-space: nowrap;
  text-decoration: none;
}

nav.top .nav-items {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.top .nav-items li { list-style: none; }

nav.top .nav-item {
  position: relative;
  height: 52px;
}

nav.top .nav-item > a,
nav.top .nav-item > button {
  font-family: var(--font-head);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.65;
  text-decoration: none;
  padding: 0 1rem;
  height: 52px;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s, border-color 0.15s;
}

nav.top .nav-item:hover > a,
nav.top .nav-item:hover > button,
nav.top .nav-item > a.active {
  opacity: 1;
  border-bottom-color: var(--stone);
}

nav.top .nav-item .caret {
  margin-left: 5px;
  font-size: 7px;
  opacity: 0.7;
}

nav.top .dropdown {
  position: absolute;
  top: 52px;
  left: 0;
  min-width: 260px;
  background: var(--bg-dark);
  border: 1px solid #3A3836;
  border-top: none;
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 99;
}

nav.top .nav-item:hover .dropdown,
nav.top .nav-item:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

nav.top .dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--stone);
  opacity: 0.8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: background 0.1s, opacity 0.1s;
}

nav.top .dropdown a:hover {
  background: rgba(192,188,172,0.08);
  opacity: 1;
}

nav.top .dropdown .dd-label {
  display: block;
  font-family: var(--font-head);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-dk);
  padding: 0.4rem 1.2rem 0.25rem;
}

nav.top .search-form {
  margin-left: 0.5rem;
}

nav.top .search-form input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(192,188,172,0.15);
  color: var(--stone-lt);
  font-family: var(--font-body);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 3px;
  width: 140px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

nav.top .search-form input::placeholder {
  color: var(--stone-dk);
}

nav.top .search-form input:focus {
  border-color: var(--stone);
  background: rgba(255,255,255,0.08);
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  background: var(--bg-dark);
  color: var(--stone-lt);
  padding: 4.25rem 2.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(192,188,172,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

.hero-tag {
  font-family: var(--font-head);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.7;
  margin-bottom: 1.15rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--stone);
  max-width: 640px;
  opacity: 0.9;
}

.hero .breadcrumb {
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-dk);
  margin-bottom: 1rem;
}

.hero .breadcrumb a { color: var(--stone-dk); text-decoration: none; }
.hero .breadcrumb a:hover { color: var(--stone); }
.hero .breadcrumb .sep { margin: 0 0.5rem; opacity: 0.5; }

/* ─── Page ────────────────────────────────────────────────────── */
.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.25rem 2rem 5rem;
  flex: 1;
  width: 100%;
}

.page.narrow {
  max-width: 820px;
}

.content h1 {
  display: none; /* h1 lives in hero */
}

.content h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin: 3rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.content h2:first-child,
.content > h2:first-of-type {
  margin-top: 0.25rem;
  padding-top: 0;
  border-top: none;
}

.content h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 1.75rem 0 0.65rem;
}

.content h4 {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 1.25rem 0 0.5rem;
}

.content p,
.content li {
  color: var(--ink-mid);
  font-size: 14px;
  line-height: 1.7;
}

.content p { margin-bottom: 1rem; }

.content ul,
.content ol {
  margin: 0.25rem 0 1.25rem 1.2rem;
}

.content li { margin-bottom: 0.3rem; }

.content strong { color: var(--ink); font-weight: 700; }

.content li.task { list-style: none; margin-left: -1.2rem; padding-left: 0; }

.content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--stone);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.content a:hover { text-decoration-color: var(--ink); }

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ─── Code ────────────────────────────────────────────────────── */
.content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--stone-lt);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
  word-break: break-word;
}

.content pre {
  background: var(--bg-dark);
  color: #C0BCAC;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  padding: 1.25rem 1.4rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ─── Tables ──────────────────────────────────────────────────── */
.content .table-wrap,
.content table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

.content table {
  border-collapse: collapse;
  font-size: 13px;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.content thead { background: var(--bg-dark); }

.content thead th {
  font-family: var(--font-head);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}

.content tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.content tbody tr:last-child { border-bottom: none; }
.content tbody tr:hover { background: #FAFAF8; }

.content tbody td {
  padding: 10px 14px;
  color: var(--ink-mid);
  vertical-align: top;
  font-size: 13px;
}

.content tbody td:first-child { color: var(--ink); font-weight: 600; }

.content tbody td code {
  font-size: 11.5px;
}

/* Empty-header tables (used in "At a glance" pairs) — hide the empty thead
   but keep rendering the body rows. First column acts as the label. */
.content table.kv thead { display: none; }
.content table.kv { border-top: 1px solid var(--border); }
.content table.kv tbody td:first-child {
  font-family: var(--font-head);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  white-space: nowrap;
  background: #FAFAF8;
  width: 190px;
  vertical-align: middle;
}

/* ─── Progressive-disclosure <details> ────────────────────────── */
.content details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 0.6rem 0;
  transition: border-color 0.15s;
}

.content details[open] {
  border-color: var(--stone-dk);
}

.content details + details {
  margin-top: -1px; /* clean stack */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.content details:has(+ details) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.content summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.2rem;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: background 0.1s;
}

.content summary::-webkit-details-marker { display: none; }

.content summary:hover { background: #FAFAF8; }

.content summary::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--stone-dk);
  border-bottom: 1.5px solid var(--stone-dk);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  margin-top: -2px;
}

.content details[open] > summary::before {
  transform: rotate(45deg);
  margin-top: 0;
  margin-bottom: 2px;
}

.content summary strong {
  font-weight: 700;
  color: var(--ink);
}

.content details[open] > summary {
  border-bottom: 1px solid var(--border);
}

.content details > *:not(summary) {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

.content details > *:not(summary):first-of-type { padding-top: 1.1rem; }
.content details > *:not(summary):last-child { padding-bottom: 1.2rem; }

.content details table {
  margin-left: 0;
  margin-right: 0;
}

/* ─── Admonition / VERIFY ─────────────────────────────────────── */
.content .verify,
.content p.verify {
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 1rem 0 1.5rem;
  font-size: 13.5px;
  color: var(--ink-mid);
}

.content .verify strong { color: var(--amber); }

.content .callout {
  background: var(--stone-lt);
  border-left: 3px solid var(--stone-dk);
  border-radius: var(--radius);
  padding: 0.9rem 1.15rem;
  margin: 1rem 0;
  font-size: 13.5px;
  color: var(--ink-mid);
}

/* ─── Home page ───────────────────────────────────────────────── */
.home-section {
  margin-bottom: 3.5rem;
}

.home-section-label {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone-dk);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.home-section h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.home-section .sec-lede {
  font-size: 13.5px;
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
  max-width: 620px;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid.three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .card-grid,
  .card-grid.two-col,
  .card-grid.three-col { grid-template-columns: 1fr; }
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-card:hover {
  border-color: var(--stone-dk);
  box-shadow: 0 4px 16px rgba(30,28,26,0.06);
  transform: translateY(-1px);
}

.doc-card .tag {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-dk);
}

.doc-card .title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.doc-card .desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-mid);
  margin-top: 0.15rem;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.1rem;
  background: var(--stone);
  color: var(--bg-dark);
  font-family: var(--font-head);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.15s;
}

.home-hero-cta:hover { background: var(--stone-lt); }

/* ─── Sheet embed / link block ────────────────────────────────── */
.sheet-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.25rem 0 1.75rem;
}

.sheet-block-header {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.sheet-block-desc {
  font-size: 13px;
  color: var(--ink-mid);
  margin-bottom: 1rem;
}

.sheet-block iframe {
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

.sheet-block .sheet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  background: var(--stone-lt);
  border-radius: 3px;
  transition: background 0.15s;
}

.sheet-block .sheet-link:hover { background: var(--stone); color: var(--bg-dark); }

.sheet-block.fallback iframe { display: none; }

/* ─── Playbooks index ─────────────────────────────────────────── */
.pb-group {
  margin-bottom: 2.5rem;
}

.pb-group-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.pb-group-header .pb-num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--stone-dk);
  text-transform: uppercase;
}

.pb-group-header h2 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.pb-list {
  list-style: none;
  margin: 0;
}

.pb-item {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: -1px;
  background: var(--bg-card);
  text-decoration: none !important;
  color: var(--ink);
  transition: background 0.1s, border-color 0.15s;
  font-size: 13.5px;
}

.pb-item,
.pb-item * { text-decoration: none !important; }

.pb-item:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.pb-item:last-child { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; margin-bottom: 0; }

.pb-item:hover {
  background: #FAFAF8;
  border-color: var(--stone-dk);
  position: relative;
  z-index: 1;
}

.pb-item .pb-title {
  color: var(--ink);
  font-weight: 600;
}

.pb-item .pb-symptom {
  display: block;
  color: var(--ink-soft);
  font-size: 12.5px;
  margin-top: 2px;
}

.pb-quick-table {
  margin-bottom: 2.5rem;
}

/* ─── Status widgets (homepage) ───────────────────────────────── */
.status-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}

.status-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.status-panel-title {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-dk);
}

.status-panel-time { font-size: 11px; color: var(--ink-soft); }

.status-workers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.status-worker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.05rem;
}

.status-worker-name {
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-worker-name .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.dot-ok { background: #2D8F3C; }
.dot-err { background: #C9362C; }
.dot-loading { background: var(--stone); animation: pulse 1.2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.status-checks { display: flex; flex-direction: column; gap: 0.3rem; }

.status-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11.5px;
  color: var(--ink-mid);
}

.status-check .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-check .latency { color: var(--ink-soft); font-size: 10px; margin-left: auto; }

/* ─── Footer ──────────────────────────────────────────────────── */
footer.site {
  background: var(--bg-dark);
  color: var(--stone-dk);
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1.35rem 2rem;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  nav.top { padding: 0 1rem; }
  nav.top .nav-item > a,
  nav.top .nav-item > button { padding: 0 0.6rem; font-size: 8.5px; }
  nav.top .search-form { display: none; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .page { padding: 2.25rem 1.25rem 3.5rem; }
  .content table { font-size: 12px; }
}

@media (max-width: 520px) {
  nav.top .nav-item.hide-sm { display: none; }
}
