/*
 * Email Triage blog — same design system as the main site
 * (frontend/src/styles/marketing.css). Static pages written by Ghost Writer
 * (templates/emailtriage_post.html) link this file, so restyling the blog
 * never needs every post regenerated.
 */
:root {
  --paper: #f6f3ee;
  --paper-2: #efeae2;
  --card: #fffdf9;
  --ink: #16140f;
  --ink-2: #3f3b33;
  --muted: #6f695e;
  --rule: #ddd5c8;
  --rule-2: #e9e3d9;
  --accent: #d2451e;
  --accent-soft: #f6dfd5;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container,
  .article-wrap {
    padding: 0 16px;
  }
}

/* ── Nav (mirrors the site header) ─────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 238, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.nav-logo svg {
  width: 28px;
  height: 28px;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a,
.nav-signin {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-cta,
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font: 600 14px var(--sans);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-cta:hover,
.cta-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.nav-menu {
  display: none;
  position: relative;
}
.nav-menu summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  font: 500 14px var(--sans);
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu[open] > div {
  position: absolute;
  right: 0;
  top: 48px;
  width: 220px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 20px 40px -20px rgba(22, 20, 15, 0.35);
}
.nav-menu a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-2);
}
.nav-menu a:last-child {
  border-bottom: 0;
}
@media (max-width: 880px) {
  .nav-links,
  .nav-signin {
    display: none;
  }
  .nav-menu {
    display: block;
  }
}
@media (max-width: 480px) {
  .nav-logo {
    font-size: 22px;
  }
  .nav-actions .nav-cta {
    display: none;
  }
}

/* ── Post ──────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  gap: 8px;
  margin: 48px 0 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.back-link:hover {
  color: var(--accent);
}
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.article-category {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.article-body {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 64px;
}
.article-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  color: var(--ink);
  margin: 56px 0 18px;
}
.article-body h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 12px;
}
.article-body p {
  margin-bottom: 22px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 24px 24px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body li::marker {
  color: var(--accent);
}
.article-body strong {
  color: var(--ink);
  font-weight: 600;
}
.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  background: var(--card);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 24px;
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  padding: 1px 6px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 16px;
}
.article-body th,
.article-body td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--rule);
}
.inline-related {
  font-size: 16px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
/* Related-articles block is generated with inline styles; tune its colours. */
.article-wrap a[style*='border-radius:12px'] {
  background: var(--card);
  border-color: var(--rule) !important;
}
.article-wrap a[style*='border-radius:12px']:hover {
  border-color: var(--ink) !important;
}
.article-wrap a[style*='border-radius:12px'] span[style*='text-transform:uppercase'] {
  color: var(--accent) !important;
  font-family: var(--mono);
}
/* Space between the generated related-articles block and the CTA box. */
.article-wrap > div[style*='margin-top:56px'] {
  margin-bottom: 56px;
}
.article-wrap h3[style*='font-weight:700'] {
  font-family: var(--serif);
  font-weight: 400 !important;
  font-size: 30px !important;
}

.cta-box {
  background: var(--ink);
  color: #efe9df;
  border-radius: 18px;
  padding: 40px 36px;
  margin-bottom: 96px;
}
.cta-box h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.cta-box p {
  color: #b9b1a4;
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 34em;
}
.cta-box .cta-btn {
  background: #efe9df;
  border-color: #efe9df;
  color: var(--ink) !important;
  font-size: 15px;
  padding: 13px 20px;
}
.cta-box .cta-btn:hover {
  background: #ff8a62;
  border-color: #ff8a62;
}

/* ── Blog index ────────────────────────────────────── */
.page-hero {
  padding: 96px 0 48px;
}
.page-hero .kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.page-hero .kicker::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
}
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.012em;
  margin: 16px 0 24px;
  max-width: 12em;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.page-hero p {
  font-size: 20px;
  color: var(--ink-2);
  max-width: 34em;
}
.posts-section {
  padding: 24px 0 120px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1000px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}
.post-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.post-card:hover {
  border-color: var(--ink);
}
.card-meta {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.card-cat {
  color: var(--accent);
}
.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.12;
  margin-bottom: 12px;
  color: var(--ink);
}
.card-excerpt {
  font-size: 15px;
  color: var(--ink-2);
  flex: 1;
  margin-bottom: 20px;
}
.card-read {
  align-self: flex-start;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1.5px solid var(--accent);
}

/* ── Footer (mirrors the site footer) ─────────────── */
.site-footer {
  background: var(--ink);
  color: #cfc8bb;
  padding: 88px 0 40px;
  font-size: 15px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(4, minmax(0, 2fr));
  gap: 40px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(239, 233, 223, 0.14);
}
.footer-brand .nav-logo {
  color: #efe9df;
}
.footer-brand p {
  margin-top: 18px;
  max-width: 24em;
  color: #a59d90;
}
.site-footer h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d8578;
  margin-bottom: 16px;
}
.site-footer ul {
  list-style: none;
}
.site-footer li {
  margin-bottom: 10px;
}
.site-footer a {
  text-decoration: none;
  color: #e6dfd3;
}
.site-footer a:hover {
  color: #ff8a62;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: #8d8578;
}
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
