/* KotakAlat — gaya utama */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1c2230;
  --ink-2: #2d3548;
  --paper: #f5f6f8;
  --surface: #ffffff;
  --safety: #f2b705;
  --safety-soft: #fff4cc;
  --peg: #d9dfe6;
  --peg-hole: #b4bec9;
  --link: #1d58b5;
  --muted: #566073;
  --line: #d4d9e0;
  --field: #98a2b0;
  --ok: #1d7444;
  --ok-soft: #e3f3e9;
  --warn: #a8401a;
  --warn-soft: #fbe9e1;
  --radius: 10px;
  --wrap: 1120px;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--safety); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--safety); color: var(--ink); padding: 8px 14px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); font-weight: 750; margin-top: 1.8em; }
h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.5em; }
p { margin: 0 0 1em; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo span { font-family: var(--display); font-stretch: 125%; font-weight: 850; font-size: 1.3rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: #dfe4ec; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 0.98rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--safety); }
.nav-toggle {
  display: none; background: transparent; border: 2px solid #4a5468; color: #fff; border-radius: 8px;
  padding: 6px 10px; font: inherit; font-weight: 700; cursor: pointer;
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--ink);
    flex-direction: column; padding: 8px 20px 16px; border-top: 1px solid #39425a;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  font-stretch: 125%;
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-bottom: 18px;
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; margin-bottom: 26px; }
.search {
  display: flex; align-items: center; gap: 10px; max-width: 560px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 4px 6px 4px 14px;
  box-shadow: 0 4px 0 var(--ink);
}
.search svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.search input {
  flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.1rem; padding: 12px 4px; background: transparent; color: var(--ink); min-width: 0;
}
.search:focus-within { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px var(--safety); }
.hero-note { margin-top: 18px; color: var(--muted); font-size: 0.98rem; max-width: 60ch; }
.hero-note strong { color: var(--ink); }

/* ---------- Pegboard rack ---------- */
.rack {
  background-color: var(--peg);
  background-image: radial-gradient(circle at center, var(--peg-hole) 0 3px, transparent 3.6px);
  background-size: 30px 30px;
  background-position: 15px 15px;
  padding: 44px 0 52px;
  border-top: 1px solid #c6ced8;
  border-bottom: 1px solid #c6ced8;
}
.rack-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.rack-head h2 { margin: 0; }
.rack-head p { margin: 0; color: var(--ink-2); }
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px 20px; list-style: none; margin: 0; padding: 0; }
.tag-wrap {
  display: block; text-decoration: none; color: inherit;
  filter: drop-shadow(0 1px 0 rgba(28, 34, 48, 0.22)) drop-shadow(0 6px 8px rgba(28, 34, 48, 0.10));
  transform-origin: 50% 12px;
  transition: transform 0.25s ease;
}
.tag-wrap:hover { transform: rotate(-2deg); color: inherit; }
.tag-wrap:focus-visible { outline: none; }
.tag-wrap:focus-visible .tag { box-shadow: inset 0 0 0 3px var(--safety); }
.tag {
  position: relative; display: block; background: var(--surface); height: 100%;
  padding: 40px 18px 18px;
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%, 0 18px);
  border-radius: 0 0 var(--radius) var(--radius);
}
.tag::before {
  content: ""; position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--peg); box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.28);
}
.tag-icon { width: 34px; height: 34px; color: var(--ink); margin-bottom: 10px; }
.tag-name { display: block; font-family: var(--display); font-stretch: 112%; font-weight: 750; font-size: 1.12rem; line-height: 1.2; margin-bottom: 4px; }
.tag-desc { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.tag-pop .tag { background: var(--safety-soft); }
.tag-pop .tag::after {
  content: "Paling dicari"; position: absolute; top: 10px; right: 14px; font-size: 0.75rem; font-weight: 700;
  color: var(--ink); background: var(--safety); padding: 1px 8px; border-radius: 99px;
}
.empty-search { display: none; background: var(--surface); border-radius: var(--radius); padding: 18px; margin-top: 8px; }
.empty-search.show { display: block; }
@media (prefers-reduced-motion: reduce) {
  .tag-wrap, .tag-wrap:hover { transition: none; transform: none; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.section-title h2 { margin: 0; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 18px 0; text-decoration: none; color: inherit; }
.post-list a:hover .post-title { text-decoration: underline; text-underline-offset: 0.18em; }
.post-title { font-family: var(--display); font-stretch: 108%; font-weight: 750; font-size: 1.2rem; line-height: 1.25; }
.post-meta { color: var(--muted); font-size: 0.92rem; white-space: nowrap; align-self: start; padding-top: 3px; }
.post-excerpt { grid-column: 1 / -1; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 600px) {
  .post-list a { grid-template-columns: 1fr; }
  .post-meta { order: 3; }
}
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.promise h3 { margin-top: 0; font-size: 1.1rem; }
.promise p { color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .promise { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Page / tool layout ---------- */
.page-head { padding: 32px 0 8px; }
.crumbs { font-size: 0.92rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }
.page-head p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }

.bench {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; margin: 18px 0 8px; box-shadow: 0 2px 0 var(--line);
}
@media (max-width: 600px) { .bench { padding: 18px 16px; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 700; font-size: 0.97rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="url"], input[type="tel"],
input[type="password"], select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--field); border-radius: 8px; padding: 10px 12px; min-height: 46px; width: 100%;
}
textarea { min-height: 200px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--safety); }
input[type="range"] { width: 100%; accent-color: var(--ink); }
input[type="color"] { width: 56px; height: 44px; border: 1.5px solid var(--field); border-radius: 8px; padding: 2px; background: #fff; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
  background: var(--safety); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px;
  padding: 10px 18px; min-height: 46px; box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: var(--ink); background: #ffc61a; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--ink); }
.btn-plain { background: #fff; }
.btn-plain:hover { background: var(--paper); }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 0.93rem; box-shadow: 0 2px 0 var(--ink); }
.btn-sm:active { transform: translateY(2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  background: #fff; color: var(--ink); border: 1.5px solid var(--field); border-radius: 99px; padding: 6px 14px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.tabs button {
  font: inherit; font-weight: 700; cursor: pointer; background: transparent; color: var(--ink-2);
  border: 2px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; padding: 8px 14px; margin-bottom: -2px;
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--ink); border-bottom: 2px solid var(--surface); }

.readout { background: var(--paper); border-radius: 12px; padding: 18px; }
.big { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--paper); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--display); font-stretch: 108%; font-size: 1.6rem; line-height: 1.1; font-weight: 800; }
.stat span { color: var(--muted); font-size: 0.92rem; }
.note { border-radius: 10px; padding: 12px 14px; font-size: 0.97rem; margin: 12px 0; }
.note-ok { background: var(--ok-soft); color: #0f4a2a; }
.note-warn { background: var(--warn-soft); color: #6d2a10; }
.note-info { background: var(--safety-soft); color: #4d3b00; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
  border: 2px dashed var(--field); border-radius: 12px; padding: 34px 16px; background: var(--paper); cursor: pointer;
}
.drop.over { border-color: var(--ink); background: var(--safety-soft); }
.drop svg { width: 40px; height: 40px; color: var(--muted); }
.drop strong { font-size: 1.1rem; }

.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 99px; transition: width 0.2s ease; }

/* ---------- Article body ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.98rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { border-bottom: 2px solid var(--ink); font-family: var(--display); font-stretch: 105%; }
.table-scroll { overflow-x: auto; }
.prose blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 4px solid var(--safety); background: var(--surface); }
.prose code { background: #e9ecf0; padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.article-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
.faq details p { margin: 8px 0 0; color: var(--ink-2); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 20px 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout p { margin: 0; font-weight: 700; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-top: 28px; }
.aside { position: sticky; top: 84px; }
.aside h2 { font-size: 1.1rem; margin-top: 0; }
.aside ul { list-style: none; padding: 0; margin: 0 0 24px; }
.aside li a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.aside li a:hover { color: var(--link); }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .aside { position: static; } }

.related { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.related a {
  display: inline-block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: 99px; padding: 6px 14px; font-weight: 700; font-size: 0.95rem;
}
.related a:hover { background: var(--safety); }

/* ---------- Ad slots (kosong = tidak tampil) ---------- */
.ad-slot { margin: 22px auto; text-align: center; overflow: hidden; max-width: 100%; }
.ad-slot:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d0db; margin-top: 56px; padding: 40px 0 28px; font-size: 0.97rem; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-grid h2 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 6px; }
.foot-bottom { border-top: 1px solid #39425a; margin-top: 28px; padding-top: 18px; font-size: 0.9rem; color: #a7b0be; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.copy-ok { color: var(--ok); font-weight: 700; font-size: 0.92rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.pw-out {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.25rem; word-break: break-all;
  background: var(--paper); border-radius: 10px; padding: 14px 16px; min-height: 58px; border: 1.5px solid var(--line);
}
.preview-img { display: block; max-height: 340px; width: auto; margin: 0 auto; border-radius: 8px; background: #fff; }
.qr-box { display: flex; justify-content: center; align-items: center; background: var(--paper); border-radius: 12px; padding: 18px; min-height: 260px; }
.qr-box canvas { width: 240px; height: 240px; image-rendering: pixelated; }
.scale { position: relative; height: 16px; border-radius: 99px; overflow: hidden; display: flex; margin: 10px 0 4px; }
.scale i { display: block; height: 100%; }
.scale-pin { position: relative; height: 18px; }
.scale-pin b { position: absolute; top: 0; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 12px solid var(--ink); transform: translateX(-8px); transition: left 0.25s ease; }
.scale-legend { position: relative; height: 20px; font-size: 0.82rem; color: var(--muted); }
.scale-legend span { position: absolute; top: 0; transform: translateX(-50%); }
.scale-legend span:first-child { transform: none; }
.scale-legend span:last-child { transform: translateX(-100%); }
.limit-row { display: grid; grid-template-columns: 170px 1fr 90px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 0.95rem; }
.limit-row .meter > i.over { background: var(--warn); }
@media (max-width: 560px) { .limit-row { grid-template-columns: 1fr 80px; } .limit-row .meter { grid-column: 1 / -1; order: 3; } }
.not-found { text-align: left; padding: 72px 0; }
.not-found .code { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(4rem, 16vw, 9rem); line-height: 0.9; color: var(--ink); }
