/* Warna dan huruf template ini diatur di blok :root berikut. */
:root {
  --ground: #1466C2;
  --ink: #16202E;
  --label: #FFFFFF;
  --frame: #D3202A;
  --pen: #1B3FB5;
  --spine: #16202E;
  --desk: #C49A6C;
  --action: #D3202A;
  --action-ink: #FFFFFF;
  --focus: #FFD84D;
  --font: 'Bitter', Georgia, serif;
  --hand: 'Kalam', 'Comic Sans MS', cursive;
}

@font-face { font-family: 'Bitter'; font-weight: 700; font-display: swap; src: url('fonts/bitter-700.woff2') format('woff2'); }
@font-face { font-family: 'Kalam'; font-weight: 400; font-display: swap; src: url('fonts/kalam-400.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
}
h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
input, button { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
[hidden] { display: none; }
:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }

.alert { font-weight: 600; }
.trial { display: inline-block; padding: 10px 0; }
.more summary { cursor: pointer; padding: 10px 0; }
.more label { display: block; }
.more input { width: 100%; padding: 10px 12px; margin-top: 4px; }

/* Halaman setelah login: alogin, status, logout, error */
.sheet {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 100vh; min-height: 100svh;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 32px 20px;
}
.sheet h1 { font-size: 44px; line-height: 1.02; }
.facts { display: grid; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.action {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  background: var(--action);
  color: var(--action-ink);
  transition: transform .15s ease;
}
.action:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

body { font-weight: 700; }
.buku { min-height: 100vh; min-height: 100svh; display: flex; }
/* Lakban punggung buku di kiri dan tepi kertas di kanan */
.sampul {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  padding: 20px 16px 18px 18px; background: var(--ground); color: var(--label);
  border-left: 22px solid var(--spine); border-right: 5px solid #E8EBEF;
  animation: buka .5s cubic-bezier(.2,.9,.3,1) both; transform-origin: left center;
}
@keyframes buka { from { opacity: 0; transform: perspective(1200px) rotateY(-8deg); } }
.pensil { display: none; }
h1 { font-size: 21vw; line-height: .92; letter-spacing: -.02em; }
h1 span { display: block; }

/* Label sampul: bingkai merah ganda dengan sudut terpotong */
.label {
  padding: 3px; background: var(--frame);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}
.form {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 14px 16px; background: var(--label); color: var(--ink);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}
.baris { display: flex; align-items: flex-end; gap: 6px; }
.baris label, .tulis { flex: none; width: 60px; font-size: 15px; padding-bottom: 5px; }
.baris input, .pena {
  flex: 1; min-width: 0; height: 36px; padding: 0 2px;
  border: 0; border-bottom: 2px dotted var(--ink); background: transparent;
  font-family: var(--hand); font-weight: 400; font-size: 21px; line-height: 40px; color: var(--pen);
}
.baris input:focus { outline: 0; border-bottom: 2px solid var(--pen); }
.pena { white-space: nowrap; overflow: hidden; }
.action { font-size: 18px; padding: 12px; }
.alert { color: var(--frame); font-size: 15px; line-height: 1.25; }
.trial { padding: 8px 16px; background: var(--label); color: var(--ink); display: block; }
.catatan { font-size: 16px; font-weight: 500; line-height: 1.35; }

@media (min-width: 760px) {
  body.page-login { background: var(--desk); display: flex; align-items: center; justify-content: center; padding: 28px; }
  .buku { position: relative; min-height: 0; align-items: center; }
  .pensil { display: block; position: absolute; left: 100%; margin-left: 44px; width: 44px; height: 520px; }
  .sampul {
    width: 520px; flex: none; min-height: 680px; padding: 40px 44px 32px 44px;
    border-left-width: 34px; border-right-width: 9px;
  }
  h1 { font-size: 96px; }
  .form { padding: 26px 26px 24px; }
  .baris label, .tulis { width: 76px; font-size: 17px; }
  .baris input, .pena { font-size: 25px; height: 42px; line-height: 46px; }
  .catatan { font-size: 17px; }
}

.sheet { color: var(--label); border-left: 22px solid var(--spine); max-width: none; padding-left: 30px; }
.sheet h1 { font-size: 44px; }
.facts div { padding: 8px 10px; background: var(--label); color: var(--ink); }
.facts dd { font-family: var(--hand); font-weight: 400; color: var(--pen); font-size: 19px; line-height: 1.2; }
.sheet .action { font-size: 18px; max-width: 26rem; }
.sheet .facts, .sheet p, .sheet form { max-width: 26rem; }
