/* Lexiweft Universal — Zero-Tracker WCAG 2.2 AA Public Legal & Support Stylesheet */
:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #334155;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #ccfbf1;
  --border: #cbd5e1;
  --focus: #0284c7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #0f172a;
    --surface-alt: #1e293b;
    --text: #f8fafc;
    --text-muted: #cbd5e1;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #134e4a;
    --border: #334155;
    --focus: #38bdf8;
  }
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 0.95rem + 0.3vw, 18px);
  line-height: 1.72;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-strong);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  border-radius: 8px;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.brand-lockup img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-tag {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  border-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

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

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(20px, 3vw, 36px);
}

h1 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: clamp(24px, 1.35rem + 1.1vw, 34px);
  line-height: 1.26;
  letter-spacing: -0.02em;
}

h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: clamp(19px, 1.05rem + 0.45vw, 23px);
  line-height: 1.35;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 1.06rem;
  line-height: 1.4;
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  word-break: break-word;
}

a {
  color: var(--accent-strong);
}

.callout-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.callout-box h2 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.hub-card h2 {
  margin: 0 0 8px;
  border: 0;
  padding: 0;
  font-size: 1.1rem;
}

.hub-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hub-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

th {
  background: var(--surface-alt);
  font-weight: 700;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.site-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 12pt;
  }
  .site-nav,
  .skip-link {
    display: none;
  }
  .doc-card {
    border: 0;
    padding: 0;
  }
}
