/* PPDB Pesantren Al-Hikmah — arah visual "Arsip Akademik":
   kertas hijau pucat, kartu putih seperti lembar arsip, pita di pojok kartu,
   stempel bulat garis ganda miring 8°, stepper vertikal yang lengket di desktop.
   Tanpa gradien, tanpa blob, tanpa bayangan blur besar. */

:root {
  --bg: #EFF3EC;
  --paper: #FFFFFF;
  --paper-2: #F7F9F3;
  --ink: #17301F;
  --ink-soft: #48604F;
  --line: #D3DDCB;
  --line-strong: #B9C6AF;
  --accent: #1E5B41;
  --accent-deep: #14402E;
  --accent-soft: #E2EBDF;
  --gold: #B98A2F;
  --gold-ink: #7A5A16;
  --gold-soft: #F1E7CF;
  --warn: #A3221A;
  --warn-bg: #FBEDEB;
  --radius: 2px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .step-name, .brand, .fact-num, .btn, .cost-code {
  font-family: "Sora", system-ui, sans-serif;
}

.num { font-variant-numeric: tabular-nums; }

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Kepala halaman */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.demo-badge { color: var(--accent); font-weight: 600; flex: 0 0 auto; }

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.top-note {
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  letter-spacing: .02em;
}

.top-wa {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* Kerangka dua kolom */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(316px, 366px);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 44px) clamp(16px, 4vw, 44px) 64px;
}

.col-main {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 2.6vw, 32px);
  min-width: 0;
}

/* Narasi */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "kicker stamp"
    "title  stamp"
    "lede   stamp"
    "facts  facts";
  column-gap: 26px;
  align-items: start;
}

.kicker {
  grid-area: kicker;
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  grid-area: title;
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
}

h1 em {
  font-style: normal;
  color: var(--accent);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 1px;
}

.lede {
  grid-area: lede;
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 54ch;
}

.facts {
  grid-area: facts;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.facts li {
  background: var(--paper);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-top: 3px solid var(--accent);
}

.fact-num {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.fact-label { font-size: 11.5px; color: var(--ink-soft); line-height: 1.35; }

/* Stempel arsip */
.stamp {
  grid-area: stamp;
  position: relative;
  width: 118px;
  height: 118px;
  margin-top: 4px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  color: var(--gold-ink);
  background: transparent;
  flex: 0 0 auto;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.stamp-inner {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
}

.stamp-year { font-weight: 500; letter-spacing: .06em; }

/* Kartu formulir */
.form-card {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.6vw, 30px);
  box-shadow: 0 1px 0 var(--line);
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  pointer-events: none;
}

.ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-soft);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.ribbon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 124px;
  height: 1px;
  background: var(--gold);
  transform-origin: 0 0;
  transform: rotate(45deg);
}

.ribbon span {
  position: absolute;
  top: 13px;
  right: 9px;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--gold-ink);
}

.form-head { position: relative; padding-right: 96px; }

.form-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.form-head p { margin: 0 0 22px; font-size: 13px; color: var(--ink-soft); }

.form { display: flex; flex-direction: column; gap: 18px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Field */
.fld-label { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--ink); }

.fld-req { color: var(--warn); }

.fld-input {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  min-height: 46px;
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.fld-input:hover { border-color: var(--accent); }

.fld-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fld-input:focus { border-color: var(--accent); }

select.fld-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E5B41' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: right 13px center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.fld-hint { font-size: 12px; color: var(--ink-soft); line-height: 1.45; }

.fld-error { color: var(--warn); }

.fld.is-error .fld-input { border-color: var(--warn); background: var(--warn-bg); }

/* Checkbox jadi kartu kecil */
.extras {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  margin: 0;
  padding: 12px 14px 14px;
  display: grid;
  gap: 9px;
  background: var(--paper-2);
}

.extras legend {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0 6px;
}

.opt-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.opt-check:hover { border-color: var(--accent); }

.opt-check:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.opt-check input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.opt-check input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  min-height: 50px;
  padding: 13px 20px;
  width: 100%;
  transition: background .15s ease, transform .1s ease;
}

.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px); }

.form-note {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.alert {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
  color: #7A1810;
  font-size: 13.5px;
}

/* Kolom kanan */
.rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.rail-title {
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Stepper vertikal */
.steps {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.step-list li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 16px;
}

.step-list li:last-child { padding-bottom: 0; }

.step-list li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 26px;
  bottom: 2px;
  width: 1px;
  background: var(--line-strong);
}

.step-list li:last-child::before { display: none; }

.step-num {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step-list li.is-now .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.step-name { margin: 3px 0 2px; font-size: 13.5px; font-weight: 600; }

.step-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-soft); }

/* Lembar biaya */
.cost {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  overflow: hidden;
}

.cost-empty { border-top-color: var(--line-strong); }

.cost-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 0;
}

.cost-label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cost-code {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--accent);
}

.cost-headline {
  margin: 10px 0 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.cost-meta {
  margin: 0 0 14px;
  padding: 0 0 12px;
  display: grid;
  gap: 7px;
  border-bottom: 1px dashed var(--line-strong);
}

.cost-meta > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.cost-meta dt {
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-soft);
}

.cost-meta dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  overflow-wrap: break-word;
}

.cost-lines {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
}

.cost-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dotted var(--line-strong);
}

.line-label { font-size: 13px; line-height: 1.4; }

.line-note {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.line-amt {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.line-amt.is-discount { color: var(--accent); }

.cost-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.cost-total span { font-size: 11.5px; color: var(--ink-soft); max-width: 52%; }

.cost-total strong {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost-msg {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cost-again {
  display: inline-block;
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.cost-preview {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--line-strong);
  display: grid;
  gap: 7px;
}

.cost-preview li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.cost-preview .num { color: var(--ink); font-weight: 500; }

/* Riwayat */
.recent { padding: 4px 2px 0; }

.recent ul { list-style: none; margin: 0; padding: 0; display: grid; }

.recent li {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.recent li:first-child { border-top: 1px solid var(--line); }

.recent-sum { font-size: 12.5px; line-height: 1.4; }

.recent-meta { font-size: 11.5px; color: var(--ink-soft); }

.recent-empty,
.recent-count { margin: 10px 0 0; font-size: 11.5px; color: var(--ink-soft); }

/* Kaki */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 18px clamp(16px, 4vw, 44px);
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

.foot p { margin: 0; }

.foot-credit { color: var(--ink); font-weight: 600; }

/* Lengket hanya bila layar cukup tinggi, supaya riwayat tidak terpotong. */
@media (min-width: 1001px) and (min-height: 880px) {
  .rail { position: sticky; top: 20px; }
}

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { max-width: none; }
  .cost, .steps { max-width: 560px; }
}

@media (max-width: 760px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "kicker"
      "title"
      "lede"
      "stamp"
      "facts";
  }
  .stamp {
    justify-self: start;
    width: 98px;
    height: 98px;
    margin: 0 0 22px;
  }
  .stamp-inner { font-size: 9px; }
  .top-note { display: none; }
  .top-right { font-size: 12px; }
  .form-head { padding-right: 0; }
  .form-head h2 { padding-right: 70px; }
  .cost, .steps { max-width: none; }
}

@media (max-width: 620px) {
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .brand {
    font-size: 13.5px;
    padding-left: 0;
    border-left: 0;
    width: 100%;
  }
  .top-left { flex-wrap: wrap; gap: 6px 12px; }
  h1 { font-size: 1.7rem; }
  .lede { font-size: 15px; }
  .facts li { padding: 10px 10px; }
  .fact-num { font-size: 21px; }
  .fact-label { font-size: 11px; }
  .cost-total strong { font-size: 21px; }
  .cost-meta > div { grid-template-columns: 76px minmax(0, 1fr); }
  .ribbon { width: 74px; height: 74px; }
  .ribbon::after { width: 105px; }
  .ribbon span { top: 11px; right: 6px; font-size: 8.5px; letter-spacing: .16em; }
  .form-card { padding: 16px 14px 20px; }
  .steps, .cost { padding: 15px 14px 17px; }
}
