/* ============================================================
   Mesterly — shared stylesheet for comparison & guide pages
   Design tokens match apps/web/landing/index.html (warm paper,
   signal orange). Self-contained, no external requests.
   ============================================================ */
:root {
  --bg: #f6f4ef;          /* warm paper */
  --surface: #ffffff;
  --ink: #1c1d1f;
  --muted: #5c5f58;
  --line: #e2ded4;
  --accent: #dc5a1b;      /* signal orange — trade/workwear vibe */
  --accent-hover: #c24d13;
  --accent-soft: #fbeae0;
  --success: #1f7a45;
  --success-soft: #e6f3ea;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 29, 31, 0.05), 0 8px 24px rgba(28, 29, 31, 0.07);
  --font-display: "Avenir Next", "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-toggle button {
  background: var(--surface); border: 0; padding: 6px 12px;
  font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--muted);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; cursor: pointer; border: 0;
  transition: background 0.15s ease; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Page hero (guide / comparison) ---------- */
.page-hero { padding: 56px 0 36px; }
.kicker {
  display: inline-block; font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.01em;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 42em; margin: 0 0 20px; }
.entity-def {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin: 20px 0; max-width: 52em;
}
.entity-def strong { display: block; margin-bottom: 4px; }
.meta-line { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Content sections ---------- */
.section { padding: 28px 0; }
.section h2 {
  font-family: var(--font-display); font-size: 1.65rem; margin: 0 0 14px;
  scroll-margin-top: 90px;
}
.section h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.section p { max-width: 46em; }
ul, ol { max-width: 46em; padding-left: 1.4em; }
li { margin-bottom: 8px; }

/* ---------- Comparison tables ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius); box-shadow: var(--shadow); }
table.compare {
  width: 100%; border-collapse: collapse; background: var(--surface);
  font-size: 0.95rem; min-width: 560px;
}
table.compare th, table.compare td {
  padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}
table.compare thead th { background: var(--ink); color: #fff; font-weight: 600; }
table.compare tbody tr:nth-child(even) { background: #faf8f3; }
table.compare tbody th {
  font-weight: 600; width: 26%; background: #f3f0e8;
  border-right: 1px solid var(--line);
}
table.compare .yes { color: var(--success); font-weight: 600; }
table.compare .no { color: var(--danger); font-weight: 600; }
table.compare .partial { color: #8a6d1a; font-weight: 600; }
.tag-mesterly {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle;
}
.table-note { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }

/* ---------- Verdict cards ---------- */
.verdict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.verdict {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.verdict h3 { margin-top: 0; font-size: 1.05rem; }
.verdict ul { margin: 0; padding-left: 1.2em; }

/* ---------- FAQ ---------- */
.faq { margin: 24px 0; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 36px 28px; margin: 40px 0; text-align: center;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #d8d5cc; margin: 0 auto 20px; max-width: 38em; }
.cta-band .btn-primary { font-size: 1.05rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 40px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.9rem; margin-bottom: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.disclaimer {
  font-size: 0.85rem; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--line); border-radius: 8px; padding: 12px 16px; max-width: 52em;
}
.copyright { font-size: 0.82rem; color: var(--muted); margin-top: 14px; }

/* ---------- Guide-specific ---------- */
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 24px 0; box-shadow: var(--shadow);
}
.toc ol { margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 20px 0; }
.related-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: block; color: var(--ink);
}
.related-card:hover { text-decoration: none; border-color: var(--accent); }
.related-card strong { display: block; margin-bottom: 6px; color: var(--accent); }
.related-card span { font-size: 0.92rem; color: var(--muted); }

.callout {
  background: var(--success-soft); border-left: 4px solid var(--success);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin: 18px 0; max-width: 52em;
}
.callout strong { display: block; margin-bottom: 2px; }
