/* authorkit.pro — shared styles for web tools.
 *
 * Matches the main site's literary, book-craft identity:
 * Playfair Display + Source Serif 4, warm paper ground,
 * monochrome palette, ruled sections, no border-radius cards.
 *
 * All colours use CSS custom properties so dark mode works.
 */

/* The site's two fonts, self-hosted (SIL OFL 1.1, licences beside them). Latin subset. */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/shared/fonts/playfair-display-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/shared/fonts/playfair-display-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/shared/fonts/source-serif-4-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/shared/fonts/source-serif-4-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black:   #000000;
  --white:   #ffffff;
  --stone:   #4a4845;
  --rule:    #000000;
  --rule-lt: rgba(0,0,0,.12);
  --paper:   #F8F6F1;
  --code-bg: #EFEDE8;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 38rem;
  --pad: clamp(1rem, 4vw, 2rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --black:   #f0ece4;
    --white:   #13120d;
    --stone:   #9c968a;
    --rule:    rgba(240,236,228,.25);
    --rule-lt: rgba(240,236,228,.10);
    --paper:   #13120d;
    --code-bg: #1c1a14;
  }
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--paper);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--black);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

/* ── Layout ─────────────────────────────────────────────── */
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Wider wrap for calculator pages — forms need more room */
.wrap--wide { max-width: 48rem; }

/* ── Masthead ───────────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 20;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.2rem;
}

.masthead__brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--black);
}

.masthead__mark {
  width: 30px;
  height: 35px;
  flex-shrink: 0;
  fill: var(--black);
}

.masthead__name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-body);
  font-size: .95rem;
}

.masthead__nav a {
  color: var(--stone);
  text-decoration: none;
  /* Icon-only: flex removes the inline-image baseline gap, and the padding
     keeps the tap target near 44px without enlarging the mark. */
  display: flex;
  align-items: center;
  padding: .35rem;
  margin: -.35rem;
  border-radius: 4px;
}
.masthead__nav a:hover { color: var(--black); }
.masthead__nav a[aria-current="page"] {
  color: var(--black);
  font-weight: 600;
}
.masthead__nav a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* ── Hero / page heading ────────────────────────────────── */
.hero {
  padding-top: clamp(2.2rem, 5vw, 3.6rem);
  padding-bottom: 1.1rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--black);
  margin-bottom: .75rem;
  text-wrap: balance;
}

.hero p {
  font-size: 1rem;
  color: var(--stone);
  text-wrap: pretty;
}

/* ── Section heads (uppercase label + rule) ──────────────── */
.section-head {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .45rem;
  margin-top: 2.2rem;
  margin-bottom: .9rem;
}

/* ── Forms ───────────────────────────────────────────────── */
.ak-field {
  margin-bottom: 1.1rem;
}

.ak-field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: .35rem;
}

.ak-field select,
.ak-field input[type="number"],
.ak-field input[type="text"] {
  width: 100%;
  padding: .5rem .65rem;
  font-size: .95rem;
  font-family: var(--font-body);
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--black);
}

.ak-field select:focus,
.ak-field input:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.ak-hint {
  display: block;
  font-size: .75rem;
  color: var(--stone);
  margin-top: .25rem;
}

.ak-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ak-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .ak-grid-2, .ak-grid-3 { grid-template-columns: 1fr; }
  .masthead__nav { gap: 1rem; font-size: .85rem; white-space: nowrap; }
  .masthead__nav .masthead__gh { display: none; }
  .colophon__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .masthead__brand { gap: .5rem; }
  .masthead__name { font-size: 1.15rem; }
}

/* ── Results table ──────────────────────────────────────── */
.ak-results {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.ak-results th,
.ak-results td {
  text-align: left;
  padding: .55rem .5rem .55rem 0;
  border-bottom: 1px solid var(--rule-lt);
  vertical-align: baseline;
}

.ak-results th {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .9rem;
  color: var(--stone);
}
.ak-results thead th {
  border-bottom-color: var(--rule);
  padding-bottom: .4rem;
}
.ak-results th[scope="row"] { width: 40%; padding-right: 1rem; }

.ak-val {
  font-family: var(--font-mono);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.ak-highlight th,
.ak-highlight td {
  border-top: 1px solid var(--rule);
  border-bottom-color: var(--rule);
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.ak-muted td { color: var(--stone); }

/* ── Ruled sections (instead of rounded cards) ───────────── */
.ak-section {
  border-top: 1px solid var(--rule-lt);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}

.ak-section h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: .9rem;
}

.ak-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: .6rem;
}

/* ── Callout boxes ──────────────────────────────────────── */
.ak-callout {
  border: 1px solid var(--rule);
  padding: .9rem 1.1rem;
  font-size: .95rem;
  line-height: 1.6;
  margin: 1.25rem 0;
}

.ak-callout strong {
  display: block;
  margin-bottom: .2rem;
}

/* Subtle left-accent variants */
.ak-callout-info  { border-left-width: 3px; }
.ak-callout-warn  { border-left-width: 3px; }
.ak-callout-ok    { border-left-width: 3px; }

/* ── Prose (guide pages) ────────────────────────────────── */
.ak-prose h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .45rem;
  margin-top: 2.2rem;
  margin-bottom: .9rem;
}

/* A section already opens with a rule; its first heading needs no second one. */
.ak-section > h2:first-child { border-bottom: 0; padding-bottom: 0; margin-top: 0; }

.ak-prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.ak-prose p  { margin-bottom: .85rem; }
.ak-prose ul, .ak-prose ol {
  margin-bottom: .85rem;
  padding-left: 1.1rem;
  color: var(--stone);
}
.ak-prose li { margin: .3rem 0; }
.ak-prose a  { color: var(--black); }
.ak-prose code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--code-bg);
  padding: .1em .3em;
}

/* Numbered steps */
.ak-steps { counter-reset: step; list-style: none; padding-left: 0; }
.ak-steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 1.1rem;
  color: var(--stone);
}
.ak-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .15em;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
}
.ak-steps > li strong { color: var(--black); }

/* ── Sources / citations ────────────────────────────────── */
.ak-sources {
  font-size: .8rem;
  color: var(--stone);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-lt);
}

/* The last accordion's bottom rule already separates the sources. */
.ak-faq + .ak-sources { border-top: 0; padding-top: 0; }
.ak-sources ul { list-style: none; padding: 0; margin: 0; }
.ak-sources li { margin-bottom: .25rem; font-size: .8rem; color: var(--stone); }
.ak-sources a {
  color: var(--stone);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}
.ak-sources a:hover {
  color: var(--black);
  text-decoration-color: var(--black);
}

/* ── Colophon / footer ──────────────────────────────────── */
.colophon {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 2rem;
  font-size: .875rem;
  color: var(--stone);
}

.colophon__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.colophon__brand {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.colophon__legal { white-space: nowrap; }

.colophon__mark {
  width: 13px;
  height: 15px;
  fill: var(--stone);
  flex-shrink: 0;
}

.colophon a { color: var(--stone); text-underline-offset: 2px; }
.colophon a:hover { color: var(--black); }

/* ── Resource page layout ────────────────────────────────
 * .wrap--page > .ak-crumbs, then .ak-page = main.ak-main + aside.ak-sidebar.
 * Wide: two columns, sidebar sticky. Narrow: one column, sidebar after main. */
.wrap--page { max-width: 64rem; width: 100%; } /* width: body is a flex column, so auto margins would shrink-wrap it */

:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.ak-skip { position: absolute; left: -999px; }
.ak-skip:focus { left: var(--pad); top: .5rem; z-index: 30; background: var(--paper); padding: .3rem .6rem; }

.ak-crumbs { font-size: .8rem; color: var(--stone); padding-top: 1rem; }
.ak-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .4rem; }
.ak-crumbs li + li::before { content: "›"; margin-right: .4rem; }
.ak-crumbs a { color: var(--stone); }

.ak-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-bottom: 3rem; }
.ak-main .hero p, .ak-main .ak-prose { max-width: var(--measure); }
/* A ruled section spans the column like the accordions; only its text keeps the measure. */
.ak-main .ak-section.ak-prose { max-width: none; }
.ak-main .ak-section.ak-prose > * { max-width: var(--measure); }
.ak-main .ak-section.ak-prose > table { max-width: none; }
/* A table that ends its section: the next section's rule closes it. */
.ak-section > .ak-results:last-child tr:last-child > * { border-bottom: 0; }

@media (min-width: 60rem) {
  .ak-page { grid-template-columns: minmax(0, 1fr) 16rem; }
  .ak-sidebar { position: sticky; top: 5.2rem; align-self: start; padding-top: clamp(2.2rem, 5vw, 3.6rem); }
}

.ak-sidebar { font-size: .85rem; }
.ak-sidebar h2 { font-family: var(--font-body); font-size: .85rem; font-weight: 600; border-bottom: 1px solid var(--rule); padding-bottom: .35rem; margin-bottom: .5rem; }
.ak-sidebar ul + h2 { margin-top: 1.5rem; }
.ak-sidebar ul { list-style: none; }
.ak-sidebar li { padding: .3rem 0; border-bottom: 1px solid var(--rule-lt); }
.ak-sidebar a { color: var(--stone); text-decoration: none; }
.ak-sidebar a:hover { color: var(--black); text-decoration: underline; }
.ak-sidebar a[aria-current="page"] { color: var(--black); font-weight: 600; }

/* The tool: a ruled box, inputs beside the visual when there is room. */
.ak-tool { border: 1px solid var(--rule); padding: clamp(.6rem, 3vw, 1.5rem); container-type: inline-size; }
.ak-tool__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@container (min-width: 34rem) {
  .ak-tool__body { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); align-items: start; }
}
.ak-tool .ak-results { margin: 1.5rem 0 0; }
/* The tool's own border closes the table. */
.ak-tool .ak-results tr:last-child > th,
.ak-tool .ak-results tr:last-child > td { border-bottom: 0; }
.ak-tool .ak-field select,
.ak-tool .ak-field input[type="number"],
.ak-tool .ak-field input[type="text"] { font-size: .85rem; }
@container (max-width: 20rem) { .ak-tool .ak-field select { font-size: .8rem; padding-left: .4rem; } }

.ak-field input[type="range"] { width: 100%; margin-top: .5rem; accent-color: var(--black); }

.ak-headline span { white-space: nowrap; }
.ak-headline { font-family: var(--font-mono); font-size: clamp(.85rem, 3.5vw, 1.05rem); font-variant-numeric: tabular-nums; margin-top: .6rem; }

/* To-scale diagrams: drawn in currentColor on --paper, so dark mode just works. */
.ak-proof { display: block; width: 100%; height: auto; color: var(--black); }
.ak-proof .line { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ak-proof .fold { stroke-dasharray: 4 3; }
.ak-proof .faint { stroke: var(--stone); }
.ak-proof .paper { fill: var(--paper); }
.ak-proof text { fill: currentColor; font-family: var(--font-body); }
.ak-proof .small { fill: var(--stone); }

.ak-prose .ak-steps { padding-left: 0; color: inherit; }

/* Draft pages: a calm notice that the content is not final. */
.ak-draft { border: 1px dashed var(--rule); padding: .7rem 1rem; font-size: .9rem; color: var(--stone); margin: 1rem 0; }
.ak-draft strong { color: var(--black); }

/* Hub list: a grid of resource cards. Single column on phones happens by itself. */
.ak-index {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  column-gap: 2.5rem;
  row-gap: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-bottom: 3rem;
}
.ak-index li { display: flex; flex-direction: column; gap: .35rem; }
.ak-index a { font-weight: 600; }
.ak-index span { display: block; color: var(--stone); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Utility ────────────────────────────────────────────── */
.ak-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Outbound links carry the brand's link arrow (same shape as Swati's
   Journal's .link-arrow): half opacity, nudges up-right on hover. */
main a[href^="http"]:not([href*="authorkit.pro"])::after,
.ak-sidebar a[href^="http"]:not([href*="authorkit.pro"])::after,
.colophon a[href^="http"]:not([href*="authorkit.pro"])::after {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-left: .2em;
  vertical-align: .02em;
  background: currentColor;
  opacity: .5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='7' y1='17' x2='17' y2='7'/%3E%3Cpolyline points='7 7 17 7 17 17'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='7' y1='17' x2='17' y2='7'/%3E%3Cpolyline points='7 7 17 7 17 17'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s ease, opacity .2s ease;
}
main a[href^="http"]:not([href*="authorkit.pro"]):hover::after,
.ak-sidebar a[href^="http"]:not([href*="authorkit.pro"]):hover::after,
.colophon a[href^="http"]:not([href*="authorkit.pro"]):hover::after {
  transform: translate(3px, -3px);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  main a::after, .ak-sidebar a::after, .colophon a::after { transition: none; }
}

/* Standard disclaimer: last thing in the main column on every page. */
.ak-disclaimer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-lt);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--stone);
}

/* Explainers and FAQs: native accordions. The heading keeps the brand face. */
.ak-faq { border-top: 1px solid var(--rule-lt); }
.ak-faq:last-of-type { border-bottom: 1px solid var(--rule-lt); }
.ak-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: .9rem 2rem .9rem 0;
}
.ak-faq summary::-webkit-details-marker { display: none; }
.ak-faq summary h2 { display: inline; margin: 0; font-size: 1.15rem; font-family: var(--font-head); }
.ak-faq summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--stone);
}
.ak-faq[open] summary::after { content: "\2212"; }
.ak-faq summary:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.ak-faq-content { padding: 0 0 1.25rem; }
@media (prefers-reduced-motion: no-preference) {
  .ak-faq[open] .ak-faq-content { animation: ak-fade-in .2s ease; }
}
@keyframes ak-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Text output tools: checkbox rows, ISBN rows, generated text, button ── */
.ak-field textarea {
  width: 100%;
  padding: .5rem .65rem;
  font-size: .85rem;
  line-height: 1.5;
  font-family: var(--font-mono);
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--black);
  resize: vertical;
  min-height: 8rem;
  field-sizing: content;
}
.ak-field textarea:focus { outline: 2px solid var(--black); outline-offset: 1px; }
.ak-field--check label { display: flex; gap: .5rem; align-items: baseline; margin-bottom: 0; }
.ak-isbn-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .5rem; }
.ak-btn {
  font: inherit;
  font-size: .9rem;
  padding: .5rem 1rem;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--paper);
  cursor: pointer;
}
.ak-btn:hover { background: var(--paper); color: var(--black); }
.ak-btn:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

/* Sandboxed preview frame (book description formatter) */
.ak-preview { display: block; width: 100%; height: 18rem; border: 1px solid var(--rule); background: #fff; }
.ak-field textarea.ak-tall { min-height: 18rem; }

/* Previous / next: the brand arrow's stroke, drawn horizontally. */
.ak-prev::before, .ak-next::after {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  vertical-align: -.05em;
  background: currentColor;
  opacity: .5;
  -webkit-mask: var(--ak-arrow-h) no-repeat center / contain;
          mask: var(--ak-arrow-h) no-repeat center / contain;
  transition: transform .2s ease, opacity .2s ease;
}
.ak-prev::before { margin-right: .3em; transform: scaleX(-1); }
.ak-next::after { margin-left: .3em; }
.ak-prev:hover::before { transform: scaleX(-1) translateX(3px); opacity: 1; }
.ak-next:hover::after { transform: translateX(3px); opacity: 1; }
:root { --ak-arrow-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .ak-prev::before, .ak-next::after { transition: none; } }

/* A worked example of a tool's output, shown before the form. */
.ak-example { margin: 0 0 1.5rem; border-left: 3px solid var(--rule); padding: .25rem 0 .25rem 1rem; }
.ak-example figcaption { font-size: .8rem; color: var(--stone); margin-bottom: .5rem; }
.ak-example blockquote { margin: 0; font-size: .9rem; }
.ak-example blockquote p + p { margin-top: .5rem; }

/* Feedback box: last in the sidebar, so it ends the page on phones. */
.ak-connect { margin-top: 1.5rem; border: 1px solid var(--rule); padding: 1rem; font-size: .85rem; line-height: 1.5; }
.ak-connect p + p { margin-top: .6rem; }
.ak-connect__label { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); margin-top: .9rem !important; }
.ak-connect__cta { display: inline-block; margin-top: .9rem; padding: .45rem .8rem; border: 1px solid var(--black); color: var(--black); text-decoration: none; }
.ak-connect__cta:hover { background: var(--black); color: var(--paper); }
.ak-connect__cta:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.ak-connect p a { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }

/* Resource groups: hub sections and sidebar sub-heads share one order. */
.ak-group + .ak-group { margin-top: 2rem; }
.ak-group h2 { font-family: var(--font-body); font-size: .76rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--stone); border-bottom: 1px solid var(--rule); padding-bottom: .45rem; margin-bottom: 1rem; }
.ak-sidebar h3 { font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); margin: 1rem 0 .25rem; }
.ak-sidebar h2 + h3 { margin-top: .5rem; }
.ak-group .ak-index { border-top: 0; padding-top: 0; margin-bottom: 0; }
#tools { margin-bottom: 3rem; }
