/* Shared styles for /blog — matches the homepage design tokens */
:root {
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-soft: #eff4ff;
  --brand-soft-2: #dbe6ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --bg: #f7f9fc;
  --card: #ffffff;
  --rule: #e6ebf2;
  --rule-2: #d8e0ec;
  --success: #15803d;
  --success-soft: #e7f6ec;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }

a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px;
  letter-spacing: -.04em;
}

/* ---------- Layout ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.breadcrumb { font-size: 13.5px; color: var(--ink-3); margin: 28px 0 18px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--rule-2); }
.breadcrumb a { color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--rule-2); }
.btn-secondary:hover { border-color: var(--ink); }

/* ---------- Article ---------- */
article.post h1 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 14px;
}
.post-meta { color: var(--ink-3); font-size: 14px; margin-bottom: 24px; }
.post-meta strong { color: var(--ink-2); font-weight: 600; }
.lede { font-size: 18.5px; color: var(--ink-2); margin: 0 0 24px; }

article.post h2 {
  font-size: 25px; line-height: 1.3; letter-spacing: -0.01em;
  margin: 44px 0 12px; scroll-margin-top: 80px;
}
article.post h3 { font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 80px; }
article.post p, article.post li { font-size: 17px; color: var(--ink-2); }
article.post li { margin-bottom: 6px; }
article.post strong { color: var(--ink); }

.toc {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
}
.toc .label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc li { font-size: 15.5px !important; margin-bottom: 4px !important; }

.note {
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
}
.note p { margin: 0; font-size: 16px !important; }

/* Table */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { background: var(--bg); font-weight: 700; color: var(--ink); }
td { color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }

/* App call-to-action box */
.app-cta {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(135deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid var(--brand-soft-2);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 32px 0;
}
.app-cta .icon {
  width: 56px; height: 56px; flex: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: grid; place-items: center;
}
.app-cta .icon svg { width: 28px; height: 28px; }
.app-cta .text { flex: 1; min-width: 220px; }
.app-cta .title { font-weight: 800; font-size: 18px; color: var(--ink); margin: 0 0 2px; }
.app-cta .sub { margin: 0 !important; font-size: 15px !important; color: var(--ink-2); }
.app-cta .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 16.5px; }
.faq details p { margin: 10px 0 0; }

/* ---------- Blog index ---------- */
.blog-hero { padding: 8px 0 8px; }
.blog-hero h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 800; line-height: 1.1; }
.blog-hero p { color: var(--ink-2); font-size: 18px; max-width: 62ch; margin: 0 0 28px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.post-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.post-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand-soft-2); }
.post-card .tag { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; }
.post-card h2 { font-size: 19px; line-height: 1.35; margin: 0; color: var(--ink); }
.post-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.post-card .meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-3); }

/* ---------- Footer ---------- */
footer.site {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  color: var(--ink-3); font-size: 13.5px;
}
footer.site .links { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site .links a { color: var(--ink-2); }
footer.site .left { display: flex; align-items: center; gap: 10px; }

/* ---------- Images ---------- */
.post-banner { margin: 0 0 28px; }
.post-banner img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.shots.two { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); }
.shots figcaption, .post-banner figcaption { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; text-align: center; }
@media (max-width: 560px) { .shots { grid-template-columns: repeat(2, 1fr); } .shots figure:nth-child(3) { display: none; } }
.post-card .thumb { display: block; width: calc(100% + 44px); margin: -22px -22px 6px; height: auto; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 1024 / 500; object-fit: cover; }

/* ---------- Author box ---------- */
.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 22px; margin: 36px 0 8px; }
.author-box .logo-mark { flex: none; width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
.author-box p { margin: 0; font-size: 15px !important; color: var(--ink-2); }
.author-box .name { font-weight: 700; color: var(--ink); margin-bottom: 4px; font-size: 16px !important; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .wrap, .wrap-wide { padding: 0 16px; }
  .breadcrumb { margin: 18px 0 12px; }
  .lede { font-size: 17px; }
  article.post h2 { font-size: 22px; margin-top: 36px; }
  article.post p, article.post li { font-size: 16px; }
  .app-cta { padding: 18px; }
  .app-cta .actions, .app-cta .actions .btn { width: 100%; justify-content: center; }
  .author-box { padding: 16px; }
  .post-grid { grid-template-columns: 1fr; }
  footer.site { padding: 24px 16px 40px; flex-direction: column; align-items: flex-start; }
}

/* ---------- Live countdown (holiday posts) ---------- */
.countdown {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  color: #fff; border-radius: var(--radius); padding: 22px 20px; margin: 24px 0; text-align: center;
}
.countdown .label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fcd34d; font-weight: 700; margin: 0 0 12px; }
.countdown .units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 0 auto; }
.countdown .unit { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 4px; }
.countdown .num { display: block; font-size: clamp(26px, 6vw, 38px); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown .cap { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #c7d2fe; margin-top: 4px; }
.countdown .sleeps { margin: 14px 0 0; font-size: 16px; color: #fde68a; font-weight: 600; }

/* Card thumbnails bleed to the card edges; small tables fit phones without scrolling */
.post-card .thumb { max-width: none; }
table.fit { min-width: 0; }
@media (max-width: 600px) { table.fit th, table.fit td { padding: 10px; font-size: 14px; } }
