/* =========================================================================
   DocVelora — global stylesheet
   Tokens locked from the approved handover (Section 3: Visual design system).
   Do not introduce new brand colors without updating this token block.
   ========================================================================= */

:root {
  /* Approved color tokens */
  --ink: #0B1630;
  --primary-blue: #2563EB;
  --primary-blue-dark: #1D4ED8;
  --soft-blue: #EFF6FF;
  --canvas: #F8FAFC;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --pdf-red: #E5484D;
  --pdf-red-soft: #FEECEC;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --text-muted: #5B6472;

  /* Radii */
  --radius-card: 18px;
  --radius-control: 11px;
  --radius-pill: 999px;

  /* Layout */
  --content-max: 1180px;
  --shadow-card: 0 1px 2px rgba(11, 22, 48, 0.04), 0 8px 24px rgba(11, 22, 48, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Focus visibility — accessibility floor, never remove */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -------------------------------------------------------------------------
   Header / primary nav
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand__logo { width: 30px; height: 30px; flex: none; }
.brand__doc { color: var(--ink); }
.brand__velora { color: var(--primary-blue); }

.primary-nav {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink);
}

.primary-nav a { padding: 6px 2px; border-bottom: 2px solid transparent; }
.primary-nav a:hover { border-bottom-color: var(--primary-blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .header-actions__free { display: none; }
@media (min-width: 900px) { .header-actions .header-actions__free { display: inline-flex; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  padding: 10px 18px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--primary-blue); color: var(--white); }
.btn--primary:hover { background: var(--primary-blue-dark); }

.btn--secondary { background: var(--white); color: var(--ink); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--ink); }

.btn--soft { background: var(--soft-blue); color: var(--primary-blue); }
.btn--soft:hover { background: #E0EBFF; }

.btn--pill { border-radius: var(--radius-pill); padding: 8px 16px; font-size: 0.85rem; }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; }

.mobile-nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.mobile-nav-toggle svg { width: 18px; height: 18px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 16px;
  border-top: 1px solid var(--border);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 12px 4px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  .primary-nav { display: flex; }
  .mobile-nav-toggle { display: none; }
}

/* -------------------------------------------------------------------------
   Eyebrow / section labels
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero { padding: 48px 0 40px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
}

.hero__title {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 800;
}
.hero__title .accent { color: var(--primary-blue); }

.hero__lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 26px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.trust-row li { display: flex; align-items: center; gap: 6px; list-style: none; }
.trust-row svg { width: 14px; height: 14px; color: var(--success); flex: none; }

/* Upload card */
.upload-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.dropzone {
  border: 1.5px dashed #C7D6F5;
  background: var(--soft-blue);
  border-radius: calc(var(--radius-card) - 4px);
  padding: 34px 20px;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.is-dragover { border-color: var(--primary-blue); background: #E4EEFF; }
.dropzone.has-file { border-style: solid; border-color: var(--success); background: var(--success-soft); }
.dropzone.has-error { border-style: solid; border-color: var(--pdf-red); background: var(--pdf-red-soft); }

.dropzone__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--primary-blue);
}
.dropzone__icon svg { width: 20px; height: 20px; }

.dropzone__title { font-weight: 700; margin: 0 0 4px; font-size: 1rem; }
.dropzone__hint { font-size: 0.84rem; color: var(--text-muted); margin: 0 0 18px; }

.dropzone__filename {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 14px;
  word-break: break-word;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; justify-content: center; }
.chip {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  color: var(--ink);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------------------
   Section shells
   ------------------------------------------------------------------------- */
.section { padding: 48px 0; }
.section--muted { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 640px; margin-bottom: 30px; }
.section__title { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; }
.section__lede { color: var(--text-muted); margin: 0; font-size: 1rem; }

/* Tool grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 720px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, transform .1s ease;
}
.tool-card:hover { border-color: var(--primary-blue); transform: translateY(-2px); }

.tool-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.tool-card__title { font-weight: 700; font-size: 0.96rem; margin: 0; }
.tool-card__desc { font-size: 0.83rem; color: var(--text-muted); margin: 0; flex-grow: 1; }
.tool-card__go { font-size: 0.82rem; font-weight: 700; color: var(--primary-blue); display: flex; align-items: center; gap: 4px; }
.tool-card__go svg { width: 14px; height: 14px; }

/* Workflow */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 900px) { .workflow-grid { grid-template-columns: 1.1fr 0.9fr; } }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 22px;
}
@media (min-width: 560px) { .workflow-steps { grid-template-columns: repeat(4, 1fr); } }

.workflow-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}
.workflow-step__num {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--primary-blue);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.workflow-step__title { font-weight: 700; font-size: 0.92rem; margin: 0 0 4px; }
.workflow-step__desc { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.privacy-panel {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.privacy-panel .btn--soft { background: rgba(255,255,255,0.12); color: var(--white); }
.privacy-panel__badge {
  align-self: flex-start;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
}
.privacy-panel__title { font-size: 1.4rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.privacy-panel__desc { font-size: 0.92rem; color: #C7D0E0; margin: 0; }
.privacy-panel__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.privacy-panel__chips .chip { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: var(--white); }

/* Direct answer box */
.answer-box {
  background: var(--soft-blue);
  border-left: 4px solid var(--primary-blue);
  border-radius: 12px;
  padding: 20px 22px;
}
.answer-box p { margin: 0; color: var(--ink); }
.answer-box > strong { display: block; margin-bottom: 6px; }

/* Ad placement zone — visual reservation only; real ad code goes in production */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 32px 0;
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.96rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary-blue);
  transition: transform .15s ease;
  flex: none;
  margin-left: 12px;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--text-muted); font-size: 0.9rem; margin: 10px 0 0; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C7D0E0; padding: 44px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 32px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }

.footer-brand .brand__doc { color: var(--white); }
.footer-brand p { font-size: 0.85rem; color: #9AA6BC; margin: 12px 0 0; max-width: 32ch; }

.footer-col h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9AA6BC; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 0.88rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
  font-size: 0.8rem;
  color: #8792A8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}
.footer-bottom a:hover { color: var(--white); }

/* =========================================================================
   Tool page components (Word to PDF, and reusable for future tool pages)
   ========================================================================= */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 18px 0 10px;
}
.breadcrumb a:hover { color: var(--primary-blue); }

.tool-header { padding-bottom: 8px; }
.tool-header__title { font-size: clamp(1.7rem, 3.6vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; margin: 6px 0 10px; }
.tool-header__lede { color: var(--text-muted); max-width: 60ch; margin: 0 0 16px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 44px;
}
@media (min-width: 900px) { .tool-layout { grid-template-columns: 1.2fr 0.8fr; } }

.side-stack { display: flex; flex-direction: column; gap: 16px; }

.fact-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.fact-panel h3, .fact-panel__heading { font-size: 0.9rem; margin: 0 0 12px; font-weight: 700; }
.info-card h3, .card-heading { font-size: 0.95rem; margin: 0 0 8px; font-weight: 700; }
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.fact-row:last-child { border-bottom: none; }
.fact-row span:first-child { color: var(--text-muted); }
.fact-row span:last-child { font-weight: 700; }
.fact-row .is-success { color: var(--success); }

.step-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}
@media (min-width: 720px) { .step-grid { grid-template-columns: repeat(3, 1fr); } }

.two-col-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 24px 0;
}
@media (min-width: 720px) { .two-col-cards { grid-template-columns: 1fr 1fr; } }

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.info-card h3 { font-size: 0.95rem; margin: 0 0 8px; }
.info-card p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0 8px;
}
@media (min-width: 720px) { .related-grid { grid-template-columns: repeat(4, 1fr); } }
.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.related-card__title { font-weight: 700; font-size: 0.9rem; margin: 0 0 4px; }
.related-card__desc { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.honesty-note {
  background: var(--soft-blue);
  border-left: 4px solid var(--primary-blue);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.86rem;
  margin: 20px 0 0;
}
.honesty-note strong { display: block; margin-bottom: 4px; color: var(--primary-blue); }

/* Convert-tool progress + result states */
.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 6px;
  display: none;
}
.progress-track.is-active { display: block; }
.progress-fill { height: 100%; width: 0%; background: var(--primary-blue); transition: width .15s ease; }
.progress-label { font-size: 0.78rem; color: var(--text-muted); display: none; }
.progress-label.is-active { display: block; }

.result-panel { display: none; text-align: center; }
.result-panel.is-active { display: block; }
.result-panel__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.result-panel__icon svg { width: 24px; height: 24px; }
.result-panel__title { font-size: 1.25rem; font-weight: 800; margin: 0 0 4px; }
.result-panel__meta { font-size: 0.86rem; color: var(--text-muted); margin: 0 0 18px; }
.result-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.result-panel__warning {
  text-align: left;
  background: #FFF7E6;
  border-left: 4px solid #D97706;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #7C4A03;
  margin: 0 0 18px;
}

.tool-section { display: block; }
.is-hidden { display: none !important; }

/* =========================================================================
   PDF Workspace (multi-file: merge, reorder, rotate, page numbers, watermark)
   ========================================================================= */
.workspace-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 980px) { .workspace-shell { grid-template-columns: 2fr 1fr; } }

.file-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.file-row__thumb {
  width: 40px; height: 52px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  flex: none;
  background: var(--canvas);
  display: flex; align-items: center; justify-content: center;
}
.file-row__thumb canvas, .file-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-row__info { flex: 1; min-width: 0; }
.file-row__name { font-weight: 600; font-size: 0.88rem; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__meta { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.file-row__actions { display: flex; gap: 4px; flex: none; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--primary-blue); color: var(--primary-blue); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn--danger:hover { border-color: var(--pdf-red); color: var(--pdf-red); }

.add-more-row { display: flex; justify-content: center; margin: 4px 0 4px; }

.workspace-options { display: flex; flex-direction: column; gap: 14px; }
.option-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.option-card h3 { font-size: 0.9rem; margin: 0 0 10px; }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.option-row:last-child { margin-bottom: 0; }
.option-row label { font-size: 0.85rem; }
.option-row select, .option-row input[type=text] {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  max-width: 140px;
}
.switch {
  position: relative;
  width: 38px; height: 22px;
  flex: none;
}
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch__track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background-color .15s ease;
  pointer-events: none;
}
.switch__track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .15s ease;
}
.switch input:checked + .switch__track { background: var(--primary-blue); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }

.output-summary { display: flex; flex-direction: column; gap: 8px; }

.workspace-empty {
  text-align: center;
  padding: 40px 20px;
}


/* ==========================================================================
   BLOG + 404

   DESIGN NOTE
   The listing is set as a document contents page rather than a stack of
   cards: title flush left, date and reading time flush right, a leader rule
   carrying the eye across the gap. That device is borrowed from the thing
   this whole site is about — printed documents — and it does the same job
   here that it does in a real table of contents. It is the one place this
   section spends any visual boldness; the reading page itself stays
   deliberately plain, because the posts are long and the job there is to be
   read.

   Everything uses the tokens already declared at the top of this file
   (--ink, --primary-blue, --canvas, --soft-blue, --border, --text-muted).
   No new palette, no web font: the blog should read as the same site.

   LINK COLOURS: this stylesheet sets `a { color: inherit; text-decoration:
   none; }` near the top. That is right for nav, cards and buttons, where the
   whole block is the click target, and wrong for body copy, where a link has
   to look like one. The anchor rules below undo that reset wherever prose
   appears, and each sets both colour and underline — colour alone is not
   enough to mark a link.
   ========================================================================== */

/* Reading width.
   The measure stays at 68ch — that is the readable line length and widening
   it would make the posts harder to read, not better. What changes is what
   sits beside it: on a wide screen the leftover margin carries the section
   outline instead of sitting empty. The grid is offset slightly left of
   centre so the text column, not the whole grid, reads as the centre of the
   page. */

.container--reading {
  max-width: 1000px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 68ch) minmax(0, 200px);
  gap: 64px;
  align-items: start;
}

/* --- Section outline rail --------------------------------------------- */

.outline {
  position: sticky;
  top: 96px;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.outline__title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.outline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: outline;
}

.outline__list li {
  margin-bottom: 9px;
}

.outline__list a {
  display: block;
  font-size: 0.86rem;
  line-height: 1.42;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}

.outline__list a:hover,
.outline__list a:focus-visible {
  color: var(--ink);
}

/* Current section. Marked with weight and colour, plus a short rule that
   sits over the rail's own border — so it is legible without relying on
   colour alone. */
.outline__list a.is-current {
  color: var(--primary-blue);
  font-weight: 600;
  position: relative;
}

.outline__list a.is-current::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 0.35em;
  width: 2px;
  height: 1.1em;
  background: var(--primary-blue);
}

/* Kept for anything still using the old class. */
.container--narrow {
  max-width: 68ch;
}

/* --- Listing header --------------------------------------------------- */

.blog-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.021em;
}

/* --- Contents-page listing -------------------------------------------- */

.contents {
  list-style: none;
  max-width: 860px;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.entry {
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--border);
}

.entry__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.entry__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
  flex: 0 1 auto;
}

.entry__title a {
  color: var(--ink);
  text-decoration: none;
}

.entry__title a:hover,
.entry__title a:focus-visible {
  color: var(--primary-blue);
}

/* The leader. Sits between title and meta and absorbs the free space, so it
   grows and shrinks with the title length the way a printed one does. */
.entry__leader {
  flex: 1 1 auto;
  min-width: 24px;
  align-self: flex-end;
  margin-bottom: 0.32em;
  height: 0;
  border-bottom: 1px dotted var(--border);
}

.entry:hover .entry__leader {
  border-bottom-color: #C7D2E4;
}

.entry__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A hairline rule instead of a middot between meta items. */
.entry__sep {
  width: 1px;
  height: 0.85em;
  background: var(--border);
}

.entry__summary {
  max-width: 68ch;
  margin: 9px 0 0;
  color: var(--text-muted);
  line-height: 1.62;
}

/* --- Reading page ----------------------------------------------------- */

.post-head {
  margin: 0 0 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.post-head__title {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.021em;
}

.post-head__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.post-head__sep {
  width: 1px;
  height: 0.85em;
  background: var(--border);
}

.prose {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink);
}

/* Headings take more space above than below, so each section reads as
   attached to the text that follows it rather than floating between two. */
.prose h2 {
  margin: 2.4em 0 0.55em;
  font-size: 1.42rem;
  line-height: 1.26;
  letter-spacing: -0.014em;
  scroll-margin-top: 80px;
}

.prose h3 {
  margin: 1.9em 0 0.45em;
  font-size: 1.14rem;
  letter-spacing: -0.008em;
  scroll-margin-top: 80px;
}

.prose p {
  margin: 0 0 1.15em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.3em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.5em;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--text-muted);
}

.prose a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--primary-blue-dark);
  text-decoration-thickness: 2px;
}

/* Outward arrow marks a link that leaves the site. */
.prose a[target="_blank"]::after {
  content: " ↗";
  font-size: 0.85em;
  line-height: 1;
}

.prose strong {
  font-weight: 650;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--primary-blue);
  color: var(--text-muted);
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--canvas);
  border: 1px solid var(--border);
  font-size: 0.89em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Long lines scroll inside the box rather than pushing the page sideways. */
.prose pre {
  margin: 1.6em 0;
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--canvas);
  border: 1px solid var(--border);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.88rem;
  line-height: 1.6;
}

.prose hr {
  margin: 2.6em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* --- End-of-post blocks ------------------------------------------------
   Set off by a rule rather than a tinted card. Two tinted panels stacked at
   the end of an article compete with the article; a rule says "this is
   apparatus, not content" without shouting. */

.endnote {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.endnote__title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.006em;
}

.endnote__lede {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.endnote ul {
  margin: 0;
  padding-left: 1.15em;
}

.endnote li {
  margin-bottom: 6px;
}

.endnote a,
.back-link a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.endnote a:hover,
.endnote a:focus-visible,
.back-link a:hover {
  color: var(--primary-blue-dark);
  text-decoration-thickness: 2px;
}

.back-link {
  margin-top: 34px;
  font-size: 0.92rem;
}

/* --- Pagination + breadcrumb ------------------------------------------ */

.pagination {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pagination a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.pagination a:hover,
.pagination a:focus-visible {
  text-decoration: underline;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--primary-blue);
}

/* --- 404 --------------------------------------------------------------- */

.tool-list-plain {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 26px;
  margin: 12px 0 0;
  padding-left: 1.15em;
}

.tool-list-plain li {
  margin-bottom: 4px;
}

.tool-list-plain a {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tool-list-plain a:hover,
.tool-list-plain a:focus-visible {
  color: var(--primary-blue-dark);
  text-decoration-thickness: 2px;
}

/* --- Inline links in body copy across the whole site ------------------

   The tool pages and guides already carry contextual internal links inside
   info cards, FAQ answers and prose paragraphs — the content framework's
   internal-linking rule put them there. The global `a { color: inherit }`
   reset meant every one of them rendered as plain black text. A link nobody
   can see is a link nobody clicks.

   Scoped to <p> and <li> inside <main>, and only to anchors with no class of
   their own. That covers prose wherever it appears, including the custom
   pages which style their paragraphs inline rather than through a wrapper
   class, while leaving every styled component alone: .btn, .related-card,
   .tool-card and the listing entries all carry classes, and card links wrap
   their <p> rather than sitting inside one. Header, footer and nav are
   outside <main> and keep the reset. */

main p a:not([class]),
main li a:not([class]) {
  color: var(--primary-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

main p a:not([class]):hover,
main li a:not([class]):hover,
main p a:not([class]):focus-visible,
main li a:not([class]):focus-visible {
  color: var(--primary-blue-dark);
  text-decoration-thickness: 2px;
}

/* --- Small screens ----------------------------------------------------- */

/* Below this there is no spare margin left to spend, so the rail goes and the
   text column takes the full width. */
@media (max-width: 1080px) {
  .post-layout {
    grid-template-columns: minmax(0, 68ch);
    gap: 0;
  }

  .outline {
    display: none;
  }
}

@media (max-width: 680px) {
  /* The leader depends on horizontal room it doesn't have on a phone, so the
     row stacks and the leader is dropped rather than squeezed to a stub. */
  .entry__head {
    display: block;
  }

  .entry__leader {
    display: none;
  }

  .entry__meta {
    margin-top: 7px;
  }

  .entry__title {
    font-size: 1.14rem;
  }

  .prose {
    font-size: 1rem;
  }

  .prose h2 {
    font-size: 1.24rem;
  }

  .tool-list-plain {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
