/* Notexa Hub — Note Arena / Notexa app branding (#2D6A4F) */

:root {
  --notexa-green: #2d6a4f;
  --notexa-green-dark: #1b4332;
  --notexa-green-soft: #40916c;
  --notexa-green-light: #d8f3dc;
  --notexa-surface: #ffffff;
  --notexa-surface-muted: #f4f9f6;
  --notexa-border: rgba(45, 106, 79, 0.14);
  --notexa-text: #1b4332;
  --notexa-muted: #52796f;
  --notexa-shadow: 0 4px 24px rgba(27, 67, 50, 0.08);
  --notexa-radius: 16px;
  --notexa-radius-sm: 10px;
}

/* ── Hub landing page (theme title + intro) ── */

.notexa-page--hub .entry-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.notexa-page--hub .entry-title {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--notexa-green-dark);
  margin-bottom: 0.35rem;
}

.notexa-page--hub .entry-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin: 0.65rem auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--notexa-green), var(--notexa-green-soft));
}

.notexa-page--hub .notexa-hub__lead,
.notexa-page--hub .entry-content > p:first-of-type {
  max-width: 42rem;
  margin: 0 auto 1.75rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--notexa-muted);
}

/* ── Hub component ── */

.notexa-hub {
  margin: 0 0 2.5rem;
  font-family: inherit;
}

.notexa-hub__filter-bar {
  background: var(--notexa-surface-muted);
  border: 1px solid var(--notexa-border);
  border-radius: var(--notexa-radius);
  padding: 1rem 1.15rem 1.1rem;
  margin-bottom: 1.35rem;
}

.notexa-hub__filter-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--notexa-muted);
  margin-bottom: 0.65rem;
}

.notexa-hub__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.notexa-hub__tag {
  appearance: none;
  border: 1px solid var(--notexa-border);
  background: var(--notexa-surface);
  color: var(--notexa-muted);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.12s ease, box-shadow 0.18s ease;
}

.notexa-hub__tag:hover,
.notexa-hub__tag:focus-visible {
  border-color: var(--notexa-green-soft);
  color: var(--notexa-text);
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.1);
  outline: none;
}

.notexa-hub__tag.is-active {
  background: linear-gradient(135deg, var(--notexa-green), var(--notexa-green-soft));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.28);
}

.notexa-hub__grid-wrap {
  transition: opacity 0.2s ease;
}

.notexa-hub__grid-wrap.is-filtered {
  animation: notexa-fade-in 0.25s ease;
}

@keyframes notexa-fade-in {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notexa-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.notexa-hub__grid--compact {
  grid-template-columns: 1fr;
  max-width: 36rem;
}

.notexa-hub__card {
  position: relative;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1.15rem 1.2rem;
  border-radius: var(--notexa-radius);
  border: 1px solid var(--notexa-border);
  background: var(--notexa-surface);
  color: var(--notexa-text);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(27, 67, 50, 0.04);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.notexa-hub__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--notexa-green), var(--notexa-green-soft));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notexa-hub__card:hover,
.notexa-hub__card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(64, 145, 108, 0.45);
  box-shadow: var(--notexa-shadow);
  outline: none;
}

.notexa-hub__card:hover::before,
.notexa-hub__card:focus-visible::before {
  opacity: 1;
}

.notexa-hub__card-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--notexa-green-light), rgba(216, 243, 220, 0.5));
  border: 1px solid rgba(45, 106, 79, 0.12);
}

.notexa-hub__card-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.notexa-hub__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  flex: 1;
}

.notexa-hub__card-title {
  font-weight: 650;
  font-size: 1.06rem;
  color: var(--notexa-green-dark);
  line-height: 1.3;
}

.notexa-hub__card-desc {
  font-size: 0.88rem;
  color: var(--notexa-muted);
  line-height: 1.5;
}

.notexa-hub__card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.notexa-hub__card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(45, 106, 79, 0.09);
  color: var(--notexa-green);
}

.notexa-hub__card-tag--legal,
.notexa-hub__card-tag--privacy {
  background: rgba(91, 33, 182, 0.08);
  color: #5b21b6;
}

.notexa-hub__card-tag--support,
.notexa-hub__card-tag--contact {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
}

.notexa-hub__card-tag--security {
  background: rgba(180, 83, 9, 0.1);
  color: #b45309;
}

.notexa-hub__card-arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--notexa-green-soft);
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.notexa-hub__card:hover .notexa-hub__card-arrow,
.notexa-hub__card:focus-visible .notexa-hub__card-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ── Content pages (privacy, help) ── */

.notexa-page--privacy .entry-header,
.notexa-page--help .entry-header {
  display: none;
}

.notexa-content {
  max-width: 46rem;
  margin: 0 auto 2.5rem;
  padding: 2rem 2.25rem;
  background: var(--notexa-surface);
  border: 1px solid var(--notexa-border);
  border-radius: var(--notexa-radius);
  box-shadow: var(--notexa-shadow);
  color: var(--notexa-text);
  line-height: 1.7;
}

.notexa-content h1 {
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--notexa-green-dark);
  margin: 0 0 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--notexa-green-light);
}

.notexa-content h1 + p {
  color: var(--notexa-muted);
  font-size: 0.95rem;
  margin-top: 0;
}

.notexa-content h2 {
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--notexa-green-dark);
  margin: 2rem 0 0.65rem;
  scroll-margin-top: 5rem;
}

.notexa-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--notexa-text);
  margin: 1.35rem 0 0.5rem;
}

.notexa-content p,
.notexa-content li {
  font-size: 1rem;
  color: #2d4a3e;
}

.notexa-content ul,
.notexa-content ol {
  padding-left: 1.35rem;
  margin: 0.5rem 0 1rem;
}

.notexa-content li {
  margin-bottom: 0.35rem;
}

.notexa-content a {
  color: var(--notexa-green);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(45, 106, 79, 0.35);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.notexa-content a:hover,
.notexa-content a:focus-visible {
  color: var(--notexa-green-soft);
  text-decoration-color: var(--notexa-green-soft);
}

.notexa-content strong {
  color: var(--notexa-green-dark);
  font-weight: 600;
}

/* Help table of contents */

.notexa-toc,
.notexa-content > nav:not(.notexa-content__footer) {
  background: var(--notexa-surface-muted);
  border: 1px solid var(--notexa-border);
  border-radius: var(--notexa-radius-sm);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0 2rem;
}

.notexa-toc__title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--notexa-muted);
  margin-bottom: 0.75rem;
}

.notexa-toc ul,
.notexa-content > nav:not(.notexa-content__footer) ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 1.5rem;
}

.notexa-toc li,
.notexa-content > nav:not(.notexa-content__footer) li {
  break-inside: avoid;
  margin-bottom: 0.4rem;
}

.notexa-toc a,
.notexa-content > nav:not(.notexa-content__footer) a {
  display: inline-block;
  padding: 0.15rem 0;
  text-decoration: none;
  font-size: 0.92rem;
}

.notexa-toc a:hover,
.notexa-toc a:focus-visible,
.notexa-content > nav:not(.notexa-content__footer) a:hover,
.notexa-content > nav:not(.notexa-content__footer) a:focus-visible {
  text-decoration: underline;
}

/* Footer nav on content pages */

.notexa-content__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--notexa-border);
  font-size: 0.92rem;
}

.notexa-content__footer a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--notexa-border);
  background: var(--notexa-surface-muted);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notexa-content__footer a:hover,
.notexa-content__footer a:focus-visible {
  background: var(--notexa-green-light);
  border-color: rgba(45, 106, 79, 0.25);
  text-decoration: none;
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .notexa-content {
    padding: 1.35rem 1.15rem;
    border-radius: 12px;
  }

  .notexa-toc ul,
  .notexa-content > nav:not(.notexa-content__footer) ul {
    columns: 1;
  }

  .notexa-hub__grid {
    grid-template-columns: 1fr;
  }

  .notexa-hub__card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notexa-hub__card,
  .notexa-hub__tag,
  .notexa-hub__grid-wrap.is-filtered {
    animation: none;
    transition: none;
  }
}
