/* Yayasan Tarbiyatul Athfal Al Adzkia — "Buku Rapor PAUD".
   The page is the foundation's report book: green bookcloth folder, white
   HVS sheets with pale-blue printed rules, foil only on cover lettering and
   the registration seal, the teacher's red ink only on entry points, purple
   stamp ink only for dates. */

@font-face {
  font-family: "Bonum";
  src: url("../fonts/bonum-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bonum";
  src: url("../fonts/bonum-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playwrite ID";
  src: url("../fonts/playwrite-id.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Naskh Pepatah";
  src: url("../fonts/naskh-proverb.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Bookcloth */
  --cloth: #1e5b3f;
  --cloth-deep: #164631;
  --cloth-hi: #2a6b4d;
  --on-cloth: #ffffff;
  --on-cloth-2: #cfe3d6;
  /* Foil: cover lettering and the registration seal only */
  --foil: #e0c26a;
  /* HVS sheet */
  --paper: #ffffff;
  --ink: #1b2233;
  --ink-2: #46506a;
  --rule: #9dbde0;
  --rule-strong: #6f9bcb;
  --band: #e6eff9;
  /* Teacher's red pen: entry points only */
  --red: #c21f30;
  --red-deep: #9e1726;
  /* Stamp ink: dates only */
  --stamp: #5b3c8c;

  --font-print: "Bonum", "Bookman Old Style", "URW Bookman", Georgia, serif;
  --font-hand: "Playwrite ID", "Segoe Print", "Bradley Hand", cursive;
  --font-arab: "Naskh Pepatah", "Noto Naskh Arabic", "Amiri", serif;

  /* One text size for everything printed inside the forms */
  --text: 1.0625rem;
  --line: 1.6;
  --gap: 1.5rem;
  --pad: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --sheet-shadow: 0 1px 2px rgb(6 30 18 / 0.28), 0 18px 36px -16px rgb(4 24 14 / 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--cloth-hi) var(--cloth-deep);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-print);
  font-size: var(--text);
  line-height: var(--line);
  color: var(--ink);
  background-color: var(--cloth);
  background-image: var(--grain);
  background-size: 180px 180px;
  font-variant-numeric: lining-nums;
}

::selection { background: #e4dcf2; color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; color: var(--red-deep); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--red);
  font-weight: 700;
}
.skip:focus { top: 1rem; }

.num { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }

/* ---------- Cover band (header) ---------- */

.band {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
  padding: 0.5rem clamp(1rem, 0.4rem + 2vw, 2.5rem);
  background-color: var(--cloth-deep);
  background-image: var(--grain);
  background-size: 180px 180px;
  color: var(--on-cloth);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.08), 0 8px 18px -12px rgb(0 0 0 / 0.6);
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--foil);
  text-decoration: none;
  min-height: 44px;
}
.mark:hover { color: var(--foil); }
.mark-emblem { width: 2.25rem; height: 2.25rem; color: var(--foil); }
.mark-text { display: grid; line-height: 1.15; }
.mark-name {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.45);
}
.mark-sub { font-size: 0.8125rem; color: var(--on-cloth-2); }

.toc { margin-left: auto; }
.toc-toggle { display: none; }
.toc-list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--on-cloth);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.toc-list a:hover { border-bottom-color: var(--red); color: var(--on-cloth); }
.band :focus-visible { outline-color: var(--on-cloth); }

.band-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1.5px solid rgb(255 255 255 / 0.6);
  border-radius: 3px;
  color: var(--on-cloth);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  white-space: nowrap;
}
.band-link:hover { color: #fff; border-color: #fff; text-decoration-thickness: 3px; }

/* ---------- The open folder: inside cover + held sheet ---------- */

main { padding-bottom: clamp(2rem, 4vw, 4rem); }

.spread {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  max-width: 88rem;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2.25rem) clamp(1rem, 0.4rem + 2.4vw, 2.75rem) 0;
}

.cover {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1.5rem, 0.8rem + 2.2vw, 3rem);
  color: var(--on-cloth);
}
/* Blind-debossed frame line, all four sides */
.cover::before {
  content: "";
  position: absolute;
  inset: 0.25rem;
  border: 1px solid rgb(0 0 0 / 0.32);
  box-shadow: 1px 1px 0 rgb(255 255 255 / 0.1), inset 1px 1px 0 rgb(255 255 255 / 0.08);
  pointer-events: none;
}

.seal {
  width: clamp(6rem, 4.5rem + 3vw, 8.5rem);
  height: auto;
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
  color: var(--foil);
  filter: drop-shadow(0 1px 0 rgb(0 0 0 / 0.45));
}
.seal-line { fill: none; stroke: var(--foil); stroke-width: 1.6; }
.seal-text {
  fill: var(--foil);
  font-family: var(--font-print);
  font-weight: 700;
  font-size: 13.4px;
  letter-spacing: 0.6px;
}

h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.125rem, 1.1rem + 3vw, 3.625rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--foil);
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.5), 0 -1px 0 rgb(255 255 255 / 0.08);
  text-wrap: balance;
}

.cover-lead {
  max-width: 34ch;
  margin: clamp(1rem, 1.6vw, 1.5rem) 0 0;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--on-cloth);
}
.cover-lead strong { font-weight: 700; }

.cover-motto {
  margin: 1.5rem 0 0;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--foil);
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.5);
}

/* ---------- Sheets ---------- */

.sheet {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-content: start;
  max-width: 68rem;
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  padding: var(--pad) var(--pad) calc(var(--pad) + 1.25rem);
  background: var(--paper);
  box-shadow: var(--sheet-shadow);
}
.sheet > * { grid-column: 1 / -1; }
main > .sheet { width: calc(100% - 2 * clamp(1rem, 0.4rem + 2.4vw, 2.75rem)); }

.spread .sheet { margin: 0; max-width: none; padding-top: clamp(1.25rem, 0.6rem + 2vw, 2.25rem); }
.spread .sheet-title { margin-bottom: 1.1rem; }

.sheet-title {
  margin: 0 0 1.5rem;
  padding: 0.55rem 1rem 0.6rem;
  background: var(--band);
  font-weight: 700;
  font-size: clamp(1.375rem, 1rem + 1.1vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  /* printed double rule */
  border-bottom: 3px double var(--rule-strong);
}

.sheet-intro {
  max-width: 68ch;
  text-wrap: pretty;
  margin: 0 auto 1.75rem;
  text-align: center;
  color: var(--ink-2);
}

.folio {
  position: absolute;
  right: var(--pad);
  bottom: 0.9rem;
  margin: 0;
  font-size: 0.875rem;
  font-style: normal;
  color: var(--ink-2);
}

/* Corner straps of the folder holding the first sheet */
.strap {
  position: absolute;
  width: clamp(3.5rem, 5vw, 4.75rem);
  aspect-ratio: 1;
  background-color: var(--cloth-deep);
  background-image: var(--grain);
  background-size: 180px 180px;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35));
  z-index: 2;
  pointer-events: none;
}
.sheet--held .folio { right: calc(clamp(3.5rem, 5vw, 4.75rem) + 0.75rem); }
.strap--tl { top: -1px; left: -1px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.strap--br { right: -1px; bottom: -1px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* ---------- Printed form tables ---------- */

.form-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text);
}
.form-table th,
.form-table td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.form-table th {
  width: 9.5rem;
  background: var(--band);
  font-weight: 700;
  white-space: nowrap;
}
.form-table td .icon { margin-right: 0.45rem; color: var(--ink-2); }

/* Printed form boxes: label in the corner, the entry beneath */
.isian {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.isian-kotak {
  padding: 0.5rem 0.85rem 0.65rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.isian dt {
  font-weight: 700;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--ink-2);
}
.isian dd { margin: 0.1rem 0 0; line-height: 1.5; }

.paraf {
  display: inline-block;
  width: 5.5rem;
  height: 2.2rem;
  margin: -0.6rem 0 -0.7rem 0.35rem;
  vertical-align: middle;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.paraf path { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .paraf path { animation: paraf 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s backwards; }
  .paraf path + path { animation-duration: 1.1s; animation-delay: 1.15s; }
}
@keyframes paraf {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* Clear plastic pocket on the inside cover, holding one printed photo */
.cover-top {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
}
.cover-top .seal { margin-bottom: 0; }
.saku {
  position: relative;
  flex: none;
  width: clamp(8.5rem, 4rem + 6vw, 11.25rem);
  margin: 0;
  padding: 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.32);
  background: rgb(255 255 255 / 0.07);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 6px 14px -8px rgb(0 0 0 / 0.6);
  rotate: 1.5deg;
}
/* the printed photo: white mount with room at the foot for the date stamp */
.cetak {
  position: relative;
  display: block;
  padding: 0.35rem 0.35rem 2.3rem;
  background: #fff;
}
.cetak img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.saku figcaption {
  padding-top: 0.45rem;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--on-cloth-2);
}

.stamp {
  position: absolute;
  right: 0.55rem;
  bottom: 0.4rem;
  padding: 0.1rem 0.45rem;
  border: 2px solid currentColor;
  border-radius: 3px;
  outline: 1px solid currentColor;
  outline-offset: 1.5px;
  color: var(--stamp);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: rotate(-5deg);
  mix-blend-mode: multiply;
  opacity: 0.9;
}

/* ---------- Composer: the rapor's own blanks ---------- */

.keperluan {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}

.cek-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.cek-group legend,
.blank label {
  float: left;
  width: 6.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
}
.cek-group legend { padding: 0; margin-right: 0.25rem; }

.cek {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  cursor: pointer;
}
.cek input {
  appearance: none;
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  border: 1.5px solid var(--ink);
  border-radius: 1px;
  background: var(--paper);
  cursor: pointer;
}
/* the teacher's red tick */
.cek input:checked {
  border-color: var(--red);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5c2.5 1.3 4.2 3.6 5.6 6 3.7-7.4 8-12.6 13.4-17' fill='none' stroke='%23c21f30' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 125% no-repeat;
}
.cek input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.cek:hover input { border-color: var(--red); }

.blank {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
}
.blank label { float: none; flex: none; }
.blank input,
.blank textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.25rem 0.25rem 0.15rem;
  border: 0;
  border-bottom: 1.5px dotted var(--ink-2);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-hand);
  font-size: var(--text);
  line-height: 2.1rem;
  color: var(--ink);
  caret-color: var(--red);
}
.blank input::placeholder { color: #646d84; opacity: 1; }
.blank input:focus,
.blank textarea:focus { outline: none; border-bottom: 2px solid var(--red); }
.blank input:focus-visible,
.blank textarea:focus-visible { outline: none; }
.blank--pesan { align-items: flex-start; }
.blank--pesan label { min-height: 2.1rem; }
.blank textarea {
  resize: none;
  overflow: hidden;
  scrollbar-color: var(--rule) transparent;
  min-height: calc(3 * 2.1rem + 0.3rem);
  padding-top: 0;
  border-bottom: 0;
  /* ruled writing lines */
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.1rem - 1px), var(--rule) calc(2.1rem - 1px), var(--rule) 2.1rem);
  background-attachment: local;
}
.blank textarea:focus { border-bottom: 0; box-shadow: 0 2px 0 var(--red); }
.blank textarea.is-writing { color: var(--ink-2); }

.kirim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.4rem;
  padding-left: 6.75rem;
}
.plate {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-print);
  font-weight: 700;
  font-size: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.2) inset, 0 3px 8px -3px rgb(120 10 20 / 0.6);
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}
.plate:hover { background: var(--red-deep); }
.plate:active { transform: translateY(1px); }
.kirim-ke { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- Visi & misi ---------- */

.visi {
  grid-column: 2 / -2;
  margin: 0.5rem 0 0.75rem;
  text-align: center;
}
.visi p {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(1.25rem, 0.95rem + 1.1vw, 1.75rem);
  line-height: 1.75;
  color: var(--ink);
  text-wrap: balance;
}
.visi-sumber {
  max-width: 62ch;
  text-wrap: pretty;
  margin: 0 auto 1.75rem;
  text-align: center;
  color: var(--ink-2);
}

.aspek {
  width: 100%;
  border-collapse: collapse;
}
.aspek th,
.aspek td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.aspek thead th {
  background: var(--band);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.aspek tbody th { width: 42%; font-weight: 700; }
.aspek .note {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-hand);
  color: var(--ink-2);
  line-height: 1.9;
}

/* ---------- Documentation: photos taped into the lampiran ---------- */

.tempel-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2.25rem var(--gap);
  align-items: start;
}
.tempel { margin: 0; }
.tempel-foto {
  position: relative;
  padding: 0.4rem;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(20 30 50 / 0.25), 0 6px 14px -8px rgb(20 30 50 / 0.45);
}
.tempel-foto img { width: 100%; object-fit: cover; }
/* clear tape across the top-left corner */
.tempel-foto::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: -1.1rem;
  z-index: 1;
  width: 5.25rem;
  height: 1.45rem;
  rotate: -38deg;
  background: rgb(214 224 220 / 0.72);
  border-left: 1px dashed rgb(150 166 160 / 0.7);
  border-right: 1px dashed rgb(150 166 160 / 0.7);
  box-shadow: 0 1px 2px rgb(20 30 50 / 0.16);
}
.tempel figcaption { display: grid; gap: 0.3rem; padding-top: 0.7rem; }
.pita {
  /* dated band: the date in stamp ink, then aspect · place */
  display: grid;
  gap: 0.05rem;
  padding: 0.25rem 0.6rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--band);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
  font-weight: 700;
  line-height: 1.35;
}
.pita-tgl { color: var(--stamp); }
.pita-isi { color: var(--ink); }
.hand {
  font-family: var(--font-hand);
  line-height: 1.9;
  color: var(--ink-2);
}

/* row 1: wide + square */
.tempel--a { grid-column: span 8; }
.tempel--a img { aspect-ratio: 2 / 1; }
.tempel--b { grid-column: span 4; }
.tempel--b img { aspect-ratio: 1 / 1; }
/* row 2: portrait + 3:2 */
.tempel--c { grid-column: span 4; }
.tempel--c img { aspect-ratio: 3 / 4; }
.tempel--d { grid-column: span 8; }
.tempel--d img { aspect-ratio: 3 / 2; }
/* row 3: full-width group */
.tempel--e { grid-column: 1 / -1; }
.tempel--e img { aspect-ratio: 5 / 2; object-position: 50% 60%; }
/* row 4: two halves */
.tempel--f, .tempel--g { grid-column: span 6; }
.tempel--f img, .tempel--g img { aspect-ratio: 4 / 3; }
/* row 5: two squares (the Lanud sign is kept whole) */
.tempel--h, .tempel--i { grid-column: span 6; }
.tempel--h img, .tempel--i img { aspect-ratio: 1 / 1; }
.tempel--i img { object-position: 50% 60%; }

/* ---------- Registration ---------- */

.dua-kolom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem var(--gap);
}
.unit h3,
.kontak h3 {
  margin: 0 0 0.85rem;
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.25;
}
.form-table--unit th { width: 7.5rem; }

.ink-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin-top: 0.6rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.ink-link .icon { transition: translate 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.ink-link:hover .icon { translate: 0.2rem 0; }

/* ---------- Last page: support, signatures, contacts ---------- */

.aspek--dukung tbody th { width: 30%; }

.ttd {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem clamp(1.5rem, 6vw, 6rem);
  margin: 2.5rem 0 0;
  padding: 0 clamp(0rem, 3vw, 3rem);
}
.ttd-tempat { grid-column: 2; margin: 0 0 0.5rem; }
.ttd-tempat .hand { color: var(--ink); }
.ttd-kolom { display: grid; justify-items: start; }
.ttd-peran { margin: 0; font-weight: 700; }
.ttd-garis {
  display: block;
  width: 100%;
  height: 4.5rem;
  border-bottom: 1.5px dotted var(--ink-2);
}

.kontak { margin-top: 2.75rem; }
.kontak .form-table th { width: 9.5rem; }

/* ---------- Back cover ---------- */

.back {
  background-color: var(--cloth-deep);
  background-image: var(--grain);
  background-size: 180px 180px;
  color: var(--on-cloth);
}
.back-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1rem, 0.4rem + 2.4vw, 2.75rem);
  text-align: center;
}
.pepatah {
  margin: 0;
  font-family: var(--font-arab);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1.6;
  color: var(--foil);
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.5);
}
.pepatah-arti {
  max-width: 44ch;
  margin: 0.5rem auto 0;
  font-size: 1.125rem;
}
.pepatah-arti span { display: block; margin-top: 0.25rem; font-size: 0.9375rem; color: var(--on-cloth-2); }
.back-name {
  margin: 2.5rem 0 0.25rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--foil);
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.5);
}
.back-meta { margin: 0.2rem 0 0; font-size: 0.9375rem; color: var(--on-cloth-2); }

/* ---------- Responsive ---------- */

@media (max-width: 75rem) {
  .spread { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
}

/* The full band (mark, five links, Kirim pesan) needs about 70rem on one line;
   below that the links fold behind the Daftar isi toggle. */
@media (max-width: 70rem) {
  .toc { position: relative; }
  .toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    white-space: nowrap;
    padding: 0 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 3px;
    background: transparent;
    color: var(--on-cloth);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
  }
  .toc-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    display: none;
    flex-direction: column;
    min-width: 13rem;
    padding: 0.4rem;
    background: var(--paper);
    box-shadow: var(--sheet-shadow);
  }
  .toc.is-open .toc-list { display: flex; }
  .toc-list a { color: var(--ink); width: 100%; border-bottom: 1px solid var(--rule); }
  .toc-list li:last-child a { border-bottom: 0; }
  .toc-list a:hover { color: var(--red); border-bottom-color: var(--rule); }
  .no-js .toc-toggle { display: none; }
  .no-js .toc-list { position: static; display: flex; flex-direction: row; flex-wrap: wrap; min-width: 0; padding: 0; background: none; box-shadow: none; }
  .no-js .toc-list a { color: var(--on-cloth); border: 0; }
}

@media (max-width: 60rem) {
  .band { gap: 0.75rem; }
  .mark-sub { display: none; }

  .spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding-top: 0.75rem;
  }
  .cover { padding: 1.25rem 1.25rem 1.5rem; }
  .cover-motto { display: none; }
  .seal { width: 4.5rem; margin-bottom: 0.9rem; }
  .cover-lead { font-size: var(--text); max-width: 42ch; margin-top: 0.75rem; }

  /* the composer comes straight after the title on phones */
  .sheet--held { display: flex; flex-direction: column; }
  .sheet--held .keperluan { order: 1; margin-top: 0; padding-top: 0; border-top: 0; gap: 0.35rem; }
  .sheet--held .sheet-title { order: 2; margin-top: 2rem; }
  .sheet--held .isian { order: 3; }
  .sheet--held .folio { order: 4; }

  .tempel--a, .tempel--b, .tempel--c, .tempel--d, .tempel--f, .tempel--g, .tempel--h, .tempel--i { grid-column: span 6; }
  .tempel--a img, .tempel--d img { aspect-ratio: 3 / 2; }
  .tempel--b img, .tempel--c img { aspect-ratio: 3 / 2; }
  .tempel--h img { aspect-ratio: 1 / 1; }
  .tempel--i img { aspect-ratio: 4 / 5; }
  .dua-kolom { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  :root { --gap: 1rem; }
  .band { padding-inline: 0.75rem; min-height: 3.5rem; }
  .mark-emblem { width: 1.9rem; height: 1.9rem; }
  .mark-name { font-size: 1rem; }
  .band { gap: 0.5rem; }
  .band-link { padding: 0 0.7rem; font-size: 0.9375rem; }
  .band-link .icon { display: none; }
  .mark-name { white-space: nowrap; }
  .toc-toggle { width: 44px; justify-content: center; padding: 0; }
  .toc-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  h1 { font-size: 1.9rem; }
  .seal { width: 3.5rem; margin-bottom: 0.7rem; }
  .cover { padding: 1rem 1rem 1.25rem; }
  .cover-lead { line-height: 1.5; }

  .sheet { padding: 1.25rem 1rem 3rem; }
  .sheet--held .folio { right: 3.25rem; }
  main > .sheet { width: calc(100% - 1.25rem); }
  .spread { padding-inline: 0.625rem; }
  .sheet-title { margin-bottom: 1rem; }
  .strap { width: 2.5rem; }

  .cek-group { gap: 0 0.7rem; }
  .cek { gap: 0.4rem; }
  .cek-group legend { float: none; width: 100%; min-height: 0; margin-bottom: 0.1rem; }
  .blank label { width: 3.75rem; }
  .blank--pesan { display: block; }
  .blank--pesan label { width: auto; min-height: 0; margin-bottom: 0.1rem; }
  .blank--pesan textarea { width: 100%; line-height: 1.95rem; min-height: calc(3 * 1.95rem + 0.3rem);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.95rem - 1px), var(--rule) calc(1.95rem - 1px), var(--rule) 1.95rem); }
  .spread .sheet-title { margin-bottom: 0.8rem; padding-bottom: 0.5rem; }
  .kirim { padding-left: 0; margin-top: 0.25rem; }
  .plate { width: 100%; justify-content: center; }

  .form-table th,
  .form-table td { display: block; width: 100%; border-top: 0; }
  .form-table tr:first-child th { border-top: 1px solid var(--rule); }
  .form-table th { width: 100% !important; padding-block: 0.35rem; white-space: normal; }

  .aspek thead { display: none; }
  .aspek tr { display: block; border-top: 1px solid var(--rule); }
  .aspek th,
  .aspek td { display: block; width: 100% !important; border-top: 0; }
  .aspek tbody th { background: var(--band); }

  .isian { grid-template-columns: minmax(0, 1fr); }
  .cover { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 1rem; align-items: start; }
  .cover-top { display: contents; }
  .cover-top .saku { grid-column: 1; grid-row: 1 / span 2; }
  .cover-top .seal { grid-column: 2; grid-row: 1; margin: 0 0 0.5rem; }
  .cover h1 { grid-column: 2; grid-row: 2; font-size: 1.75rem; }
  .cover-lead { grid-column: 1 / -1; grid-row: 3; }
  .saku { width: 7.5rem; padding: 0.3rem; }
  .cetak { padding: 0.25rem 0.25rem 1.7rem; }
  .saku figcaption { display: none; }
  .stamp { font-size: 0.75rem; right: 0.3rem; bottom: 0.25rem; padding: 0 0.3rem; }
  .tempel-grid { gap: 2rem; }
  .tempel--a, .tempel--b, .tempel--c, .tempel--d, .tempel--e, .tempel--f, .tempel--g, .tempel--h, .tempel--i { grid-column: 1 / -1; }
  .tempel--e img { aspect-ratio: 2 / 1; }

  .ttd { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 1.5rem; }
  .ttd-tempat { grid-column: 1; margin: 0; }
  .ttd-garis { height: 3rem; }
  .folio { right: 1rem; }
}

@media print {
  body { background: #fff; }
  .band, .keperluan, .ink-link, .strap { display: none; }
  .sheet { box-shadow: none; break-inside: avoid; }
}
