/* Shared stylesheet for every static page in this folder — cortex's own equivalent
   (resources/templates/assets/*.css) was split per-page with duplicated rules; one file here
   keeps all pages visually consistent instead. */

:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e6e6e9;
  --text: #17181a;
  --text-dim: #55585e;
  --text-faint: #94969c;
  --accent: #2554e8;
  --accent-dim: #eef2ff;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, 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: 15px;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header / nav */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }

.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Main content */

main.wrap { flex: 1; padding-top: 56px; padding-bottom: 64px; }

h1 { font-size: 28px; font-weight: 650; margin: 0 0 14px; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 650; margin: 32px 0 10px; }
p { color: var(--text-dim); margin: 0 0 14px; }
p.lead { font-size: 16px; color: var(--text-dim); max-width: 560px; }
p.updated { font-size: 13px; color: var(--text-faint); margin-bottom: 28px; }

/* Feature cards (home page) */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-size: 14.5px; font-weight: 650; margin: 0 0 8px; }
.card p { font-size: 13.5px; margin: 0; }

/* Empty state (updates page) */

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  margin-top: 24px;
}
.empty-state p { color: inherit; margin: 0; }

/* Forms (unsubscribe page) */

.form {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form label { font-size: 13px; font-weight: 600; color: var(--text); }
.form input {
  font-size: 14.5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form button {
  margin-top: 4px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
}
.form button:hover { opacity: 0.92; }
.form .hint { font-size: 12.5px; color: var(--text-faint); margin: 4px 0 0; }

.button {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 10px 20px;
}
.button:hover { text-decoration: none; opacity: 0.92; }

/* Error / system pages (403, 404, pmta-error) */

.error-page {
  padding-top: 96px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.error-page .error-code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.error-page h1 { font-size: 22px; }
.error-page .lead { margin-left: auto; margin-right: auto; }

.tech-details {
  margin-top: 24px;
  width: 100%;
  max-width: 520px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px 18px;
}
.tech-details summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.tech-details pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 14px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--text-faint); }
.footer-links a:hover { color: var(--text-dim); }
