:root {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --ink: #15181e;
  --muted: #5b6470;
  --line: #dfe3e8;
  --yellow: #f6cf4a;
  --yellow-soft: #fdf1c4;
  --ok: #1f6b4a;
  --ok-bg: #e3f3ea;
  --err: #a8261d;
  --err-bg: #fde8e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: "Figtree", system-ui, sans-serif; line-height: 1.65; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 760px; margin: 0 auto; padding-inline: 24px; }
h1, h2, h3, .brand { font-family: "Bricolage Grotesque", "Figtree", sans-serif; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.6s ease both; animation-delay: var(--d, 0s); }

/* Header */
header { padding-block: 28px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 34px; transition: transform 0.25s ease; }
.brand:hover svg { transform: rotate(-8deg); }
.back { font-size: 15px; font-weight: 500; padding-block: 4px; background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 2px no-repeat; transition: background-size 0.25s ease; }
.back:hover { background-size: 100% 2px; }

/* Judul halaman tool */
.tool-head { padding-block: 40px 32px; }
.tool-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; margin-bottom: 12px; }
.tool-head p { color: var(--muted); font-size: 17px; max-width: 46ch; }

/* Kertas bersudut lipat */
.sheet { position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; padding: 26px; box-shadow: 8px 8px 0 var(--yellow); }
.sheet::before { content: ""; position: absolute; top: -2px; right: -10px; width: 12px; height: 40px; background: var(--bg); }
.sheet::after { content: ""; position: absolute; top: -2px; right: -2px; width: 40px; height: 40px; background: linear-gradient(to bottom left, var(--bg) 0 48%, var(--ink) 48% 52%, var(--paper) 52% 100%); border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

/* Tombol */
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 22px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.15s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--yellow); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Footer */
footer { border-top: 2px solid var(--ink); margin-top: 96px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 36px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer-inner a { font-weight: 500; color: var(--ink); }
.footer-inner a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .wrap { padding-inline: 18px; }
  .sheet { padding: 18px; box-shadow: 6px 6px 0 var(--yellow); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
