:root {
  --bg-body: #09090b;
  --bg-card: #18181b;
  --bg-card-hover: #27272a;
  --bg-accent: #0c1929;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --border-color: #27272a;
  --border-highlight: #3f3f46;

  --primary: #4189DC;
  --primary-glow: rgba(65, 137, 220, 0.25);
  --primary-hover: #5da9ea;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}


[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-accent: #eff6ff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --border-color: #e2e8f0;
  --border-highlight: #cbd5e1;

  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --primary-hover: #1d4ed8;

  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
}

[data-theme="light"] body {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .motivation {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.2);
}

[data-theme="light"] .disclaimer-note {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .confidence-table th {
  background-color: #f1f5f9;
}

[data-theme="light"] .confidence-table tr:hover td {
  background-color: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-body);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}


::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
  border: 2px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-body);
}


.reveal {
  position: relative;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  transform: translateY(0);
  opacity: 1;
}


.header {
  position: relative;
  background: radial-gradient(circle at center, #0c1929 0%, #000000 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  transition: background 0.3s;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.header-content {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  z-index: 1;
}

h1 {
  font-size: 4rem;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(to right, #fff, #a5d8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  transition: background 0.3s;
}

.tagline {
  font-size: 1.25rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
  font-weight: 400;
}

.banner-img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 30px auto;
  display: block;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  padding: 20px;
}

.badges img {
  height: 24px;
  filter: grayscale(0.7);
  transition: filter 0.2s;
}

.badges img:hover {
  filter: grayscale(0);
}

.main-content {
  padding: 60px 0 100px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  margin-bottom: 80px;
}

h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
}

h2::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: var(--border-color);
  margin-left: 20px;
  opacity: 0.5;
}

h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-weight: 600;
  margin-top: 25px;
}

p {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: #e2e8f0;
  display: inline-block;
}

[data-theme="light"] code {
  background: rgba(0, 0, 0, 0.08);
  color: #334155;
}


.main-links {
  text-align: center;
  margin: 60px 0;
}

.main-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 10px;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: 1px solid transparent;
}

.main-links a:not(.primary) {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="light"] .main-links a:not(.primary) {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.main-links a:not(.primary):hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .main-links a:not(.primary):hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--text-muted);
}

.main-links a.primary {
  background: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.main-links a.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}


.launch-btn {
  background-color: #0970e5;
  color: white;
}

.launch-btn:hover {
  background-color: #044b76;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(9, 115, 229, 0.4);
}


.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.tool {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tool:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.tool h4 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 1.15rem;
  margin-top: 0;
}

.tool p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.95rem;
}


.highlight-section {
  background: linear-gradient(145deg, rgba(24, 24, 27, 0.5), rgba(0, 0, 0, 0));
  padding: 40px;
  border-radius: 16px;
  margin-bottom: 50px;
  border: 1px solid var(--border-color);
  transition: background 0.3s;
}

[data-theme="light"] .highlight-section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0));
}

.highlight-section h2 {
  border-bottom: none;
}


.ui-showcase {
  margin-top: 20px;
}

.showcase-group {
  margin-bottom: 50px;
}

.showcase-group h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 15px;
  margin-bottom: 20px;
  margin-top: 0;
}

.showcase-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;

  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: var(--bg-card);
}

.showcase-img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
}


.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}


.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}


@media (max-width: 900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}


.confidence-overview-list {
  list-style-type: none;
  padding-left: 0;
}

.confidence-overview-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.confidence-overview-list li::before {
  content: "→";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}


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

.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
}


.tier-card[style*="#ef4444"]::before {
  background: #ef4444;
}

.tier-card[style*="#4189DC"]::before {
  background: #4189DC;
}

.tier-card[style*="#16a34a"]::before {
  background: #16a34a;
}

.tier-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tier-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.tier-card h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 15px;
  margin-top: 10px;
}

.tier-card p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.tier-card ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tier-card ul li {
  margin-bottom: 8px;
}


.table-responsive {
  overflow-x: auto;
  margin-top: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.confidence-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  min-width: 600px;
}

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

.confidence-table th {
  background-color: #0f0f11;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.confidence-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.confidence-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.confidence-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="light"] .confidence-badge {
  background: rgba(0, 0, 0, 0.05);
}

.rationale {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .rationale {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}


.motivation {
  background: rgba(24, 40, 75, 0.2);
  padding: 30px;
  border-radius: 12px;
  margin: 30px 0;
  border-left: 4px solid var(--primary);
  font-style: normal;
  color: var(--text-secondary);
  border: 1px solid rgba(65, 137, 220, 0.2);
  transition: background 0.3s;
}

.motivation h3 {
  color: var(--text-primary);
  margin-top: 0;
}

.disclaimer-note {
  background: rgba(245, 158, 11, 0.1);
  padding: 30px;
  border-radius: 12px;
  margin: 30px 0;
  border-left: 4px solid var(--warning);
  color: var(--text-secondary);
  font-size: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  transition: background 0.3s;
}

.disclaimer-note strong {
  color: var(--warning);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.acknowledgement-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}


.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 30px;
  align-items: center;
  justify-content: flex-start;
}

.ack-img {
  max-width: 300px;
  height: auto;
  margin-bottom: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}


.logo-row .ack-img {
  max-width: 280px;
  max-height: 200px;
  object-fit: contain;
  margin-bottom: 0;
  border: none;
  background: transparent;
}

.ack-text p {
  margin: 0 0 15px 0;
  max-width: 100%;
}

.ack-text strong {
  color: var(--primary);
}

.ack-text a {
  color: var(--primary-hover);
  text-decoration: none;
  font-weight: 500;
}

.ack-text a:hover {
  text-decoration: underline;
}


.citation-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.citation-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.citation-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.citation-select {
  background: var(--bg-body);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-main);
  width: 100%;
  outline: none;
  transition: border-color 0.3s;
}


.citation-display {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-secondary);
  min-height: 100px;
  display: flex;
  align-items: center;
  position: relative;
  word-break: break-word;
}

.citation-display em {
  font-style: normal;
}

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

.citation-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {

  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .citation-container {
    grid-template-columns: 1fr 2fr;
  }

  .citation-controls {
    justify-content: start;
  }
}


footer {
  background: #000;
  color: var(--text-muted);
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  transition: background 0.3s;
}

[data-theme="light"] footer {
  background: #ffffff;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.9rem;
}

footer a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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


.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: none;
}


.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {
    transform: scale(0.9)
  }

  to {
    transform: scale(1)
  }
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.close-lightbox:hover {
  color: var(--primary);
  text-decoration: none;
}


.errors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.error-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  border-left: 3px solid var(--border-highlight);
}

.error-card:hover {
  transform: translateY(-3px);
  border-color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.error-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 700;
  padding-right: 20px;
}

.error-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 6px;
  margin-top: 16px;
}

.error-label:first-of-type {
  margin-top: 0;
}

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

.error-label.fix {
  color: var(--success);
}

.error-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.6;
}

.error-text img {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid var(--border-color);
  display: block;
}

@media (max-width: 900px) {
  h1 {
    font-size: 2.8rem;
  }

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

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

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

}

@media (max-width: 768px) {
  .header {
    padding: 40px 0;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

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

  .badges {
    padding: 15px;
    gap: 8px;
  }

  .badges img {
    height: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .main-links a {
    display: block;
    width: 100%;
    margin: 8px 0;
  }

  .highlight-section {
    padding: 25px;
  }

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