/* Amunera Journal — the blog's complete stylesheet.

   STANDALONE ON PURPOSE. It does not load styles.css. That file still carries
   the site's original blue/violet palette with Fraunces and Outfit, while
   index.html was redesigned to warm dark and gold with Cormorant Garamond and
   Inter in its own inline <style>. Anything inheriting styles.css today looks
   like a different website, and a reader arriving from Google onto an article
   that does not resemble the homepage has no reason to believe they are the
   same company. The tokens below are copied from index.html's :root — if the
   homepage palette moves again, move these with it. */

:root {
  --bg: #0c0b0a;
  --bg-panel: #131110;
  --ink: #f0eae0;
  --ink-dim: rgba(240, 234, 224, 0.64);
  /* Long-form body copy only. --ink-dim is a caption colour; at 17.5px across
     1,500 words it reads as switched off. */
  --ink-body: rgba(240, 234, 224, 0.78);
  --ink-faint: rgba(240, 234, 224, 0.4);
  --gold: #d8b078;
  --gold-bright: #eed7a8;
  --gold-ink: #191309;
  --violet: #a08cc8;
  --violet-deep: #241c38;
  --line: rgba(240, 234, 224, 0.09);
  --r-panel: 22px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* The background colour is set on html as well as body. A gradient alone,
   especially a fixed-attachment one, leaves the canvas unpainted wherever the
   gradient does not reach — which showed up as a white band above the content
   while scrolling. A solid base means any gap is dark, not white. */
html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: 66px;           /* clears the fixed nav */
}

/* A soft warm wash, fixed behind everything, matching the homepage's depth
   without repeating its full scenery. */
.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 620px at 78% -10%, rgba(216, 176, 120, 0.09), transparent 62%),
    radial-gradient(900px 700px at -10% 108%, rgba(160, 140, 200, 0.08), transparent 58%);
}

.container { max-width: 1020px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 28px); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.14; letter-spacing: 0.005em; margin: 0; }
a { color: var(--gold-bright); }

/* ── Nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(18px, 3.5vw, 44px);
  background: linear-gradient(rgba(10, 9, 8, 0.78), rgba(10, 9, 8, 0.5));
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}
.nav .links { display: flex; gap: clamp(14px, 3vw, 26px); align-items: center; }
.nav .links a { color: var(--ink-dim); text-decoration: none; font-size: 13.5px; font-weight: 400; transition: color .3s; white-space: nowrap; }
.nav .links a:hover { color: var(--gold-bright); }
/* No inline style on the <img>: an inline height would outrank the media
   query below and the nav clipped "Sign in" on a 360px phone. */
.brand-logo { height: 30px; width: auto; display: block; }

.blog-main { padding: 8px 0 90px; }

/* ── Article header ────────────────────────────────────────────────────── */

.crumbs { font-size: 13px; color: var(--ink-faint); margin: 34px 0 20px; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--gold-bright); }
.crumbs span { opacity: .55; margin: 0 5px; }

.kicker {
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 14px;
}

.post h1, .blog-head h1 {
  font-size: clamp(33px, 5.2vw, 54px);
  margin: 0 0 16px;
  max-width: 21ch;
}

.post .dek, .blog-head .dek {
  font-family: var(--serif);
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  opacity: .88;
  margin: 0 0 34px;
  max-width: 36ch;
  font-weight: 400;
  font-style: italic;
}

.post .hero { margin: 0 0 38px; }
.post .hero img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-panel); border: 1px solid var(--line);
}
.post .hero figcaption { font-size: 12px; color: var(--ink-faint); margin-top: 10px; }
.post .hero figcaption a { color: var(--ink-faint); }

/* ── Contents ──────────────────────────────────────────────────────────── */

.toc {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg-panel);
  padding: 20px 24px; margin: 0 0 40px; max-width: 620px;
}
.toc-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 12px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 6px 0; line-height: 1.5; }
.toc li::marker { color: var(--gold); font-size: 13px; }
.toc a { color: var(--ink); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--gold-bright); text-decoration: underline; }

/* ── Body copy ─────────────────────────────────────────────────────────── */

/* 68ch is the readable measure; wider and the eye loses the line return. */
.prose { max-width: 68ch; }

.prose p { color: var(--ink-body); font-size: 17.5px; line-height: 1.8; margin: 0 0 24px; }
.prose h2 { font-size: clamp(25px, 3.2vw, 33px); margin: 52px 0 16px; scroll-margin-top: 90px; }
.prose h3 { font-size: clamp(20px, 2.4vw, 24px); margin: 38px 0 12px; scroll-margin-top: 90px; }
.prose h4 { font-size: 16px; margin: 28px 0 8px; font-family: var(--sans); font-weight: 600; letter-spacing: .01em; }
.prose ul, .prose ol { color: var(--ink-body); font-size: 17.5px; line-height: 1.8; padding-left: 24px; margin: 0 0 24px; }
.prose li { margin: 9px 0; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink); }
.prose a { color: var(--gold-bright); text-underline-offset: 3px; }

.prose blockquote { margin: 34px 0; padding: 2px 0 2px 24px; border-left: 2px solid var(--gold); }
.prose blockquote p {
  font-family: var(--serif); font-size: 22px; line-height: 1.5;
  color: var(--ink); margin: 0; font-style: italic;
}

.prose img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); margin: 10px 0; }

/* An image with a credit. The caption is small and quiet — it has to be
   present because the licence requires it, not because anyone reads it. */
.prose .am-fig { margin: 26px 0; }
.prose .am-fig img { margin: 0; }
.prose .am-fig figcaption { font-size: 12px; color: var(--ink-faint); margin-top: 9px; line-height: 1.5; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 46px 0; }

.prose pre {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 14px;
}
.prose code { font-size: .92em; background: rgba(240, 234, 224, 0.07); padding: 1px 5px; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }

/* Wide tables scroll inside their own box so the page never scrolls sideways. */
.prose .tw { overflow-x: auto; margin: 0 0 28px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.prose td { color: var(--ink-body); }

.ai-note {
  max-width: 68ch; margin: 46px 0 0; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; line-height: 1.65; color: var(--ink-faint);
}

/* ── Widgets ───────────────────────────────────────────────────────────
   The small calculators on the reference pages. Markup comes from
   apps/api/src/services/blog-widgets.ts; an article can only name one, never
   write one, so these class names are a closed set. */

.am-widget {
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--bg-panel); padding: 22px 24px; margin: 8px 0 30px;
  max-width: 520px;
}
.am-widget label {
  display: block; font-size: 11.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px;
}
.am-widget input {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: rgba(240, 234, 224, 0.05);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  /* 16px minimum, or iOS Safari zooms the whole page on focus. */
}
.am-widget input:focus { outline: none; border-color: rgba(216, 176, 120, 0.5); }
/* The native date picker's icon is black-on-black without this. */
.am-widget input::-webkit-calendar-picker-indicator { filter: invert(0.85); cursor: pointer; }

.am-widget-out:not(:empty) { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.am-widget-big {
  display: block; font-family: var(--serif); font-size: 30px;
  line-height: 1.15; color: var(--gold-bright); margin-bottom: 8px;
}
.am-widget-work { display: block; font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); margin-top: 4px; }

/* ── Read next ─────────────────────────────────────────────────────────── */

.read-next { margin: 72px 0 0; max-width: 68ch; }
.read-next h2 { font-size: 24px; margin-bottom: 6px; }
.read-next ul { list-style: none; padding: 0; margin: 0; }
.read-next li { border-top: 1px solid var(--line); padding: 17px 0; }
.read-next a { color: var(--ink); text-decoration: none; font-size: 17px; display: block; transition: color .25s; }
.read-next a:hover { color: var(--gold-bright); }
.read-next span { display: block; color: var(--ink-faint); font-size: 14.5px; margin-top: 5px; line-height: 1.55; }

/* ── Index ─────────────────────────────────────────────────────────────── */

.blog-head { margin: 34px 0 48px; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card-post a {
  display: block; text-decoration: none; height: 100%;
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--bg-panel); padding: 20px;
  transition: border-color .3s, transform .3s;
}
.card-post a:hover { border-color: rgba(216, 176, 120, 0.28); transform: translateY(-2px); }
.card-post img { width: 100%; height: 158px; object-fit: cover; border-radius: 13px; margin: -4px 0 16px; display: block; }
.card-post h2 { font-size: 22px; margin: 8px 0 8px; line-height: 1.25; color: var(--ink); }
.card-post p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.card-post.empty { grid-column: 1 / -1; }
.card-post.empty p { color: var(--ink-faint); padding: 30px 0; text-align: center; }

/* ── Browsing: subject chips, search, and the lead card ────────────────── */

.card-post .most-read { font-style: normal; color: var(--gold-bright); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; }
.chips .chip {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 15px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg-panel);
  color: var(--ink-dim); font-size: 13.5px; letter-spacing: .01em;
  transition: border-color .25s, color .25s, background .25s;
}
.chips .chip:hover { border-color: rgba(216, 176, 120, 0.32); color: var(--ink); }
.chips .chip span { font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
/* The active chip is the only filled one, so where you are is obvious without
   reading the labels. */
.chips .chip.on {
  background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600;
}
.chips .chip.on span { color: rgba(25, 19, 9, 0.62); }

.journal-search { display: flex; align-items: center; gap: 12px; margin: 0 0 30px; flex-wrap: wrap; }
.journal-search input {
  flex: 1; min-width: 220px; max-width: 420px;
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-panel);
  color: var(--ink); font-family: inherit; font-size: 14.5px;
}
.journal-search input::placeholder { color: var(--ink-faint); }
.journal-search input:focus { outline: none; border-color: rgba(216, 176, 120, 0.42); }
.journal-search .count { color: var(--ink-faint); font-size: 13px; }

/* The lead card spans the grid and runs image-beside-text on a wide screen.
   The words are one block (.card-text), so the grid has exactly two children
   to place — picture, then words. Laying the four elements out as loose grid
   cells put the headline back under the image, which is the bug this replaced. */
@media (min-width: 720px) {
  .card-post.wide { grid-column: 1 / -1; }
  .card-post.wide a {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 30px; align-items: center; padding: 24px;
  }
  .card-post.wide img { height: 100%; min-height: 230px; margin: 0; }
  .card-post.wide h2 { font-size: clamp(25px, 2.4vw, 32px); margin: 10px 0 12px; }
  .card-post.wide p { font-size: 15.5px; }
  /* No image: one column, so the text uses the width instead of leaving a hole
     where the picture would have been. */
  .card-post.wide a:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
}

/* ── The offer, partway down the list ──────────────────────────────────── */

.card-post.cta-inline { grid-column: 1 / -1; }
.card-post.cta-inline a {
  text-align: center; padding: 34px 30px; cursor: pointer;
  background: radial-gradient(620px 200px at 50% 0%, rgba(216, 176, 120, 0.09), transparent 70%), var(--bg-panel);
}
.card-post.cta-inline h2 { font-size: clamp(21px, 2.4vw, 27px); margin: 10px auto 10px; max-width: 30ch; }
.card-post.cta-inline p { max-width: 56ch; margin: 0 auto; }
.card-post.cta-inline .cta-go {
  display: inline-block; margin-top: 20px; padding: 11px 26px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--gold-ink); font-weight: 600; font-size: 14.5px;
}
.card-post.cta-inline a:hover .cta-go { filter: brightness(1.05); }

/* ── Closing CTA ───────────────────────────────────────────────────────── */

.blog-cta {
  margin: 80px 0 0; padding: 38px 34px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: radial-gradient(700px 240px at 50% 0%, rgba(216, 176, 120, 0.08), transparent 70%), var(--bg-panel);
}
.blog-cta h2 { font-size: clamp(24px, 3.2vw, 32px); margin-bottom: 12px; }
.blog-cta p { max-width: 52ch; margin: 0 auto 26px; font-size: 16px; color: var(--ink-dim); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-size: 14.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 14px 30px; border-radius: 10px; border: none; cursor: pointer;
  box-shadow: 0 0 30px rgba(216, 176, 120, 0.22);
  transition: box-shadow .35s ease, transform .35s ease;
}
.btn:hover { box-shadow: 0 0 44px rgba(216, 176, 120, 0.34); transform: translateY(-1px); }

/* ── Footer ────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); margin-top: 84px; padding: 32px 0 52px; font-size: 13.5px; }
footer p { color: var(--ink-faint); margin: 0 0 10px; }
footer .disclaimer { max-width: 74ch; font-size: 12.5px; line-height: 1.65; }
footer a { color: var(--ink-dim); text-decoration: none; }
footer a:hover { color: var(--gold-bright); }

/* The nav ran out of room on a phone and clipped "Sign in" to "Si". The logo
   gives up height first, then the gaps close, then Plans leaves — Sign in and
   Journal are the two that have to survive. */
@media (max-width: 620px) {
  body { padding-top: 60px; }
  .nav { padding: 12px 16px; gap: 10px; }
  .brand-logo { height: 24px; }
  .nav .links { gap: 15px; }
  .nav .links a { font-size: 13px; }
  .prose p, .prose ul, .prose ol { font-size: 16.5px; }
  .prose blockquote p { font-size: 20px; }
  .blog-cta { padding: 28px 20px; }
  .post .dek, .blog-head .dek { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card-post a, .btn { transition: none; }
}

@media (max-width: 430px) {
  .nav .links .hide-s { display: none; }
}
