/* Article kit — the components of the October 2026 flagship posts.
   Loaded on post pages only (templates/blog/post_detail.html). Everything is scoped
   under .prose; the reading typography only under .prose.ak-body, which the template
   adds to a post that uses the kit, so the 299 imported posts look exactly as before.

   Brand: the logo's blue → cyan, buttons #2f6fe4, no purple. Every colour pair used
   for text meets WCAG AA (4.5:1 for body text, 3:1 for large numerals); the cyan and
   teal of the logo appear only where nothing has to be read on them.
   The contract the writers follow: article_quality/draft/articles-oct4/ARTICLE-KIT.md */

.prose {
  --ak-ink: #0f1729;
  --ak-ink-2: #23304d;
  --ak-muted: #56637c;          /* 5.9:1 on white, 5.4:1 on the tinted panels */
  --ak-line: #e1e8f3;
  --ak-blue: #2f6fe4;           /* the owner's button blue: 4.6:1 with white */
  --ak-blue-deep: #2457bd;      /* labels and links on tints: 6:1 */
  --ak-blue-a: #4473da;         /* the logo's "A" */
  --ak-cyan: #23bfd3;           /* the logo's "o" — decoration only */
  --ak-teal: #1edfb5;           /* the logo's "t" — decoration only */
  --ak-sea: #12809a;            /* a readable cyan for numerals: 4.4:1 */
  --ak-tint: #f1f6fe;
  --ak-tint-2: #eefafb;
  --ak-radius: 16px;
  --ak-space: clamp(1.6rem, 4vw, 2.4rem);
  --ak-shadow: 0 1px 2px rgba(15, 23, 41, .04), 0 8px 24px rgba(15, 23, 41, .06);
}

/* ------------------------------------------------------------ reading type */
.prose.ak-body {
  color: var(--ak-ink-2);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.75;
  overflow-wrap: break-word;
}
.prose.ak-body p,
.prose.ak-body li { font-size: 1.125rem; }
.prose.ak-body > p { margin: 0 0 1.2em; }
.prose.ak-body h2 {
  color: var(--ak-ink); font-size: clamp(1.5rem, 3.2vw, 1.85rem); line-height: 1.25;
  letter-spacing: -.02em; margin: 2.3em 0 .65em; scroll-margin-top: 24px;
}
.prose.ak-body h3 {
  color: var(--ak-ink); font-size: 1.28rem; line-height: 1.35; letter-spacing: -.01em;
  margin: 1.8em 0 .5em; scroll-margin-top: 24px;
}
.prose.ak-body strong { color: var(--ak-ink); font-weight: 700; }
.prose.ak-body a:not(.ak-btn) {
  color: var(--ak-blue-deep); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: .2em; text-decoration-color: rgba(36, 87, 189, .4);
}
.prose.ak-body a:not(.ak-btn):hover { text-decoration-color: currentColor; }
.prose.ak-body > ul,
.prose.ak-body > ol { padding-left: 1.35em; margin: 0 0 1.3em; }
.prose.ak-body > ul li,
.prose.ak-body > ol li { margin: .45em 0; padding-left: .2em; }
.prose.ak-body > ul li::marker { color: var(--ak-blue); }
.prose.ak-body > ol li::marker { color: var(--ak-blue-deep); font-weight: 700; }
.prose.ak-body > blockquote:not(.ak-quote) { color: var(--ak-ink-2); }

/* ------------------------------------------------- shared panel furniture */
.prose .ak-label {
  display: inline-flex; align-items: center; gap: .5em; margin: 0 0 .7em;
  font-size: .78rem !important; font-weight: 800; line-height: 1.2; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ak-blue-deep);
}
.prose .ak-tldr,
.prose .ak-takeaways,
.prose .ak-callout {
  position: relative; margin: var(--ak-space) 0; padding: 1.35rem 1.5rem 1.2rem;
  border-radius: var(--ak-radius); color: var(--ak-ink-2);
}
.prose .ak-tldr > :last-child,
.prose .ak-takeaways > :last-child,
.prose .ak-callout > :last-child { margin-bottom: 0; }

/* Quick answer: the reader's whole question, answered first. */
.prose .ak-tldr {
  background: linear-gradient(135deg, var(--ak-tint) 0%, var(--ak-tint-2) 100%);
  border: 1px solid #d6e3f8; padding-left: 1.75rem; overflow: hidden;
}
.prose .ak-tldr::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--ak-blue-a), var(--ak-cyan) 70%, var(--ak-teal));
}
.prose .ak-tldr p:not(.ak-label) { font-size: 1.15rem; line-height: 1.65; color: var(--ak-ink); }

/* Key takeaways */
.prose .ak-takeaways { background: #f8fafe; border: 1px solid var(--ak-line); }
.prose .ak-takeaways ul { list-style: none; margin: 0; padding: 0; }
.prose .ak-takeaways li { position: relative; margin: .55em 0; padding-left: 1.6em; }
.prose .ak-takeaways li::before {
  content: ""; position: absolute; left: .2em; top: .62em; width: .55em; height: .55em;
  border-radius: 2px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--ak-blue), var(--ak-cyan));
}

/* Callouts: tip, warn, note. The glyph sits in a circle of the callout's own colour. */
.prose .ak-callout,
.prose .ak-callout--note { --ak-c: #46546b; background: #f6f8fb; border: 1px solid #e1e6ee; }
.prose .ak-callout--tip { --ak-c: #0b6b5c; background: #effbf7; border-color: #c5ecdf; }
.prose .ak-callout--warn { --ak-c: #8a4b00; background: #fff8eb; border-color: #f4dcae; }
.prose .ak-callout .ak-label { color: var(--ak-c); }
.prose .ak-callout .ak-label::before {
  content: "i"; display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.55em; height: 1.55em;
  border-radius: 50%; background: var(--ak-c); color: #fff;
  font: 800 .9em/1 Georgia, "Times New Roman", serif; letter-spacing: 0; text-transform: none;
}
.prose .ak-callout--tip .ak-label::before { content: "\2713"; font-family: system-ui, sans-serif; }
.prose .ak-callout--warn .ak-label::before { content: "!"; font-family: system-ui, sans-serif; }

/* ------------------------------------------------------------ numbered steps */
.prose ol.ak-steps {
  list-style: none; counter-reset: ak-step; margin: var(--ak-space) 0; padding: 0;
  display: grid; gap: 14px;
}
.prose ol.ak-steps > li {
  counter-increment: ak-step; position: relative; margin: 0;
  display: grid; grid-template-columns: 4.2rem 1fr; column-gap: 1.1rem; align-items: start;
  padding: 1.35rem 1.5rem 1.25rem 1.2rem; background: #fff;
  border: 1px solid var(--ak-line); border-radius: var(--ak-radius); box-shadow: var(--ak-shadow);
}
.prose ol.ak-steps > li::before {
  content: counter(ak-step, decimal-leading-zero);
  grid-row: 1 / span 20; font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; padding-top: .1rem;
  color: var(--ak-blue-deep);
  background: linear-gradient(160deg, var(--ak-blue-deep) 10%, var(--ak-sea) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.prose ol.ak-steps > li > * { grid-column: 2; }
.prose ol.ak-steps > li > h3 { margin: .15em 0 .35em; font-size: 1.2rem; }
.prose ol.ak-steps > li > :last-child { margin-bottom: 0; }
.prose ol.ak-steps > li p { font-size: 1.06rem; }

/* ---------------------------------------------------------------- stat chips */
.prose .ak-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  margin: var(--ak-space) 0;
}
.prose .ak-stat {
  display: flex; flex-direction: column; gap: .3rem; padding: 1.05rem 1.15rem;
  background: linear-gradient(160deg, #fff 0%, var(--ak-tint) 100%);
  border: 1px solid #d9e5f8; border-radius: 14px;
}
.prose .ak-stat-num {
  font-size: 1.9rem; font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--ak-blue-deep);
}
.prose .ak-stat-label { font-size: .9rem; line-height: 1.4; color: var(--ak-muted); }

/* --------------------------------------------------------------------- table */
.prose .ak-table-wrap {
  margin: var(--ak-space) 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ak-line); border-radius: var(--ak-radius);
  /* A soft shadow at whichever edge has more table behind it. */
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 41, .16), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 41, .16), transparent) right center / 12px 100% no-repeat scroll,
    #fff;
}
.prose .ak-table-wrap:focus-visible { outline: 3px solid rgba(47, 111, 228, .38); outline-offset: 2px; }
.prose table.ak-table {
  display: table; width: 100%; margin: 0; border-collapse: separate; border-spacing: 0;
  font-size: .97rem; line-height: 1.5; overflow: visible;
}
.prose table.ak-table:has(tr > :nth-child(3)) { min-width: 36rem; }
.prose table.ak-table:has(tr > :nth-child(5)) { min-width: 46rem; }
.prose .ak-table th,
.prose .ak-table td {
  border: 0; border-bottom: 1px solid var(--ak-line); padding: .8rem 1rem;
  text-align: left; vertical-align: top;
}
.prose .ak-table thead th {
  background: rgba(47, 111, 228, .08); color: var(--ak-ink);
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.prose .ak-table tbody tr:nth-child(even) > * { background: rgba(47, 111, 228, .035); }
.prose .ak-table tbody tr:last-child > * { border-bottom: 0; }
.prose .ak-table tbody th,
.prose .ak-table tbody td:first-child { color: var(--ak-ink); font-weight: 650; }

/* -------------------------------------------------------- good for / not for */
.prose .ak-proscons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: var(--ak-space) 0;
}
.prose .ak-pros,
.prose .ak-cons { padding: 1.25rem 1.35rem 1.1rem; border-radius: var(--ak-radius); border: 1px solid; }
.prose .ak-pros { background: #effbf7; border-color: #c5ecdf; }
.prose .ak-cons { background: #fff5f2; border-color: #f5d6cd; }
.prose .ak-pros .ak-label { color: #0b6b5c; }
.prose .ak-cons .ak-label { color: #a1361f; }
.prose .ak-pros ul,
.prose .ak-cons ul { list-style: none; margin: 0; padding: 0; }
.prose .ak-pros li,
.prose .ak-cons li { position: relative; margin: .55em 0; padding-left: 1.75em; font-size: 1.04rem; line-height: 1.55; }
.prose .ak-pros li::before,
.prose .ak-cons li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.15em; height: 1.15em; border-radius: 50%;
}
/* A tick: two borders of a turned box. */
.prose .ak-pros li::before { background: #c9f0e3; }
.prose .ak-pros li::after {
  content: ""; position: absolute; left: .42em; top: .42em; width: .3em; height: .55em;
  border: solid #0b6b5c; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* A cross: two bars. */
.prose .ak-cons li::before {
  background:
    linear-gradient(45deg, transparent 43%, #a1361f 43% 57%, transparent 57%) center / .55em .55em no-repeat,
    linear-gradient(-45deg, transparent 43%, #a1361f 43% 57%, transparent 57%) center / .55em .55em no-repeat,
    #fbdcd3;
}

/* ------------------------------------------------------------------ checklist */
.prose ul.ak-checklist {
  list-style: none; margin: var(--ak-space) 0; padding: .4rem 1.4rem;
  background: #f8fafe; border: 1px solid var(--ak-line); border-radius: var(--ak-radius);
}
.prose ul.ak-checklist > li { position: relative; margin: 0; padding: .8rem 0 .8rem 2.3rem; }
.prose ul.ak-checklist > li + li { border-top: 1px dashed #d5dfee; }
.prose ul.ak-checklist > li::before {
  content: ""; position: absolute; left: 0; top: .95rem; width: 1.45rem; height: 1.45rem; border-radius: 7px;
  background: linear-gradient(135deg, var(--ak-blue), #1789b4);
  box-shadow: 0 3px 8px rgba(47, 111, 228, .25);
}
.prose ul.ak-checklist > li::after {
  content: ""; position: absolute; left: .52rem; top: 1.18rem; width: .38rem; height: .7rem;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* --------------------------------------------------------------------- figure */
.prose figure.ak-figure { margin: calc(var(--ak-space) + .4rem) 0; }
.prose figure.ak-figure img {
  display: block; width: 100%; height: auto; margin: 0;
  border-radius: var(--ak-radius); background: var(--ak-tint);
  box-shadow: 0 1px 2px rgba(15, 23, 41, .06), 0 14px 34px rgba(15, 23, 41, .1);
}
.prose figure.ak-figure figcaption {
  display: flex; gap: .7rem; align-items: baseline; margin-top: .85rem;
  font-size: .93rem; line-height: 1.5; color: var(--ak-muted);
}
.prose figure.ak-figure figcaption::before {
  content: ""; flex: 0 0 22px; height: 2px; transform: translateY(-.3em);
  background: linear-gradient(90deg, var(--ak-blue), var(--ak-cyan));
}

/* ------------------------------------------------------------ call to action */
.prose .ak-btn {
  display: inline-block; padding: .85rem 1.5rem; border-radius: 12px;
  background: var(--ak-blue); color: #fff; font-size: 1.02rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; box-shadow: 0 8px 22px rgba(47, 111, 228, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.prose .ak-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(47, 111, 228, .36); }
.prose .ak-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--ak-blue); }

.prose .ak-cta {
  position: relative; overflow: hidden; isolation: isolate;
  margin: calc(var(--ak-space) + .6rem) 0; padding: clamp(1.6rem, 4.5vw, 2.4rem);
  border-radius: 20px; color: #fff;
  /* Dark enough everywhere for white text (4.5:1 at its lightest corner); the logo's
     cyan and teal live only in the glow, where there is no text. */
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(30, 223, 181, .2) 0%, rgba(35, 191, 211, .1) 45%, transparent 75%),
    linear-gradient(125deg, #142f6e 0%, #2457bd 50%, #12688f 100%);
  box-shadow: 0 18px 44px rgba(36, 87, 189, .28);
}
.prose .ak-cta::after {
  content: ""; position: absolute; z-index: -1; right: -60px; bottom: -80px; width: 240px; height: 240px;
  border-radius: 50%; border: 36px solid rgba(255, 255, 255, .07);
}
.prose .ak-cta p { color: #fff; font-size: 1.06rem; line-height: 1.6; max-width: 52ch; }
.prose .ak-cta .ak-cta-title {
  max-width: 30ch; margin: 0 0 .45em; font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 800; line-height: 1.25; letter-spacing: -.02em;
}
.prose .ak-cta .ak-btn {
  margin-top: .4rem; background: #fff; color: #1d4cad;
  box-shadow: 0 10px 26px rgba(8, 24, 64, .28);
}
.prose .ak-cta .ak-btn:hover { box-shadow: 0 14px 32px rgba(8, 24, 64, .34); }
.prose .ak-cta .ak-btn::after { content: " \2192"; }
.prose .ak-cta .ak-btn:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .35); }

/* --------------------------------------------------------------- pull quote */
.prose blockquote.ak-quote {
  position: relative; margin: calc(var(--ak-space) + 2rem) 0 calc(var(--ak-space) + .4rem); padding: 1.6rem 0 1.3rem 0;
  border: 0; border-top: 1px solid var(--ak-line); border-bottom: 1px solid var(--ak-line);
  color: var(--ak-ink);
}
.prose blockquote.ak-quote::before {
  content: "\201C"; position: absolute; top: -.48em; left: -.04em; padding-right: .12em;
  font: 800 5.2rem/.9 Georgia, "Times New Roman", serif; color: var(--ak-blue-a); background: #fff;
}
.prose blockquote.ak-quote p {
  margin: 0; font-size: clamp(1.2rem, 2.6vw, 1.42rem); font-weight: 650; line-height: 1.5; letter-spacing: -.01em;
}
.prose blockquote.ak-quote p + p { margin-top: .6em; font-size: 1rem; font-weight: 500; color: var(--ak-muted); }

/* ------------------------------------------------------------------------ FAQ */
.prose section.ak-faq { margin: calc(var(--ak-space) + 1rem) 0 var(--ak-space); }
.prose section.ak-faq > h2 { margin-bottom: .8em; }
.prose .ak-faq details {
  margin: 10px 0; background: #fff; border: 1px solid var(--ak-line); border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.prose .ak-faq details[open] { border-color: #c9d9f5; box-shadow: var(--ak-shadow); }
.prose .ak-faq summary {
  position: relative; display: block; list-style: none; cursor: pointer;
  padding: 1.05rem 3.6rem 1.05rem 1.25rem; border-radius: 14px;
  color: var(--ak-ink); font-size: 1.08rem; font-weight: 700; line-height: 1.45;
}
.prose .ak-faq summary::-webkit-details-marker { display: none; }
.prose .ak-faq summary:hover { color: var(--ak-blue-deep); }
.prose .ak-faq summary:focus-visible { outline: 3px solid rgba(47, 111, 228, .38); outline-offset: -3px; }
/* The marker: a plus in a soft circle whose upright bar turns flat when open. */
.prose .ak-faq summary::before,
.prose .ak-faq summary::after { content: ""; position: absolute; top: 50%; }
.prose .ak-faq summary::before {
  right: 1.05rem; width: 1.9rem; height: 1.9rem; margin-top: -.95rem; border-radius: 50%;
  background: linear-gradient(var(--ak-blue-deep), var(--ak-blue-deep)) center / .8rem 2px no-repeat, var(--ak-tint);
  transition: background-color .2s ease;
}
.prose .ak-faq summary::after {
  right: calc(1.05rem + .95rem - 1px); width: 2px; height: .8rem; margin-top: -.4rem;
  background: var(--ak-blue-deep); border-radius: 1px;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.prose .ak-faq details[open] > summary::after { transform: rotate(90deg); }
.prose .ak-faq details > div { padding: 0 1.25rem 1.1rem; color: var(--ak-ink-2); }
.prose .ak-faq details[open] > div { animation: ak-faq-open .28s ease; }
.prose .ak-faq details > div > :last-child { margin-bottom: 0; }
.prose .ak-faq details > div p { font-size: 1.06rem; }
@keyframes ak-faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------- phones */
@media (max-width: 640px) {
  .prose.ak-body { font-size: 1.0625rem; line-height: 1.72; }
  .prose.ak-body p,
  .prose.ak-body li { font-size: 1.0625rem; }   /* 17px: 18px leaves 8 words a line at 375px */
  .prose .ak-tldr,
  .prose .ak-takeaways,
  .prose .ak-callout { padding: 1.15rem 1.1rem 1rem; }
  .prose .ak-tldr { padding-left: 1.35rem; }
  .prose .ak-tldr p:not(.ak-label) { font-size: 1.08rem; }
  .prose .ak-proscons { grid-template-columns: 1fr; }
  .prose ol.ak-steps > li { grid-template-columns: 1fr; padding: 1.15rem 1.1rem 1.05rem; }
  .prose ol.ak-steps > li::before { grid-row: auto; font-size: 2rem; margin-bottom: .35rem; }
  .prose ol.ak-steps > li > * { grid-column: 1; }
  .prose .ak-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prose .ak-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* no lone half-width chip */
  .prose .ak-stat { padding: .9rem .95rem; }
  .prose .ak-stat-num { font-size: 1.55rem; }
  .prose .ak-table th,
  .prose .ak-table td { padding: .7rem .8rem; }
  .prose ul.ak-checklist { padding: .3rem 1rem; }
  .prose .ak-cta .ak-btn { display: block; text-align: center; }
  .prose .ak-faq summary { padding: .95rem 3.2rem .95rem 1rem; font-size: 1.02rem; }
  .prose .ak-faq summary::before { right: .8rem; }
  .prose .ak-faq summary::after { right: calc(.8rem + .95rem - 1px); }
  .prose .ak-faq details > div { padding: 0 1rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .prose .ak-btn,
  .prose .ak-faq details,
  .prose .ak-faq summary::before,
  .prose .ak-faq summary::after { transition: none; }
  .prose .ak-faq details[open] > div { animation: none; }
  .prose .ak-btn:hover { transform: none; }
}

@media print {
  .prose .ak-cta { background: none; color: inherit; border: 1px solid #999; box-shadow: none; }
  .prose .ak-cta p, .prose .ak-cta .ak-btn { color: inherit; }
}
