
:root {
  --bg: #f6f8fc;
  --bg-elevated: rgba(255, 255, 255, 0.84);
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --primary: #4f8cff;
  --primary-dark: #3a74e8;
  --primary-fade: rgba(79, 140, 255, 0.14);
  --accent: #eaf2ff;
  --navy: #0f172a;
  --success: #12b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow-button: 0 14px 30px rgba(79, 140, 255, 0.24);
  --max-width: 1180px;
  --sidebar-width: 278px;
  --font-sans: Inter, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(122, 166, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, #f4f7fc 100%);
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(79, 140, 255, 0.16);
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.08);
  backdrop-filter: blur(16px);
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f8cff, #7aa6ff);
  box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.12);
}

.section-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 0;
}

.text-gradient {
  background: linear-gradient(120deg, #0f172a 10%, #356ee0 55%, #6f99ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(246, 248, 252, 0.72);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-pill {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(122, 166, 255, 0.4));
  border: 1px solid rgba(79, 140, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 14px 32px rgba(79, 140, 255, 0.14);
  display: grid;
  place-items: center;
  position: relative;
}

.brand-pill::before,
.brand-pill::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #4f8cff;
}

.brand-pill::before {
  width: 16px;
  height: 16px;
  filter: blur(10px);
  opacity: 0.45;
}

.brand-pill::after {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #4f8cff, #7aa6ff);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
  transition: 0.2s ease;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

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

.button,
.button-secondary,
.button-ghost {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button {
  color: #ffffff;
  background: linear-gradient(135deg, #4f8cff, #7aa6ff);
  box-shadow: var(--shadow-button);
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover {
  transform: translateY(-1px);
}

.button:hover {
  box-shadow: 0 18px 38px rgba(79, 140, 255, 0.3);
}

.button-secondary {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.button-ghost {
  color: var(--text-soft);
  background: transparent;
}

.hero {
  padding: 72px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 32px;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  max-width: 11ch;
}

.hero-copy p {
  margin: 0;
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-proof {
  margin-top: 36px;
  display: grid;
  gap: 14px;
}

.proof-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(79, 140, 255, 0.12);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.proof-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.proof-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.proof-icon {
  min-width: 42px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(122, 166, 255, 0.3));
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  font-weight: 800;
}

.hero-visual {
  padding: 26px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.72));
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
}

.hero-visual::before {
  width: 220px;
  height: 220px;
  background: rgba(79, 140, 255, 0.12);
  top: -70px;
  right: -50px;
}

.hero-visual::after {
  width: 170px;
  height: 170px;
  background: rgba(122, 166, 255, 0.15);
  bottom: -50px;
  left: -30px;
}

.logo-stage {
  padding: 22px;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(79,140,255,0.08), transparent 45%), #ffffff;
  border: 1px solid rgba(79, 140, 255, 0.1);
  position: relative;
}

.logo-stage img {
  width: min(100%, 620px);
  margin: 0 auto;
}

.hero-surface {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.surface-card {
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: rgba(244, 248, 255, 0.92);
  border: 1px solid rgba(79, 140, 255, 0.12);
}

.surface-card strong {
  display: block;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.surface-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.mini-stat {
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.mini-stat strong {
  font-size: 1.2rem;
}

.mini-stat span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.section {
  padding: 74px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--text-soft);
  max-width: 60ch;
  line-height: 1.7;
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 20px;
}

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

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

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

.card {
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.feature-card,
.step-card,
.output-card,
.pricing-card,
.testimonial-card,
.metric-card,
.shell-card,
.list-card,
.auth-card,
.upload-card,
.history-card,
.quiz-card,
.settings-card {
  padding: 26px;
}

.feature-card h3,
.output-card h3,
.pricing-card h3,
.metric-card h3,
.shell-card h3,
.list-card h3,
.auth-card h1,
.upload-card h2,
.history-card h3,
.quiz-card h3,
.settings-card h3,
.step-card h3 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.feature-card p,
.step-card p,
.output-card p,
.pricing-card p,
.testimonial-card p,
.metric-card p,
.shell-card p,
.list-card p,
.auth-card p,
.upload-card p,
.history-card p,
.quiz-card p,
.settings-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.feature-card .icon,
.output-card .icon,
.step-number {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(122, 166, 255, 0.3));
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.step-number {
  font-size: 1rem;
}

.feature-list,
.clean-list,
.result-list,
.detail-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.feature-list li,
.clean-list li,
.result-list li,
.detail-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-soft);
  line-height: 1.6;
}

.feature-list li::before,
.clean-list li::before,
.result-list li::before,
.detail-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f8cff, #7aa6ff);
  flex-shrink: 0;
}

.quote {
  margin-top: 16px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pricing-card {
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border: 1px solid rgba(79, 140, 255, 0.26);
  box-shadow: 0 24px 52px rgba(79, 140, 255, 0.16);
}

.pricing-card .price {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 14px 0 16px;
}

.pricing-card .price strong {
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.pricing-card .price span {
  color: var(--text-muted);
  padding-bottom: 4px;
}

.pricing-card .flag {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.12);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.pricing-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cta-band {
  padding: 40px;
  border-radius: 34px;
  background: linear-gradient(135deg, #0f172a, #1f3e82 52%, #5a8cff 100%);
  color: white;
  box-shadow: 0 26px 52px rgba(15, 23, 42, 0.22);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
}

.cta-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-light {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  background: white;
  color: var(--navy);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.24);
}

.button-outline-light {
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  color: white;
  background: rgba(255,255,255,0.08);
}

.footer {
  padding: 32px 0 54px;
}

.footer-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 14px 36px rgba(15,23,42,0.05);
}

.footer-card p {
  margin: 0;
  color: var(--text-muted);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px;
  background: rgba(255,255,255,0.72);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar .brand-copy strong {
  font-size: 1.02rem;
}

.sidebar-nav {
  margin-top: 28px;
  display: grid;
  gap: 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--text-soft);
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(79, 140, 255, 0.1);
  transform: translateX(2px);
}

.sidebar-nav .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.4);
}

.sidebar-panel {
  margin-top: 28px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(79,140,255,0.12), rgba(255,255,255,0.9));
  border: 1px solid rgba(79,140,255,0.16);
}

.sidebar-panel strong {
  display: block;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.sidebar-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
}

.mini-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15,23,42,0.06);
}

.mini-user .avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(79,140,255,0.18), rgba(122,166,255,0.42));
  color: var(--primary-dark);
  font-weight: 800;
}

.mini-user strong {
  display: block;
}

.mini-user span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.main-panel {
  padding: 28px 28px 46px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.panel-title h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.panel-title p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
  max-width: 64ch;
}

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

.dashboard-grid,
.upload-grid,
.results-grid,
.history-grid,
.settings-grid,
.auth-grid {
  display: grid;
  gap: 20px;
}

.dashboard-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.stack {
  display: grid;
  gap: 20px;
}

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

.metric-card .metric-value {
  margin-top: 12px;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-card .metric-caption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.hero-shell {
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(79,140,255,0.15), rgba(255,255,255,0.92));
  border: 1px solid rgba(79,140,255,0.14);
  overflow: hidden;
  position: relative;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: auto -50px -50px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(122,166,255,0.18);
  filter: blur(22px);
}

.hero-shell h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.hero-shell p {
  margin: 0 0 22px;
  color: var(--text-soft);
  max-width: 58ch;
  line-height: 1.7;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-link {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 30px rgba(15,23,42,0.05);
}

.quick-link strong {
  display: block;
  margin-bottom: 6px;
}

.quick-link span {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.timeline-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15,23,42,0.06);
}

.timeline-item strong {
  display: block;
  margin-bottom: 6px;
}

.timeline-item p,
.timeline-item span {
  color: var(--text-muted);
}

.timeline-item .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.1);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
}

.data-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.data-row {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15,23,42,0.06);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.data-row strong {
  display: block;
  margin-bottom: 5px;
}

.data-row span {
  color: var(--text-muted);
}

.upload-grid {
  grid-template-columns: 1.06fr 0.94fr;
}

.dropzone {
  margin-top: 20px;
  padding: 34px 24px;
  border-radius: 28px;
  border: 1.5px dashed rgba(79, 140, 255, 0.26);
  background: linear-gradient(180deg, rgba(79,140,255,0.08), rgba(255,255,255,0.92));
  text-align: center;
  transition: 0.18s ease;
}

.dropzone.dragover {
  transform: translateY(-1px);
  border-color: rgba(79,140,255,0.58);
  background: linear-gradient(180deg, rgba(79,140,255,0.16), rgba(255,255,255,0.98));
}

.dropzone h3 {
  margin: 14px 0 6px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.dropzone p {
  max-width: 52ch;
  margin: 0 auto;
}

.drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(79,140,255,0.18), rgba(122,166,255,0.36));
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.hidden-input {
  display: none;
}

.file-chip-list {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.form-grid {
  margin-top: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  min-height: 122px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(79, 140, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(79,140,255,0.12);
}

.inline-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.12);
  color: var(--text-soft);
  line-height: 1.65;
}

.status-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  display: none;
  border: 1px solid transparent;
}

.status-box.show { display: block; }

.status-box.info {
  background: rgba(79, 140, 255, 0.08);
  border-color: rgba(79, 140, 255, 0.14);
  color: var(--primary-dark);
}

.status-box.success {
  background: rgba(18, 185, 129, 0.08);
  border-color: rgba(18, 185, 129, 0.16);
  color: #0f8a5d;
}

.status-box.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.16);
  color: #b42318;
}

.results-grid {
  grid-template-columns: 1.08fr 0.92fr;
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: start;
}

.result-header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  letter-spacing: -0.04em;
}

.meta-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.flash-grid,
.quiz-list,
.exam-grid,
.history-list,
.result-stack,
.card-grid {
  display: grid;
  gap: 16px;
}

.flash-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(234,242,255,0.92));
  border: 1px solid rgba(79,140,255,0.14);
  box-shadow: 0 18px 32px rgba(15,23,42,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.flash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(15,23,42,0.09);
}

.flash-card .side-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.flash-card .answer {
  display: none;
}

.flash-card.flipped .question {
  display: none;
}

.flash-card.flipped .answer {
  display: block;
}

.quiz-item,
.exam-item,
.history-item {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 16px 32px rgba(15,23,42,0.05);
}

.quiz-item h4,
.exam-item h4,
.history-item h3 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.quiz-options {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.96);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.quiz-option:hover {
  border-color: rgba(79,140,255,0.42);
}

.quiz-option.correct {
  border-color: rgba(18, 185, 129, 0.42);
  background: rgba(18,185,129,0.08);
}

.quiz-option.incorrect {
  border-color: rgba(239, 68, 68, 0.36);
  background: rgba(239,68,68,0.08);
}

.quiz-explanation {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(79,140,255,0.08);
  color: var(--text-soft);
}

.history-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.history-item {
  display: grid;
  gap: 12px;
}

.history-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.empty-state {
  padding: 34px 26px;
  border-radius: 26px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(15,23,42,0.06);
  text-align: center;
}

.empty-state h3 {
  margin: 14px 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
}

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

.settings-card .detail-list {
  margin-top: 16px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-side {
  padding: 42px;
  background:
    radial-gradient(circle at top left, rgba(79,140,255,0.18), transparent 38%),
    radial-gradient(circle at bottom right, rgba(122,166,255,0.18), transparent 32%),
    linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-logo {
  width: min(520px, 100%);
}

.auth-copy {
  max-width: 520px;
}

.auth-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.auth-copy p {
  color: var(--text-soft);
  line-height: 1.75;
  margin: 0;
}

.auth-benefits {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.auth-card {
  margin: auto;
  width: min(520px, calc(100% - 48px));
  padding: 34px;
}

.auth-card h1 {
  font-size: clamp(2.2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.auth-card form {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.auth-card .footnote {
  margin-top: 18px;
  color: var(--text-muted);
}

.auth-card .switch {
  margin-top: 18px;
  color: var(--text-soft);
}

.auth-card .switch a {
  color: var(--primary-dark);
  font-weight: 700;
}

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

.center {
  text-align: center;
}

.small {
  font-size: 0.9rem;
}

@media (max-width: 1120px) {
  .hero-grid,
  .dashboard-grid,
  .upload-grid,
  .results-grid,
  .history-grid,
  .settings-grid,
  .auth-shell,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .quick-links,
  .grid-3,
  .grid-2,
  .surface-stats {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .main-panel {
    padding-top: 22px;
  }

  .auth-side {
    min-height: 44vh;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(var(--max-width), calc(100% - 22px));
  }

  .topbar-inner,
  .section-head,
  .panel-top,
  .footer-card,
  .result-header {
    align-items: start;
    flex-direction: column;
  }

  .topbar-nav,
  .topbar-actions,
  .panel-actions,
  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .topbar-nav a,
  .topbar-actions a,
  .topbar-actions button,
  .panel-actions a,
  .hero-actions a,
  .hero-actions button,
  .cta-actions a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .metric-grid,
  .quick-links,
  .grid-3,
  .grid-2,
  .surface-stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .main-panel,
  .auth-side,
  .auth-card,
  .cta-band,
  .hero-visual,
  .feature-card,
  .step-card,
  .output-card,
  .pricing-card,
  .history-item,
  .metric-card,
  .settings-card,
  .shell-card,
  .upload-card,
  .quiz-card {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    padding-top: 52px;
  }

  .hero-copy h1,
  .section-head h2,
  .panel-title h1,
  .auth-copy h1,
  .auth-card h1 {
    max-width: none;
  }
}

.brand-lockup.compact {
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(79, 140, 255, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 14px 28px rgba(79, 140, 255, 0.12);
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.brand-lockup.compact .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.v2-hero-grid {
  align-items: start;
}

.hero-visual.tuned {
  padding: 22px;
}

.logo-stage.cleaner {
  padding: 16px 18px;
}

.logo-stage.cleaner img {
  width: min(100%, 520px);
}

.hero-proof.compact {
  max-width: 720px;
}

.surface-stats.four-up {
  grid-template-columns: repeat(4, 1fr);
}

.pricing-grid-landing {
  align-items: stretch;
}

.pricing-card .flag.subtle {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
}

.pricing-card .stack-actions {
  margin-top: 18px;
}

.lifted {
  padding: 30px;
}

.full-width {
  width: 100%;
  justify-content: center;
  text-align: center;
}

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

.center-actions {
  justify-content: center;
}

.muted-light {
  color: rgba(255,255,255,0.82);
}

.strong-pill {
  font-weight: 800;
  background: rgba(79, 140, 255, 0.12);
  color: var(--primary-dark);
}

.tuned-auth {
  grid-template-columns: 1fr 0.92fr;
}

.auth-side.quieter {
  padding: 34px 42px 28px;
}

.tuned-card {
  max-width: 520px;
}

.auth-logo.refined {
  width: min(380px, 76%);
  margin-top: 18px;
}

.auth-logo.refined.small-logo {
  width: min(330px, 70%);
}

.proof-card.slim {
  padding: 16px 18px;
}

.divider-or {
  margin: 18px 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.divider-or::before,
.divider-or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(15, 23, 42, 0.08);
}

.divider-or span {
  font-size: 0.92rem;
}

.soon-pill {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.result-headline {
  display: grid;
  gap: 14px;
}

.result-meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guest-banner {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.14);
}

.guest-banner strong {
  display: block;
  margin-bottom: 8px;
}

.guest-banner p {
  margin: 0;
  color: var(--text-soft);
}

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

.result-quiz-grid,
.exam-grid {
  display: grid;
  gap: 16px;
}

.result-quiz-card,
.exam-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,23,42,0.06);
}

.result-quiz-card p,
.exam-card p {
  margin-top: 8px;
}

.quiz-progress {
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.quiz-inline-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-review {
  margin-top: 18px;
  padding: 26px;
}

.quiz-review-list {
  display: grid;
  gap: 14px;
}

.review-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15,23,42,0.06);
}

.review-item.correct {
  border-color: rgba(18,185,129,0.24);
  background: rgba(18,185,129,0.06);
}

.review-item.incorrect {
  border-color: rgba(239,68,68,0.18);
  background: rgba(239,68,68,0.05);
}

.review-item p {
  margin-top: 8px;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.status-box.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.16);
  color: #a16207;
}

@media (max-width: 1120px) {
  .surface-stats.four-up,
  .pricing-grid-landing,
  .compact-grid,
  .split-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .surface-stats.four-up,
  .pricing-grid-landing,
  .compact-grid,
  .split-3,
  .result-meta-pills {
    grid-template-columns: 1fr;
  }

  .quiz-inline-actions,
  .stack-actions,
  .quiz-progress {
    width: 100%;
  }

  .quiz-inline-actions > *,
  .stack-actions > *,
  .quiz-progress > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .auth-logo.refined,
  .auth-logo.refined.small-logo {
    width: min(300px, 100%);
  }
}

.button-secondary.active {
  border-color: rgba(79, 140, 255, 0.28);
  background: rgba(79, 140, 255, 0.1);
  color: var(--primary-dark);
}

/* ---------- V3 polish + new features ---------- */

.simple-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.simple-brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.simple-brand span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.brand-lockup.text-only {
  gap: 0;
}

.brand-lockup.text-only .brand-copy span {
  font-size: 0.88rem;
}

.brand-lockup.text-only.compact .brand-copy strong {
  font-size: 0.98rem;
}

.hero-clean {
  padding: 72px 0 30px;
}

.hero-clean-shell {
  display: grid;
  gap: 28px;
}

.hero-copy.max-hero {
  max-width: 66rem;
}

.hero-copy.max-hero h1 {
  max-width: 12ch;
}

.feature-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.section-head.tighter {
  margin-bottom: 20px;
}

.clean-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-side {
  padding: 42px 54px;
  background: linear-gradient(180deg, rgba(79, 140, 255, 0.08), rgba(255,255,255,0.6));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-brand {
  margin-bottom: 14px;
}

.auth-side h1 {
  margin: 0;
  max-width: 8ch;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.auth-side p {
  max-width: 56ch;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.8;
  margin: 0;
}

.auth-proof-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  max-width: 54rem;
}

.proof-row {
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15,23,42,0.06);
  display: grid;
  gap: 8px;
}

.proof-row span {
  color: var(--text-soft);
}

.auth-card-wrap {
  display: grid;
  place-items: center;
  padding: 40px 28px;
}

.auth-form-card {
  width: min(460px, 100%);
  padding: 30px;
  border-radius: 32px;
}

.auth-form-card h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.auth-form-card > p {
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 14px;
}

.auth-form-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.soon-tag {
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15,23,42,0.08);
}

.inline-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.two-column-tight {
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
}

.route-card,
.upload-card,
.notes-meta-card,
.notes-editor-card,
.exam-controls,
.exam-paper {
  min-height: 100%;
}

.mode-card-stack,
.style-group {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.mini-detail-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(15,23,42,0.06);
}

.mini-detail-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15,23,42,0.08);
  flex-wrap: wrap;
}

.segmented.compact {
  width: fit-content;
}

.segmented-button {
  border: none;
  padding: 12px 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
}

.segmented-button.active {
  background: rgba(79,140,255,0.14);
  color: var(--primary-dark);
}

.progress-shell {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.07);
}

.progress-shell.compact {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), #7aa6ff);
  transition: width 0.35s ease;
}

.progress-track.subtle {
  height: 10px;
}

.three-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(79,140,255,0.12);
  border: 1px solid rgba(79,140,255,0.12);
}

.results-v3-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.result-summary-card {
  grid-column: 1 / 2;
}

.result-preview-card {
  display: grid;
  gap: 16px;
}

.result-summary-copy {
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 1.04rem;
}

.meta-row.wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.soft-pill {
  background: rgba(15,23,42,0.06);
  color: var(--text-soft);
}

.notes-preview {
  display: grid;
  gap: 14px;
  color: var(--text-soft);
  line-height: 1.75;
}

.notes-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 0.78fr 1.22fr;
  align-items: start;
}

.coverage-block {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.editor-toolbar button {
  border: none;
  background: rgba(15,23,42,0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
}

.notes-editor {
  min-height: 70vh;
  padding: 8px 2px 8px 0;
  outline: none;
  color: var(--text);
  line-height: 1.85;
  font-size: 1rem;
}

.notes-editor h2,
.notes-editor h3 {
  letter-spacing: -0.04em;
  margin-top: 24px;
  margin-bottom: 8px;
}

.notes-editor p {
  margin: 0 0 12px;
  color: var(--text-soft);
}

.notes-editor ul,
.notes-editor ol {
  padding-left: 20px;
  margin: 10px 0 14px;
}

.notes-editor li {
  margin-bottom: 8px;
  color: var(--text-soft);
}

.watermark-surface {
  position: relative;
  overflow: hidden;
}

.watermark-surface.with-watermark::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background: url("assets/logo-transparent.png") center 54% / min(58%, 320px) auto no-repeat;
}

.exam-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 0.84fr 1.16fr;
  align-items: start;
}

.style-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.style-chip {
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: left;
}

.style-chip.active {
  background: rgba(79,140,255,0.14);
  color: var(--primary-dark);
  border-color: rgba(79,140,255,0.2);
}

.timer-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(15,23,42,0.06);
}

.timer-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.timer-display {
  min-height: 150px;
  border-radius: 24px;
  background: rgba(79,140,255,0.08);
  border: 1px solid rgba(79,140,255,0.12);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.timer-display[data-exam-timer] span,
.timer-display .analog-clock {
  display: block;
}

[data-timer-digital] {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.08em;
}

.analog-clock {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  border: 6px solid rgba(79,140,255,0.18);
  position: relative;
  background: radial-gradient(circle, rgba(255,255,255,0.96) 0%, rgba(234,242,255,0.86) 100%);
}

.analog-clock::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--primary-dark);
  transform: translate(-50%, -50%);
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 999px;
  background: var(--text);
}

.hand.hour { width: 5px; height: 34px; }
.hand.minute { width: 4px; height: 46px; }
.hand.second { width: 2px; height: 54px; background: var(--primary); }

.compact-actions {
  justify-content: flex-start;
}

.exam-paper-sheet {
  display: grid;
  gap: 24px;
}

.exam-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}

.exam-paper-head h2 {
  margin: 0 0 8px;
  letter-spacing: -0.05em;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.exam-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.exam-instructions {
  display: grid;
  gap: 10px;
  color: var(--text-soft);
}

.exam-section {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(15,23,42,0.06);
}

.exam-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 14px;
}

.exam-section-head h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.exam-section-head span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.exam-question-list {
  display: grid;
  gap: 14px;
}

.exam-question {
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,0.08);
}

.exam-question:first-child {
  border-top: none;
  padding-top: 0;
}

.exam-question-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.exam-question summary {
  margin-top: 10px;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
}

.exam-question p {
  color: var(--text-soft);
}

.exam-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 25, 0.92);
  z-index: 70;
  display: grid;
  place-items: center;
}

.exam-overlay-card {
  width: min(520px, calc(100% - 32px));
  padding: 30px;
  border-radius: 30px;
  background: rgba(255,255,255,0.96);
  text-align: center;
}

.exam-overlay-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.exam-overlay-card p {
  margin: 0 0 22px;
  color: var(--text-soft);
  line-height: 1.75;
}

.theme-form-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.color-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(15,23,42,0.07);
}

.color-control input {
  width: 58px;
  height: 42px;
  border: none;
  background: transparent;
  padding: 0;
}

.theme-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-chip {
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  color: var(--text-soft);
  font-weight: 700;
}

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

.mini-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.pricing-card.mini {
  padding: 18px;
}

.pricing-card.mini .detail-list.compact {
  margin-top: 12px;
}

.pricing-card.mini h3 {
  margin-bottom: 10px;
}

.detail-list.compact div {
  padding: 10px 0;
}

.empty-state.light {
  min-height: 420px;
  background: transparent;
  border: 1px dashed rgba(15,23,42,0.08);
}

@media (max-width: 1140px) {
  .feature-ribbon,
  .results-v3-grid,
  .notes-layout,
  .exam-grid,
  .two-column-tight,
  .two-col-settings,
  .mini-plan-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 920px) {
  .clean-auth {
    grid-template-columns: 1fr;
  }

  .auth-side {
    padding: 32px 24px 10px;
  }

  .auth-side h1 {
    max-width: 10ch;
    font-size: clamp(2.4rem, 8vw, 4rem);
  }

  .auth-card-wrap {
    padding-top: 0;
  }

  .feature-ribbon,
  .three-fields,
  .pricing-grid-landing,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > * {
    flex: 1;
    text-align: center;
  }

  .main-panel {
    padding: 22px 18px 34px;
  }

  .hero-clean {
    padding-top: 42px;
  }

  .result-summary-card,
  .result-preview-card,
  .exam-controls,
  .exam-paper,
  .notes-meta-card,
  .notes-editor-card {
    padding: 20px;
  }
}


/* ---------- V4 redesign ---------- */
.logo-lockup {
  display: inline-flex;
  align-items: center;
}

.logo-lockup img,
.brand-wordmark-img {
  display: block;
  width: clamp(132px, 12vw, 176px);
  height: auto;
}

.sidebar-logo img {
  width: 150px;
}

.topbar-logo img {
  width: 172px;
}

.hero-v4 {
  padding: 72px 0 34px;
}

.hero-v4-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.hero-v4 .hero-copy.max-hero {
  max-width: none;
}

.hero-v4 .hero-copy.max-hero p {
  max-width: 38rem;
}

.hero-proof-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.glass-card,
.hero-showcase,
.dashboard-hero-v4,
.insight-card-v4 {
  backdrop-filter: blur(16px);
}

.hero-showcase {
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.94));
  box-shadow: 0 18px 50px rgba(15,23,42,0.07);
}

.showcase-stack {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.showcase-panel {
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(15,23,42,0.06);
  background: rgba(247,249,254,0.82);
}

.showcase-panel strong,
.proof-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.showcase-panel p,
.proof-tile p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.accent-panel {
  background: linear-gradient(135deg, rgba(79,140,255,0.14), rgba(255,255,255,0.96));
}

.mini-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mini-flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(15,23,42,0.06);
  font-weight: 700;
  color: var(--text-soft);
}

.quote-card {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,248,255,0.88));
  border: 1px solid rgba(79,140,255,0.12);
}

.quote-card blockquote {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.quote-card p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-weight: 600;
}

.compact-quote {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.spaced-head .eyebrow {
  max-width: 42rem;
  margin-top: 8px;
}

.section-soft {
  padding-top: 12px;
}

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

.selling-card {
  padding: 24px;
}

.selling-kicker {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(79,140,255,0.12);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 16px;
}

.selling-card h3 {
  margin: 0 0 10px;
}

.dashboard-hero-v4 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  gap: 20px;
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(79,140,255,0.14), rgba(255,255,255,0.95));
  border: 1px solid rgba(79,140,255,0.14);
  box-shadow: var(--shadow-card);
}

.dashboard-hero-main h2 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 3vw, 3.3rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.dashboard-hero-main p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.dashboard-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.dashboard-hero-side {
  display: grid;
  gap: 16px;
}

.dashboard-quote-card,
.insight-card-v4,
.dashboard-flow-card,
.dashboard-side-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.06);
}

.insight-card-v4 h3,
.dashboard-side-card h3,
.dashboard-flow-card h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.insight-card-v4 p,
.dashboard-side-card p,
.dashboard-flow-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.metric-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.dashboard-v4-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  margin-top: 20px;
}

.dashboard-v4-grid > .dashboard-side-card:last-child {
  align-self: start;
}

.idea-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.idea-list article {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(247,249,254,0.86);
  border: 1px solid rgba(15,23,42,0.06);
}

.idea-list strong {
  display: block;
  margin-bottom: 4px;
}

.idea-list p {
  margin: 0;
  color: var(--text-soft);
}

.auth-v4 .auth-side-v4 {
  background: linear-gradient(180deg, rgba(79,140,255,0.08), rgba(255,255,255,0.78));
}

.auth-logo img {
  width: 170px;
}

.auth-form-card-v4 {
  box-shadow: 0 20px 60px rgba(15,23,42,0.08);
}

.auth-quote-card {
  margin-top: 6px;
}

.compact-field select {
  margin-top: 8px;
}

body.skin-paper .card,
body.skin-paper .hero-showcase,
body.skin-paper .dashboard-hero-v4,
body.skin-paper .showcase-panel,
body.skin-paper .quote-card,
body.skin-paper .dashboard-quote-card,
body.skin-paper .insight-card-v4,
body.skin-paper .sidebar,
body.skin-paper .metric-card,
body.skin-paper .timeline-item,
body.skin-paper .mini-user {
  box-shadow: 0 10px 30px rgba(89, 62, 27, 0.06);
}

body.skin-paper .main-panel,
body.skin-paper .panel-title p,
body.skin-paper .showcase-panel p,
body.skin-paper .proof-row span {
  color: rgba(36,21,11,0.78);
}

body.skin-paper .sidebar {
  background: rgba(255, 250, 240, 0.82);
}

body.skin-paper .topbar {
  background: rgba(248,243,232,0.86);
}

@media (max-width: 1260px) {
  .hero-v4-shell,
  .dashboard-hero-v4,
  .dashboard-v4-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .hero-proof-grid,
  .selling-grid,
  .metric-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .hero-proof-grid,
  .selling-grid,
  .metric-grid-4,
  .dashboard-v4-grid {
    grid-template-columns: 1fr;
  }

  .hero-v4 {
    padding-top: 44px;
  }

  .topbar-logo img,
  .auth-logo img {
    width: 148px;
  }
}
