/* ============================================================
   INSOMDREAMS — Akademi Farmasi
   Design: Swiss modular grid / technical-brutalist.
   Hairline rules, exposed grid, one hot accent, mono utility type.
   ============================================================ */

:root {
  /* ground + paper */
  --ground:      #E8E8E4;
  --paper:       #F2F2EF;
  --paper-2:     #FBFBF9;
  --sunken:      #DEDEDA;

  /* ink */
  --ink:         #16160F;
  --ink-2:       #4A4A42;
  --ink-3:       #7C7C72;
  --ink-4:       #A6A69C;

  /* rules */
  --rule:        #D0D0C9;
  --rule-strong: #B4B4AC;

  /* the one hot accent */
  --hot:         #FF5A1F;
  --hot-ink:     #1A0A03;
  --hot-soft:    rgba(255, 90, 31, 0.10);
  --hot-line:    rgba(255, 90, 31, 0.38);

  /* semantic — separate from the accent */
  --ok:          #0B6B4F;
  --ok-soft:     rgba(11, 107, 79, 0.11);
  --warn:        #8A5A00;
  --warn-soft:   rgba(138, 90, 0, 0.12);
  --bad:         #A3231C;
  --bad-soft:    rgba(163, 35, 28, 0.11);
  --info:        #1F4F8F;
  --info-soft:   rgba(31, 79, 143, 0.11);

  --shadow:      0 1px 0 rgba(22,22,15,.04);

  /* type */
  --f-display: "Michroma", "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --f-head:    "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-body:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --cell: 1px;
  --gut: 20px;
  --rad: 3px;
  --topbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #121210;
    --paper:       #1A1A17;
    --paper-2:     #212120;
    --sunken:      #0C0C0B;
    --ink:         #EFEFE9;
    --ink-2:       #B6B6AD;
    --ink-3:       #83837A;
    --ink-4:       #5E5E56;
    --rule:        #2C2C28;
    --rule-strong: #43433D;
    --hot:         #FF6A33;
    --hot-ink:     #1A0A03;
    --hot-soft:    rgba(255, 106, 51, 0.13);
    --hot-line:    rgba(255, 106, 51, 0.42);
    --ok:          #3FBE93;
    --ok-soft:     rgba(63, 190, 147, 0.13);
    --warn:        #E0A63C;
    --warn-soft:   rgba(224, 166, 60, 0.14);
    --bad:         #F0685E;
    --bad-soft:    rgba(240, 104, 94, 0.13);
    --info:        #6FA8F0;
    --info-soft:   rgba(111, 168, 240, 0.13);
    --shadow:      0 1px 0 rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  --ground:      #121210;
  --paper:       #1A1A17;
  --paper-2:     #212120;
  --sunken:      #0C0C0B;
  --ink:         #EFEFE9;
  --ink-2:       #B6B6AD;
  --ink-3:       #83837A;
  --ink-4:       #5E5E56;
  --rule:        #2C2C28;
  --rule-strong: #43433D;
  --hot:         #FF6A33;
  --hot-ink:     #1A0A03;
  --hot-soft:    rgba(255, 106, 51, 0.13);
  --hot-line:    rgba(255, 106, 51, 0.42);
  --ok:          #3FBE93;
  --ok-soft:     rgba(63, 190, 147, 0.13);
  --warn:        #E0A63C;
  --warn-soft:   rgba(224, 166, 60, 0.14);
  --bad:         #F0685E;
  --bad-soft:    rgba(240, 104, 94, 0.13);
  --info:        #6FA8F0;
  --info-soft:   rgba(111, 168, 240, 0.13);
  --shadow:      0 1px 0 rgba(0,0,0,.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- the exposed grid: fixed hairline field behind everything ---- */
#gridfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 25vw 180px;
  background-position: -1px -1px;
  opacity: .55;
}
#app { position: relative; z-index: 1; }

/* ---------------- typography ---------------- */
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(30px, 5.4vw, 60px); line-height: 1.02; }
h2 { font-size: clamp(22px, 3vw, 34px); line-height: 1.1; }
h3 { font-size: clamp(17px, 2vw, 21px); line-height: 1.2; }
h4 { font-size: 15px; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
.prose a, table.data a, .kv a {
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 2px;
}
.prose a:hover, table.data a:hover, .kv a:hover { text-decoration-color: var(--hot); }

.mono { font-family: var(--f-mono); }
/* Angka besar memakai Chakra Petch, bukan Michroma: nol pada Michroma
   berbentuk persegi membulat dan terbaca seperti kotak kosong. */
.figure {
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
}
.figure.lg { font-size: clamp(28px, 4vw, 40px); }
.figure.xl { font-size: clamp(40px, 8vw, 68px); }
.figure sub { font-size: .52em; color: var(--ink-4); vertical-align: baseline; font-weight: 600; }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--hot);
  flex: none;
}
.eyebrow.plain::before { display: none; }
.lede { font-size: clamp(15px, 1.6vw, 17.5px); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; font-family: var(--f-mono); }

/* ---------------- layout primitives ---------------- */
.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding-inline: var(--gut); }
.bleed-rule { border-top: 1px solid var(--rule); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.wrapf { flex-wrap: wrap; }

/* crosshair corner marks — structural, marks a grid intersection */
.xmark { position: absolute; width: 11px; height: 11px; pointer-events: none; opacity: .75; }
.xmark::before, .xmark::after { content: ""; position: absolute; background: var(--rule-strong); }
.xmark::before { left: 5px; top: 0; width: 1px; height: 11px; }
.xmark::after { top: 5px; left: 0; height: 1px; width: 11px; }

/* ---------------- top bar ---------------- */
#topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
}
.topbar-in { display: flex; align-items: stretch; height: var(--topbar-h); max-width: 1400px; margin: 0 auto; }
.brandcell {
  display: flex; align-items: center; gap: 10px;
  padding-inline: var(--gut);
  border-right: 1px solid var(--rule);
  flex: none;
  cursor: pointer;
  background: none; border-top: 0; border-bottom: 0; border-left: 0;
  color: inherit;
  font: inherit;
}
.brandcell:hover .logomark { transform: rotate(-8deg) scale(1.06); }
.logomark { width: 30px; height: 30px; flex: none; transition: transform .35s cubic-bezier(.2,.9,.25,1); }
.wordmark {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .01em;
  line-height: 1;
  text-align: left;
}
.wordmark small {
  display: block;
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .22em;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 500;
}
#navmain {
  display: flex; align-items: stretch; flex: 1 1 auto;
  overflow-x: auto; scrollbar-width: none;
  /* tepi kanan memudar sebagai isyarat masih ada menu yang tergulir */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
}
#navmain::-webkit-scrollbar { display: none; }
@media (max-width: 1120px) { .navlink { padding: 0 11px; font-size: 11px; } }
.navlink {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: none; border: 0;
  padding: 0 15px;
  display: inline-flex; align-items: center;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color .18s;
}
.navlink::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 0;
  height: 2px; background: var(--hot);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.9,.25,1);
}
.navlink:hover { color: var(--ink); }
.navlink:hover::after, .navlink[aria-current="page"]::after { transform: scaleX(1); }
.navlink[aria-current="page"] { color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 8px; padding-inline: 12px var(--gut); border-left: 1px solid var(--rule); flex: none; }

/* ---------------- buttons ---------------- */
.btn {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 11px 18px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--rad);
  transition: background .18s, color .18s, border-color .18s, transform .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  line-height: 1;
  text-decoration: none;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.hot { background: var(--hot); border-color: var(--hot); color: #fff; border-radius: 7px; }
.btn.hot:hover { background: color-mix(in srgb, var(--hot) 86%, #000); border-color: color-mix(in srgb, var(--hot) 86%, #000); }
.btn.solid { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn.solid:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.sm { padding: 7px 12px; font-size: 10.5px; }
.btn.tiny { padding: 5px 9px; font-size: 10px; letter-spacing: .06em; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }

.iconbtn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink-2);
  cursor: pointer; border-radius: var(--rad); transition: color .18s, border-color .18s;
  flex: none;
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink); }

:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }

/* ---------------- panels ---------------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  position: relative;
}
.panel-pad { padding: 20px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

/* chip */
.chip {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  border-radius: 2px;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.35;
}
.chip.hot   { color: var(--hot); border-color: var(--hot-line); background: var(--hot-soft); }
.chip.ok    { color: var(--ok);  border-color: color-mix(in srgb, var(--ok) 42%, transparent); background: var(--ok-soft); }
.chip.warn  { color: var(--warn);border-color: color-mix(in srgb, var(--warn) 42%, transparent); background: var(--warn-soft); }
.chip.bad   { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 42%, transparent); background: var(--bad-soft); }
.chip.info  { color: var(--info);border-color: color-mix(in srgb, var(--info) 42%, transparent); background: var(--info-soft); }
.chip.solid { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ---------------- forms ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
}
.input, .select, .textarea {
  font-family: var(--f-body);
  font-size: 14px;
  padding: 11px 13px;
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: var(--rad);
  width: 100%;
  transition: border-color .18s, background .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--hot); outline: none; background: var(--paper-2); }
.input::placeholder { color: var(--ink-4); }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.textarea { min-height: 90px; resize: vertical; font-family: var(--f-body); }
.hint { font-size: 11.5px; color: var(--ink-3); font-family: var(--f-mono); }
.err { font-size: 11.5px; color: var(--bad); font-family: var(--f-mono); }

/* ---------------- progress ---------------- */
.bar { height: 5px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--hot); border-radius: 99px; transition: width .7s cubic-bezier(.2,.9,.25,1); }
.bar.ok > i { background: var(--ok); }

/* ---------------- motion ---------------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sweepIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes popIn { from { opacity:0; transform: scale(.96); } to { opacity:1; transform:none; } }
@keyframes pulseDot { 0%,100% { opacity:1; } 50% { opacity:.25; } }
@keyframes spin { to { transform: rotate(360deg); } }

.anim-rise { animation: riseIn .6s cubic-bezier(.2,.9,.25,1) backwards; }
.anim-fade { animation: fadeIn .5s ease backwards; }
.anim-sweep { animation: sweepIn .8s cubic-bezier(.2,.9,.25,1) backwards; }
.anim-pop { animation: popIn .34s cubic-bezier(.2,.9,.25,1) backwards; }
.d1{animation-delay:.05s}.d2{animation-delay:.11s}.d3{animation-delay:.17s}.d4{animation-delay:.23s}
.d5{animation-delay:.29s}.d6{animation-delay:.35s}.d7{animation-delay:.41s}.d8{animation-delay:.47s}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- hero ---------------- */
.hero { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero-top { border-bottom: 1px solid var(--rule); padding-block: 26px 22px; position: relative; }
.hero-display {
  font-family: var(--f-display);
  font-size: clamp(38px, 11.2vw, 168px);
  line-height: .86;
  letter-spacing: -0.035em;
  margin: 0;
  white-space: nowrap;
  color: var(--ink);
}
.hero-display .lite { color: var(--ink-4); }
.hero-marquee { overflow: hidden; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }
.hero-sub { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.hero-left { padding: 30px var(--gut) 34px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 20px; justify-content: space-between; }
.hero-right { position: relative; min-height: 340px; overflow: hidden; }
/* animasi latar pada hero mengisi selnya, tanpa kendali dan tanpa bingkai */
.hero-right .player { position: absolute; inset: 0; border: 0; background: transparent; }
.hero-right .stage { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; background: transparent; }
.hero-right .controls, .hero-right .caption { display: none; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.statstrip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.statstrip > div { padding: 16px var(--gut); border-right: 1px solid var(--rule); }
.statstrip > div:last-child { border-right: 0; }
.statstrip b { font-family: var(--f-head); font-size: clamp(22px, 2.6vw, 30px); display: block; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.statstrip span { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }

/* section frame */
.section { border-bottom: 1px solid var(--rule); position: relative; }
.section-head { padding: 34px var(--gut) 20px; display: flex; flex-direction: column; gap: 12px; }

/* card grid with shared hairlines */
.cardgrid { display: grid; border-top: 1px solid var(--rule); }
.cardgrid > * { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 22px var(--gut); background: transparent; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.feat { display: flex; flex-direction: column; gap: 10px; transition: background .25s; position: relative; }
.feat:hover { background: var(--paper); }
.feat .idx { font-family: var(--f-mono); font-size: 10px; color: var(--hot); letter-spacing: .1em; }
.feat h3 { font-size: 17px; }
.feat p { font-size: 13.5px; color: var(--ink-2); margin: 0; }

/* ---------------- app shell (post-login) ---------------- */
.appmain { padding-block: 26px 90px; }
.pagehead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.pagehead .between { align-items: flex-end; }

.tabbar { display: flex; gap: 0; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  padding: 11px 15px; background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-3); cursor: pointer; white-space: nowrap; transition: color .18s, border-color .18s;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--hot); }

/* data table */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--paper); }
table.data { border-collapse: collapse; width: 100%; min-width: 620px; }
table.data th {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule-strong);
  font-weight: 500; white-space: nowrap; background: var(--paper);
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--rule); font-size: 13.5px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: var(--paper-2); }

/* ---------------- animation player ---------------- */
.player { border: 1px solid var(--rule); background: var(--sunken); position: relative; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 10; max-width: 100%; background: var(--paper-2); overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.caption {
  padding: 13px 16px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
  min-height: 74px;
}
.caption b { color: var(--hot); font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 3px; font-weight: 500; }
.controls { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--rule); background: var(--paper); }
.scrub { flex: 1 1 auto; height: 22px; position: relative; cursor: pointer; display: flex; align-items: center; min-width: 60px; }
.scrub .track { height: 3px; width: 100%; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.scrub .fill { height: 100%; background: var(--hot); width: 0; }
.scrub .marks { position: absolute; inset: 0; pointer-events: none; }
.scrub .marks i { position: absolute; top: 50%; width: 1px; height: 9px; background: var(--rule-strong); transform: translateY(-50%); }
.tcode { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }

/* ---------------- lesson reading ---------------- */
.prose { max-width: 66ch; }
.prose h3 { margin: 28px 0 8px; }
.prose p { font-size: 15px; line-height: 1.72; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 1em; color: var(--ink-2); }
.prose li { margin-bottom: 6px; line-height: 1.65; }
.prose strong { color: var(--ink); font-weight: 600; }
.callout { border-left: 3px solid var(--hot); background: var(--hot-soft); padding: 13px 16px; margin: 18px 0; font-size: 13.5px; }
.callout .eyebrow { margin-bottom: 5px; }

/* keyvalue */
.kv { display: grid; grid-template-columns: 148px minmax(0,1fr); gap: 0; border-top: 1px solid var(--rule); }
.kv > dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.kv > dd { margin: 0; padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid var(--rule); color: var(--ink-2); }

/* toast */
#toaster { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 32px)); }
.toast {
  background: var(--ink); color: var(--ground);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .03em;
  padding: 11px 16px; border-radius: var(--rad);
  animation: popIn .3s cubic-bezier(.2,.9,.25,1);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  max-width: 100%;
}
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok  { background: var(--ok); color: #fff; }

/* modal */
.scrim {
  position: fixed; inset: 0; z-index: 150; background: rgba(10,10,8,.5);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn .2s ease;
}
.modal { background: var(--paper); border: 1px solid var(--rule-strong); width: min(560px, 100%); max-height: 88vh; overflow: auto; animation: popIn .28s cubic-bezier(.2,.9,.25,1); }

/* loader */
.spinner { width: 15px; height: 15px; border: 2px solid var(--rule-strong); border-top-color: var(--hot); border-radius: 50%; animation: spin .7s linear infinite; }

/* quiz */
.opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 13px 15px; border: 1px solid var(--rule-strong); background: var(--paper-2);
  cursor: pointer; font-family: var(--f-body); font-size: 14px; color: var(--ink);
  border-radius: var(--rad); transition: border-color .18s, background .18s;
  line-height: 1.5;
}
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt .k { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); flex: none; margin-top: 2px; width: 16px; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .k { color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .k { color: var(--bad); }
.opt:disabled { cursor: default; }

/* empty */
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); font-family: var(--f-mono); font-size: 12px; }

/* auth split */
.authwrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100vh - var(--topbar-h) - 2px); }
.authside { border-right: 1px solid var(--rule); padding: 42px var(--gut); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.authform { padding: 42px var(--gut); display: flex; flex-direction: column; justify-content: center; }

/* certificate */
.cert { border: 2px solid var(--ink); padding: 30px; background: var(--paper-2); text-align: center; position: relative; }
.cert::after { content: ""; position: absolute; inset: 7px; border: 1px solid var(--rule-strong); pointer-events: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .statstrip { grid-template-columns: repeat(2, 1fr); }
  .statstrip > div:nth-child(2n) { border-right: 0; }
  .statstrip > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 860px) {
  :root { --gut: 16px; }
  .hero-body { grid-template-columns: 1fr; }
  .hero-left { border-right: 0; border-bottom: 1px solid var(--rule); }
  .hero-right { min-height: 260px; }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .authwrap { grid-template-columns: 1fr; min-height: 0; }
  .authside { border-right: 0; border-bottom: 1px solid var(--rule); padding-block: 30px; }
  .authform { padding-block: 30px; }
  .kv { grid-template-columns: 1fr; }
  .kv > dt { border-bottom: 0; padding-bottom: 2px; }
  .kv > dd { padding-top: 0; }
}
@media (max-width: 620px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .cardgrid > * { border-right: 0; }
  #gridfield { background-size: 50vw 150px; }
  /* kendali akun tetap terjangkau di layar sempit — hanya namanya yang disembunyikan */
  .topbar-right { padding-inline: 10px 14px; gap: 6px; }
  .topbar-right .btn { padding: 9px 11px; }
  .topbar-right .btn .lbl { display: none; }
}

/* utility spacing */
.gap4{gap:4px}.gap6{gap:6px}.gap8{gap:8px}.gap10{gap:10px}.gap12{gap:12px}.gap14{gap:14px}
.gap16{gap:16px}.gap20{gap:20px}.gap24{gap:24px}.gap28{gap:28px}.gap32{gap:32px}
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}.mt32{margin-top:32px}
.mb0{margin-bottom:0}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.mb20{margin-bottom:20px}.mb24{margin-bottom:24px}
.fs11{font-size:11px}.fs12{font-size:12px}.fs13{font-size:13px}.fs14{font-size:14px}
.tr{text-align:right}.tc{text-align:center}
.nowrap{white-space:nowrap}
.hidden{display:none !important}

/* ---------------- animasi sebaris pada materi ---------------- */
.animfig { margin: 24px 0 28px; width: min(820px, calc(100vw - 2 * var(--gut))); max-width: none; }
.animfig figcaption { margin-bottom: 8px; flex-wrap: wrap; }
.animfig .caption { min-height: 64px; font-size: 13px; }

/* ---------------- konten terkunci ---------------- */
.kunci {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--hot-line); background: var(--hot-soft);
  padding: 20px 22px; position: relative;
}
.kunci-sm { padding: 14px 16px; }
.kunci-ikon {
  width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hot-line); color: var(--hot); background: var(--paper-2); border-radius: var(--rad);
}
.kunci-ikon svg { width: 18px; height: 18px; }
.pratinjau-kabur { position: relative; max-height: 220px; overflow: hidden; }
.pratinjau-kabur::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 10%, var(--ground) 92%);
}
.lockmark { display: inline-flex; vertical-align: -1px; color: var(--ink-4); margin-left: 6px; }
.feat.terkunci { opacity: .72; }
.feat.terkunci:hover { opacity: 1; }

/* ---------------- paket harga ---------------- */
.plans > .plan { display: flex; flex-direction: column; gap: 12px; padding-block: 26px; }
.plan .idx { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); }
.plan-harga {
  font-family: var(--f-mono); font-weight: 600; letter-spacing: -.03em;
  font-size: clamp(28px, 3.2vw, 38px); line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums;
}
.plan-fitur { list-style: none; padding: 0; margin: 6px 0 8px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-fitur li { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.plan-fitur li svg { flex: none; margin-top: 3px; color: var(--ok); }
.plan-unggul { background: var(--paper); box-shadow: inset 0 3px 0 var(--hot); }
.plan-unggul .plan-harga { color: var(--hot); }

.pasar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 128px; gap: 16px; align-items: center; }
.pasar-nama { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pasar-bar { height: 10px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.pasar-bar i { display: block; height: 100%; background: var(--ink-4); border-radius: 99px; }
.pasar-harga { text-align: right; font-size: 13.5px; font-weight: 600; }
.pasar-kita .pasar-bar i { background: var(--hot); }
.pasar-kita .pasar-harga, .pasar-kita b { color: var(--hot); }

.total-bayar { border: 1px solid var(--hot-line); background: var(--hot-soft); padding: 16px 18px; }
.qris { width: 220px; max-width: 100%; border: 1px solid var(--rule-strong); background: #fff; padding: 8px; display: block; }

@media (max-width: 620px) {
  .pasar { grid-template-columns: 1fr auto; }
  .pasar-bar { grid-column: 1 / -1; order: 3; }
}
