/* ==========================================================================
   Disclaimer and affiliate disclosure (avhishek.in/disclaimer)
   Uses the site tokens; the one accent is the brand orange #fc6e20.
   ========================================================================== */

.lg {
  --lg-gutter: 20px;
  --lg-orange: #fc6e20;
  width: min(1180px, 100% - 2 * var(--lg-gutter));
  margin-inline: auto;
  padding-block: 40px 96px;
}
.lg:focus { outline: none; }
.lg :where(h1, h2, h3, p, ul, ol) { margin: 0; }
@media (min-width: 720px) { .lg { --lg-gutter: 32px; } }

/* ---------- Heading ---------- */
.lg-head { max-width: 760px; }
.lg-updated {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.lg-title {
  max-width: 16ch;
  margin-top: 12px !important;
  color: var(--text);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.lg-dek {
  max-width: 52ch;
  margin-top: 18px !important;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- The short version ---------- */
.lg-short {
  margin-top: 40px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 12px 32px -18px rgb(0 0 0 / 0.14);
}
.lg-short-title {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}
.lg-points {
  display: grid;
  gap: 20px;
  margin-top: 16px !important;
  padding: 0;
  list-style: none;
}
.lg-points li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.lg-point-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text);
}
.lg-point-icon-accent { background: color-mix(in srgb, var(--lg-orange) 14%, transparent); color: #c2410c; }
html[data-theme="dark"] .lg-point-icon-accent { color: #ff9a5c; }
.lg-points h3 { margin-top: 2px !important; font-size: 1.0625rem; font-weight: 650; line-height: 1.3; }
.lg-points p { margin-top: 4px !important; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }

/* ---------- Body: contents + article ---------- */
.lg-body { display: grid; gap: 32px; margin-top: 56px; }
.lg-toc-title {
  margin-bottom: 8px !important;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.lg-toc ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.lg-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
@media (hover: hover) { .lg-toc a:hover { border-color: var(--line-strong); } }
.lg-toc a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.lg-article { min-width: 0; max-width: 68ch; }
.lg-section + .lg-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.lg-section > * + * { margin-top: 16px !important; }
.lg-section h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 110px;
}
.lg-section { scroll-margin-top: 100px; }
.lg-section p,
.lg-list li {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.lg-section p strong { font-weight: 650; }
.lg-section a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--lg-orange);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.lg-section a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.lg-list { display: grid; gap: 10px; padding-inline-start: 1.25em; }
.lg-list li::marker { color: var(--muted); }

/* How affiliate links look */
.lg-example {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px dashed color-mix(in srgb, var(--lg-orange) 55%, var(--line));
  background: color-mix(in srgb, var(--lg-orange) 5%, var(--surface));
}
.lg-example-label { color: var(--muted); font-size: 0.8125rem !important; font-weight: 600; }
.lg-example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px !important;
}
.lg-example-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--lg-orange);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.lg-example-note { margin-top: 8px !important; color: var(--muted); font-size: 0.875rem !important; line-height: 1.5 !important; }

.lg-callout {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-muted);
  font-size: 0.9375rem !important;
  font-weight: 500;
  line-height: 1.55 !important;
}

/* ---------- Wide screens ---------- */
@media (min-width: 720px) {
  .lg-short { padding: 28px 32px; }
  .lg-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .lg-points li { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 960px) {
  .lg { padding-block: 56px 112px; }
  .lg-body { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; margin-top: 72px; }
  .lg-toc { position: sticky; top: 100px; align-self: start; }
  .lg-toc ol { display: grid; gap: 2px; margin-inline: -10px; }
  .lg-toc a {
    min-height: 34px;
    padding-inline: 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
  }
  @media (hover: hover) { .lg-toc a:hover { color: var(--text); background: var(--surface-muted); } }
}
@media print {
  .lg-toc { display: none; }
}
