/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* CSS Custom Properties - Dark Mode First */
:root {
  /* Dark Mode (Default) */
  --color-canvas: #0a0a0a;
  --color-ink: #f0f0f0;
  --color-ink-subtle: #999999;
  --color-surface: #1a1a1a;
  --color-border: #333333;
  --color-verdict: #ff3333;

  /* Typography */
  --font-primary: "Helvetica Neue", Helvetica, -apple-system, Arial, sans-serif;
  --font-mono: "Menlo", "Consolas", "Monaco", monospace;

  /* Spacing - 8px baseline grid */
  --unit-base: 8px;
  --unit-1: calc(var(--unit-base) * 0.5); /* 4px */
  --unit-2: var(--unit-base); /* 8px */
  --unit-3: calc(var(--unit-base) * 2); /* 16px */
  --unit-4: calc(var(--unit-base) * 3); /* 24px */
  --unit-5: calc(var(--unit-base) * 4); /* 32px */
  --unit-6: calc(var(--unit-base) * 6); /* 48px */
  --unit-8: calc(var(--unit-base) * 8); /* 64px */
  --unit-12: calc(var(--unit-base) * 12); /* 96px */

  /* Grid */
  --max-width: 1120px; /* 140 units */
  --header-height: calc(var(--unit-base) * 10); /* 80px */
}

/* Light Mode Override */
[data-theme="light"] {
  --color-canvas: #ffffff;
  --color-ink: #111111;
  --color-ink-subtle: #666666;
  --color-surface: #f4f4f4;
  --color-border: #dcdcdc;
  --color-verdict: #e50000;
}

html {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--color-ink);
  background-color: var(--color-canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: none; /* No smooth transitions - immediate verdict */
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Master Grid Layout */
.master-grid {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "main"
    "footer";
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Typography Scale */
h1 {
  font-size: 4rem; /* 64px */
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: var(--unit-4);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem; /* 32px */
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: var(--unit-4);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: var(--unit-3);
}

h4 {
  font-size: 1.25rem; /* 20px */
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: var(--unit-3);
}

p {
  font-size: 1rem; /* 16px */
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: var(--unit-3);
}

.body-small {
  font-size: 0.875rem; /* 14px */
  line-height: 1.5;
  font-weight: 400;
}

.caption {
  font-size: 0.75rem; /* 12px */
  line-height: 1.4;
  font-weight: 400;
  color: var(--color-ink-subtle);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: var(--unit-3); /* Changed from top to bottom */
  right: var(--unit-3);
  width: var(--unit-6); /* 48px */
  height: var(--unit-6); /* 48px */
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: none; /* No smooth transitions */
  border-radius: 50%; /* Circular shape */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.theme-toggle:hover {
  background-color: var(--color-verdict);
  border-color: var(--color-verdict);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: none;
}

/* Theme Toggle Icon Visibility - Fixed Logic */
/* Hide all theme icons by default */
.theme-icon {
  display: none;
}

/* In light mode, show the moon icon (to switch to dark) */
[data-theme="light"] .theme-toggle .moon-icon.light-mode-icon {
  display: block;
}

/* In dark mode (when data-theme is NOT light), show the sun icon (to switch to light) */
html:not([data-theme="light"]) .theme-toggle .sun-icon.dark-mode-icon {
  display: block;
}

/* General icon visibility for content icons (not theme toggle) */
/* Dark mode (default) - show dark mode icons */
:root .dark-mode-icon:not(.theme-icon) {
  display: block;
}
:root .light-mode-icon:not(.theme-icon) {
  display: none;
}
/* Light mode - show light mode icons */
[data-theme="light"] .dark-mode-icon:not(.theme-icon) {
  display: none;
}
[data-theme="light"] .light-mode-icon:not(.theme-icon) {
  display: block;
}

/* Header/Navigation */
.site-header {
  grid-area: header;
  background-color: var(--color-canvas);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--unit-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--unit-5);
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  padding: var(--unit-1) 0;
  border-bottom: 2px solid transparent;
  transition: none; /* No smooth transitions */
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-verdict);
  border-bottom-color: var(--color-verdict);
}

/* Main Content */
.main-content {
  grid-area: main;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--unit-8) var(--unit-4);
  width: 100%;
  overflow-x: hidden;
  position: relative; /* Ensure z-index works */
  z-index: 1; /* Bring content above decorations */
}

/* Section Styling */
.section {
  margin-bottom: var(--unit-12);
  position: relative; /* For positioning section decorations */
}

.section:last-child {
  margin-bottom: 0;
}

/* Hero Section */
.hero {
  text-align: left;
  margin-bottom: var(--unit-12);
  padding: var(--unit-8) 0;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: var(--unit-3);
}

.tagline {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-verdict);
  margin-bottom: var(--unit-5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-ramen-showcase {
  display: flex;
  gap: var(--unit-4);
  margin-top: var(--unit-5);
  justify-content: flex-start;
}

.hero-ramen-image {
  width: 64px;
  height: 64px;
  opacity: 0.6;
  transition: none;
}

.hero-ramen-image:hover {
  opacity: 1;
}

/* Lead Text */
.lead {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--unit-4);
  color: var(--color-ink);
}

/* Emphasis Blocks */
.emphasis-block {
  background-color: var(--color-surface);
  padding: var(--unit-4);
  margin: var(--unit-5) 0;
  border-left: 4px solid var(--color-verdict);
}

.emphasis-block p {
  margin-bottom: var(--unit-3);
}

.emphasis-block p:last-child {
  margin-bottom: 0;
}

/* Ramen Comparison */
.ramen-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--unit-8);
  margin: var(--unit-5) 0;
}

.ramen-card {
  padding: var(--unit-5);
  background-color: var(--color-canvas);
  position: relative;
}

.ramen-card.losing {
  border: 2px solid var(--color-ink-subtle);
}

.ramen-card.winning {
  border: 2px solid var(--color-verdict);
  background-color: var(--color-surface);
}

.ramen-card.winning::after {
  content: "WINNER";
  position: absolute;
  top: calc(-1 * var(--unit-1)); /* Adjusted position */
  right: var(--unit-3); /* Adjusted position */
  background-color: var(--color-verdict);
  color: var(--color-canvas);
  padding: var(--unit-1) var(--unit-3);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ramen-image-container {
  text-align: center;
  margin-bottom: var(--unit-4);
  padding: var(--unit-4);
  background-color: var(--color-surface);
}

.ramen-image {
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

.ramen-card h3 {
  display: flex;
  align-items: center;
  gap: var(--unit-2);
  margin-bottom: var(--unit-3);
  font-size: 1.25rem;
}

.icon-warning,
.icon-code {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.subtitle {
  font-size: 1rem;
  font-style: italic;
  color: var(--color-ink-subtle);
  margin-bottom: var(--unit-3);
  font-weight: 400;
}

.ramen-list {
  list-style: none;
  padding: 0;
}

.ramen-list li {
  margin-bottom: var(--unit-2);
  padding-left: var(--unit-3);
  position: relative;
  line-height: 1.6;
}

.ramen-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-ink);
  font-weight: 700;
}

/* Data Table */
.data-table {
  margin: var(--unit-5) 0;
  overflow-x: auto;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 500px;
  max-width: none;
  border-collapse: collapse;
}

th,
td {
  padding: var(--unit-3);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 1rem;
}

th {
  background-color: var(--color-ink);
  color: var(--color-canvas);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

td {
  font-weight: 500;
}

.yes {
  color: var(--color-verdict);
  font-weight: 700;
  text-transform: uppercase;
}

.no {
  color: var(--color-ink-subtle);
  font-weight: 700;
  text-transform: uppercase;
}

/* Verdict Comparison */
.conclusion-content {
  padding: var(--unit-5) 0;
}

.verdict-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--unit-8);
  margin: var(--unit-6) 0;
}

.verdict-item {
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  padding: var(--unit-5);
  text-align: center;
  position: relative;
}

.verdict-item.verdict-winner {
  border-color: var(--color-verdict);
  background-color: var(--color-canvas);
}

.verdict-item.verdict-winner::after {
  content: "SUPERIOR";
  position: absolute;
  top: calc(-1 * var(--unit-2)); /* Adjusted position */
  right: var(--unit-3); /* Adjusted position */
  background-color: var(--color-verdict);
  color: var(--color-canvas);
  padding: var(--unit-1) var(--unit-3);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.verdict-item h3 {
  font-size: 1.5rem;
  margin-bottom: var(--unit-2);
  color: var(--color-ink);
}

.verdict-item.verdict-winner h3 {
  color: var(--color-verdict);
}

.verdict-description {
  font-size: 1.125rem;
  font-weight: 700;
  font-style: italic;
  color: var(--color-ink-subtle);
  margin-bottom: var(--unit-4);
}

.verdict-item.verdict-winner .verdict-description {
  color: var(--color-verdict);
}

.verdict-details ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.verdict-details li {
  margin-bottom: var(--unit-2);
  padding-left: var(--unit-3);
  position: relative;
  line-height: 1.6;
}

.verdict-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-ink-subtle);
  font-weight: 700;
}

.verdict-item.verdict-winner .verdict-details li::before {
  color: var(--color-verdict);
}

/* Winner Declaration */

.winner-declaration {
  background-color: var(--color-surface);
  border: 3px solid var(--color-verdict);
  padding: var(--unit-8) var(--unit-5);
  margin: var(--unit-5) 0;
  position: relative;
  text-align: center;
}

.award-container {
  position: absolute;
  top: calc(-1 * var(--unit-4));
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-canvas);
  padding: var(--unit-4);
  border-radius: 50%;
  border: 2px solid var(--color-verdict);
  z-index: 10;
}

.award-image {
  width: 40px;
  height: 40px;
  opacity: 0.9;
}

.winner-declaration h3 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--color-verdict);
  margin-bottom: var(--unit-3);
  margin-top: var(--unit-8);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.winner-declaration p {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  grid-area: footer;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--unit-5) var(--unit-4);
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-content p {
  font-size: 1rem;
  margin-block: var(--unit-4);
}

.footer-content p:last-child {
  margin-bottom: 0;
}

.footer-branding {
  margin-top: var(--unit-4);
  padding-top: var(--unit-4);
  border-top: 1px solid var(--color-border);
}

.footer-branding p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--unit-1);
  font-size: 0.875rem;
  color: var(--color-ink-subtle);
}

.heart-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-branding a {
  color: var(--color-ink);
  text-decoration: underline;
  font-weight: 600;
}

.footer-branding a:hover {
  color: var(--color-verdict);
}

.footer-copyright {
  margin-top: var(--unit-4);
  padding-top: var(--unit-4);
  border-top: 1px solid var(--color-border);
}

.footer-copyright p {
  font-size: 0.875rem;
  color: var(--color-ink-subtle);
  text-align: center;
  margin-bottom: 0;
}

/* Section Decorations */
.section-decoration {
  position: relative;
  margin: var(--unit-5) 0;
}

.decoration-ramen {
  position: absolute;
  width: 48px;
  height: 48px;
  opacity: 0.1;
  pointer-events: none;
}

.decoration-left {
  top: 0;
  left: 0;
}

.decoration-right {
  top: 0;
  right: 0;
}

/* Button Styles */
.btn-primary {
  background-color: var(--color-verdict);
  color: var(--color-canvas);
  border: none;
  padding: var(--unit-3) var(--unit-5);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: none;
}

.btn-primary:hover {
  opacity: 0.9;
  color: var(--color-ink);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
  padding: var(--unit-3) var(--unit-5);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: none;
}

.btn-secondary:hover {
  background-color: var(--color-ink);
  color: var(--color-canvas);
}

/* Links */
a {
  color: var(--color-ink);
  text-decoration: underline;
  transition: none;
}

a:hover {
  color: var(--color-verdict);
}

/* SVG Icon System - Simple theme-based visibility */
svg {
  transition: none; /* No smooth transitions - immediate verdict */
}

/* Ramen images - handle filter-based theming for decorative images */
.ramen-image,
.hero-ramen-image,
.decoration-ramen {
  transition: none;
}

/* SVG Image Theming - Fix visibility in dark mode */
/* Dark mode (default) - invert black SVGs to white/light */
:root .ramen-image,
:root .hero-ramen-image,
:root .decoration-ramen,
:root .award-image {
  filter: invert(1) brightness(0.9);
}

/* Light mode - keep original black SVGs */
[data-theme="light"] .ramen-image,
[data-theme="light"] .hero-ramen-image,
[data-theme="light"] .decoration-ramen,
[data-theme="light"] .award-image {
  filter: none;
}

/* Focus States for Accessibility */
*:focus-visible {
  outline: 2px solid var(--color-verdict);
  outline-offset: 2px;
}

/* Prevent horizontal overflow in all contexts */
.section,
.hero,
.ramen-comparison,
.verdict-comparison,
.winner-declaration,
.emphasis-block {
  max-width: 100%;
  overflow-x: hidden;
}

/* Evidence Page Specific Styles */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--unit-5);
  margin-top: var(--unit-5);
}

.evidence-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--unit-5);
  text-align: center;
}

.evidence-card h3 {
  margin-bottom: var(--unit-3);
  color: var(--color-verdict);
}

.metric {
  margin-bottom: var(--unit-4);
}

.metric .number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-verdict);
  display: block;
  line-height: 1;
}

.metric .label {
  font-size: 0.875rem;
  color: var(--color-ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cost-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--unit-8);
  margin: var(--unit-5) 0;
}

.cost-breakdown {
  background-color: var(--color-canvas);
  border: 2px solid var(--color-ink-subtle);
  padding: var(--unit-5);
}

.cost-breakdown.winner {
  border-color: var(--color-verdict);
  background-color: var(--color-surface);
}

.cost-breakdown h3 {
  color: var(--color-ink);
  margin-bottom: var(--unit-4);
}

.cost-breakdown.winner h3 {
  color: var(--color-verdict);
}

.cost-breakdown ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--unit-4);
}

.cost-breakdown li {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--unit-2);
  font-size: 1rem;
}

.cost-breakdown li.total {
  font-weight: 700;
  font-size: 1.125rem;
  border-top: 1px dashed var(--color-border);
  padding-top: var(--unit-2);
  margin-top: var(--unit-3);
}

.cost-breakdown .footnote {
  font-size: 0.75rem;
  color: var(--color-ink-subtle);
  text-align: right;
  margin-top: var(--unit-2);
}

.tech-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--unit-8);
  margin-top: var(--unit-5);
}

.spec-category {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--unit-5);
}

.spec-category h3 {
  color: var(--color-ink);
  margin-bottom: var(--unit-3);
}

.spec-category ul {
  list-style: none;
  padding: 0;
}

.spec-category li {
  margin-bottom: var(--unit-2);
  padding-left: var(--unit-3);
  position: relative;
}

.spec-category li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-verdict);
  font-weight: 700;
}

/* Methodology Page Specific Styles */
.hypothesis-block {
  background-color: var(--color-surface);
  padding: var(--unit-4);
  margin: var(--unit-5) 0;
  border-left: 4px solid var(--color-verdict);
}

.hypothesis-block p {
  margin-bottom: var(--unit-3);
}

.hypothesis-block p:last-child {
  margin-bottom: 0;
}

.methodology-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--unit-5);
  margin-top: var(--unit-5);
}

.step {
  display: flex;
  align-items: flex-start;
  gap: var(--unit-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--unit-4);
}

.step-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-verdict);
  line-height: 1;
  flex-shrink: 0;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: var(--unit-2);
  color: var(--color-ink);
}

.implementation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--unit-8);
  margin-top: var(--unit-5);
}

.tech-choice {
  background-color: var(--color-canvas);
  border: 2px solid var(--color-border);
  padding: var(--unit-5);
}

.tech-choice h3 {
  color: var(--color-verdict);
  margin-bottom: var(--unit-3);
}

.tech-choice p {
  margin-bottom: var(--unit-3);
}

.tech-choice ul {
  list-style: none;
  padding: 0;
}

.tech-choice li {
  margin-bottom: var(--unit-2);
  padding-left: var(--unit-3);
  position: relative;
}

.tech-choice li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-ink);
  font-weight: 700;
}

.qa-checklist {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--unit-5);
  margin-top: var(--unit-5);
}

.qa-checklist h3 {
  color: var(--color-ink);
  margin-bottom: var(--unit-4);
}

.qa-checklist ul {
  list-style: none;
  padding: 0;
}

.qa-checklist li {
  margin-bottom: var(--unit-2);
  padding-left: var(--unit-4);
  position: relative;
  color: var(--color-ink);
}

.qa-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
}

.qa-checklist li::before {
  content: "-";
  font-size: 1rem;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
}

.results-summary {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--unit-5);
  margin-top: var(--unit-5);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--unit-5);
  margin-top: var(--unit-5);
}

.result-metric {
  background-color: var(--color-canvas);
  border: 1px solid var(--color-border);
  padding: var(--unit-4);
}

.result-metric h4 {
  color: var(--color-verdict);
  margin-bottom: var(--unit-2);
}

.final-statement {
  margin-top: var(--unit-8);
  padding-top: var(--unit-5);
  border-top: 1px dashed var(--color-border);
}

@media (max-width: 768px) {
  .cost-comparison,
  .tech-specs,
  .implementation-details,
  .results-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .header-container {
    padding: 0 var(--unit-3);
  }

  .site-title {
    font-size: 1.1rem;
  }

  .nav-menu {
    gap: var(--unit-3);
  }

  .nav-menu a {
    font-size: 0.9rem;
  }

  .main-content {
    padding: var(--unit-6) var(--unit-3);
  }

  .hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
  }

  .tagline {
    font-size: 1.2rem;
  }

  .ramen-comparison,
  .verdict-comparison {
    grid-template-columns: 1fr;
    gap: var(--unit-6);
  }

  .ramen-card.winning::after,
  .verdict-item.verdict-winner::after {
    font-size: 0.75rem;
    padding: var(--unit-1) var(--unit-2);
  }

  .winner-declaration {
    padding: var(--unit-6) var(--unit-4);
  }

  .winner-declaration h3 {
    font-size: clamp(2.25rem, 5vw, 3rem);
  }

  .winner-declaration p {
    font-size: 1.1rem;
  }

  .footer-content {
    padding: 0 var(--unit-3);
  }
}

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

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .header-container {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    padding: var(--unit-3);
  }

  .site-title {
    width: 100%;
    text-align: center;
    margin-bottom: var(--unit-3);
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
    gap: var(--unit-2);
  }

  .nav-menu a {
    font-size: 0.85rem;
    padding: var(--unit-1) var(--unit-2);
  }

  .main-content {
    padding: var(--unit-5) var(--unit-2);
  }

  .hero h1 {
    font-size: clamp(2.25rem, 6vw, 3rem);
  }

  .tagline {
    font-size: 1rem;
  }

  .ramen-card,
  .verdict-item {
    padding: var(--unit-4);
  }

  .winner-declaration {
    padding: var(--unit-5) var(--unit-3);
  }

  .winner-declaration h3 {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  .winner-declaration p {
    font-size: 1rem;
  }

  .footer-content {
    padding: 0 var(--unit-2);
  }
}

/* General utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.p-0 {
  padding: 0 !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.ml-auto {
  margin-left: auto;
}

.mr-auto {
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.d-block {
  display: block;
}

.d-inline-block {
  display: inline-block;
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

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

.flex-column {
  flex-direction: column;
}

.gap-1 {
  gap: var(--unit-1);
}

.gap-2 {
  gap: var(--unit-2);
}

.gap-3 {
  gap: var(--unit-3);
}

.gap-4 {
  gap: var(--unit-4);
}

.gap-5 {
  gap: var(--unit-5);
}

.gap-6 {
  gap: var(--unit-6);
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-1 {
  z-index: 1;
}

.z-10 {
  z-index: 10;
}

.z-100 {
  z-index: 100;
}

.z-1000 {
  z-index: 1000;
}

.z-9999 {
  z-index: 9999;
}

/* Hide elements visually but keep them accessible for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Hide on small screens */
@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* Hide on large screens */
@media (min-width: 769px) {
  .hide-on-desktop {
    display: none !important;
  }
}

/* Flexbox utilities */
.flex-grow-1 {
  flex-grow: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-around {
  justify-content: space-around;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-end {
  align-items: flex-end;
}

.align-self-start {
  align-self: flex-start;
}

.align-self-end {
  align-self: flex-end;
}

.align-self-center {
  align-self: center;
}

/* Text utilities */
.text-uppercase {
  text-transform: uppercase;
}

.text-lowercase {
  text-transform: lowercase;
}

.text-capitalize {
  text-transform: capitalize;
}

.font-weight-bold {
  font-weight: 700;
}

.font-weight-normal {
  font-weight: 400;
}

.font-italic {
  font-style: italic;
}

/* Margin and Padding utilities */
/* Example: .m-auto, .mt-2, .px-3, .py-4 */
/* Based on --unit-base (8px) */

/* Margins */
.m-auto {
  margin: auto;
}
.mt-auto {
  margin-top: auto;
}
.mb-auto {
  margin-bottom: auto;
}
.ml-auto {
  margin-left: auto;
}
.mr-auto {
  margin-right: auto;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.my-auto {
  margin-top: auto;
  margin-bottom: auto;
}

.m-1 {
  margin: var(--unit-1);
}
.mt-1 {
  margin-top: var(--unit-1);
}
.mb-1 {
  margin-bottom: var(--unit-1);
}
.ml-1 {
  margin-left: var(--unit-1);
}
.mr-1 {
  margin-right: var(--unit-1);
}
.mx-1 {
  margin-left: var(--unit-1);
  margin-right: var(--unit-1);
}
.my-1 {
  margin-top: var(--unit-1);
  margin-bottom: var(--unit-1);
}

.m-2 {
  margin: var(--unit-2);
}
.mt-2 {
  margin-top: var(--unit-2);
}
.mb-2 {
  margin-bottom: var(--unit-2);
}
.ml-2 {
  margin-left: var(--unit-2);
}
.mr-2 {
  margin-right: var(--unit-2);
}
.mx-2 {
  margin-left: var(--unit-2);
  margin-right: var(--unit-2);
}
.my-2 {
  margin-top: var(--unit-2);
  margin-bottom: var(--unit-2);
}

.m-3 {
  margin: var(--unit-3);
}
.mt-3 {
  margin-top: var(--unit-3);
}
.mb-3 {
  margin-bottom: var(--unit-3);
}
.ml-3 {
  margin-left: var(--unit-3);
}
.mr-3 {
  margin-right: var(--unit-3);
}
.mx-3 {
  margin-left: var(--unit-3);
  margin-right: var(--unit-3);
}
.my-3 {
  margin-top: var(--unit-3);
  margin-bottom: var(--unit-3);
}

.m-4 {
  margin: var(--unit-4);
}
.mt-4 {
  margin-top: var(--unit-4);
}
.mb-4 {
  margin-bottom: var(--unit-4);
}
.ml-4 {
  margin-left: var(--unit-4);
}
.mr-4 {
  margin-right: var(--unit-4);
}
.mx-4 {
  margin-left: var(--unit-4);
  margin-right: var(--unit-4);
}
.my-4 {
  margin-top: var(--unit-4);
  margin-bottom: var(--unit-4);
}

.m-5 {
  margin: var(--unit-5);
}
.mt-5 {
  margin-top: var(--unit-5);
}
.mb-5 {
  margin-bottom: var(--unit-5);
}
.ml-5 {
  margin-left: var(--unit-5);
}
.mr-5 {
  margin-right: var(--unit-5);
}
.mx-5 {
  margin-left: var(--unit-5);
  margin-right: var(--unit-5);
}
.my-5 {
  margin-top: var(--unit-5);
  margin-bottom: var(--unit-5);
}

.m-6 {
  margin: var(--unit-6);
}
.mt-6 {
  margin-top: var(--unit-6);
}
.mb-6 {
  margin-bottom: var(--unit-6);
}
.ml-6 {
  margin-left: var(--unit-6);
}
.mr-6 {
  margin-right: var(--unit-6);
}
.mx-6 {
  margin-left: var(--unit-6);
  margin-right: var(--unit-6);
}
.my-6 {
  margin-top: var(--unit-6);
  margin-bottom: var(--unit-6);
}

/* Paddings */
.p-1 {
  padding: var(--unit-1);
}
.pt-1 {
  padding-top: var(--unit-1);
}
.pb-1 {
  padding-bottom: var(--unit-1);
}
.pl-1 {
  padding-left: var(--unit-1);
}
.pr-1 {
  padding-right: var(--unit-1);
}
.px-1 {
  padding-left: var(--unit-1);
  padding-right: var(--unit-1);
}
.py-1 {
  padding-top: var(--unit-1);
  padding-bottom: var(--unit-1);
}

.p-2 {
  padding: var(--unit-2);
}
.pt-2 {
  padding-top: var(--unit-2);
}
.pb-2 {
  padding-bottom: var(--unit-2);
}
.pl-2 {
  padding-left: var(--unit-2);
}
.pr-2 {
  padding-right: var(--unit-2);
}
.px-2 {
  padding-left: var(--unit-2);
  padding-right: var(--unit-2);
}
.py-2 {
  padding-top: var(--unit-2);
  padding-bottom: var(--unit-2);
}

.p-3 {
  padding: var(--unit-3);
}
.pt-3 {
  padding-top: var(--unit-3);
}
.pb-3 {
  padding-bottom: var(--unit-3);
}
.pl-3 {
  padding-left: var(--unit-3);
}
.pr-3 {
  padding-right: var(--unit-3);
}
.px-3 {
  padding-left: var(--unit-3);
  padding-right: var(--unit-3);
}
.py-3 {
  padding-top: var(--unit-3);
  padding-bottom: var(--unit-3);
}

.p-4 {
  padding: var(--unit-4);
}
.pt-4 {
  padding-top: var(--unit-4);
}
.pb-4 {
  padding-bottom: var(--unit-4);
}
.pl-4 {
  padding-left: var(--unit-4);
}
.pr-4 {
  padding-right: var(--unit-4);
}
.px-4 {
  padding-left: var(--unit-4);
  padding-right: var(--unit-4);
}
.py-4 {
  padding-top: var(--unit-4);
  padding-bottom: var(--unit-4);
}

.p-5 {
  padding: var(--unit-5);
}
.pt-5 {
  padding-top: var(--unit-5);
}
.pb-5 {
  padding-bottom: var(--unit-5);
}
.pl-5 {
  padding-left: var(--unit-5);
}
.pr-5 {
  padding-right: var(--unit-5);
}
.px-5 {
  padding-left: var(--unit-5);
  padding-right: var(--unit-5);
}
.py-5 {
  padding-top: var(--unit-5);
  padding-bottom: var(--unit-5);
}

.p-6 {
  padding: var(--unit-6);
}
.pt-6 {
  padding-top: var(--unit-6);
}
.pb-6 {
  padding-bottom: var(--unit-6);
}
.pl-6 {
  padding-left: var(--unit-6);
}
.pr-6 {
  padding-right: var(--unit-6);
}
.px-6 {
  padding-left: var(--unit-6);
  padding-right: var(--unit-6);
}
.py-6 {
  padding-top: var(--unit-6);
  padding-bottom: var(--unit-6);
}

/* Widths */
.w-25 {
  width: 25%;
}
.w-50 {
  width: 50%;
}
.w-75 {
  width: 75%;
}

/* Heights */
.h-25 {
  height: 25%;
}
.h-50 {
  height: 50%;
}
.h-75 {
  height: 75%;
}

/* Display */
.d-none {
  display: none;
}

/* Borders */
.border {
  border: 1px solid var(--color-border);
}
.border-top {
  border-top: 1px solid var(--color-border);
}
.border-bottom {
  border-bottom: 1px solid var(--color-border);
}
.border-left {
  border-left: 1px solid var(--color-border);
}
.border-right {
  border-right: 1px solid var(--color-border);
}

/* Rounded corners */
.rounded {
  border-radius: var(--unit-1);
}
.rounded-circle {
  border-radius: 50%;
}

/* Shadows */
.shadow-sm {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.shadow {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.shadow-lg {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Opacity */
.opacity-0 {
  opacity: 0;
}
.opacity-25 {
  opacity: 0.25;
}
.opacity-50 {
  opacity: 0.5;
}
.opacity-75 {
  opacity: 0.75;
}
.opacity-100 {
  opacity: 1;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}
.overflow-auto {
  overflow: auto;
}
.overflow-scroll {
  overflow: scroll;
}

/* Position */
.position-fixed {
  position: fixed;
}
.position-absolute {
  position: absolute;
}
.position-relative {
  position: relative;
}
.position-sticky {
  position: sticky;
}

/* Top, Right, Bottom, Left */
.t-0 {
  top: 0;
}
.r-0 {
  right: 0;
}
.b-0 {
  bottom: 0;
}
.l-0 {
  left: 0;
}

/* Z-index */
.z-index-0 {
  z-index: 0;
}
.z-index-1 {
  z-index: 1;
}
.z-index-2 {
  z-index: 2;
}
.z-index-3 {
  z-index: 3;
}
.z-index-4 {
  z-index: 4;
}
.z-index-5 {
  z-index: 5;
}

/* Flexbox alignment */
.align-self-stretch {
  align-self: stretch;
}
.align-self-baseline {
  align-self: baseline;
}

/* Flexbox distribution */
.justify-content-start {
  justify-content: flex-start;
}
.justify-content-end {
  justify-content: flex-end;
}

/* Text alignment */
.text-left {
  text-align: left;
}

/* List styles */
.list-unstyled {
  list-style: none;
  padding-left: 0;
}

/* Image responsiveness */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Embed responsiveness */
.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.embed-responsive::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.embed-responsive-item {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Visibility */
.visible {
  visibility: visible;
}
.invisible {
  visibility: hidden;
}

/* Screen reader only */
.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Print utilities */
@media print {
  .d-print-none {
    display: none !important;
  }
  .d-print-block {
    display: block !important;
  }
  .d-print-inline {
    display: inline !important;
  }
  .d-print-inline-block {
    display: inline-block !important;
  }
}

/* Custom styles for mobile navigation */
.nav-toggle {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-ink);
  z-index: 1001; /* Above header and theme toggle */
  padding: 0;
  width: var(--unit-6);
  height: var(--unit-6);
  align-items: center;
  justify-content: center;
  border-radius: var(--unit-1);
  transition: none;
}

.nav-toggle:hover {
  background-color: var(--color-surface);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-verdict);
  outline-offset: 2px;
}

.nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-canvas);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-panel.is-open {
  transform: translateX(0);
}

.nav-close {
  position: absolute;
  top: var(--unit-3);
  right: var(--unit-3);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-ink);
  z-index: 1051;
  padding: 0;
  width: var(--unit-5);
  height: var(--unit-5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--unit-1);
  transition: none;
}

.nav-close:hover {
  background-color: var(--color-surface);
}

.nav-close:focus-visible {
  outline: 2px solid var(--color-verdict);
  outline-offset: 2px;
}

.nav-panel .nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  width: 100%;
  padding: var(--unit-8) 0;
  margin-top: var(--unit-8);
  list-style: none;
  justify-content: center;
  align-items: center;
}

.nav-panel .nav-menu a {
  font-size: 1.5rem;
  padding: var(--unit-4) var(--unit-6);
  display: block;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: none;
  font-weight: 500;
  position: relative;
  width: 100%;
  max-width: 300px;
}

.nav-panel .nav-menu a:hover {
  color: var(--color-verdict);
  border-bottom-color: var(--color-verdict);
}

.nav-panel .nav-menu a.active {
  color: var(--color-verdict);
  border-bottom-color: var(--color-verdict);
}

/* Adjust theme toggle for mobile nav */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: var(--unit-3);
    right: var(--unit-3);
    z-index: 1002; /* Ensure it's above the nav panel */
  }

  .header-container {
    justify-content: space-between; /* Align title left, toggle right */
    flex-wrap: nowrap; /* Prevent wrapping on smaller screens */
  }

  .hide-on-mobile {
    display: none !important; /* Hide desktop nav on mobile */
  }

  .nav-toggle {
    display: flex !important; /* Show hamburger icon */
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none !important; /* Hide hamburger icon on desktop */
  }

  .nav-panel {
    display: none !important; /* Ensure nav panel is hidden on desktop */
  }

  .hide-on-desktop {
    display: none !important; /* Hide mobile-only elements on desktop */
  }
}

/* Ensure theme toggle is always visible and on top */
.theme-toggle {
  position: fixed;
  bottom: var(--unit-3);
  right: var(--unit-3);
  z-index: 9999; /* Always on top */
}

/* Adjust header for mobile */
@media (max-width: 480px) {
  .header-container {
    justify-content: space-between;
    padding: var(--unit-3);
    height: var(--header-height);
  }

  .site-title {
    margin-bottom: 0;
    width: auto;
  }

  .nav-panel .nav-menu {
    padding: var(--unit-6) 0;
    margin-top: var(--unit-6);
  }

  .nav-panel .nav-menu a {
    font-size: 1.25rem;
    padding: var(--unit-3) var(--unit-4);
  }
}
