:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  background-color: #0b0f1a;
}

body {
  background: radial-gradient(1200px 700px at 10% 10%, rgba(31, 138, 112, 0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 20%, rgba(193, 154, 107, 0.25), transparent 60%),
    linear-gradient(180deg, #f8f5f0 0%, #f2f7fb 60%, #ffffff 100%);
  background-color: #0b0f1a;
  padding-top: 80px;
}

.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  max-width: 820px;
  width: calc(100% - 2rem);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(120deg, #ecfdf5 0%, #bbf7d0 45%, #a7f3d0 100%);
  padding: 12px 22px 28px 28px;
  font-size: 1rem;
  line-height: 1.5;
  color: #064e3b;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35), 0 0 28px rgba(16, 185, 129, 0.35);
}

.toast #success-toast-message {
  white-space: pre-line;
}

.toast button {
  align-items: center;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  line-height: 1;
  min-width: 32px;
  width: 32px;
  border-radius: 8px;
  border: 1px solid rgba(5, 150, 105, 0.4);
  background: rgba(255, 255, 255, 0.7);
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #065f46;
}

.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28);
}

.field-error-message {
  margin-top: 6px;
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
}

.blog-content {
  line-height: 1.85;
  font-size: 1rem;
  color: #0b0f1a;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.blog-content h2,
.blog-content h3 {
  scroll-margin-top: 120px;
}
.blog-content p {
  margin-top: 1rem;
}
.blog-content h2 {
  margin-top: 2.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: inherit;
  position: relative;
  padding-left: 12px;
}
.blog-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0.95em;
  border-radius: 999px;
  background: #9fd4ff;
  box-shadow: 0 0 10px rgba(159, 212, 255, 0.4);
}
.blog-content h3 {
  margin-top: 1.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 6px;
}
.blog-content h3::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 6px;
  background: rgba(159, 212, 255, 0.5);
  border-radius: 999px;
}
.blog-content ul,
.blog-content ol {
  margin-top: 0.9rem;
  margin-left: 1.25rem;
}
.blog-content ul {
  list-style: disc;
}
.blog-content ol {
  list-style: decimal;
}
.blog-content li {
  margin-top: 0.35rem;
}
.blog-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
}
.blog-content th,
.blog-content td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.blog-content tr:first-child th:first-child,
.blog-content tr:first-child td:first-child {
  border-top-left-radius: 14px;
}
.blog-content tr:first-child th:last-child,
.blog-content tr:first-child td:last-child {
  border-top-right-radius: 14px;
}
.blog-content tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}
.blog-content tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}
.blog-content th {
  background: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: #f1f5fb;
}
.blog-content figure {
  margin: 1.6rem 0;
}
.blog-content figure img {
  display: block;
  width: 100%;
  border-radius: 18px;
}
.blog-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #1e2a44;
  opacity: 0.75;
}
.blog-article {
  background: #0f1a2b;
}
.blog-article .blog-content,
.blog-article .blog-content p,
.blog-article .blog-content li,
.blog-article .blog-content h2,
.blog-article .blog-content h3 {
  color: #f1f5fb;
}
.blog-article.blog-content a {
  color: #9fd4ff !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.blog-article.blog-content a:hover {
  color: #ffffff !important;
}
.blog-article.blog-content h2 a,
.blog-article.blog-content h3 a {
  color: inherit !important;
  text-decoration: none !important;
}
.blog-article.blog-content a.blog-share-cta {
  text-decoration: none !important;
  color: #ffffff !important;
}
.blog-article .blog-content figcaption {
  color: #b8c6db;
}
.blog-article .blog-content table {
  background: #101b2d;
  color: #f1f5fb;
}
.blog-article .blog-content tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.06);
}
.blog-article .blog-content tbody tr:nth-child(even) {
  background: rgba(46, 91, 140, 0.35);
}
.blog-article .blog-content th,
.blog-article .blog-content td {
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5fb;
}
.blog-article .blog-content th {
  background: rgba(255, 255, 255, 0.18);
  color: #f1f5fb;
}

@media (max-width: 768px) {
  .blog-article .blog-content table {
    display: block;
    border: none;
    background: transparent;
  }
  .blog-article .blog-content thead {
    display: none;
  }
  .blog-article .blog-content tbody {
    display: grid;
    gap: 12px;
  }
  .blog-article .blog-content tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .blog-article .blog-content td {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    border: none;
    padding: 0;
    color: #f1f5fb;
  }
  .blog-article .blog-content td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(241, 245, 251, 0.7);
  }
}

@media (max-width: 768px) {
  .blog-content table,
  .blog-content thead,
  .blog-content tbody,
  .blog-content tr,
  .blog-content th,
  .blog-content td {
    display: block;
    width: 100%;
  }
  .blog-content thead {
    display: none;
  }
  .blog-content tbody {
    display: grid;
    gap: 12px;
  }
  .blog-content tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .blog-content td {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    border: none;
    padding: 0;
  }
  .blog-content td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(241, 245, 251, 0.7);
  }
}
.blog-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .blog-layout.no-toc {
    grid-template-columns: 1fr;
  }
}
.blog-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  background: #0b1322;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  color: #f1f5fb;
}
.blog-toc {
  display: none;
}
@media (min-width: 1024px) {
  .blog-toc {
    display: block;
  }
}
.blog-toc ol {
  list-style: decimal;
  padding-left: 18px;
}
.blog-toc .toc-link {
  display: block;
  color: #c8e6ff;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 4px 0;
  border-left: 2px solid transparent;
}
.blog-toc .toc-link:hover {
  color: #ffffff;
}
.blog-toc .toc-link.is-active {
  color: #ffffff;
  border-left-color: #9fd4ff;
  padding-left: 12px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(159, 212, 255, 0.35);
}
.blog-share-cta {
  margin-left: auto;
}
@media (max-width: 768px) {
  .blog-share-cta {
    margin-left: 0;
  }
}

.blog-article .blog-content a {
  color: #9fd4ff !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.blog-article .blog-content a:hover {
  color: #ffffff !important;
}
.blog-card-image {
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: cover;
  border-radius: 18px;
}

.quiz-question {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
}

#quiz-content {
  position: relative;
}

.quiz-progress-track {
  margin-top: 6px;
  height: 6px;
  width: 100%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.quiz-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f8a70, #0ea5e9);
  transition: width 0.25s ease;
}

.quiz-question legend {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0b0f1a;
  margin-bottom: 10px;
}

.quiz-reason {
  margin: -4px 0 12px;
  font-size: 0.85rem;
  color: #64748b;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #1e2a44;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.6);
}

.quiz-option + .quiz-option {
  margin-top: 10px;
}

.quiz-option input {
  accent-color: #1f8a70;
}

body.theme-dark .quiz-question {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .quiz-question legend,
body.theme-dark .quiz-option {
  color: #e2e8f0;
}

body.theme-dark .quiz-option {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}

body.modal-open {
  overflow: hidden;
}

.quiz-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-top-color: #1f8a70;
  animation: quizSpin 0.9s linear infinite;
}

@keyframes quizSpin {
  to {
    transform: rotate(360deg);
  }
}

.quiz-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}

.quiz-loading-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  z-index: 1;
}

.quiz-loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(248, 250, 252, 0.25);
  border-top-color: #38bdf8;
  animation: quizSpin 0.9s linear infinite;
}

.modal-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.quiz-scale {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #dc2626 0%,
    #dc2626 25%,
    #fb923c 50%,
    #f59e0b 70%,
    #a3e635 85%,
    #10b981 100%
  );
  opacity: 1;
  filter: saturate(1.1);
  mix-blend-mode: normal;
  overflow: visible;
}

.quiz-marker {
  position: absolute;
  top: -12px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #f8fafc;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.quiz-result-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(15, 23, 42, 0.6));
  border-color: rgba(239, 68, 68, 0.35);
}

.quiz-result-orange {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(15, 23, 42, 0.6));
  border-color: rgba(251, 146, 60, 0.35);
}

.quiz-result-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.6));
  border-color: rgba(245, 158, 11, 0.35);
}

.quiz-result-lime {
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.2), rgba(15, 23, 42, 0.6));
  border-color: rgba(132, 204, 22, 0.35);
}

.quiz-result-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.6));
  border-color: rgba(16, 185, 129, 0.35);
}

.quiz-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  cursor: pointer;
}

.quiz-detail-toggle {
  width: 20px;
  text-align: center;
}

.quiz-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.quiz-status-critical {
  background: linear-gradient(120deg, #dc2626, #ef4444);
  color: #fff;
}

.quiz-status-risky {
  background: linear-gradient(120deg, #ef4444, #fb923c);
  color: #111827;
}

.quiz-status-average {
  background: linear-gradient(120deg, #f59e0b, #facc15);
  color: #1f2937;
}

.quiz-status-good {
  background: linear-gradient(120deg, #84cc16, #22c55e);
  color: #0f172a;
}

.quiz-status-strong {
  background: linear-gradient(120deg, #34d399, #22c55e);
  color: #0f172a;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.line-grid {
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.section-gradient {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.6));
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 28px;
  padding: 2.25rem;
}

main section {
  scroll-margin-top: 110px;
}

body.theme-dark {
  color: #e2e8f0;
}

body.theme-dark {
  background: radial-gradient(1200px 700px at 10% 10%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 20%, rgba(15, 23, 42, 0.7), transparent 60%),
    linear-gradient(180deg, #0b0f1a 0%, #111827 60%, #0f172a 100%);
}

body.theme-dark .glass {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .section-gradient {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.7));
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .line-grid {
  background-image: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
}

body.theme-dark [class*="bg-white"] {
  background-color: rgba(15, 23, 42, 0.72) !important;
}

body.theme-dark [class*="border-dusk"] {
  border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark [class*="text-ink"] {
  color: #f8fafc !important;
}

body.theme-dark [class*="text-dusk"] {
  color: #94a3b8 !important;
}

body.theme-dark [class*="text-white"] {
  color: #f8fafc !important;
}

body.theme-dark nav {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .toast {
  background: linear-gradient(120deg, #052e1d 0%, #064e3b 40%, #065f46 100%);
  border-color: rgba(16, 185, 129, 0.35);
  color: #ecfdf5;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35), 0 0 28px rgba(16, 185, 129, 0.35);
}

body.theme-dark .toast button {
  color: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(3, 105, 75, 0.5);
}

@media (max-width: 768px) {
  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table td {
    display: block;
    width: 100%;
  }

  .comparison-table tr {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 12px 16px;
  }

  .comparison-table td {
    border: none;
    padding: 6px 0;
  }

  .comparison-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 4px;
  }

  [role="dialog"] .glass {
    padding: 1.5rem 1.5rem 1.1rem;
    max-height: 85vh;
  }
}

.logo-dark {
  display: none;
}

body.theme-dark .logo-light {
  display: none;
}

body.theme-dark .logo-dark {
  display: block;
}
