/* ========= Design Tokens (override with your site vars if you like) ========= */
:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b91c1c;
  --brand: #315a3d; /* fallback if you don't set your own */
  --brand-2: #4f7b5d;
  --accent: #2563eb;
  --ring: rgba(37, 99, 235, 0.25);
}

/* =================== Page Layout =================== */

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 32px);
  display: grid;
  gap: 24px;
  grid-template-columns: 280px 1fr;
}
@media (max-width: 980px) {
  .wrap {
    grid-template-columns: 1fr;
  }
}

/* =================== Sidebar / TOC =================== */
.toc {
  position: sticky;
  top: 12px;
  align-self: start;
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.toc h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}
.toc small {
  color: var(--muted);
}
.toc nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
}
.toc nav a:hover {
  background: #f1f5f9;
}
.toc nav a.active {
  background: #eef2ff;
  outline: 2px solid var(--ring);
}

/* =================== Content =================== */
main {
  display: grid;
  gap: 18px;
}
.hero {
  background: linear-gradient(135deg, #5181b6, #446b95);
  color: white;
  border-radius: 18px;
  padding: 24px 24px 18px;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 1.2rem + 1.4vw, 2.1rem);
}
.hero p {
  margin: 0;
  opacity: 0.95;
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  margin-right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.card h2,
.card h3 {
  margin-top: 0;
}
.callout {
  border-left: 4px solid var(--warn);
  background: #fff7ed;
  color: #7c2d12;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
}
.callout.ok {
  border-left-color: var(--ok);
  background: #ecfdf5;
  color: #065f46;
}
.callout.danger {
  border-left-color: var(--danger);
  background: #fef2f2;
  color: #7f1d1d;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

ul.check {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
ul.check li {
  padding-left: 30px;
  position: relative;
  margin: 8px 0;
}
ul.check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
  color: var(--ok);
  border: 1px solid #c8eadf;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f0fdf4;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
thead th {
  background: #f8fafc;
  font-weight: 600;
}
tbody tr:hover {
  background: #f9fafb;
}

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono',
    monospace;
  font-size: 0.9rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2px 6px;
}

details {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: white;
}
details + details {
  margin-top: 10px;
}
details summary {
  cursor: pointer;
  font-weight: 600;
}

.footnote {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Tiny helper for the floating print button on desktop */
.print-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
}
@media (max-width: 900px) {
  .print-fab {
    position: static;
  }
}
