/*
Theme Name: UKP Latihan
Description: Tema untuk situs simulasi ujian UKP. Dirancang bersama plugin Simulasi Ujian UKP: beranda menampilkan tingkat ujian, alur ujian, dan nilai terakhir peserta, sedangkan halaman ujian memakai tata letak lebar tanpa gangguan.
Version: 1.1.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: ukp-tema
*/

/* ------------------------------------------------------------ Token */
:root {
	--paper: #f6f7f9;
	--surface: #ffffff;
	--graphite: #23262d;
	--graphite-soft: #5a606b;
	--ink-red: #c8303a;
	--ink-red-soft: #f1d3d5;
	--navy: #1d3f72;
	--navy-dark: #142d52;
	--navy-wash: #e6edf7;
	--line: #dce0e6;
	--ok: #137333;
	--ok-wash: #e6f4ea;
	--bad-wash: #fce8e6;

	--font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--step--1: 0.875rem;
	--step-0: 1rem;
	--step-1: 1.25rem;
	--step-2: 1.563rem;
	--step-3: 2.441rem;
	--step-4: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem);

	--wrap: 1120px;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--graphite);
	font-family: var(--font);
	font-size: var(--step-0);
	line-height: 1.6;
	font-feature-settings: "tnum" 0;
	text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--graphite); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--surface); padding: 8px 14px; border-radius: var(--radius); }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------ Tombol */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 10px 22px;
	border: 1.5px solid var(--navy); border-radius: var(--radius);
	background: var(--navy); color: #fff;
	font: 600 var(--step-0)/1.2 var(--font); text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn--quiet { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--quiet:hover { background: var(--surface); color: var(--navy-dark); border-color: var(--navy); }
.btn--line { background: var(--surface); color: var(--navy); }
.btn--line:hover { background: var(--navy); color: #fff; }
.btn--small { min-height: 36px; padding: 6px 14px; font-size: var(--step--1); }
.text-link { font-weight: 600; }

/* ------------------------------------------------------------ Kepala */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--step-1); color: var(--graphite); text-decoration: none; letter-spacing: -.01em; }
.brand__mark {
	width: 22px; height: 22px; border-radius: 50%;
	border: 2px solid var(--ink-red);
	background: radial-gradient(circle at 50% 50%, var(--graphite) 0 6.5px, transparent 7px);
}
.custom-logo { max-height: 44px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav__list a { color: var(--graphite); text-decoration: none; font-weight: 600; }
.nav__list a:hover, .nav__list .current-menu-item > a { color: var(--navy); }
.account { display: flex; align-items: center; gap: 14px; font-size: var(--step--1); }
.account__name { color: var(--graphite-soft); }
.account__link { font-weight: 600; text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
	.nav-toggle {
		display: inline-flex; min-height: 40px; padding: 6px 14px;
		border: 1.5px solid var(--line); border-radius: var(--radius);
		background: var(--surface); font: 600 var(--step--1) var(--font); color: var(--graphite);
	}
	.nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 14px; padding: 6px 0 18px; }
	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; gap: 10px; }
}

/* ------------------------------------------------------------ Pembuka */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; max-width: 15ch; margin-bottom: .45em; }
.hero__text { font-size: var(--step-1); color: var(--graphite-soft); max-width: 34em; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 0; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.hero__facts div { padding: 16px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line); }
.hero__facts div:last-child { border-right: 0; margin-right: 0; }
.hero__facts dt { font-size: var(--step--1); color: var(--graphite-soft); }
.hero__facts dd { margin: 2px 0 0; font-weight: 700; font-size: var(--step-1); font-variant-numeric: tabular-nums; }

.hero__sheet { justify-self: center; width: 100%; max-width: 380px; }
.ljk { display: block; width: 100%; transform: rotate(2deg); filter: drop-shadow(0 18px 28px rgba(35, 38, 45, .16)); }
.ljk__sheet { fill: #fff; stroke: var(--ink-red); stroke-width: 1.5; }
.ljk__title { fill: var(--ink-red); font: 800 19px var(--font); }
.ljk__rule { stroke: var(--ink-red); stroke-width: 1; }
.ljk__head { fill: var(--ink-red); font: 700 13px var(--font); }
.ljk__num { fill: var(--ink-red); font: 700 14px var(--font); font-variant-numeric: tabular-nums; }
.ljk__bubble { fill: #fff; stroke: var(--ink-red); stroke-width: 1.3; }
.ljk__letter { fill: var(--ink-red); font: 600 10px var(--font); opacity: .75; }
.ljk__mark { fill: var(--graphite); opacity: .9; }

/* Satu momen gerak: arsiran pensil terisi berurutan saat halaman dibuka. */
@media (prefers-reduced-motion: no-preference) {
	.ljk__mark {
		transform-box: fill-box; transform-origin: center;
		animation: arsir .32s ease-out both;
		animation-delay: calc(400ms + var(--i) * 140ms);
	}
	@keyframes arsir {
		from { opacity: 0; transform: scale(.35) rotate(-8deg); }
		to { opacity: .9; transform: scale(1) rotate(-8deg); }
	}
}

@media (max-width: 860px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__sheet { max-width: 280px; }
	.hero__facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
	.hero__facts div { padding-right: 12px; margin-right: 12px; }
	.hero__facts dd { font-size: var(--step-0); white-space: nowrap; }
}

/* ------------------------------------------------------------ Bagian */
.levels, .steps, .recent, .front-content { padding: clamp(40px, 6vw, 72px) 0; }
.levels { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: var(--step-3); font-weight: 800; letter-spacing: -.02em; margin-bottom: .3em; }
.section-lead { color: var(--graphite-soft); max-width: 40em; margin-bottom: 28px; }

/* Tingkat ujian: baris seperti isian formulir */
.level-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink-red-soft); }
.level {
	display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 24px; align-items: center;
	padding: 26px 0; border-bottom: 1.5px solid var(--ink-red-soft);
}
.level__code {
	width: 56px; height: 56px; border-radius: 50%;
	display: grid; place-items: center;
	border: 2px solid var(--ink-red); color: var(--ink-red);
	font-weight: 800; font-size: 1.5rem;
}
.level__title { font-size: var(--step-1); font-weight: 700; margin-bottom: .25em; }
.level__blurb { color: var(--graphite-soft); max-width: 46em; margin-bottom: .35em; }
.level__meta { font-size: var(--step--1); font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; }
.level__off { font-size: var(--step--1); color: var(--graphite-soft); }
.level.is-off .level__code { border-color: var(--line); color: var(--graphite-soft); }
@media (max-width: 680px) {
	.level { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
	.level__code { width: 44px; height: 44px; font-size: 1.15rem; }
	.level__action { grid-column: 2; }
}

/* Alur ujian: memang berurutan, jadi bernomor */
.step-list { list-style: none; counter-reset: langkah; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.step-list li { counter-increment: langkah; position: relative; padding-top: 52px; }
.step-list li::before {
	content: counter(langkah);
	position: absolute; top: 0; left: 0;
	width: 36px; height: 36px; border-radius: 50%;
	display: grid; place-items: center;
	border: 1.5px solid var(--ink-red); color: var(--ink-red);
	font-weight: 700; font-variant-numeric: tabular-nums;
}
.step-list li:not(:last-child)::after {
	content: ""; position: absolute; top: 18px; left: 46px; right: -22px;
	border-top: 1.5px dashed var(--ink-red-soft);
}
.step-list h3 { font-size: var(--step-1); font-weight: 700; }
.step-list p { color: var(--graphite-soft); margin: 0; }
@media (max-width: 900px) {
	.step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.step-list li::after { display: none; }
}
@media (max-width: 520px) { .step-list { grid-template-columns: 1fr; gap: 24px; } }

/* Nilai terakhir */
.recent { background: var(--surface); border-top: 1px solid var(--line); }
.score-table { width: 100%; border-collapse: collapse; margin: 20px 0 16px; }
.score-table th, .score-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.score-table th { font-size: var(--step--1); color: var(--graphite-soft); font-weight: 600; }
.score-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-table .score { font-weight: 800; font-size: var(--step-1); }
.status { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: var(--step--1); }
.status.is-pass { background: var(--ok-wash); color: var(--ok); }
.status.is-fail { background: var(--bad-wash); color: var(--ink-red); }
.empty { color: var(--graphite-soft); }
@media (max-width: 640px) {
	.score-table thead { display: none; }
	.score-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.score-table td { border: 0; padding: 0; }
	.score-table td:nth-child(2) { font-weight: 600; }
	.score-table td:nth-child(4) { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}

/* ------------------------------------------------------------ Halaman isi */
.page-wrap { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); max-width: 780px; }
.page-head { margin-bottom: 28px; }
.page-title { font-size: var(--step-3); font-weight: 800; letter-spacing: -.02em; }
.page-meta { color: var(--graphite-soft); font-size: var(--step--1); }
.page-figure { margin: 0 0 28px; }
.prose { font-size: 1.0625rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 3px solid var(--ink-red); color: var(--graphite-soft); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
.alignwide { max-width: min(1080px, 100vw - 32px); }
.post-list { display: grid; gap: 0; }
.post-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.post-item__title { font-size: var(--step-1); margin-bottom: 4px; }
.post-item__title a { color: var(--graphite); text-decoration: none; }
.post-item__title a:hover { color: var(--navy); }
.post-item__date { font-size: var(--step--1); color: var(--graphite-soft); margin-bottom: 8px; }
.nav-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.comments { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments__list { padding-left: 1.2em; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea, .search-form input[type="search"] {
	width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--surface);
}
.comment-form .submit, .search-form [type="submit"] {
	min-height: 44px; padding: 8px 18px; border: 0; border-radius: var(--radius); background: var(--navy); color: #fff; font: 600 var(--step-0) var(--font); cursor: pointer;
}

/* ------------------------------------------------------------ Daftar akun */
.auth {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 6vw, 88px);
	align-items: start; padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 96px);
}
.auth__title { font-size: var(--step-4); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; max-width: 12ch; }
.auth__text { font-size: var(--step-1); color: var(--graphite-soft); max-width: 30em; line-height: 1.55; }
.auth__alt { margin-top: 24px; }
.auth__alt a { font-weight: 700; }
.auth__card {
	background: var(--surface); border: 1.5px solid var(--ink-red); border-radius: var(--radius);
	padding: clamp(22px, 4vw, 32px); box-shadow: 0 18px 28px rgba(35, 38, 45, .10);
}
.auth__card-title { font-size: var(--step-1); font-weight: 700; }
.auth__admin { font-size: var(--step--1); color: var(--graphite-soft); border-left: 3px solid var(--ink-red-soft); padding-left: 12px; }
.auth__form { display: grid; gap: 18px; }
.auth__submit { width: 100%; margin-top: 4px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input {
	width: 100%; min-height: 46px; padding: 10px 12px;
	border: 1.5px solid var(--line); border-radius: var(--radius);
	font: 400 var(--step-0) var(--font); color: var(--graphite); background: var(--surface);
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-wash); }
.field input[aria-invalid="true"] { border-color: var(--ink-red); }
.field__hint { font-size: var(--step--1); color: var(--graphite-soft); margin: 6px 0 0; }
.field__error { font-size: var(--step--1); color: var(--ink-red); font-weight: 600; margin: 6px 0 0; }
.field__pass { position: relative; }
.field__pass input { padding-right: 100px; }
.field__toggle {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	min-height: 34px; padding: 4px 10px; border: 0; border-radius: 6px;
	background: transparent; color: var(--navy); font: 600 var(--step--1) var(--font); cursor: pointer;
}
.field__toggle:hover { background: var(--navy-wash); }
.field--trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
	margin-bottom: 18px; padding: 12px 14px; border-radius: var(--radius);
	background: var(--bad-wash); color: var(--ink-red); font-weight: 600; font-size: var(--step--1);
}
@media (max-width: 820px) {
	.auth { grid-template-columns: 1fr; }
	.auth__title { font-size: var(--step-3); }
}

/* ------------------------------------------------------------ Halaman ujian */
.exam-wrap { padding-top: 24px; padding-bottom: 48px; max-width: 1180px; }
body.is-exam .site-footer { background: transparent; }

/* Plugin Simulasi UKP mengikuti warna dan huruf tema (termasuk dialog dan notifikasinya) */
.ukp-app, .ukp-modal, .ukp-toast {
	--ukp-ink: var(--graphite);
	--ukp-ink-soft: var(--graphite-soft);
	--ukp-line: var(--line);
	--ukp-paper: var(--surface);
	--ukp-wash: var(--paper);
	--ukp-brand: var(--navy);
	--ukp-brand-wash: var(--navy-wash);
	--ukp-bad: var(--ink-red);
	--ukp-radius: var(--radius);
	font-family: var(--font);
}
.ukp-app .ukp-h1, .ukp-app .ukp-h2 { letter-spacing: -.015em; }
.ukp-app .ukp-level__code { background: transparent; border: 2px solid var(--ink-red); color: var(--ink-red); border-radius: 50%; }
.ukp-app .ukp-level.is-off .ukp-level__code { border-color: var(--line); color: var(--graphite-soft); }
.ukp-app .ukp-option__key { border-color: var(--ink-red-soft); color: var(--ink-red); }
.ukp-app .ukp-option.is-on .ukp-option__key { background: var(--graphite); border-color: var(--graphite); color: #fff; }

/* ------------------------------------------------------------ Kaki */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; align-items: center; padding-top: 24px; padding-bottom: 24px; font-size: var(--step--1); color: var(--graphite-soft); }
.site-footer__inner p { margin: 0; }
.site-footer__nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { color: var(--graphite-soft); }

/* WordPress */
.wp-caption-text, .gallery-caption { font-size: var(--step--1); color: var(--graphite-soft); }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.sticky, .bypostauthor { }
