/* Palet diambil dari kontenmu.id (navy + toska) supaya sekolah mengenali ini bagian dari KontenMU.
   Toska digelapkan ke #0f766e: toska asli (#0d9488) cuma 3.7:1 di bawah teks putih, gagal WCAG AA. */
:root {
	--ink: #0f172a;
	--muted: #475569;
	--line: #d6dde6;
	--paper: #ffffff;
	--cream: #fbf7ef; /* latar hangat untuk bagian peran, biar nggak steril */
	--teal: #0f766e;
	--teal-soft: #e6f4f2;
	--sun: #f59e0b; /* aksen: hanya di nomor langkah */
	--radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 17px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
h1, h2, h3, .brand { font-family: "Space Grotesk", "Segoe UI", sans-serif; letter-spacing: -0.01em; }
a { color: var(--teal); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---- header ---- */
header.top { border-bottom: 1px solid var(--line); background: var(--paper); }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; }
.brand b { color: var(--teal); }
header.top nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
header.top nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
header.top nav a:hover { color: var(--ink); background: var(--teal-soft); }
header.top nav a[aria-current="page"] { color: var(--teal); background: var(--teal-soft); font-weight: 700; }

/* ---- tombol ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 16px; border: 0; cursor: pointer; font-family: inherit; }
.btn-main { background: var(--teal); color: #fff; }
.btn-main:hover { background: #115e59; }
.btn-line { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.btn-line:hover { border-color: var(--teal); }

/* ---- beranda: pembuka ---- */
.hero { padding-block: 48px 56px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; margin: 0 0 16px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 34em; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero figure { margin: 0; }
.hero figure img { border-radius: 20px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.hero figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---- langkah ---- */
.section-title { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 6px; }
.section-lead { color: var(--muted); margin: 0 0 28px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.step::before {
	content: counter(step);
	grid-row: 1 / span 3;
	width: 48px; height: 48px; border-radius: 50%;
	background: var(--sun); color: var(--ink);
	font: 700 22px/48px "Space Grotesk", sans-serif; text-align: center;
}
.step h3 { margin: 4px 0 6px; font-size: 21px; }
.step p { margin: 0; color: var(--muted); max-width: 36em; }
.step .shot { margin-top: 18px; width: 100%; max-width: 360px; border-radius: 14px; border: 1px solid var(--line); }
.step .shot-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 18px; }
.step .shot-row img { max-width: 200px; }
.step .btn { margin-top: 14px; }

/* ---- apa itu KontenMU ---- */
.about { padding-bottom: 24px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; }
.trio p { margin: 0; padding-top: 12px; border-top: 3px solid var(--teal); color: var(--muted); }
.trio b { display: block; color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 19px; }
.samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.samples figure { margin: 0; }
.samples img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.samples figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.samples figcaption b { color: var(--ink); }
h3.sub { font-size: 19px; margin: 32px 0 10px; }
.tbl { border-collapse: collapse; width: 100%; max-width: 640px; font-size: 16px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 14px; color: var(--muted); font-weight: 600; }
.tbl td:not(:first-child) { font-variant-numeric: tabular-nums; }

/* ---- biaya ---- */
.price { padding-top: 56px; }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.price-grid h3.sub { margin-top: 0; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; }
.checks li { padding: 6px 0 6px 28px; position: relative; }
.checks li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

.cek { margin-top: 36px; max-width: 640px; padding: 20px; border-radius: 16px; background: var(--cream); }
.cek h3.sub { margin-top: 0; }
.cek-out { margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--paper); }
.cek-out p { margin: 0 0 4px; }
.cek-name { font-weight: 700; font-size: 18px; }
.cek-price { font-family: "Space Grotesk", sans-serif; font-size: 30px; font-weight: 700; color: var(--teal); margin-top: 8px !important; }
.cek-price span { font-size: 16px; color: var(--muted); font-weight: 500; }
.cek-out .btn { margin-top: 12px; }

/* ---- footer ---- */
.foot p { margin: 4px 0; }

/* ---- halaman mengajar ---- */
.teach { padding: 28px 0; border-top: 1px solid var(--line); }
.teach:first-of-type { border-top: 0; padding-top: 0; }
.contrast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.contrast > div { border-radius: 14px; padding: 18px 20px; }
.contrast h3 { margin: 0 0 6px; font-size: 18px; }
.contrast p { margin: 0; }
.contrast .no { background: #f1f5f9; color: var(--muted); }
.contrast .yes { background: var(--teal-soft); }
.formula, .levels { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.formula { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.formula li { border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; }
.formula .tag { display: inline-block; font-size: 14px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.formula h3 { margin: 0 0 6px; font-size: 20px; }
.formula p { margin: 0; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.timeline .time { grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--teal); }
.timeline h3 { margin: 0; font-size: 18px; }
.timeline p { margin: 2px 0 0; color: var(--muted); }
.models { margin: 0; display: grid; gap: 12px; }
.models > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.models dt { font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.models dd { margin: 0; color: var(--muted); }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.levels li { counter-increment: n; padding: 14px; border-radius: 12px; background: var(--cream); }
.levels li::before { content: counter(n); display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--sun); color: var(--ink); font: 700 18px/36px "Space Grotesk", sans-serif; text-align: center; margin-bottom: 8px; }
.levels b { display: block; font-size: 18px; }
.levels span { color: var(--muted); font-size: 15px; }
.levels li:last-child { background: var(--teal-soft); }

/* ---- daftar Muhammadiyah ID ---- */
.muid { padding-top: 56px; }
.muid-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.muid-ways h3 { font-size: 19px; margin: 20px 0 4px; }
.muid-ways h3:first-child { margin-top: 0; }
.muid-ways p, .muid-ways ol { margin: 0; color: var(--muted); }
.muid-ways ol { padding-left: 20px; }
.muid-ways li { margin: 4px 0; }
.muid-ways .tip { margin-top: 20px; background: var(--teal-soft); border-radius: 10px; padding: 12px 14px; color: var(--ink); }
.muid-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muid-shots figure { margin: 0; }
.muid-shots img { width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.muid-shots figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }

/* ---- peran: admin & guru ---- */
.roles { background: var(--cream); margin-top: 56px; padding: 56px 0; }
.roles-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.role { background: var(--paper); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.role img { width: 100%; max-width: 280px; aspect-ratio: 4 / 3; object-fit: contain; margin: 0 auto 4px; }
.role h3 { margin: 0; font-size: 22px; }
.role p { margin: 0; color: var(--muted); }
.role ul { margin: 0; padding-left: 20px; color: var(--muted); }

/* ---- video ---- */
.video-block { padding-block: 56px 72px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: center; }
.video { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

footer.bottom { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 15px; }

/* ---- halaman biasa (FAQ, Surat Tugas) ---- */
main.page { padding-block: 40px 72px; }
.page-head h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0 0 24px; max-width: 40em; }
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.page-head img { width: 180px; }

/* ---- FAQ ---- */
.faq-search { max-width: 640px; }
.faq-list { max-width: 760px; margin-top: 20px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 24px; }
.faq-list summary::after { content: "+"; color: var(--teal); font-size: 24px; line-height: 1; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0 0 18px; color: var(--muted); white-space: pre-line; }
.state { color: var(--muted); padding: 20px 0; }

/* ---- form ---- */
label, .label { display: block; font-size: 15px; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=file] {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--paper); color: var(--ink);
}
input:focus { border-color: var(--teal); }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.lock { background: var(--teal-soft); border-radius: 10px; padding: 12px; font-size: 15px; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 28px 0 0; }
legend { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 19px; padding: 0; }

/* ---- surat tugas: form kiri, pratinjau kanan ---- */
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.st-preview { position: sticky; top: 16px; }
.st-preview h2 { font-size: 18px; margin: 0 0 10px; }
.st-actions { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---- surat ---- */
.letter { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 36px 40px; font-family: "Times New Roman", Times, serif; font-size: 14px; line-height: 1.5; color: #000; overflow-x: auto; }
.letter .kop { text-align: center; border-bottom: 3px double #000; padding-bottom: 8px; margin-bottom: 18px; }
.letter .kop img { max-width: 100%; max-height: 130px; display: inline-block; }
.letter .kop .n { font-size: 20px; font-weight: bold; }
.letter h2 { text-align: center; text-decoration: underline; font-size: 17px; margin: 0; font-family: inherit; }
.letter .no { text-align: center; margin: 0 0 18px; }
.letter table { border-collapse: collapse; margin: 6px 0 12px 8px; }
.letter td { padding: 1px 6px 1px 0; vertical-align: top; }
.letter .ttd { margin-top: 34px; margin-left: 50%; text-align: center; }
.letter .ttd img { max-height: 80px; max-width: 180px; display: block; margin: 4px auto; }
.letter .ttd .space { height: 80px; }
.letter .ttd .nm { font-weight: bold; text-decoration: underline; }
.ph { color: #64748b; }

/* ---- HP ---- */
@media (max-width: 820px) {
	.hero, .video-block, .st-layout, .roles-grid, .muid-grid, .price-grid, .contrast, .formula, .trio, .samples { grid-template-columns: 1fr; }
	.levels { grid-template-columns: 1fr 1fr; }
	.models > div { grid-template-columns: 1fr; gap: 2px; }
	.timeline li { grid-template-columns: 1fr; }
	.timeline .time { grid-row: auto; }
	.hero { padding-top: 28px; gap: 24px; }
	.st-preview { position: static; }
	.page-head { grid-template-columns: 1fr; }
	.page-head img { display: none; }
}
@media (max-width: 520px) {
	body { font-size: 16px; }
	.step { grid-template-columns: 44px minmax(0, 1fr); gap: 0 14px; }
	.step::before { width: 40px; height: 40px; font-size: 18px; line-height: 40px; }
	.letter { padding: 20px 16px; font-size: 13px; }
	.letter .ttd { margin-left: 30%; }
	header.top nav a { padding: 8px 10px; }
}

/* ---- PKS: pencarian sekolah ---- */
.pick-list { list-style: none; padding: 0; margin: 8px 0 0; max-height: 320px; overflow-y: auto; border-radius: 10px; }
.pick-list button { width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; font: inherit; color: var(--ink); min-height: 44px; }
.pick-list button:hover { border-color: var(--teal); }
.pick-list span { display: block; font-size: 14px; color: var(--muted); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#isian:disabled { opacity: 0.55; }

/* ---- PKS: dokumen ---- */
.letter.pks { font-size: 13px; line-height: 1.55; }
.letter.pks p { margin: 6px 0; text-align: justify; }
.letter.pks .center { text-align: center; }
.letter.pks .center p { text-align: center; }
.letter.pks .b { font-weight: bold; margin-bottom: 14px; }
.letter.pks table.kv { margin: 6px 0; }
.letter.pks table.kv td:first-child { white-space: nowrap; }
.letter.pks table.grid { border-collapse: collapse; width: 100%; margin: 8px 0 10px; }
.letter.pks table.grid th, .letter.pks table.grid td { border: 1px solid #000; padding: 4px 6px; text-align: left; vertical-align: top; }
.letter.pks ol.alpha { list-style: lower-alpha; margin: 4px 0 8px; padding-left: 28px; }
.letter.pks ol.alpha li { margin: 3px 0; text-align: justify; }
.letter.pks h3.pasal { text-align: center; font-size: inherit; margin: 16px 0 6px; font-family: inherit; break-after: avoid; }
.letter.pks .ttd2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; text-align: center; break-inside: avoid; }
.letter.pks .ttd2 p { text-align: center; }
.letter.pks .sign { height: 72px; }
/* Kolom tanda tangan Pihak Kedua: area kosong ~3x3 cm untuk e-meterai di kiri, tanda tangan + cap di kanan. */
/* Jarak 5 mm: e-meterai tidak boleh tertimpa tanda tangan atau cap (QR-nya harus tetap terbaca). */
.letter.pks .sign2 { height: auto; display: flex; align-items: center; justify-content: center; gap: 0.5cm; min-height: 3cm; }
.letter.pks .emeterai { width: 3cm; height: 3cm; flex: 0 0 3cm; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px dashed #94a3b8; color: #64748b; font: 10px/1.3 Arial, sans-serif; }
.letter.pks .ttdcap { position: relative; width: 4cm; height: 3cm; }
.letter.pks .ttdcap img { position: absolute; max-width: 100%; max-height: 100%; }
/* Cap menumpuk di ujung kiri tanda tangan, seperti surat bercap biasa. */
.letter.pks .ttdcap .cap { left: 0; top: 50%; transform: translateY(-50%); max-width: 2.6cm; max-height: 2.6cm; opacity: 0.85; }
.letter.pks .ttdcap .ttdimg { left: 0.9cm; top: 50%; transform: translateY(-50%); max-width: 3cm; max-height: 2cm; }
.howto { margin: 0 0 24px; padding-left: 22px; color: var(--muted); }
.howto li { margin: 4px 0; }
.letter.pks .lampiran { margin-top: 28px; }

@page { size: A4; margin: 20mm 22mm; }
@media print {
	.letter.pks { font-size: 12px; }
	.letter.pks .lampiran { break-before: page; }
	.letter.pks .emeterai { border: 0; color: transparent; }
	header.top, .noprint, footer.bottom { display: none !important; }
	main.page { padding: 0; }
	.wrap { max-width: none; padding: 0; }
	.st-layout { display: block; }
	.letter { border: 0; padding: 0; font-size: 15px; overflow: visible; }
	.ph { color: #000; }
}

/* Layar lebar: screenshot langkah di kanan teks, biar halamannya nggak memanjang. */
@media (min-width: 821px) {
	.step { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 300px); }
	.step > * { grid-column: 2; }
	.step:not(:has(.shot)) > * { grid-column: 2 / 4; }
	.step .shot { grid-column: 3; grid-row: 1 / span 3; margin-top: 0; width: 100%; }
}
