:root {
  --bg: #fef6e4;
  --bg-soft: #fffaf0;
  --ink: #0b1f3a;
  --ink-soft: #496284;
  --brand: #f97316;
  --brand-2: #0ea5e9;
  --card: rgba(255, 255, 255, 0.88);
  --stroke: rgba(11, 31, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 8% 20%, #fed7aa 0%, transparent 40%),
    radial-gradient(circle at 85% 10%, #bae6fd 0%, transparent 42%),
    linear-gradient(140deg, var(--bg), var(--bg-soft));
}

.backdrop,
.orb {
  position: fixed;
  pointer-events: none;
}

.backdrop {
  inset: 0;
  background-image: linear-gradient(rgba(11, 31, 58, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 58, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.45;
}

.orb {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.35;
}

.orb-one {
  background: #fb923c;
  left: -70px;
  top: 35%;
}

.orb-two {
  background: #38bdf8;
  right: -80px;
  top: 20%;
}

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 35px rgba(30, 41, 59, 0.09);
}

.sidebar {
  padding: 22px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.sidebar h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

.sidebar p {
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  text-align: left;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 12px;
  border-radius: 11px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  transform: translateX(3px);
  background: #fff;
}

.nav-link.is-active {
  background: linear-gradient(125deg, var(--brand), #fb7185);
  color: #fff;
  border-color: transparent;
}

.content {
  display: grid;
}

.page {
  display: none;
  gap: 16px;
}

.page.is-active {
  display: grid;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

article.card {
  padding: 18px;
}

h2,
h3 {
  font-family: "Fraunces", serif;
  margin: 0 0 10px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-row input {
  width: auto;
  margin: 0;
}

input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(125deg, var(--brand), #ef4444);
  color: #fff;
  padding: 10px 14px;
  margin-top: 12px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(125deg, var(--brand-2), #0f766e);
}

.badge {
  display: inline-block;
  background: linear-gradient(125deg, var(--brand-2), #0f766e);
  color: #fff;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.small {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.log {
  margin-top: 12px;
  min-height: 54px;
  max-height: 220px;
  overflow: auto;
  background: #0f172a;
  color: #f1f5f9;
  padding: 11px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.list {
  margin-top: 12px;
  display: grid;
  gap: 9px;
  max-height: 340px;
  overflow: auto;
}

.list-item {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.6);
}

.total-row {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 0.55s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }
}
