@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --surface-0: #f4f5fb;
  --surface-1: rgba(255, 255, 255, 0.8);
  --surface-2: rgba(255, 255, 255, 0.6);
  --text-primary: #0f1324;
  --text-muted: #5a6279;
  --accent: #7c5cff;
  --accent-strong: #5a3bf2;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --border-soft: rgba(124, 92, 255, 0.22);
  --shadow-soft: 0 18px 46px rgba(16, 19, 45, 0.14);
  --shadow-strong: 0 30px 60px rgba(16, 19, 45, 0.22);
}
  
body.dark {
  --surface-0: #0d101b;
  --surface-1: rgba(20, 24, 41, 0.78);
  --surface-2: rgba(23, 27, 49, 0.64);
  --text-primary: #e8ecff;
  --text-muted: #9ba4c4;
  --accent: #9f8bff;
  --accent-strong: #b2a1ff;
  --accent-soft: rgba(159, 139, 255, 0.16);
  --border-soft: rgba(136, 147, 198, 0.28);
  --shadow-soft: 0 22px 60px rgba(4, 6, 14, 0.48);
  --shadow-strong: 0 30px 80px rgba(4, 6, 14, 0.55);
}

body.theme-aurora {
  --surface-0: #050916;
  --surface-1: rgba(8, 13, 24, 0.86);
  --surface-2: rgba(15, 23, 42, 0.74);
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-strong: #60a5fa;
  --accent-soft: rgba(45, 212, 191, 0.16);
  --border-soft: rgba(148, 163, 184, 0.32);
  --shadow-soft: 0 24px 70px rgba(2, 6, 23, 0.62);
  --shadow-strong: 0 36px 96px rgba(2, 6, 23, 0.78);
  --feed-card-bg: rgba(7, 11, 23, 0.9);
  --feed-card-border: rgba(148, 163, 184, 0.26);
  --feed-card-shadow: 0 48px 120px -46px rgba(2, 6, 23, 0.92);
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.28), transparent 46%),
    radial-gradient(circle at 84% 12%, rgba(45, 212, 191, 0.24), transparent 44%),
    radial-gradient(circle at 78% 84%, rgba(248, 113, 113, 0.16), transparent 42%),
    linear-gradient(160deg, #0b1020 0%, #020617 100%);
}

body.theme-luxury-dark {
  --surface-0: #0b0b0a;
  --surface-1: rgba(20, 18, 14, 0.84);
  --surface-2: rgba(30, 26, 18, 0.68);
  --text-primary: #f2e9d6;
  --text-muted: #b8ab8c;
  --accent: #d6b479;
  --accent-strong: #e6c892;
  --accent-soft: rgba(214, 180, 121, 0.18);
  --border-soft: rgba(214, 180, 121, 0.22);
  --shadow-soft: 0 22px 60px rgba(8, 6, 2, 0.5);
  --shadow-strong: 0 34px 90px rgba(8, 6, 2, 0.65);
}
  
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}
  
  body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface-0);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: background 0.4s ease, color 0.4s ease;
}

  a {
  color: inherit;
  text-decoration: none;
}

  a:hover,
a:focus-visible {
  text-decoration: underline;
}

  .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
  
body.home {
  position: relative;
  overflow-x: hidden;
}

body.home::before,
body.home::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body.home::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(124, 92, 255, 0.18), transparent 45%),
    radial-gradient(circle at 82% 12%, rgba(98, 212, 255, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(236, 239, 255, 0.85), rgba(225, 230, 255, 0.55));
}

body.home.dark::before {
  background:
    radial-gradient(circle at 10% 18%, rgba(124, 92, 255, 0.22), transparent 42%),
    radial-gradient(circle at 78% 10%, rgba(66, 181, 255, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(11, 13, 28, 0.96), rgba(11, 14, 32, 0.85));
}

body.home.theme-luxury-dark::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(214, 180, 121, 0.18), transparent 48%),
    radial-gradient(circle at 78% 12%, rgba(129, 99, 46, 0.2), transparent 46%),
    linear-gradient(145deg, rgba(8, 7, 5, 0.98), rgba(14, 12, 8, 0.88));
}

body.home::after {
  z-index: -1;
  background: radial-gradient(circle at center 120%, rgba(124, 92, 255, 0.24), transparent 65%);
  opacity: 0.7;
}

body.home.theme-luxury-dark::after {
  background: radial-gradient(circle at center 120%, rgba(214, 180, 121, 0.28), transparent 66%);
  opacity: 0.6;
}

body.home.theme-luxury-dark .feed-navbar__link {
  color: rgba(245, 234, 212, 0.88);
}

body.home.theme-luxury-dark .feed-navbar__link:hover,
body.home.theme-luxury-dark .feed-navbar__link:focus-visible {
  color: #fff5e6;
}

body.home.theme-luxury-dark .feed-navbar__link.is-active {
  color: #fff5e6;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 10vw, 96px);
  padding: clamp(32px, 8vw, 96px) clamp(18px, 6vw, 120px) 100px;
  width: 100%;
}

.home-header {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3.6vw, 40px);
  padding: clamp(12px, 2.8vw, 20px) clamp(20px, 3.8vw, 34px);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.home-header .logo a {
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  flex-wrap: wrap;
}

.home-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.home-nav a:hover,
.home-nav a:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}


.home .signup,
.home .login {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
  cursor: pointer;
}

.home .signup {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.25);
}

.home .signup:hover,
.home .signup:focus-visible {
  transform: translateY(-1px);
  background: var(--accent-strong);
  box-shadow: 0 12px 36px rgba(124, 92, 255, 0.32);
}

.home .login {
  border-color: var(--border-soft);
  background: var(--surface-2);
}

.home .login:hover,
.home .login:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.18);
}

.theme-toggle {
  border: none;
  background: var(--surface-2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.home-search {
  display: flex;
  justify-content: center;
  position: relative;
}

.home-search__inner {
  width: min(960px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 4.5rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.home-search__subtitle {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.6;
}

.home-search__form.feed-search {
  --home-search-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  margin: 10px auto 0;
  width: min(760px, 100%);
  padding: clamp(6px, 1.4vw, 14px) clamp(12px, 2.4vw, 20px);
  gap: clamp(8px, 1.5vw, 14px);
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: clamp(42px, 4.8vw, 58px);
  height: clamp(42px, 4.8vw, 58px);
  text-align: left;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--home-search-shadow);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-search__form.feed-search:focus-within,
.home-search__form.feed-search.is-open {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: var(--home-search-shadow);
}

.home-search__form.feed-search.is-open {
  border-radius: 999px 999px 20px 20px;
}

body.dark .home-search__form.feed-search {
  background: rgba(2, 6, 23, 0.92);
  border-color: rgba(71, 85, 105, 0.6);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.7);
}

body.theme-luxury-dark .home-search__form.feed-search {
  background: rgba(12, 10, 7, 0.92);
  border-color: rgba(214, 180, 121, 0.35);
  box-shadow: 0 22px 52px rgba(8, 6, 2, 0.7);
}

body.dark .home-search__form.feed-search:focus-within,
body.dark .home-search__form.feed-search.is-open {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.7);
}

body.theme-luxury-dark .home-search__form.feed-search:focus-within,
body.theme-luxury-dark .home-search__form.feed-search.is-open {
  border-color: rgba(214, 180, 121, 0.7);
  box-shadow: 0 22px 52px rgba(8, 6, 2, 0.7);
}

.home-search__form.feed-search .feed-search__icon {
  color: #0ea5e9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.home-search__form.feed-search .feed-search__icon svg {
  width: 100%;
  height: 100%;
}

body.theme-luxury-dark .home-search__form.feed-search .feed-search__icon {
  color: #d6b479;
}

.home-search__form.feed-search input[type="search"] {
  font-size: clamp(0.9rem, 1.8vw, 1.08rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  caret-color: #0ea5e9;
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
}

body.theme-luxury-dark .home-search__form.feed-search input[type="search"] {
  caret-color: #d6b479;
}

.home-search__form.feed-search input[type="search"]::-webkit-search-decoration,
.home-search__form.feed-search input[type="search"]::-webkit-search-cancel-button,
.home-search__form.feed-search input[type="search"]::-webkit-search-results-button,
.home-search__form.feed-search input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

.home-search__form.feed-search input[type="search"]::placeholder {
  color: rgba(100, 116, 139, 0.75);
}

body.dark .home-search__form.feed-search input[type="search"]::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

body.theme-luxury-dark .home-search__form.feed-search input[type="search"]::placeholder {
  color: rgba(184, 171, 140, 0.75);
}

.home-search__form.feed-search .feed-search__submit {
  padding: clamp(6px, 1.2vw, 8px) clamp(12px, 2vw, 20px);
  font-size: clamp(0.82rem, 1.2vw, 0.95rem);
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  color: #fff;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.25);
  border: none;
}

body.theme-luxury-dark .home-search__form.feed-search .feed-search__submit {
  background: linear-gradient(135deg, #d6b479, #a07a3f);
  box-shadow: 0 12px 24px rgba(122, 90, 40, 0.35);
}

.home-search__form.feed-search .feed-search__submit:hover,
.home-search__form.feed-search .feed-search__submit:focus-visible {
  background: linear-gradient(135deg, #0284c7, #16a34a);
  transform: none;
}

body.theme-luxury-dark .home-search__form.feed-search .feed-search__submit:hover,
body.theme-luxury-dark .home-search__form.feed-search .feed-search__submit:focus-visible {
  background: linear-gradient(135deg, #e4c48a, #b38643);
}

.home-search__form.feed-search .feed-search__suggestions {
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 12px 16px 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
  z-index: 600;
}

.home-search__form.feed-search.is-open .feed-search__suggestions {
  top: calc(100% - 2px);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top-color: transparent;
}

.home-search__form.feed-search .feed-search__heading {
  margin-bottom: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(100, 116, 139, 0.85);
}

.home-search__form.feed-search .feed-search__list {
  gap: 4px;
}

.home-search__form.feed-search .feed-search__option {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 12px 10px 46px;
  border-radius: 12px;
}

.home-search__form.feed-search .feed-search__option::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(100, 116, 139, 0.45);
  border-radius: 50%;
  transform: translateY(-50%);
}

.home-search__form.feed-search .feed-search__option::after {
  content: '';
  position: absolute;
  left: 28px;
  top: 50%;
  width: 7px;
  height: 1.5px;
  background: rgba(100, 116, 139, 0.45);
  transform: translateY(4px) rotate(45deg);
  border-radius: 999px;
}

.home-search__form.feed-search .feed-search__option:hover,
.home-search__form.feed-search .feed-search__option.is-active,
.home-search__form.feed-search .feed-search__option:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
}

.home-search__form.feed-search .feed-search__option-index {
  display: none;
}

.home-search__form.feed-search .feed-search__option-label {
  flex: 1;
  font-weight: 500;
}

.home-search__form.feed-search .feed-search__option-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(100, 116, 139, 0.8);
}

.home-search__form.feed-search .feed-search__empty {
  background: transparent;
  color: rgba(100, 116, 139, 0.8);
  padding: 8px 12px;
}

body.dark .home-search__form.feed-search .feed-search__suggestions {
  background: rgba(2, 6, 23, 0.92);
  border-color: rgba(71, 85, 105, 0.45);
  box-shadow: 0 28px 56px rgba(2, 6, 23, 0.7);
}

body.dark .home-search__form.feed-search .feed-search__option:hover,
body.dark .home-search__form.feed-search .feed-search__option.is-active,
body.dark .home-search__form.feed-search .feed-search__option:focus-visible {
  background: rgba(148, 163, 184, 0.12);
}

body.dark .home-search__form.feed-search .feed-search__option::before {
  border-color: rgba(148, 163, 184, 0.6);
}

body.dark .home-search__form.feed-search .feed-search__option::after {
  background: rgba(148, 163, 184, 0.6);
}

body.dark .home-search__form.feed-search .feed-search__option-meta {
  color: rgba(148, 163, 184, 0.75);
}

body.dark .home-search__form.feed-search .feed-search__empty {
  color: rgba(148, 163, 184, 0.75);
}

.home-hero-actions {
  display: none !important;
}

.home-hero-action {
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-hero-action--ghost {
  border-color: var(--border-soft);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
}

.home-hero-action--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.32);
}

.home-hero-action:hover,
.home-hero-action:focus-visible {
  transform: translateY(-1px);
}

.home-hero-action--ghost:hover,
.home-hero-action--ghost:focus-visible {
  border-color: var(--accent);
}

.home-hero-action--solid:hover,
.home-hero-action--solid:focus-visible {
  box-shadow: 0 14px 32px rgba(124, 92, 255, 0.4);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  padding: 14px 16px;
  background: var(--surface-1);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.globe-icon {
  font-size: 1.2rem;
  color: var(--accent);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text-primary);
  padding: 8px 4px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-button {
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-button:hover,
.search-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(124, 92, 255, 0.34);
}

.toggle-switch {
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-visual {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}

.toggle-visual::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 19, 45, 0.15);
  transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-visual {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px transparent;
}

.toggle-switch input:checked + .toggle-visual::after {
  transform: translateX(22px);
}

.toggle-switch input:focus-visible + .toggle-visual {
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3);
}

.toggle-copy {
  font-weight: 500;
  white-space: nowrap;
}

.home-content {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 32px);
}

.home-content.is-hidden {
  display: none;
}

.home-learning.is-hidden {
  display: none;
}

.home-learning {
  margin-top: clamp(24px, 6vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 32px);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: clamp(24px, 6vw, 40px);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.home-learning__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-learning__header h3 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
}

.home-learning__subtitle {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
}

.home-learning__browse {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-0);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-learning__browse:hover,
.home-learning__browse:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.home-learning__grid {
  display: grid;
  gap: clamp(18px, 4vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.learning-tile {
  background: var(--surface-0);
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-tile:hover,
.learning-tile:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.learning-tile__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.learning-tile__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.learning-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.learning-tile__fallback {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--accent-strong);
}

.learning-tile__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 19, 36, 0.75);
  color: #fff;
  backdrop-filter: blur(6px);
}

.learning-tile__badge--progress {
  background: rgba(124, 92, 255, 0.88);
}

.learning-tile__badge--cta {
  background: rgba(15, 19, 36, 0.68);
}

.learning-tile__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 4vw, 24px);
}

.learning-tile__type {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.learning-tile__title {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 700;
  line-height: 1.35;
}

.learning-tile__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.learning-tile__context {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.learning-tile__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-tile__topic {
  background: var(--surface-2);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.learning-tile__cta {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.learning-tile__link:hover .learning-tile__cta,
.learning-tile__link:focus-visible .learning-tile__cta {
  transform: translateY(-1px);
  background: rgba(124, 92, 255, 0.3);
}

@media (max-width: 720px) {
  .home-learning {
    border-radius: 22px;
  }

  .learning-tile {
    border-radius: 18px;
  }

  .learning-tile__badge {
    top: 10px;
    left: 10px;
  }
}

.home-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 26px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.home-column h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.home-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.home-content.is-revealing .home-item,
.home-learning.is-revealing .learning-tile {
  animation: homeCardReveal 420ms ease-out both;
  animation-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .home-content.is-revealing .home-item,
  .home-learning.is-revealing .learning-tile {
    animation: none;
  }
}

.home-item {
  display: block;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-item:hover,
.home-item:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(16, 19, 45, 0.16);
}

.home-item__link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.home-item__media {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: var(--surface-1);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-item__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.home-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.home-item__title {
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.home-item__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.home-empty-state {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-muted);
  text-align: center;
}

.home-footer {
  margin-top: auto;
  padding: clamp(32px, 6vw, 48px);
  background: rgba(9, 11, 25, 0.08);
  border-top: 1px solid rgba(124, 92, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.home-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.home-footer .footer-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-footer .footer-links a:hover,
.home-footer .footer-links a:focus-visible {
  color: var(--text-primary);
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.profile-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.profile-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-avatar-btn:hover,
.profile-avatar-btn:focus-visible,
.profile-menu.open .profile-avatar-btn {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px var(--accent);

  background: var(--accent-soft);
  outline: none;

}

.profile-avatar-btn img {
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-caret {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.profile-menu.open .profile-avatar-caret {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 210px;
  border-radius: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-strong);

  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 6;

}

.profile-menu.open .profile-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.profile-menu-item--danger {
  color: var(--danger, #dc2626);
}

.avatar {
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.avatar--sm {
  width: 28px;
  height: 28px;
}

.avatar--md {
  width: 40px;
  height: 40px;
}

.avatar--lg {
  width: 64px;
  height: 64px;
}

@media (max-width: 1024px) {
  .home-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-nav {
    order: 3;
    justify-content: center;
  }

  .home-main {
    padding: clamp(28px, 10vw, 80px) clamp(16px, 6vw, 60px) 80px;
  }
}

@media (max-width: 720px) {
  .home-header {
    border-radius: 22px;
  }

  .home-nav a {
    font-size: 0.85rem;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .search-box input {
    width: 100%;
  }

  .search-button {
    width: 100%;
  }

  .toggle-switch {
    flex-direction: row;
  }

  .home-item__link {
    align-items: flex-start;
  }

  .home-item__media {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 540px) {
  .home-main {
    padding-bottom: 70px;
  }

  .home-actions {
    width: 100%;
    justify-content: center;
  }

  .home-content {
    grid-template-columns: 1fr;
  }

  .home-footer .footer-links {
    flex-direction: column;
    align-items: center;
  }

}



/* Tools marketplace */
body.tools-page {
  background: var(--surface-0);
  color: var(--text-primary);
}

body.tools-page .tools-main {
  width: min(1100px, 96vw);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 0 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 72px);
}

.tools-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: clamp(24px, 6vw, 64px);
  background: var(--surface-1);
  border-radius: 32px;
  padding: clamp(32px, 6vw, 80px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.tools-hero__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tools-hero__eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
}

.tools-hero__title {
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.1;
  font-weight: 700;
}

.tools-hero__body {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.tools-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.tools-hero__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tools-hero__link:hover,
.tools-hero__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(124, 92, 255, 0.42);
}

.tools-hero__note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tools-hero__art {
  position: relative;
  min-height: clamp(180px, 30vw, 260px);
}

.tools-hero__orb,
.tools-hero__spark {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.4px);
}

.tools-hero__orb {
  inset: 0;
  background: radial-gradient(circle at 40% 35%, rgba(124, 92, 255, 0.32), transparent 65%),
    radial-gradient(circle at 70% 60%, rgba(98, 212, 255, 0.28), transparent 68%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(124, 92, 255, 0.12));
}

.tools-hero__spark {
  width: 120px;
  height: 120px;
  right: 8%;
  bottom: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  animation: heroSpark 6s ease-in-out infinite;
}

@keyframes heroSpark {
  0%,
  100% {
    transform: scale(0.95) translateY(0);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08) translateY(-6px);
    opacity: 1;
  }
}

.tools-catalog {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tools-catalog__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tools-catalog__title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
}

.tools-catalog__subtitle {
  color: var(--text-muted);
}

.tools-grid {
  display: grid;
  gap: clamp(20px, 4vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tool-card {
  background: var(--surface-1);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 320px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.tool-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

.tool-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-card__title {
  font-size: 1.1rem;
  font-weight: 600;
}

.tool-card__tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tool-card__badge {
  margin-left: auto;
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tool-card__badge[data-state="upcoming"] {
  background: rgba(255, 200, 88, 0.16);
  color: #ffb74d;
}

.tool-card__badge[data-state="concept"] {
  background: rgba(98, 212, 255, 0.18);
  color: #45c3ff;
}

.tool-card__description {
  color: var(--text-muted);
  line-height: 1.6;
}

.tool-converter {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-dropzone {
  border: 2px dashed var(--border-soft);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  background: var(--surface-2);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  outline: none;
}

.tool-dropzone[data-dragging="true"] {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
  transform: translateY(-2px);
}

.tool-dropzone[data-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

.tool-dropzone:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.22);
}

.tool-dropzone__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.tool-dropzone__emoji {
  font-size: 2rem;
}

.tool-dropzone__lead {
  font-weight: 600;
}

.tool-dropzone__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tool-dropzone__action {
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-dropzone__action:hover,
.tool-dropzone__action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(124, 92, 255, 0.28);
}

.tool-status {
  font-weight: 500;
}

.tool-progress {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-alert {
  background: rgba(255, 92, 92, 0.14);
  color: #ff5c5c;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 92, 92, 0.3);
  font-size: 0.95rem;
}

.tool-result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(124, 92, 255, 0.12);
}

.tool-result__download {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-result__download:hover,
.tool-result__download:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(124, 92, 255, 0.32);
}

.tool-coming-soon {
  margin-top: auto;
  padding: 20px;
  border-radius: 18px;
  background: rgba(124, 92, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-coming-soon__copy {
  color: var(--text-muted);
}

.tool-coming-soon__cta {
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 720px) {
  .tools-hero {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .tool-card {
    padding: 20px;
  }

  .tool-dropzone {
    padding: 24px 16px;
  }
}

body.dark .tools-hero,
body.dark .tool-card,
body.dark .tool-result,
body.dark .tool-coming-soon {
  background: rgba(17, 20, 36, 0.92);
  border-color: rgba(86, 92, 122, 0.28);
}

body.dark .tool-dropzone {
  background: rgba(28, 31, 52, 0.92);
}

body.dark .tool-coming-soon__cta {
  border-color: rgba(86, 92, 122, 0.4);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  body.home {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .home-header,
  .home-main,
  .home-search,
  .home-search__inner,
  .home-content,
  .home-learning {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  h1,
  .hero-title,
  .home-learning__header h3 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  h2,
  .home-column h3,
  .home-learning__header h3 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .home-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.75rem;
  }

  .home-nav {
    justify-content: center;
    row-gap: 0.3rem;
  }

  .home-actions,
  .auth-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .home-search {
    padding-left: 0;
    padding-right: 0;
    min-height: 70vh;
    align-items: center;
  }

  .home-search__inner {
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .home-search__subtitle {
    margin: 0 auto;
    text-align: center;
  }

  .home-search__form.feed-search {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0.75rem 0;
    box-sizing: border-box;
    border-radius: 0;
    height: auto;
    min-height: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.dark .home-search__form.feed-search,
  body.theme-luxury-dark .home-search__form.feed-search {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .home-search__form.feed-search .feed-search__icon {
    display: none;
  }

  .home-search__form.feed-search input[type="search"],
  .home-search__form.feed-search .feed-search__submit {
    width: min(320px, 100%);
    box-sizing: border-box;
  }

  .home-search__form.feed-search input[type="search"] {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(6, 10, 20, 0.85);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.35);
    color: #e2e8f0;
  }

  .home-search__form.feed-search input[type="search"]::placeholder {
    color: rgba(226, 232, 240, 0.72);
  }

  body.dark .home-search__form.feed-search input[type="search"] {
    color: #e2e8f0;
  }

  .home-search__form.feed-search .feed-search__submit {
    width: auto;
    min-width: 140px;
    min-height: 36px;
    height: 36px;
    padding: 0 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    color: #fff;
    box-shadow: 0 6px 12px rgba(14, 165, 233, 0.24);
    margin-top: 6px;
    order: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    align-self: center;
    flex: 0 0 auto;
    line-height: 1;
  }

  body.dark .home-search__form.feed-search .feed-search__submit {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    color: #fff;
  }

  .home-search__form.feed-search .feed-search__suggestions {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
  }

  .home-search__form.feed-search .feed-search__option {
    padding-left: 14px;
  }

  .home-search__form.feed-search .feed-search__option::before,
  .home-search__form.feed-search .feed-search__option::after {
    display: none;
  }

  .toggle-switch {
    width: 100%;
    justify-content: space-between;
    margin: 0;
    max-width: 260px;
  }

  .toggle-copy {
    white-space: normal;
  }

  .home-content {
    grid-template-columns: 1fr;
  }

  .home-learning {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .home-learning__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-learning__browse {
    width: 100%;
    text-align: center;
  }

  .home-hero-actions {
    position: absolute;
    top: clamp(12px, 4vw, 18px);
    right: clamp(12px, 5vw, 20px);
    display: inline-flex;
    gap: 10px;
    align-items: center;
    z-index: 2;
  }

  .home-hero-action {
    backdrop-filter: blur(8px);
  }

  .home-hero-action--ghost {
    background: linear-gradient(135deg, var(--surface-1), rgba(124, 92, 255, 0.08));
  }
}

@media (max-width: 620px) {
  .home-search__form.feed-search {
    gap: 8px;
    padding: 0;
  }

  .home-search__form.feed-search input[type="search"] {
    font-size: 0.9rem;
    height: 34px;
  }

  .home-search__form.feed-search .feed-search__submit {
    width: auto;
    min-width: 120px;
    min-height: 34px;
    height: 34px;
    padding: 0 14px;
    font-size: 0.72rem;
    margin-top: 4px;
    flex: 0 0 auto;
  }
}
