/* TopLad design system — used by the blog and the rebuilt content pages.
   No framework, no icon font. Tokens first; components below. */

/* Fonts, colour tokens, header, mobile menu and footer live in chrome.css (loaded first). */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font-family: var(--font); font-size: 16px; line-height: 1.7;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 600; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .6em 1.15em; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1.25 var(--font); text-decoration: none; text-align: center;
  white-space: normal; cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-outline { background: #fff; color: var(--brand-700); border-color: #b9dde9; }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-700); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178c46; color: #fff; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 14px; padding-bottom: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.crumbs li + li::before { content: "/"; color: #9fb1bb; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-600); }
.crumbs li:last-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; display: inline-block; vertical-align: bottom; }

/* ---------- page hero ---------- */
.hero { background: linear-gradient(180deg, var(--bg-soft), #fff); border-bottom: 1px solid var(--line); padding: 8px 0 32px; }
.hero .crumbs { padding-left: 0; padding-right: 0; margin-bottom: 14px; }
.hero h1 { margin-top: 10px; }
.hero .lede { font-size: 1.05rem; color: var(--ink-2); max-width: 760px; margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); }

/* ---------- section tabs / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chips a:hover { border-color: var(--brand); color: var(--brand-700); }
.chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- layout: content + sidebar ---------- */
.layout { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 56px; grid-template-columns: minmax(0, 1fr); }
.layout > * { min-width: 0; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
  .layout .sidebar { position: relative; }
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .15s, border-color .15s, transform .15s; height: 100%;
}
.card:hover { box-shadow: var(--shadow); border-color: #cfe3ea; }
.card-media { aspect-ratio: 16 / 9; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.card-meta .tag { color: var(--brand-700); font-weight: 600; }
.card h2, .card h3 { font-size: 1.05rem; margin: 0; line-height: 1.4; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { margin: 0; font-size: .92rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }
.pager a, .pager span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; padding: 0 12px; }
.pager [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- sidebar widgets ---------- */
.widget { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; margin-bottom: 20px; }
.widget h2, .widget .widget-title { font-size: 1rem; margin: 0 0 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li + li { border-top: 1px solid var(--line); }
.widget li a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.45; }
.widget li a:hover { color: var(--brand-600); }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; }

/* sidebar course card (quiet: the article comes first) */
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.quote-card .quote-title { color: var(--ink); font-size: 1.02rem; font-weight: 600; margin: 0 0 4px; }
.quote-card p { font-size: .9rem; margin-bottom: 12px; }
.popular-list { padding-left: 0; counter-reset: pop; }
.popular-list li { counter-increment: pop; display: flex; gap: 10px; align-items: baseline; }
.popular-list li::before { content: counter(pop); color: var(--muted); font-size: .8rem; font-weight: 600; min-width: 1em; }

/* ---------- article ---------- */
/* Reading column: ~70 characters per line; tables and figures use the same width. */
.article, .article-col > .cta-box { max-width: 44rem; }
.article-head { padding: 8px 0 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--muted); margin: 6px 0 14px; }
.article-meta a { color: var(--ink-2); }
.article-note a { color: var(--brand-700); }
.article-note { font-size: .86rem; color: var(--ink-2); background: #fff8eb; border-left: 3px solid #e3a33a; border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 0 0 18px; }
.prose-lead { margin-bottom: 4px; }
.prose-lead p { font-size: 1.08em; color: var(--ink); }
.cover { margin: 4px 0 24px; }
.cover img { max-height: 220px; width: auto; max-width: 100%; margin: 0 auto; border-radius: var(--radius-sm); }
@media (min-width: 768px) { .cover img { max-height: 300px; } }
.cover figcaption, .prose figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }

/* table of contents: collapsed in the article on phones, in the sidebar on desktop (site.js) */
.toc { margin: 0 0 24px; }
.toc details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); }
.toc summary { cursor: pointer; padding: 12px 16px; min-height: 44px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--muted); }
.toc details[open] summary::after { content: "\2013"; }
.toc ol { list-style: none; margin: 0; padding: 0 16px 12px; }
.toc li { margin: 0; font-size: .92rem; line-height: 1.45; }
.toc li.toc-l3 { padding-left: 14px; font-size: .88rem; }
.toc a { display: block; padding: 6px 0 6px 10px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand-700); text-decoration: underline; }
.toc a[aria-current="true"] { border-left-color: var(--brand); color: var(--ink); font-weight: 600; }
.toc-slot { display: none; }
@media (min-width: 1024px) {
  .toc-slot { display: block; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
  .toc-slot .toc details { background: #fff; }
}

.prose { font-size: 1rem; line-height: 1.75; overflow-wrap: break-word; }
@media (min-width: 768px) { .prose { font-size: 1.0625rem; } }
.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose h3 { margin-top: 1.5em; }
.prose h4 { margin-top: 1.3em; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li > ul, .prose li > ol { margin: .3em 0; }
.prose img { border-radius: var(--radius-sm); margin: 8px auto; }
.prose p > a > img, .prose p > img { margin: 8px auto; }
.prose figure { margin: 1.4em 0; }
.prose figure img { margin: 0 auto; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--line); background: var(--bg-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose a { word-break: break-word; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-scroll:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 480px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose .video { position: relative; aspect-ratio: 16/9; margin: 1em 0; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
/* FAQ */
.prose h2#frequently-asked-questions ~ h3 { font-size: 1.05rem; padding: 14px 0 0; border-top: 1px solid var(--line); }

/* optional sections */
.takeaways { background: var(--brand-50); border-left: 4px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px 6px; margin: 0 0 24px; }
.takeaways h2 { font-size: 1rem; margin: 0 0 6px; }
.takeaways ul { margin: 0 0 8px; padding-left: 1.2em; }
.takeaways li { margin: .3em 0; }
.sources { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; font-size: .92rem; }
.sources h2 { font-size: 1.05rem; margin-bottom: 8px; }
.sources ol { margin: 0; padding-left: 1.3em; }
.sources li { margin: .4em 0; }
.src-host { color: var(--muted); font-size: .85em; margin-left: 6px; }
.author-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 28px; font-size: .95rem; }
.author-box h2 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.author-box .author-name { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.author-box p:last-child { margin: 0; }

/* promotion: clearly labelled and visually quieter than the article */
.cta-label { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.cta-box {
  margin: 32px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-soft);
  border: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr);
}
.cta-box .cta-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.cta-box p { margin: 0; font-size: .93rem; }
.cta-box .cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) { .cta-box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }

.related { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 40px; }
.related h2 { font-size: 1.25rem; }

/* ---------- forms (shared with the enquiry modal) ---------- */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ink); }
.field .opt { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #cdd8df; border-radius: 10px;
  font: 400 1rem/1.4 var(--font); color: var(--ink); background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(2, 126, 163, .18); }
.field-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-note { font-size: .78rem; color: var(--muted); margin: 8px 0 0; }
.error-text { color: var(--danger); font-size: .82rem; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-size: .92rem; }
.alert-error { background: #fdecea; color: #7a1c13; }
.alert-ok { background: #e7f6ee; color: #0d5c32; }

/* ---------- content pages ---------- */
.page-body { padding-top: 32px; padding-bottom: 56px; }
.page-body .prose { max-width: 820px; }
.lead-text { font-size: 1.1rem; color: var(--ink-2); }
.facts { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin: 24px 0; }
.facts > * { min-width: 0; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
.fact h3 { font-size: 1.05rem; margin-bottom: 6px; }
.fact p { margin: 0; font-size: .93rem; color: var(--muted); }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.faq-list summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--ink); }
.faq-list details > div { padding: 0 16px 14px; }
.policy h2 { font-size: 1.25rem; }

@media print {
  .sidebar, .cta-box, .tl-bar, .tl-modal { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
