/* Styles for the written pages. The tool's own styles come from styles.css;
   this only adds what prose and page furniture need. */

.page { padding-bottom: 60px; }

.crumbs {
  padding: 18px 0 10px; font-size: 13.5px; color: var(--ink-3);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; }

.page-title {
  font-size: 30px; line-height: 1.2; letter-spacing: -.022em;
  margin: 0 0 12px;
}
@media (max-width: 620px) { .page-title { font-size: 25px; } }

/* Full-width theme: running text fills its column. */
.prose { max-width: none; }
.prose h2 {
  font-size: 20px; letter-spacing: -.015em; margin: 34px 0 10px;
  padding-top: 4px;
}
.prose p { margin: 0 0 14px; color: var(--ink-2); }
.prose ul { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); }
.prose ol { margin: 0 0 16px; padding-left: 24px; color: var(--ink-2); }
.prose li { margin-bottom: 6px; }

/* Worked examples: the images are made from synthetic test PDFs by the tool
   itself. They are light artwork on purpose, so they keep a light frame in
   dark mode rather than being inverted. */
.prose figure { margin: 18px 0 22px; }
.prose figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius, 12px);
  background: #f6f7f9;
}
.prose figure.narrow img { max-width: 420px; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top;
}
.prose th { color: var(--ink); font-weight: 650; }
.prose .table-wrap { overflow-x: auto; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--accent); }
.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .92em; background: var(--surface-2);
  padding: 2px 6px; border-radius: 5px; color: var(--ink);
}
.lede p { font-size: 17px; color: var(--ink-2); }
@media (max-width: 620px) { .lede p { font-size: 16px; } }

/* The tool sits inside the page rather than owning it. */
.tool-shell {
  margin: 22px 0 8px; padding: 4px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tool-shell .wrap { padding: 0; max-width: none; }

/* ---- FAQ ---- */
.faq { margin-top: 10px; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer; padding: 14px 0; font-weight: 650; font-size: 15.5px;
  list-style: none; position: relative; padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .15s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item > div { padding: 0 0 16px; color: var(--ink-2); max-width: none; }

/* ---- related ---- */
.related { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 20px; }
.related h2 {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-3); margin: 0 0 12px;
}
.related ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.related a {
  display: block; padding: 11px 14px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.related a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- footer nav ---- */
.foot-nav { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0 10px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.foot-nav a:hover { color: var(--accent); text-decoration: underline; }

/* Brand in the header is a link on content pages. */
a.brand { text-decoration: none; color: inherit; }

/* ---- ad slots ----
   Reserved space so that inserting an ad later does not shift the page and
   wreck Cumulative Layout Shift. Empty slots collapse to nothing. */
.ad-slot {
  margin: 28px 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-slot:empty { display: none; }
.ad-slot[data-reserve="leaderboard"] { min-height: 90px; }
.ad-slot[data-reserve="rectangle"] { min-height: 250px; }

/* ---- homepage guide links ---- */
.guides { margin: 10px 0 40px; border-top: 1px solid var(--line); padding-top: 26px; }
.guides h2 { font-size: 19px; letter-spacing: -.015em; margin: 0 0 4px; }
.guides-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14.5px; }
.guide-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.guide-list a {
  display: block; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid var(--line);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.guide-list a:hover { border-color: var(--accent); transform: translateY(-2px); }
.guide-list strong { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 3px; }
.guide-list span { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }

/* ---- homepage: how it works + common questions ---- */
.home-how, .home-faq { margin: 10px 0 40px; border-top: 1px solid var(--line); padding-top: 26px; }
.home-how h2, .home-faq h2 { font-size: 19px; letter-spacing: -.015em; margin: 0 0 14px; }
.how-steps {
  list-style: none; margin: 0; padding: 0; counter-reset: how; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.how-steps li {
  counter-increment: how; position: relative; padding: 14px 16px 14px 54px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  color: var(--ink-2); font-size: 14.5px; line-height: 1.5;
}
.how-steps li::before {
  content: counter(how); position: absolute; left: 16px; top: 14px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px;
}
.how-steps strong { color: var(--ink); display: block; margin-bottom: 2px; }
.how-note { margin: 14px 0 0; color: var(--ink-2); font-size: 14.5px; }
@media (min-width: 1000px) {
  .home-faq { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .home-faq > h2 { grid-column: 1 / -1; }
}

/* ---- two-column page body ----
   The article keeps a readable line length; the sidebar takes the rest of the
   width and carries the facts people actually came to look up. Stretching a
   paragraph across a whole monitor would fill the page but nobody would read
   it, so the space is filled with something useful instead. */
.page-body { display: grid; gap: 34px; align-items: start; }
@media (min-width: 1000px) {
  .page-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .page-side { position: sticky; top: 20px; }
}

.page-side { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.card h2 {
  margin: 0 0 12px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}

.facts dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.facts dl > div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.facts dd {
  margin: 0; font-size: 14.5px; color: var(--ink); line-height: 1.45;
}
.facts dd code {
  font-family: ui-monospace, Consolas, monospace; font-size: .9em;
  background: var(--surface-2); padding: 1px 6px; border-radius: 5px;
}
.facts dd strong { font-weight: 700; }

.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a {
  color: var(--ink-2); text-decoration: none; font-size: 13.5px; line-height: 1.35;
  display: block; border-left: 2px solid var(--line); padding-left: 10px;
}
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }

/* Anchored headings should not hide under anything when jumped to. */
.prose h2[id] { scroll-margin-top: 16px; }

/* The FAQ sits below the two-column body, so on a wide screen it runs as two
   columns of its own rather than leaving half the page empty. Each item is
   independent, so nothing breaks awkwardly across a column. */
@media (min-width: 1000px) {
  .faq {
    max-width: none;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    column-gap: 44px; align-items: start;
  }
  .faq > h2 { grid-column: 1 / -1; }
}

/* Long measures read better with a touch more leading and slightly larger
   paragraph spacing, which is the trade for filling the width. */
.prose p, .prose li { line-height: 1.68; }
.prose p { margin-bottom: 16px; }

.draft-note { background: var(--warn-soft, #fef3c7); color: #92400e; padding: 10px 14px; border-radius: 10px; }

/* ---- reset-password page ---- */
.reset-form { display: grid; gap: 8px; max-width: 380px; margin: 0 0 20px; }
.reset-form label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.reset-form input { font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.reset-form .btn { margin-top: 6px; }
.reset-msg { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 14px;
  background: var(--err-soft, #fcebea); color: var(--err, #b3261e); }
.reset-msg.is-ok { background: var(--ok-soft); color: var(--ok); }
