/* Ghost additions for lists.mtblueskyconsulting.com.

   Loaded after site.css, which is the main site's stylesheet copied in
   unchanged. Everything here uses its tokens — no new colors — so the
   contrast checks in tools/check-contrast.js cover this file too, and the
   light, dark, and toggled themes all follow automatically. */

/* Subscribe form ----------------------------------------------------------- */

.subscribe-form {
  max-width: 34rem;
  margin-top: 2rem;
}

.subscribe-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.subscribe-row input {
  flex: 1 1 16rem;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--ink-soft);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
}

.subscribe-row input::placeholder {
  color: var(--ink-soft);
}

.subscribe-row input:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 2px;
}

.subscribe-row .btn {
  flex: 0 0 auto;
  font-size: 1rem;
  cursor: pointer;
}

.subscribe-busy,
.subscribe-status {
  display: none;
}

.subscribe-form.loading .subscribe-idle {
  display: none;
}

.subscribe-form.loading .subscribe-busy {
  display: inline;
}

.subscribe-form.loading .btn {
  opacity: 0.75;
  cursor: progress;
}

/* The brand has no error color yet (brand-book.md, open item 4), so the two
   states are told apart by wording and a rule of the right token: cyan for
   success, ink for a problem. Neither relies on color alone. */
.subscribe-form.success .subscribe-status--success,
.subscribe-form.error .subscribe-status--error {
  display: block;
  margin: 1rem 0 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--brand-text);
  font-weight: 600;
}

.subscribe-form.error .subscribe-status--error {
  border-left-color: var(--ink);
}

.subscribe-form.success .subscribe-row,
.subscribe-form.success .subscribe-fine {
  display: none;
}

.subscribe-fine {
  margin: 0.85rem 0 0;
  font-size: 0.9063rem;
  color: var(--ink-soft);
}

.subscribe-fine a,
.subscribe-member a,
.card p a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}

/* List picker on /subscribe/. */
.subscribe-lists {
  border: 0;
  padding: 0;
  margin: 0 0 1.75rem;
}

.subscribe-list {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.subscribe-list:hover,
.subscribe-list:has(input:checked) {
  border-color: var(--brand);
}

.subscribe-list input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.3rem;
  accent-color: var(--brand-text);
  flex: 0 0 auto;
}

.subscribe-list input:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 2px;
}

.subscribe-list strong {
  display: block;
  font-family: var(--font-title);
  font-weight: 600;
}

.subscribe-list-desc {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.subscribe-alt {
  margin-top: 2rem;
  color: var(--ink-soft);
}

.subscribe-member {
  margin-top: 1.5rem;
  font-weight: 600;
}

/* Listings ----------------------------------------------------------------- */

.pager {
  margin-top: 2.5rem;
}

/* Post and page content ----------------------------------------------------- */

/* Ghost's editor produces markup the main site's Markdown never does —
   figures, blockquotes, code, and cards — so those get a style here. Body
   text keeps the 68ch measure from site.css. */

.feature-image {
  margin: 2rem 0;
}

.feature-image img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

figcaption,
.kg-card figcaption {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: center;
}

.gh-content > * {
  max-width: var(--measure);
}

.gh-content > figure,
.gh-content > .kg-card {
  margin-block: 2rem;
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

.gh-content img {
  border-radius: 8px;
}

.gh-content blockquote {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--brand);
  color: var(--ink-soft);
  font-size: 1.0625em;
}

.gh-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.gh-content code {
  font-size: 0.9em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.gh-content pre {
  overflow-x: auto;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  line-height: 1.5;
}

.gh-content pre code {
  background: none;
  border: 0;
  padding: 0;
}

.gh-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

.gh-content th,
.gh-content td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.gh-content th {
  font-family: var(--font-title);
  font-weight: 600;
}

/* Ghost requires these two classes. Wide spans the content column; full
   breaks out to the viewport edge. */
.gh-content > .kg-width-wide {
  max-width: none;
}

.gh-content > .kg-width-full {
  max-width: none;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.kg-width-full img {
  border-radius: 0;
}

/* Callout and button cards default to Ghost's accent color. Pull them back
   onto the brand tokens so they follow the theme toggle. The selector needs
   .prose-page and the element name to outrank site.css's
   `.prose-page a:not(.btn)`, which would otherwise paint the label cyan on
   cyan — the same trap the main site's buttons hit. */
.gh-content .kg-callout-card {
  border-radius: 8px;
}

.prose-page .gh-content a.kg-btn,
.prose-page .gh-content a.kg-btn-accent {
  font-family: var(--font-title);
  font-weight: 600;
  background: var(--brand);
  color: #06232b;
  border-radius: 8px;
}
