/* paid.thehonestbroker.org. Tokens copied from thehonestbroker.org
   (thb-empire-cron/assets/home.css, lines 1-29) so the two sites match. */
:root {
  --ink: #1b1b1b;
  --ink-soft: #55524c;
  --paper: #fdfcf9;
  --paper-alt: #f4f0e8;
  --line: #e4e0d8;
  --accent: #8a1f11;
  --accent-soft: #c65a44;
  --header-bg: #fff7ed;
  --header-line: #e6ded5;
  --btn-ink: #fff;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* Fluid side padding: 16px on a phone, 40px from a 1000px window up. */
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece9e3;
    --ink-soft: #b6b2a9;
    --paper: #14130f;
    --paper-alt: #1c1a15;
    --line: #322f27;
    --accent: #e0836b;
    --accent-soft: #e0836b;
    --header-bg: #1d1712;
    --header-line: #33291f;
    /* white on the light dark-mode accent measures 2.75:1; the page colour 6.75:1 */
    --btn-ink: #14130f;
  }
}

* { box-sizing: border-box; }

/* 20px root, as on thehonestbroker.org. Sizes below are rem, so this one
   number scales the page. */
html { font-size: 125%; scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--accent-soft), var(--accent)) 1;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* One column grid for the whole page: the header, every section heading and
   the content beneath it share these edges. */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; overflow-wrap: break-word; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- header: the page-header look of thehonestbroker.org/books/ ---- */
.page-header {
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(1rem, 3vw, 2rem);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
}
.head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}
.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.page-header h1 {
  font-size: clamp(1.2rem, 0.2rem + 4.8vw, 3.4rem);
  margin: 0;
}
.logo img {
  display: block;
  width: clamp(48px, 8vw, 84px);
  height: auto;
  border-radius: 50%;
}

main.wrap { padding-top: clamp(1.25rem, 4vw, 2.5rem); padding-bottom: 2rem; }

h2 {
  font-size: clamp(1.3rem, 0.95rem + 1.9vw, 2.1rem);
  margin: 0 0 0.35rem;
}
section { margin: 0 0 clamp(2rem, 5vw, 3.25rem); }
.blurb { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---- summary block ---- */
.summary {
  background: var(--paper-alt);
  border-top: 2px solid var(--accent);
  padding: clamp(0.6rem, 3vw, 1.75rem);
}
/* The one heading that has to carry fixed wording; sized to hold one line
   at a 380px window. */
.summary h2 { font-size: clamp(0.9rem, 0.2rem + 3vw, 2.1rem); }
.summary p { margin: 0 0 0.9rem; }
.perks { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.perks strong { color: var(--ink); }
.cta { margin: 0; }
.btn {
  display: inline-block;
  padding: 0.5em 1.1em;
  background: var(--accent);
  color: var(--btn-ink);
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn:hover { color: var(--btn-ink); filter: brightness(1.1); }

/* ---- figure strip: 1 column on phones, 2 on tablets, 3 on desktop ---- */
.fig-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 600px) { .fig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .fig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fig { margin: 0; }
.fig img { display: block; width: 100%; height: auto; background: var(--paper-alt); }
.fig figcaption { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.4rem; line-height: 1.4; }

/* ---- jump links ---- */
.jump {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem;
  font-size: 0.95rem; font-weight: 600;
  padding: 0.6rem 0; margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.jump a { color: var(--accent); }

/* ---- series cards (latest six) ---- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1rem 1.5rem;
}
.card a {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.thumb {
  width: 88px; height: 66px; object-fit: cover; display: block;
  background: var(--paper-alt); border-radius: 2px;
}
.thumb-logo { object-fit: contain; padding: 8px; }
.card-text { display: block; min-width: 0; }
.card-title { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.card a:hover .card-title { color: var(--accent); }
.meta { display: block; font-size: 0.85rem; color: var(--ink-soft); margin: 0.2rem 0; }
.desc { display: block; font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
.card .desc { color: var(--ink-soft); }
.desc.todo { font-style: italic; color: var(--ink-soft); }
.more { margin: 0.9rem 0 0; font-size: 0.95rem; font-weight: 600; }
.more a { color: var(--accent); }

/* ---- rows (all posts, series pages) ---- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.row > a { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.tag {
  display: inline-block; margin-left: 0.5rem; padding: 0 0.4rem;
  border: 1px solid var(--line); border-radius: 3px; font-size: 0.78rem;
}
.series-page .cta { margin-top: 1.5rem; }

/* ---- filters ---- */
.filters { margin: 0.5rem 0 0.75rem; }
.search input {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: 0.5rem 0.7rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink-soft); border-radius: 4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0.25rem; }
.chip {
  font: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.25rem 0.7rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.status { font-size: 0.85rem; color: var(--ink-soft); margin: 0.4rem 0 0; min-height: 1.2em; }
.empty { color: var(--ink-soft); }

.packs p { margin: 0; color: var(--ink-soft); }

/* ---- footer ---- */
.site-footer {
  padding: 1.5rem 0 3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--accent); }
.site-footer p { margin: 0 0 0.6rem; }
.foot-h { font-weight: 700; color: var(--ink); }
.dash-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.fine { font-size: 0.82rem; }
