/* The Ergo Desk Guide — shared styles */

:root {
  --bg: #f5f3ee;
  --bg-card: #ffffff;
  --ink: #1c2b30;
  --muted: #5a6b70;
  --accent: #0e5c63;
  --accent-dark: #0a464b;
  --accent-soft: #e4f0f0;
  --line: #ddd8d0;
  --footer-bg: #163338;
  --footer-text: #c5d0d2;
  --footer-muted: #8fa0a3;
  --max: 60rem;
  --radius: 10px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header & nav */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  padding: 1rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

/* Main typography */

main {
  padding: 2.5rem 0 3.5rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.45rem);
  margin: 0 0 0.85rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2.4rem 0 0.85rem;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

h4 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 40rem;
}

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

/* Hero */

.hero {
  padding: 1.25rem 0 0.5rem;
}

/* Cards */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: 0 1px 2px rgba(22, 51, 56, 0.04);
}

.card.featured {
  border-left: 4px solid var(--accent);
  margin: 2rem 0 0.5rem;
}

.card.featured h2 {
  margin-top: 0.15rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Topic teasers */

.topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.75rem;
  margin-top: 0.5rem;
}

.topic h3 {
  color: var(--accent-dark);
}

.topic p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* Buttons & links */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.05rem;
  border-radius: 6px;
  line-height: 1.3;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.text-link {
  font-weight: 600;
}

/* Disclosure */

.disclosure {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  margin: 0 0 1.75rem;
}

.disclosure p {
  margin: 0;
}

/* Article body */

.article-header {
  margin-bottom: 1.5rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.prose > p,
.prose > ul {
  max-width: 42rem;
}

.look-for {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.look-for li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.look-for li:last-child {
  border-bottom: 0;
}

.look-for strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* Product picks */

.pick {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  margin: 1.25rem 0;
}

.pick h3 {
  margin-bottom: 0.35rem;
}

.best-for {
  color: var(--muted);
  margin-bottom: 1rem;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.15rem;
}

.pros-cons ul {
  margin: 0;
  padding-left: 1.15rem;
}

.pros-cons li {
  margin-bottom: 0.3rem;
}

.pros h4 {
  color: var(--accent);
}

.cons h4 {
  color: #8a4a3a;
}

/* Comparison table */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.compare caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
}

.compare th,
.compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  background: var(--accent-soft);
  color: var(--accent-dark);
  white-space: nowrap;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: 0;
}

/* Setup steps */

.steps {
  max-width: 42rem;
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 0.65rem;
}

/* FAQ */

.faq {
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  margin: 0.6rem 0 0.1rem;
}

/* About sections */

.about-block {
  margin-bottom: 0.25rem;
}

.about-block h2:first-child {
  margin-top: 1.5rem;
}

.disclosure-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 1.4rem;
  margin-top: 2rem;
}

.disclosure-block h2 {
  margin-top: 0;
}

/* Footer */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0 2.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer a {
  color: #d7ecec;
}

.site-footer p {
  margin: 0 0 0.6rem;
}

.site-footer .copyright {
  color: var(--footer-muted);
  margin-bottom: 0;
}

/* 404 */

.not-found {
  text-align: left;
  padding: 2rem 0 3rem;
}

/* Responsive */

@media (max-width: 700px) {
  .topics,
  .pros-cons {
    grid-template-columns: 1fr;
  }

  main {
    padding: 1.75rem 0 2.75rem;
  }

  .site-header .inner {
    align-items: flex-start;
  }
}
