/* ============================================================
   JUMP GRADES — MASTER PRINCIPLES OF ACCOUNTS
   STUDY GUIDE (e-Study Guide) — web layer
   Source of truth: "Master POA Ui Kit Krystle.fig"
     › homepage › study-guide-page › study-guide - article (2370:353)
   Consumes colors_and_type.css. Adds NO new colours or fonts —
   the brand applied to long-form knowledge-base articles, the
   web counterpart to the printed `worksheets.css` layer.
   All classes are `sg-` prefixed. Drop a book chapter into the
   <article class="sg-body"> region; the chrome stays fixed.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.sg-page {
  margin: 0;
  background: var(--white);
  color: var(--fg-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.sg-page img { display: block; max-width: 100%; }
.sg-page a { color: inherit; text-decoration: none; }

/* shared centred canvas */
.sg-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   SITE CHROME — nav (sticky) + black footer
   (matches the marketing kit so a chapter page sits inside the
   same site shell)
   ============================================================ */
.sg-ann {
  background: var(--blue); color: #fff; text-align: center;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 16px; display: flex; gap: 14px;
  align-items: center; justify-content: center; flex-wrap: wrap;
}
.sg-ann a {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}

.sg-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.sg-nav__row { display: flex; align-items: center; gap: 28px; height: 84px; }
.sg-nav__logo { height: 56px; }
.sg-nav__links { display: flex; gap: 30px; margin-left: 18px; }
.sg-nav__links a {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--ink); text-transform: uppercase; letter-spacing: -0.01em;
}
.sg-nav__links a:hover { color: var(--red); }
.sg-nav__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.sg-nav__login {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap;
}
.sg-nav__toggle { display: none; background: none; border: 0; cursor: pointer;
  font-size: 26px; color: var(--ink); margin-left: auto; line-height: 1; }

/* buttons (local copy so the layer is self-sufficient) */
.sg-btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  text-transform: uppercase; border-radius: var(--r-pill); cursor: pointer;
  border: 0; transition: background .15s ease, transform .05s ease;
}
.sg-btn:active { transform: translateY(1px); }
.sg-btn--red { background: var(--red); color: #fff; font-size: 16px; padding: 13px 30px; }
.sg-btn--red:hover { background: #7d0e01; }
.sg-btn--amber { background: transparent; color: var(--ink); border: 1.5px solid var(--yellow);
  font-size: 14px; padding: 12px 28px; }
.sg-btn--amber:hover { background: var(--yellow-100); }
.sg-btn--white { background: #fff; color: var(--blue); font-size: 16px; padding: 14px 32px; }
.sg-btn--white:hover { background: #f0f4fb; }

/* ============================================================
   ARTICLE SHELL
   ============================================================ */
.sg-article { padding: 22px 0 80px; }

.sg-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-family: var(--font-body); font-size: 13px; color: var(--gray);
  margin-bottom: 26px;
}
.sg-breadcrumb a:hover { color: var(--red); }
.sg-breadcrumb .sg-breadcrumb__sep { color: var(--gray-light); }
.sg-breadcrumb .sg-breadcrumb__current { color: var(--ink); font-weight: 600; }

/* title block */
.sg-head {
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 24px; margin-bottom: 44px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 24px;
  align-items: end;
}
.sg-head__byline {
  grid-column: 1 / -1;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  color: var(--ink); letter-spacing: -0.01em;
}
.sg-head__byline b { color: var(--red); font-weight: 700; }
.sg-head__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 48px); line-height: .98; letter-spacing: -0.03em;
  color: var(--black); margin: 0; text-wrap: balance;
}
.sg-share { display: flex; gap: 10px; align-items: center; padding-bottom: 4px; }
.sg-share__btn {
  width: 38px; height: 38px; border-radius: 10px; background: var(--black);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; transition: transform .1s ease, background .15s ease;
}
.sg-share__btn:hover { background: var(--red); transform: translateY(-2px); }

/* two-column layout */
.sg-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 372px;
  gap: 56px; align-items: start;
}
.sg-rail { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 28px; }

/* ============================================================
   ARTICLE BODY  (the region you paste chapter content into)
   ============================================================ */
.sg-body { font-family: var(--font-body); color: var(--fg-2); }
.sg-body > * + * { margin-top: 20px; }

.sg-body p { font-size: 16px; line-height: 1.65; color: var(--fg-2); margin: 0; }
.sg-body strong, .sg-body b { color: var(--ink); font-weight: 700; }
.sg-body a:not(.sg-btn) { color: var(--link); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
.sg-body a:not(.sg-btn):hover { color: var(--red-700); }

/* lead block: the intro summary bullets under the H1-repeat */
.sg-body h2 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 23px; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink);
  margin: 48px 0 0; text-wrap: balance; scroll-margin-top: 110px;
}
.sg-body h3 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 17px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink);
  margin: 34px 0 0; scroll-margin-top: 110px;
}
.sg-body h2 + p, .sg-body h3 + p,
.sg-body h2 + ul, .sg-body h3 + ul,
.sg-body h2 + .sg-table-wrap, .sg-body h3 + .sg-table-wrap { margin-top: 16px; }

.sg-body ul, .sg-body ol { margin: 0; padding-left: 22px; }
.sg-body li { font-size: 16px; line-height: 1.6; color: var(--fg-2); }
.sg-body li + li { margin-top: 9px; }
.sg-body li strong { color: var(--ink); }
.sg-body ul { list-style: none; padding-left: 4px; }
.sg-body ul > li { position: relative; padding-left: 22px; }
.sg-body ul > li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red);
}
.sg-body ol { padding-left: 22px; }
.sg-body ol > li { padding-left: 4px; }
.sg-body ol > li::marker { color: var(--red); font-weight: 700; font-family: var(--font-display); }

/* CALLOUT — amber-outlined principle/tip box (never a left-stripe) */
.sg-callout {
  border: 1.5px solid var(--yellow); background: var(--yellow-100);
  border-radius: var(--r-md); padding: 18px 22px;
  font-size: 15.5px; line-height: 1.6; color: var(--ink);
}
.sg-callout--teal { border-color: var(--teal); background: #e6f4f4; }
.sg-callout--blue { border-color: var(--blue); background: #eaf0fb; }
.sg-callout--red  { border-color: var(--red-500); background: var(--red-100); }
.sg-callout__label {
  display: block; font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em;
  color: var(--yellow); margin-bottom: 6px;
}
.sg-callout--teal .sg-callout__label { color: var(--teal); }
.sg-callout--blue .sg-callout__label { color: var(--blue); }
.sg-callout--red  .sg-callout__label { color: var(--red); }

/* FIGURE — contained line-art / scene on a soft tint tile */
.sg-figure { margin: 8px 0; }
.sg-figure__frame {
  background: var(--gray-xlight); border-radius: var(--r-md);
  padding: 24px; display: flex; align-items: center; justify-content: center;
}
.sg-figure__frame img { max-height: 340px; width: auto; }
.sg-figure__frame--plain { background: var(--gray-xxlight); }
.sg-figure__cap {
  font-size: 13px; color: var(--gray); margin-top: 10px; line-height: 1.5;
  font-style: italic;
}

/* TABLES — data tables + journal (Dr/Cr) entries */
.sg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sg-table {
  width: 100%; border-collapse: collapse; font-family: var(--font-body);
  font-size: 15px; border: 1px solid var(--gray-light);
}
.sg-table th, .sg-table td {
  border: 1px solid var(--gray-light); padding: 12px 16px;
  text-align: left; vertical-align: top; color: var(--fg-2);
}
.sg-table thead th {
  background: var(--gray-xlight); color: var(--ink); font-weight: 700;
  font-family: var(--font-body); font-size: 14px;
}
.sg-table tbody td:first-child { color: var(--ink); font-weight: 600; }
.sg-table--num td:not(:first-child),
.sg-table--num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* journal entry: ink header, Dr/Cr columns */
.sg-table--journal { table-layout: fixed; }
.sg-table--journal thead th { background: var(--ink); color: #fff; }
.sg-table--journal th:nth-child(n+2),
.sg-table--journal td:nth-child(n+2) {
  text-align: right; width: 110px; font-variant-numeric: tabular-nums;
}
.sg-table caption {
  caption-side: top; text-align: left; font-size: 14px; color: var(--ink);
  font-weight: 600; padding-bottom: 8px;
}

/* hand annotation */
.sg-note {
  font-family: var(--font-hand); font-size: 21px; color: var(--red);
  line-height: 1.3; transform: rotate(-1.5deg);
}

/* ============================================================
   SIDEBAR MODULES
   ============================================================ */
/* HIGHLIGHTS — pink key-takeaways box with star */
.sg-highlights {
  background: var(--red-100); border-radius: var(--r-md); padding: 20px 22px;
}
.sg-highlights__head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 14px; letter-spacing: 0.02em; color: var(--red); margin-bottom: 12px;
}
.sg-highlights ul { list-style: none; margin: 0; padding: 0; }
.sg-highlights li {
  position: relative; padding-left: 18px; font-size: 14px; line-height: 1.55;
  color: var(--ink);
}
.sg-highlights li + li { margin-top: 12px; }
.sg-highlights li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red);
}

/* ON THIS PAGE — TOC with scroll-spy */
.sg-toc {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px 22px;
}
.sg-toc__head {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 14px; letter-spacing: 0.02em; color: var(--ink);
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.sg-toc nav { display: flex; flex-direction: column; gap: 11px; }
.sg-toc a {
  font-size: 13.5px; line-height: 1.45; color: var(--gray-dark);
  border-left: 2px solid transparent; padding-left: 12px; margin-left: -2px;
  transition: color .12s ease, border-color .12s ease;
}
.sg-toc a.sg-toc--sub { padding-left: 26px; font-size: 13px; color: var(--gray); }
.sg-toc a:hover { color: var(--red); }
.sg-toc a.is-active { color: var(--red); border-left-color: var(--red); font-weight: 600; }

/* RELATED POSTS */
.sg-related__head {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 14px; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 14px;
}
.sg-related__list { display: flex; flex-direction: column; gap: 14px; }
.sg-related__card {
  display: flex; gap: 14px; align-items: center; background: var(--gray-xxlight);
  border-radius: var(--r-md); padding: 12px; transition: background .15s ease;
}
.sg-related__card:hover { background: var(--gray-xlight); }
.sg-related__thumb {
  width: 78px; height: 64px; flex: none; border-radius: var(--r-sm);
  object-fit: cover; background: var(--gray-xlight);
}
.sg-related__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 14px; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink);
}
.sg-related__meta { font-size: 12px; color: var(--gray); margin-top: 6px; }

/* ============================================================
   AUTHORS FOOTER BLOCK
   ============================================================ */
.sg-authors {
  border: 1px solid var(--gray-light); border-radius: var(--r-md);
  padding: 24px 28px; margin-top: 48px;
}
.sg-authors__row { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.sg-author { display: flex; align-items: center; gap: 12px; }
.sg-author img {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
  background: var(--gray-xlight); border: 1px solid var(--gray-light);
}
.sg-author__name {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 15px; letter-spacing: -0.01em; color: var(--ink);
}
.sg-author__role { font-size: 12px; color: var(--gray); text-transform: uppercase;
  letter-spacing: 0.04em; margin-top: 2px; }
.sg-authors__share { margin-left: auto; display: flex; gap: 10px; }
.sg-authors__dates {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--gray);
}
.sg-authors__dates b { color: var(--ink); font-weight: 700; }
.sg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sg-tag {
  font-size: 13px; color: var(--blue); background: #eaf0fb; border-radius: var(--r-pill);
  padding: 5px 12px; font-weight: 600;
}
.sg-tag:hover { background: #dde8fa; }

/* ============================================================
   OPTIONAL CTA PANEL — blue "bust your accounting expertise"
   drop <section class="sg-cta"> anywhere (end of article or rail)
   ============================================================ */
.sg-cta {
  background: var(--blue); color: #fff; border-radius: var(--r-xl);
  padding: 44px 48px; margin-top: 48px; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.sg-cta__eyebrow {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 13px; letter-spacing: 0.05em; color: rgba(255,255,255,.7);
}
.sg-cta__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 3vw, 36px); line-height: .98; letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.sg-cta__sub { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.85);
  max-width: 46ch; margin: 0 0 22px; }
.sg-cta__art { width: 320px; max-width: 36vw; align-self: end; margin-bottom: -44px; }
.sg-cta__art img { border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }

/* CTA — compact variant for the sidebar rail */
.sg-cta--rail {
  grid-template-columns: 1fr; padding: 26px 24px; margin-top: 0;
  text-align: left;
}
.sg-cta--rail .sg-cta__art { display: none; }
.sg-cta--rail .sg-cta__sub { margin-bottom: 18px; }

/* ============================================================
   FOOTER (black)
   ============================================================ */
.sg-footer { background: #000; color: #fff; padding: 64px 0 36px; }
.sg-footer__top { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 36px; }
.sg-footer__blurb { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.6;
  max-width: 34ch; margin-top: 18px; }
.sg-footer h5 { font-family: var(--font-display); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.04em; color: rgba(255,255,255,.5); margin: 0 0 16px; }
.sg-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.sg-footer a { color: #fff; font-size: 15px; }
.sg-footer a:hover { color: var(--yellow); }
.sg-footer__logo { height: 64px; filter: brightness(0) invert(1); margin: -8px 0 0 -6px; }
.sg-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px;
  padding-top: 24px; display: flex; align-items: center; gap: 16px;
  color: rgba(255,255,255,.5); font-size: 13px; flex-wrap: wrap; }
.sg-footer__socials { margin-left: auto; display: flex; gap: 14px; font-size: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .sg-layout { grid-template-columns: 1fr; gap: 40px; }
  .sg-rail { position: static; }
  /* on mobile the rail reads better with highlights first, TOC hidden */
  .sg-toc { display: none; }
}
@media (max-width: 860px) {
  .sg-nav__links, .sg-nav__login { display: none; }
  .sg-nav__toggle { display: block; }
  .sg-cta { grid-template-columns: 1fr; padding: 32px 28px; }
  .sg-cta__art { display: none; }
  .sg-footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .sg-wrap { padding: 0 20px; }
  .sg-head { grid-template-columns: 1fr; }
  .sg-share { padding-bottom: 0; }
  .sg-footer__top { grid-template-columns: 1fr; }
  .sg-authors__row { gap: 20px; }
  .sg-authors__share { margin-left: 0; width: 100%; }
}

/* nav drawer (mobile) */
.sg-drawer { display: none; }
.sg-drawer.is-open { display: block; }
.sg-drawer {
  border-bottom: 1px solid var(--border); background: #fff;
  padding: 8px 0 18px;
}
.sg-drawer nav { display: flex; flex-direction: column; }
.sg-drawer a {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 16px; color: var(--ink); padding: 12px 0; letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   PRINT — clean reading copy (drops chrome + rail)
   ============================================================ */
@media print {
  .sg-ann, .sg-nav, .sg-drawer, .sg-rail, .sg-share,
  .sg-authors__share, .sg-cta, .sg-footer { display: none !important; }
  .sg-layout { grid-template-columns: 1fr; }
  .sg-article { padding: 0; }
  .sg-body h2, .sg-body h3 { break-after: avoid; }
  .sg-table, .sg-figure, .sg-callout { break-inside: avoid; }
}
