/* =========================================================
   CoffeeNCoders — legal.css: the legal pages (privacy, terms, refunds, cookies), loaded after main.css.
   A compact dark hero (badge, title, last updated, tabs between the legal pages) ending in a copper edge, then a white reading
   column with a sticky "On this page" list (legal.js marks the section in view). Type follows the hero scale.
   ========================================================= */

.lg-hero {
  position: relative; overflow: hidden; padding: clamp(130px, 17vh, 190px) 0 clamp(56px, 7vw, 84px); color: var(--cream);
  background: radial-gradient(45% 60% at 90% 10%, rgba(226, 117, 58, .2), transparent 70%), var(--espresso);
}
.lg-hero::after {   /* flat glowing edge into the white page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--amber) 30%, #ffd2a1 50%, var(--amber) 70%, transparent);
  box-shadow: 0 -10px 40px 6px rgba(226, 117, 58, .4);
}
/* hero label: a glass pill like the other inner pages, our copper flame avatar + "Legal" over a short line */
.lg-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 236, 220, .12); backdrop-filter: blur(8px);
}
.lg-badge__av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, var(--amber), var(--copper)); box-shadow: 0 0 0 2px var(--espresso); }
.lg-badge__av img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.lg-badge__text { display: grid; gap: 1px; font-size: 12.5px; line-height: 1.25; color: var(--muted-dark); }
.lg-badge__text b { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.lg-hero__title { margin-top: 18px; font-family: var(--display); font-size: clamp(32px, 3.8vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -.045em; }   /* the shared inner hero size */
.lg-hero__date { margin-top: 12px; font-size: 15px; color: var(--muted-dark); }
.lg-hero__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.lg-hero__tabs a { padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted-dark); border: 1px solid var(--line-dark); transition: color .25s, border-color .25s, background .25s; }
.lg-hero__tabs a:hover { color: var(--cream); border-color: rgba(226, 117, 58, .6); }
.lg-hero__tabs a.is-on { color: var(--espresso); background: var(--cream); border-color: var(--cream); }

.lg-main { padding: clamp(48px, 7vw, 96px) 0 clamp(80px, 10vw, 130px); background: #fff; }
.lg-main__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: clamp(40px, 5vw, 72px); }   /* the text takes the rest of the row, no empty gap */
.lg-toc { position: sticky; top: 120px; display: grid; gap: 4px; }
.lg-toc__title { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); }
.lg-toc nav { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.lg-toc a { margin-left: -1px; padding: 6px 0 6px 14px; font-size: 14.5px; color: var(--muted); border-left: 2px solid transparent; transition: color .2s, border-color .2s; }
.lg-toc a:hover { color: var(--ink); }
.lg-toc a.is-on { color: var(--ink); font-weight: 600; border-left-color: var(--copper); }

/* the document */
.lg-doc { min-width: 0; color: var(--ink); font-size: 16.5px; line-height: 1.75; }
.lg-doc > :first-child { margin-top: 0; }
.lg-doc h2 { margin: 0 0 12px; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; }
.lg-doc p { margin: 0 0 14px; color: #4a3f37; }
/* one section per heading: a clicked "On this page" link lights its section with a warm wash that fades (legal.js) */
.lg-sec { margin: 26px -22px 0; padding: 18px 22px 6px; border-radius: 18px; scroll-margin-top: 100px; transition: background-color .9s ease, box-shadow .9s ease; }
.lg-sec.is-lit { background: #fbf1e6; box-shadow: inset 3px 0 0 var(--copper); transition-duration: .25s; }
.lg-doc > p:first-child { font-size: 18px; line-height: 1.65; color: var(--ink); }
.lg-doc ul { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.lg-doc li { position: relative; padding-left: 22px; color: #4a3f37; }
.lg-doc li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }
.lg-doc b { font-weight: 600; color: var(--ink); }
.lg-doc a { font-weight: 600; color: var(--copper); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .lg-main__grid { grid-template-columns: 1fr; gap: 28px; }
  .lg-toc { position: static; padding: 18px; border-radius: 18px; background: #faf6f1; }
}
@media (max-width: 640px) {
  .lg-hero { padding-top: 110px; }   /* the same phone top as the other inner heroes */
  .lg-doc { font-size: 16px; }
  .lg-doc h2 { font-size: 20px; }
  .lg-sec { margin: 20px -12px 0; padding: 14px 12px 4px; border-radius: 14px; }
}
