/* ============================================
   SISTER HARUM — Halaman sekunder (/quizz, /apps, error)
   Dipasangkan SETELAH home.css: home.css
   menyediakan token, chrome, & .shell;
   berkas ini hanya komponen halaman sekunder.
   ============================================ */

.hub-head {
  margin: 0 0 clamp(1.5rem, 4vh, 2.25rem);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease),
    color 0.18s var(--ease);
}

.back:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  transform: translateY(-2px);
  text-decoration: none;
}

.back:active {
  transform: translateY(0);
}

.hub-title {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hub-tagline {
  max-width: 65ch;
  margin: 0.35rem 0 0;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  color: var(--muted);
}

/* ---- Panel daftar (satu wadah, bukan grid kartu) ---- */
.hub-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 64px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.hub-list li:last-child .hub-item {
  border-bottom: 0;
}

.hub-item:hover {
  background: var(--tint);
  color: var(--brand-deep);
  text-decoration: none;
}

.hub-item:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.hub-item__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--tint);
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s var(--ease);
}

.hub-item:hover .hub-item__icon {
  background: var(--surface);
}

.hub-item__label {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.hub-item__arrow {
  flex: none;
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--muted);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}

.hub-item:hover .hub-item__arrow {
  color: var(--brand);
  transform: translate(2px, -2px);
}

/* ---- Empty state ---- */
.hub-empty {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.25rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.hub-empty code {
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--tint);
  color: var(--brand-deep);
  font-size: 0.9em;
}

/* ---- Footer: hanya kredit, ditengahkan ---- */
.colophon {
  justify-content: center;
}

/* ---- Halaman status (error.html) ---- */
.state {
  display: grid;
  place-items: center;
  min-height: clamp(340px, 58vh, 560px);
}

.state-panel {
  width: min(100%, 30rem);
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.state-code {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 2.5rem + 4vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand);
}

.state-title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.state-text {
  max-width: 40ch;
  margin: 0.6rem auto 0;
  color: var(--text);
}

.state-panel .back {
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .hub-item {
    padding: 0.7rem 0.85rem;
  }

  .state {
    min-height: 0;
    padding-top: 0.5rem;
  }
}
