/* Template light saja (sesuai Obsidian light theme di referensi) -- sengaja
   tidak ada @media (prefers-color-scheme: dark) supaya tidak auto-switch
   ikut sistem. */
:root {
  --bg: #ffffff;
  --fg: #202020;
  --muted: #6e6e6e;
  --border: #e3e3e3;
  --accent: #7b6cd9;
  --danger: #c0392b;
  --warn: #b8860b;
  --card-bg: #ffffff;
  --quote-bg: #f2f2f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.topnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 24px;
}

.topnav a {
  padding: 8px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--fg);
  border-radius: 6px;
}

.topnav a.active { background: var(--accent); color: #fff; }

main {
  max-width: 940px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.card {
  padding: 12px 0;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.card:last-child { border-bottom: none; }

h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 20px; }
h2 { font-size: 1.4rem; font-weight: 700; margin: 0 0 14px; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 14px 0 6px; }

hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge.complete { background: var(--accent); color: #fff; border-color: var(--accent); }

.chip {
  display: inline-block;
  padding: 4px 10px;
  min-height: 44px;
  line-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  margin: 2px;
}

.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

button, input[type=submit] {
  min-height: 44px;
  min-width: 44px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

button.secondary { background: transparent; color: var(--fg); border-color: var(--border); }
button.danger { background: var(--danger); border-color: var(--danger); }

input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], textarea, select {
  width: 100%;
  padding: 9px 10px;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  font-size: 0.95rem;
}

input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.muted { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--danger); }

details > summary { cursor: pointer; padding: 4px 0; list-style: revert; }
details details { margin-left: 16px; }

.habit-leaf { display: flex; align-items: center; gap: 6px; padding: 1px 0; }

/* Checkbox ala Obsidian: rapat, kotak kecil ~18px, tombol pas ukuran isinya
   (bukan target tap 44px) supaya list padat seperti reading view Obsidian. */
.checkbox-btn, .habit-status-btn {
  min-width: 0;
  min-height: 0;
  padding: 2px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: #fff;
}

.checkbox-box.checked { background: var(--accent); border-color: var(--accent); }
.checkbox-box.skipped { background: var(--muted); border-color: var(--muted); }

.checklist-item { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.checklist-item.done .checklist-label { text-decoration: line-through; color: var(--muted); }

.plain-list { list-style: disc; margin: 0; padding-left: 22px; }
.plain-list li { padding: 4px 0; }

.progress-track { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden; margin: 6px 0; }
.progress-fill { background: var(--accent); height: 100%; }

.quote-card {
  background: var(--quote-bg);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 22px;
}
.quote-card .quote-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.quote-card .quote-text {
  font-size: 1.05rem;
  color: var(--fg);
  line-height: 1.5;
}
