/* Knotmark site — shared styles. Intentionally minimal: legal pages should
   read like documents, not like marketing landing pages. */

:root {
  --bg: #ffffff;
  --fg: #1f2937;
  --fg-muted: #6b7280;
  --border: #e5e7eb;
  --link: #1d4ed8;
  --link-hover: #1e40af;
  --accent: #2563eb;
  --card: #f9fafb;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e5e7eb;
    --fg-muted: #9ca3af;
    --border: #1f2937;
    --link: #93c5fd;
    --link-hover: #bfdbfe;
    --accent: #60a5fa;
    --card: #111827;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
               Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

header.site {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

header.site .brand {
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

header.site nav a {
  color: var(--fg-muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.9rem;
}

header.site nav a:hover { color: var(--fg); }

h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

p, ul, ol { margin: 0.75rem 0; }

ul, ol { padding-left: 1.5rem; }

li { margin: 0.25rem 0; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

code, kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
               "Liberation Mono", monospace;
  font-size: 0.875em;
  background: var(--card);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.muted { color: var(--fg-muted); font-size: 0.875rem; }

.lede {
  font-size: 1.125rem;
  color: var(--fg-muted);
  margin: 0.5rem 0 2rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--card);
}

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

.product-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.product-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s;
}

.product-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.product-card h3 {
  margin: 0 0 0.4rem;
  color: var(--fg);
}

.product-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

footer.site a {
  color: var(--fg-muted);
  margin: 0 0.6rem;
}
