:root {
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.72);
  --text: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.08);
  --accent: #165dff;
  --accent-strong: #1148c7;
  --accent-violet: #7c5cff;
  --accent-mint: #18c3a5;
  --accent-soft: #edf4ff;
  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;
  --shadow-lg: 0 30px 80px rgba(16, 24, 40, 0.1);
  --shadow-md: 0 14px 34px rgba(16, 24, 40, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
}

html[data-theme="dark"] {
  --bg: #07111d;
  --surface: rgba(11, 19, 36, 0.82);
  --surface-strong: rgba(13, 22, 41, 0.94);
  --surface-soft: rgba(10, 18, 34, 0.78);
  --text: #f5f7ff;
  --muted: #a9b4c6;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #6ea8ff;
  --accent-strong: #9bc1ff;
  --accent-violet: #9d88ff;
  --accent-mint: #5be0c8;
  --accent-soft: rgba(110, 168, 255, 0.12);
  --success: #3dd598;
  --warning: #f8c15d;
  --danger: #ff7b8d;
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(22, 93, 255, 0.08), transparent 32%),
    radial-gradient(circle at bottom right, rgba(124, 92, 255, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

button,
select,
a,
.idea-card,
.proof-card,
.preview-window,
.info-card,
.history-item,
.category-chip,
.stack-card,
.modal-card {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 40px;
  position: relative;
  z-index: 1;
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.78;
  z-index: 0;
  animation: drift 16s ease-in-out infinite;
}

.orb-one {
  top: 64px;
  left: -70px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.24), rgba(22, 93, 255, 0));
}

.orb-two {
  top: 220px;
  right: -70px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22), rgba(124, 92, 255, 0));
  animation-delay: -5s;
}

.orb-three {
  bottom: 70px;
  left: 18%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(24, 195, 165, 0.18), rgba(24, 195, 165, 0));
  animation-delay: -9s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(16px, -14px, 0) scale(1.05);
  }
}

.hero,
.social-proof,
.generator,
.how-it-works,
.footer {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  padding: 24px 0;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.modal-eyebrow {
  margin: 0 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.shiny-text {
  display: inline-block;
  --shiny-base-color: #1d2738;
  --shiny-shine-color: #ffffff;
  --shiny-angle: 120deg;
  --shiny-position: 150%;
  color: var(--shiny-base-color);
  background-image: linear-gradient(
    var(--shiny-angle),
    var(--shiny-base-color) 0%,
    var(--shiny-base-color) 35%,
    var(--shiny-shine-color) 50%,
    var(--shiny-base-color) 65%,
    var(--shiny-base-color) 100%
  );
  background-size: 200% auto;
  background-position: var(--shiny-position) center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: background-position;
}

html[data-theme="dark"] .shiny-text {
  --shiny-base-color: #d9e0f0;
  --shiny-shine-color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .shiny-text {
    --shiny-position: 50%;
  }
}

.subtitle {
  margin: 18px 0 0;
  max-width: 720px;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  line-height: 1.6;
  color: var(--muted);
}

.hero-description,
.section-copy,
.history-copy,
.info-card p,
.breakdown-item p,
.history-item-text,
.trend-stats {
  line-height: 1.72;
  color: var(--muted);
}

.hero-description {
  margin: 18px 0 0;
  max-width: 64ch;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-pill,
.card-badge,
.card-shortcut,
.history-meta-chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-pill {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.theme-toggle,
.tab-button,
.button,
.modal-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.theme-toggle {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}

.theme-toggle:hover,
.proof-card:hover,
.info-card:hover,
.history-item:hover,
.stack-card:hover,
.category-chip:hover,
.preview-window:hover {
  transform: translateY(-2px);
}

.hero-preview {
  display: flex;
  justify-content: flex-end;
}

.preview-window,
.idea-card,
.proof-card,
.info-card,
.history-item,
.stack-card,
.modal-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.preview-window {
  width: 100%;
  padding: 16px;
}

.preview-window::before,
.idea-card::before,
.proof-card::before,
.info-card::before,
.history-item::before,
.stack-card::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.18), rgba(124, 92, 255, 0.18));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.preview-topbar {
  display: flex;
  gap: 8px;
}

.preview-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(16, 24, 40, 0.18);
}

.preview-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #0f172f 0%, #111b39 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.preview-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.preview-idea {
  margin-top: 14px;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.preview-grid span,
.chip-label,
.breakdown-label,
.potential-label,
.trend-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-grid span {
  color: rgba(255, 255, 255, 0.6);
}

.preview-grid strong {
  display: block;
  margin-top: 6px;
}

.social-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0 6px;
}

.scroll-stack-section {
  padding: 44px 0 18px;
}

.scroll-stack-header {
  margin-bottom: 18px;
}

.scroll-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.scroll-stack-card {
  display: grid;
  gap: 18px;
  min-height: 320px;
  padding: 38px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(82, 39, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(248, 250, 255, 0.99));
  box-shadow:
    0 32px 72px rgba(16, 24, 40, 0.14),
    inset 0 0 0 1px rgba(82, 39, 255, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

html[data-theme="dark"] .scroll-stack-card {
  background:
    radial-gradient(circle at top right, rgba(82, 39, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(16, 23, 37, 0.98), rgba(10, 16, 28, 0.98));
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.scroll-stack-card:hover {
  transform: translateY(-4px);
}

.scroll-stack-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(22, 93, 255, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-stack-card h3 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.scroll-stack-card p {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.66;
}

.scroll-stack-button {
  width: fit-content;
  margin-top: 8px;
}

.special-vault {
  padding: 12px 0 10px;
}

.special-vault-header {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.proof-card {
  padding: 20px 22px;
}

.proof-card strong {
  display: block;
  font-size: 1.04rem;
}

.proof-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.generator {
  padding: 42px 0 24px;
}

.idea-card {
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
}

.idea-card.is-updating {
  animation: cardPulse 320ms ease;
}

@keyframes cardPulse {
  0% {
    transform: translateY(8px);
    opacity: 0.88;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-glow {
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 93, 255, 0.14), rgba(22, 93, 255, 0));
  pointer-events: none;
}

.card-header,
.history-header,
.history-item-header,
.stack-card-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header {
  margin-bottom: 24px;
}

.card-badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.card-shortcut {
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
}

.icon,
.button-icon,
.chip-icon,
.section-icon,
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

kbd {
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 3px 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 0 rgba(16, 24, 40, 0.05);
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.filter-control {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-control span {
  font-weight: 600;
}

select {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

.filter-reset {
  align-self: end;
}

.card-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: rgba(246, 248, 252, 0.9);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

html[data-theme="dark"] .card-tabs,
html[data-theme="dark"] .card-shortcut,
html[data-theme="dark"] .button-ghost {
  background: rgba(255, 255, 255, 0.04);
}

.tab-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.is-active {
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.12), rgba(124, 92, 255, 0.12));
  color: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}

.tab-panel[hidden] {
  display: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.category-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

.chip-icon,
.section-icon,
.info-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(22, 93, 255, 0.12), rgba(124, 92, 255, 0.14));
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.chip-label,
.breakdown-label,
.potential-label,
.trend-label {
  color: var(--muted);
}

.category-chip strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.idea-text {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.idea-text.is-animating {
  animation: textSwap 320ms ease;
}

@keyframes textSwap {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.idea-breakdown,
.potential-panel,
.stack-section {
  margin-top: 28px;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.04);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3,
.history-title,
.modal-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.breakdown-grid,
.potential-grid,
.how-grid,
.history-list,
.stack-list,
.special-folder-grid {
  display: grid;
  gap: 14px;
}

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

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

.breakdown-item,
.potential-item,
.info-card,
.history-item,
.stack-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

html[data-theme="dark"] .breakdown-item,
html[data-theme="dark"] .potential-item,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .stack-card,
html[data-theme="dark"] .proof-card,
html[data-theme="dark"] .preview-window,
html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .history-empty,
html[data-theme="dark"] .stack-section,
html[data-theme="dark"] .idea-breakdown,
html[data-theme="dark"] .potential-panel {
  background: rgba(255, 255, 255, 0.04);
}

.potential-score-card {
  grid-column: span 1;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(6, 118, 71, 0.12);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
}

.score-badge.is-medium {
  background: rgba(181, 71, 8, 0.12);
  color: var(--warning);
}

.score-badge.is-low {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.score-bar {
  margin-top: 12px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.08);
  overflow: hidden;
}

.score-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
}

.actions,
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  margin-top: 32px;
}

.button {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.tab-button:focus-visible,
.theme-toggle:focus-visible,
.modal-close:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(22, 93, 255, 0.2);
  outline-offset: 2px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  color: #fff;
  box-shadow: 0 14px 28px rgba(22, 93, 255, 0.22);
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md);
}

.button-ghost {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.06);
}

.button.is-saved {
  background: linear-gradient(135deg, rgba(255, 214, 107, 0.2), rgba(124, 92, 255, 0.16));
  color: var(--text);
}

.button-small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.combination-note,
.status-text,
.footer p {
  color: var(--muted);
}

.combination-note {
  margin: 18px 0 0;
  font-size: 0.95rem;
}

.status-text {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 0.94rem;
}

.stack-list,
.history-list {
  margin-top: 14px;
}

.special-folder-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.stack-card-sentence,
.history-item-text {
  margin: 12px 0 0;
  font-size: 1rem;
}

.stack-meta,
.history-meta,
.trend-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.history-meta-chip,
.tag {
  min-height: 32px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.stack-actions {
  margin-top: 16px;
}

.history-empty {
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

.trend-score {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(22, 93, 255, 0.12);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.trend-metrics span {
  color: var(--muted);
  font-size: 0.92rem;
}

.special-folder-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 253, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(16, 24, 40, 0.05),
    0 18px 34px rgba(16, 24, 40, 0.08);
}

html[data-theme="dark"] .special-folder-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.special-folder-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.special-folder-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(22, 93, 255, 0.1);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.special-folder-title {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.folder-shell {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.folder-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.folder-ui {
  --folder-color: #5227ff;
  --folder-back-color: #4a23ea;
  --paper-1: #e8ebf5;
  --paper-2: #f3f6fb;
  --paper-3: #ffffff;
  position: relative;
  transform: scale(1.85);
  transition: transform 0.24s ease-in;
}

.folder-shell:hover .folder-ui,
.special-folder-card.is-open .folder-ui {
  transform: scale(1.95) translateY(-4px);
}

.folder-ui__body {
  position: relative;
  width: 100px;
  height: 80px;
  background: var(--folder-back-color);
  border-radius: 0 10px 10px 10px;
}

.folder-ui__body::after {
  position: absolute;
  z-index: 0;
  bottom: 98%;
  left: 0;
  width: 30px;
  height: 10px;
  content: "";
  background: var(--folder-back-color);
  border-radius: 5px 5px 0 0;
}

.folder-paper {
  position: absolute;
  left: 50%;
  bottom: 10%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  width: 70%;
  height: 80%;
  padding: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-1);
  transform: translate(-50%, 10%);
  transition: transform 0.3s ease-in-out, height 0.3s ease-in-out;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
}

.folder-paper:nth-child(2) {
  width: 80%;
  height: 70%;
  background: var(--paper-2);
}

.folder-paper:nth-child(3) {
  width: 90%;
  height: 60%;
  background: var(--paper-3);
}

.folder-paper__line {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(82, 39, 255, 0.18);
}

.folder-paper__text {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(57, 43, 124, 0.88);
  font-size: 0.34rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html[data-theme="dark"] .folder-paper__text {
  color: rgba(46, 36, 102, 0.86);
}

.folder-paper__line.is-short {
  width: 68%;
}

.folder-front {
  position: absolute;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 5px 10px 10px 10px;
  background: var(--folder-color);
  transform-origin: bottom;
  transition: transform 0.3s ease-in-out;
}

.folder-front.right {
  right: 0;
  transform-origin: bottom right;
}

.folder-shell:hover .folder-paper,
.special-folder-card.is-open .folder-paper {
  transform: translate(-50%, 0%);
}

.folder-shell:hover .folder-front,
.special-folder-card.is-open .folder-front {
  transform: skew(15deg) scaleY(0.6);
}

.folder-shell:hover .folder-front.right,
.special-folder-card.is-open .folder-front.right {
  transform: skew(-15deg) scaleY(0.6);
}

.special-folder-card.is-open .folder-paper:nth-child(1) {
  transform: translate(calc(-120% + var(--magnet-x, 0px)), calc(-70% + var(--magnet-y, 0px))) rotate(-15deg);
}

.special-folder-card.is-open .folder-paper:nth-child(2) {
  height: 80%;
  transform: translate(calc(10% + var(--magnet-x, 0px)), calc(-70% + var(--magnet-y, 0px))) rotate(15deg);
}

.special-folder-card.is-open .folder-paper:nth-child(3) {
  height: 80%;
  transform: translate(calc(-50% + var(--magnet-x, 0px)), calc(-100% + var(--magnet-y, 0px))) rotate(5deg);
}

.special-folder-body {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.special-folder-body[hidden] {
  display: none;
}

.special-folder-sentence {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
}

.special-folder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.special-folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.paper-preview-wrap {
  display: grid;
  gap: 18px;
}

.paper-preview-card {
  padding: 28px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.96));
  box-shadow:
    0 24px 54px rgba(16, 24, 40, 0.12),
    inset 0 0 0 1px rgba(82, 39, 255, 0.08);
}

.paper-preview-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(82, 39, 255, 0.08);
  color: #5227ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.paper-preview-title {
  margin: 18px 0 0;
  color: #121a2b;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.paper-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.paper-learn-more {
  display: grid;
  gap: 14px;
}

.paper-learn-more[hidden] {
  display: none;
}

.how-it-works {
  padding: 28px 0 8px;
}

.how-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.info-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
}

.info-card h3 {
  margin: 14px 0 10px;
  font-size: 1.08rem;
}

.footer {
  text-align: center;
}

.footer p {
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 10, 20, 0.52);
  backdrop-filter: blur(10px);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: min(860px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 24px;
}

.modal-body {
  display: grid;
  gap: 16px;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
}

.modal-section {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.05);
}

.modal-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.modal-section p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.share-card-wrap {
  display: grid;
  gap: 16px;
}

.share-canvas {
  width: 100%;
  max-width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.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;
}

@media (max-width: 960px) {
  .hero,
  .special-vault,
  .social-proof,
  .scroll-stack,
  .potential-grid,
  .breakdown-grid,
  .how-grid,
  .filter-bar,
  .special-folder-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview {
    justify-content: stretch;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 24px 16px 32px;
  }

  .chip-row,
  .card-tabs,
  .actions,
  .stack-actions,
  .special-folder-actions,
  .scroll-stack-button,
  .history-header,
  .history-item-header,
  .modal-actions,
  .hero-topbar {
    display: flex;
    flex-direction: column;
  }

  .category-chip,
  .button,
  .theme-toggle,
  .tab-button {
    width: 100%;
  }

  .idea-card,
  .preview-window,
  .proof-card,
  .modal-card {
    border-radius: 24px;
  }

  .modal-card {
    padding: 20px;
  }
}
