/* Legal pages, dark like the kolabaja.com homepage (owner 1 Des 2026: "perbarui temanya ... jangan terlalu kaku,
   presisi in lagi button2nya buat modern"). Loaded after site.css; everything is scoped under body.lg. */

html:has(body.lg) {
  background: #000;
  color-scheme: dark;
}
body.lg {
  --bg: #000;
  --panel: #0c0c0e;
  --panel-2: #141416;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #86868b;
  --red: #f0465e;
  --chip: rgba(255, 255, 255, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 85% -120px, rgba(240, 70, 94, 0.22), transparent 70%),
    radial-gradient(700px 480px at -10% 10%, rgba(240, 70, 94, 0.08), transparent 70%),
    #000;
  color: var(--text);
  font-family: var(--font);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.lg a {
  color: inherit;
}

/* ------------------------------------------------------------------ top bar */
.lg-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.lg-logo {
  display: inline-flex;
  align-items: center;
}
.lg-logo img {
  display: block;
  height: 28px;
  width: auto;
}
.lg-top-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ------------------------------------------------------------------ buttons: pill + round arrow chip, equal inset */
.lg-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, #f45a70, #e03b55);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 28px -12px rgba(240, 70, 94, 0.85);
  transition: transform 0.2s, filter 0.2s, background 0.2s;
}
.lg-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.lg-btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.lg-btn:focus-visible,
.lg-chip:focus-visible,
.lg-toc a:focus-visible,
.lg-totop:focus-visible {
  outline: 2px solid #ff8a9a;
  outline-offset: 3px;
}
.lg-arr {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.lg-arr svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  transition: transform 0.2s;
}
.lg-btn:hover .lg-arr svg {
  transform: translateX(2px);
}
/* ghost: arrow chip on the left (it points back) */
.lg-btn-ghost {
  height: 42px;
  padding: 5px 18px 5px 5px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 14px;
}
.lg-btn-ghost .lg-arr {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
}
.lg-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}
.lg-btn-ghost:hover .lg-arr svg {
  transform: translateX(-2px);
}
.lg-chip {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.lg-chip:hover {
  color: var(--text) !important;
  background: var(--chip);
}

/* ------------------------------------------------------------------ hero */
.lg-main {
  width: min(1180px, 100% - clamp(32px, 8vw, 96px));
  margin: 0 auto;
}
.lg-hero {
  padding: clamp(48px, 9vw, 104px) 0 clamp(28px, 5vw, 48px);
  animation: lg-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.lg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(240, 70, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(240, 70, 94, 0.28);
  color: #ff8a9a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lg-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0465e;
  box-shadow: 0 0 0 4px rgba(240, 70, 94, 0.18);
}
body.lg .lg-hero h1 {
  margin: 20px 0 0;
  max-width: 900px;
  font-family: var(--font);
  font-size: clamp(40px, 6.4vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  background-image: linear-gradient(105deg, #e9e9ee 0%, #e9e9ee 38%, #fff 45%, #ffd3da 50%, #fff 55%, #e9e9ee 62%, #e9e9ee 100%);
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: lg-shine 7s ease-in-out 0.6s infinite;
}
.lg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}
.lg-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--chip);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.lg-tag-note {
  color: #f5b83d;
  box-shadow: inset 0 0 0 1px rgba(245, 184, 61, 0.3);
  background: rgba(245, 184, 61, 0.08);
}

/* ------------------------------------------------------------------ contents list + document */
.lg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 72px;
}
.lg-grid:has(.lg-toc:not([hidden])) {
  grid-template-columns: 250px minmax(0, 1fr);
}
.lg-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 18px 10px 18px 0;
  scrollbar-width: thin;
}
.lg-toc-title {
  margin: 0 0 10px 12px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lg-toc-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lg-toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted) !important;
  font-size: 13.5px;
  line-height: 1.35;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.lg-toc a:hover {
  color: var(--text) !important;
  background: var(--chip);
}
.lg-toc a.is-on {
  color: #fff !important;
  background: rgba(240, 70, 94, 0.1);
  border-left-color: #f0465e;
  border-radius: 4px 10px 10px 4px;
}

body.lg .lg-doc.legal {
  max-width: none;
  margin: 0;
  padding: clamp(24px, 5vw, 56px);
  border-radius: 28px;
  background: linear-gradient(180deg, #0f0f12, #0a0a0c);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  animation: lg-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s both;
}
body.lg .legal > :first-child {
  margin-top: 0;
}
body.lg .legal .lede {
  margin-bottom: 8px;
  font-size: 18.5px;
  line-height: 1.65;
  color: #e4e4ea;
}
body.lg .legal h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 48px 0 14px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: #fff;
  font-family: var(--font);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.2;
  scroll-margin-top: 96px;
}
body.lg .legal h2::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0465e;
  box-shadow: 0 0 0 5px rgba(240, 70, 94, 0.15);
  transform: translateY(-4px);
}
body.lg .legal h3 {
  margin: 28px 0 8px;
  color: #fff;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
}
body.lg .legal p,
body.lg .legal li {
  color: #c9c9d0;
  font-size: 16.5px;
  line-height: 1.75;
}
body.lg .legal strong {
  color: #fff;
  font-weight: 650;
}
body.lg .legal ul,
body.lg .legal ol {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}
body.lg .legal li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}
body.lg .legal ul > li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0465e;
  opacity: 0.8;
}
body.lg .legal ol {
  counter-reset: lgo;
}
body.lg .legal ol > li {
  counter-increment: lgo;
  padding-left: 30px;
}
body.lg .legal ol > li::before {
  content: counter(lgo);
  position: absolute;
  left: 0;
  top: 0.25em;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(240, 70, 94, 0.14);
  color: #ff8a9a;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}
body.lg .legal a {
  color: #ff8a9a;
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 154, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
body.lg .legal a:hover {
  color: #ffb3bf;
  text-decoration-color: currentColor;
}
body.lg .legal code {
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: #f5f5f7;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
body.lg .legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 15px;
}
body.lg .legal th,
body.lg .legal td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #c9c9d0;
  text-align: left;
  vertical-align: top;
}
body.lg .legal th {
  color: #fff;
}

/* the closing card: questions → email */
body.lg .legal .lg-ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding: 18px 18px 18px 22px;
  border-radius: 20px;
  background: radial-gradient(420px 160px at 100% 0, rgba(240, 70, 94, 0.18), transparent 70%), #141416;
  box-shadow: inset 0 0 0 1px var(--line);
}
.lg-ask > div {
  display: grid;
  gap: 4px;
}
.lg-ask strong {
  color: #fff;
  font-size: 17px;
}
.lg-ask span {
  color: var(--muted);
  font-size: 14px;
}
body.lg .legal .lg-ask a.lg-btn {
  color: #fff;
  text-decoration: none;
}
body.lg .legal .lg-ask .lg-btn span {
  color: #fff;
  font-size: 15px;
}

/* ------------------------------------------------------------------ footer + back to top */
.lg-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  /* right padding keeps the links clear of the round back-to-top button */
  padding: 28px calc(clamp(16px, 3vw, 32px) + 62px) 40px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13.5px;
}
.lg-foot a {
  color: var(--muted) !important;
  text-decoration: none;
}
.lg-foot a:hover,
.lg-foot a[aria-current='page'] {
  color: #fff !important;
}
.lg-foot-links {
  display: inline-flex;
  gap: 18px;
}
.lg-totop {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 30;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 30px -14px rgba(0, 0, 0, 0.9);
  color: #fff !important;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
}
.lg-totop.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.lg-totop:hover {
  background: #e03b55;
}
.lg-totop svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@keyframes lg-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes lg-shine {
  0% {
    background-position: 130% 0;
  }
  60%,
  100% {
    background-position: -30% 0;
  }
}

@media (max-width: 1023px) {
  .lg-grid:has(.lg-toc:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  .lg-toc {
    display: none;
  }
}
@media (max-width: 600px) {
  .lg-top {
    padding: 10px 14px;
  }
  .lg-logo img {
    height: 24px;
  }
  .lg-chip {
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }
  .lg-btn-ghost {
    height: 38px;
    padding: 4px 4px 4px 4px;
  }
  .lg-btn-ghost > span:last-child {
    display: none; /* phone: just the round back arrow */
  }
  .lg-btn-ghost .lg-arr {
    width: 30px;
    height: 30px;
  }
  body.lg .lg-doc.legal {
    border-radius: 22px;
    padding: 22px 18px;
  }
  body.lg .legal p,
  body.lg .legal li {
    font-size: 16px;
  }
  body.lg .legal .lg-ask .lg-btn {
    width: 100%;
    justify-content: space-between;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lg-hero,
  body.lg .lg-hero h1,
  body.lg .lg-doc.legal {
    animation: none !important;
  }
}
@media print {
  html:has(body.lg),
  body.lg {
    background: #fff !important;
    color: #000;
  }
  .lg-top,
  .lg-toc,
  .lg-totop,
  .lg-ask {
    display: none !important;
  }
  body.lg .lg-hero h1 {
    color: #000;
    -webkit-text-fill-color: #000;
    background: none;
  }
  body.lg .lg-doc.legal {
    box-shadow: none;
    background: #fff;
    padding: 0;
  }
  body.lg .legal p,
  body.lg .legal li,
  body.lg .legal h2,
  body.lg .legal h3,
  body.lg .legal strong {
    color: #000;
  }
}

/* ------------------------------------------------------------------ light version (body.lg.lg-terang), ready for later:
   LEGAL_TEMA=terang turns it on for everyone, ?tema=terang previews one page. Same layout and buttons, light surfaces
   like the admin work area, the same red. */
html:has(body.lg-terang) {
  background: #f5f5f7;
  color-scheme: light;
}
body.lg.lg-terang {
  --line: rgba(17, 17, 24, 0.08);
  --line-2: rgba(17, 17, 24, 0.14);
  --text: #16161b;
  --muted: #5d5d66;
  --dim: #8a8a94;
  --chip: rgba(17, 17, 24, 0.04);
  background:
    radial-gradient(900px 520px at 85% -120px, rgba(240, 70, 94, 0.12), transparent 70%),
    radial-gradient(700px 480px at -10% 10%, rgba(240, 70, 94, 0.05), transparent 70%),
    #f5f5f7;
  color: var(--text);
}
.lg-terang .lg-top {
  background: rgba(245, 245, 247, 0.75);
}
.lg-terang .lg-btn-ghost {
  background: #fff;
  color: #16161b !important;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px -10px rgba(17, 17, 24, 0.3);
}
.lg-terang .lg-btn-ghost .lg-arr {
  background: #f1f1f4;
  box-shadow: inset 0 0 0 1px var(--line);
}
.lg-terang .lg-btn-ghost:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(240, 70, 94, 0.4), 0 10px 22px -12px rgba(240, 70, 94, 0.45);
}
.lg-terang .lg-kicker {
  background: rgba(240, 70, 94, 0.08);
  color: #c92a47;
}
body.lg.lg-terang .lg-hero h1 {
  background-image: linear-gradient(105deg, #16161b 0%, #16161b 38%, #4a4a55 45%, #c92a47 50%, #4a4a55 55%, #16161b 62%, #16161b 100%);
}
.lg-terang .lg-tag {
  background: #fff;
}
.lg-terang .lg-tag-note {
  color: #9a6400;
  background: rgba(245, 184, 61, 0.12);
}
.lg-terang .lg-toc a.is-on {
  color: #16161b !important;
  background: rgba(240, 70, 94, 0.08);
}
body.lg.lg-terang .lg-doc.legal {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(17, 17, 24, 0.25);
}
body.lg.lg-terang .legal .lede {
  color: #2a2a31;
}
body.lg.lg-terang .legal :is(h2, h3, strong, th) {
  color: #16161b;
}
body.lg.lg-terang .legal :is(p, li, td) {
  color: #3a3a42;
}
body.lg.lg-terang .legal a {
  color: #c92a47;
  text-decoration-color: rgba(201, 42, 71, 0.35);
}
body.lg.lg-terang .legal a:hover {
  color: #a51f39;
}
body.lg.lg-terang .legal code {
  background: #f4f4f6;
  color: #16161b;
}
body.lg.lg-terang .legal .lg-ask {
  background: radial-gradient(420px 160px at 100% 0, rgba(240, 70, 94, 0.1), transparent 70%), #fafafb;
}
.lg-terang .lg-ask strong {
  color: #16161b;
}
.lg-terang .lg-foot a:hover,
.lg-terang .lg-foot a[aria-current='page'] {
  color: #16161b !important;
}
.lg-terang .lg-totop {
  background: rgba(255, 255, 255, 0.9);
  color: #16161b !important;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 26px -14px rgba(17, 17, 24, 0.4);
}
.lg-terang .lg-totop:hover {
  color: #fff !important;
}

/* ------------------------------------------------------------------ 404 page (src/pages/404.astro, QA 45) */
.lg-404-main {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
}
.lg-404 .lg-hero {
  padding-bottom: clamp(48px, 9vw, 104px);
}
.lg-404-text {
  max-width: 560px;
  margin: 22px 0 0;
  color: #c9c9d0;
  font-size: 17px;
  line-height: 1.6;
}
.lg-404-path {
  margin: 12px 0 0;
}
.lg-404-path code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.lg-404-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.lg-404-actions .lg-btn-ghost {
  height: 46px;
  padding: 6px 20px 6px 6px;
  font-size: 15px;
}
.lg-404-actions .lg-btn-ghost .lg-arr {
  width: 34px;
  height: 34px;
}
@media (max-width: 600px) {
  .lg-404-actions .lg-btn-ghost > span:last-child {
    display: inline;
  }
}
