:root {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-border: #c7d2fe;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.07), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 45px -12px rgba(79, 70, 229, 0.16), 0 8px 18px -6px rgba(15, 23, 42, 0.06);
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(at 15% 0%, rgba(99, 102, 241, 0.09) 0px, transparent 48%),
    radial-gradient(at 85% 5%, rgba(16, 185, 129, 0.07) 0px, transparent 42%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
  color: var(--text);
  text-decoration: none !important;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14.5px;
  font-weight: 600;
  flex-wrap: wrap;
}

.nav-links a:not(.btn) {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.16s ease;
  text-decoration: none !important;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 13.5px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 16px;
  border-radius: 11px;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.36);
}

.btn-outline {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--text) !important;
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  background: #fafbff;
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary) !important;
  border-color: var(--primary-border);
}

.btn-soft:hover {
  background: #e0e7ff;
}

/* Hero */
.hero {
  padding: 64px 0 42px;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 860px;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.14;
  letter-spacing: -1px;
  font-weight: 850;
  color: var(--text);
}

.text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 700px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Interactive Product Showcase / Browser Mockup */
.demo-section {
  scroll-margin-top: 84px;
  padding: 12px 0 64px;
}

.demo-tabs-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.demo-tab-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.demo-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.browser-window {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.browser-topbar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #f87171; }
.dot-yellow { background: #fbbf24; }
.dot-green { background: #34d399; }

.browser-url {
  flex: 1;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ext-pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.demo-body {
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 26px;
  align-items: start;
}

.article-pane {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.article-kicker {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--primary);
  margin-bottom: 6px;
}

.article-pane h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

.article-pane p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.75;
}

.demo-word {
  background: #eef2ff;
  color: #3730a3;
  border-bottom: 2px dashed #6366f1;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.14s ease;
}

.demo-word:hover,
.demo-word.selected {
  background: #4f46e5;
  color: #fff;
  border-bottom-color: #4f46e5;
}

.demo-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* Simulated Extension Popup Card */
.tai-card {
  background: #fff;
  border: 1.5px solid var(--primary-border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1), 0 0 0 4px rgba(79, 70, 229, 0.05);
}

.tai-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tai-word-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.tai-phonetic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

.tai-icon-btn {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.14s ease;
}

.tai-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.tai-icon-btn.saved {
  background: var(--amber-soft);
  border-color: #fcd34d;
  color: #b45309;
}

.tai-meaning-pill {
  display: inline-block;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 12px;
}

.tai-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 10px 0 4px;
}

.tai-explain {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 10px;
}

.tai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tai-tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-weight: 600;
}

.tai-footer-meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

/* Grammar Breakdown & SRS Demo Panels */
.grammar-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.grammar-item strong {
  color: var(--primary);
}

.srs-demo-box {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1.5px solid var(--primary-border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}

.srs-grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.srs-grade-btn {
  padding: 9px 8px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.srs-grade-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* Section Headers */
.section {
  scroll-margin-top: 84px;
  padding: 56px 0;
}

.section-alt {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-kicker {
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--primary);
  margin-bottom: 8px;
}

.sec-title {
  text-align: center;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 auto 12px;
  max-width: 720px;
}

.sec-sub {
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  max-width: 660px;
  margin: 0 auto 40px;
}

/* 3 Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.step-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.price-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.price-card.featured {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: var(--shadow-lg);
}

.popular-tag {
  position: absolute;
  top: -13px;
  right: 22px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.price-name {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 4px;
}

.price-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 12px;
}

.price-val {
  font-size: 40px;
  font-weight: 850;
  letter-spacing: -1px;
  margin: 4px 0;
}

.price-val span {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.price-note {
  font-size: 13px;
  color: var(--emerald);
  font-weight: 700;
  min-height: 20px;
  margin-bottom: 16px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex: 1;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.price-list li {
  padding: 7px 0;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check-icon {
  color: var(--emerald);
  font-weight: 800;
  flex-shrink: 0;
}

/* Comparison Table */
.compare-wrap {
  margin-top: 44px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--text);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td.pro-col,
.compare-table th.pro-col {
  background: rgba(238, 242, 255, 0.45);
  font-weight: 600;
}

.mor-notice {
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

/* FAQ Accordion */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 22px;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  padding: 18px 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 0 18px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Legal & Contact Pages */
.legal-doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  margin: 40px auto 64px;
  max-width: 860px;
  box-shadow: var(--shadow-sm);
}

.legal-doc h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.legal-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.legal-doc h2 {
  font-size: 19px;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.legal-doc p,
.legal-doc li {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.7;
}

.legal-callout {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  font-size: 15px;
  color: var(--text);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.contact-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.contact-box h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
}

/* Footer */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 48px 0 38px;
  color: var(--muted);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
}

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

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .legal-doc {
    padding: 26px 22px;
  }
  .srs-grade-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
