:root {
  --bg: #07111d;
  --bg-soft: #0d1b2a;
  --panel: rgba(12, 25, 38, 0.88);
  --panel-strong: #101f2f;
  --primary: #56ccf2;
  --primary-strong: #2ec4ff;
  --accent: #7ef9c6;
  --text: #ebf4ff;
  --muted: #b9c8d9;
  --line: rgba(255, 255, 255, 0.09);
  --shadow: 0 20px 45px rgba(7, 16, 24, 0.38);
  --surface: rgba(255, 255, 255, 0.02);
  --radius: 22px;
}

body.light-theme {
  --bg: #edf5ff;
  --bg-soft: #f7fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --primary: #0b7ae8;
  --primary-strong: #005ec7;
  --accent: #0da978;
  --text: #102033;
  --muted: #4a5f78;
  --line: rgba(16, 32, 51, 0.1);
  --shadow: 0 18px 40px rgba(28, 37, 62, 0.12);
  --surface: rgba(11, 122, 232, 0.04);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

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

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

.section {
  padding: 110px 0;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 1rem;
}

p {
  color: var(--muted);
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: linear-gradient(135deg, rgba(8, 17, 32, 0.92), rgba(18, 43, 70, 0.82), rgba(10, 92, 128, 0.78));
  border-bottom: 1px solid rgba(126, 249, 198, 0.2);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.back-to-top {
  position: fixed;
  right: calc(1.5rem + env(safe-area-inset-right));
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--primary);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body.light-theme .header {
  background: linear-gradient(135deg, rgba(230, 242, 255, 0.96), rgba(255, 255, 255, 0.9), rgba(194, 232, 255, 0.86));
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  position: relative;
}

.brand {
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.brand span {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  margin-right: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(235, 244, 255, 0.8);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(86, 204, 242, 0.12);
  transform: translateY(-1px);
}

body.light-theme .nav a {
  color: rgba(16, 32, 51, 0.8);
}

.theme-toggle,
.nav-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 204, 242, 0.55);
}

.nav-toggle {
  display: none;
  border-radius: 12px;
  width: 44px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

body {
  background: linear-gradient(135deg, #0a4ec5 0%, #0a5ae0 35%, #0b57d0 100%);
}

.header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: clamp(360px, 46vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0 44px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(86, 204, 242, 0.14), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(126, 249, 198, 0.12), transparent 20%),
    linear-gradient(135deg, #020b17 0%, #071522 32%, #0d1b2a 60%, #040c19 100%);
}

.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.9;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 1;
  background-color: #020d1d;
  filter: saturate(1.25) contrast(1.12) brightness(1.02);
}

.hero-bg-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 11, 23, 0.94) 0%, rgba(2, 11, 23, 0.74) 30%, rgba(2, 11, 23, 0.18) 58%, transparent 100%),
    linear-gradient(180deg, rgba(2, 11, 23, 0.18), rgba(2, 11, 23, 0.54));
}

.hero-bg-slide.is-active {
  opacity: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(2, 10, 18, 0.18), rgba(5, 18, 36, 0.06)),
    radial-gradient(circle at center, rgba(86, 204, 242, 0.16), transparent 58%);
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(86, 204, 242, 0.12), transparent 26%);
  z-index: 1;
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(1200px, calc(100% - 32px));
}

.hero-feature-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero-feature-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 5s ease;
}

.hero-feature-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-feature-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 11, 23, 0.32), rgba(2, 11, 23, 0.08) 55%, rgba(2, 11, 23, 0.34)),
    linear-gradient(0deg, rgba(2, 11, 23, 0.72), transparent 45%);
}

.hero-feature-caption {
  position: absolute;
  z-index: 1;
  left: max(24px, calc((100vw - 1200px) / 2));
  top: 50%;
  width: min(62%, 720px);
  transform: translateY(-50%);
  color: #f8fbff;
}

.hero-feature-caption h1,
.hero-feature-caption h2 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.hero-feature-caption ul {
  display: grid;
  gap: 9px;
  padding-left: 1.2rem;
  color: #ffd84d;
  font-size: clamp(0.88rem, 1.35vw, 1.08rem);
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.hero-feature-caption li::marker {
  color: #ffd84d;
}

.hero-feature-pagination {
  position: absolute;
  z-index: 2;
  left: max(26px, calc((100vw - 1200px) / 2));
  bottom: 20px;
  display: flex;
  gap: 9px;
  pointer-events: auto;
}

.hero-feature-pagination button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-feature-pagination button.is-active {
  background: #8feeff;
  box-shadow: 0 0 10px rgba(143, 238, 255, 0.75);
}

.hero-feature-pagination button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.hero-pathways {
  position: relative;
  z-index: 2;
  flex: 0 0 340px;
  width: 340px;
  padding: 10px 12px;
  background: rgba(6, 20, 19, 0.78);
  border: 1px solid rgba(126, 249, 198, 0.34);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.hero-pathways-title {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #a8f0c5;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-pathways-heading {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 3px;
  padding-bottom: 2px;
  overflow: hidden;
}

.hero-pathway-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: #f1f7f1;
  border-top: 1px solid rgba(241, 247, 241, 0.14);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease, padding 180ms ease;
}

.hero-pathway-link:hover,
.hero-pathway-link:focus-visible {
  padding-right: 8px;
  padding-left: 16px;
  color: #a8f0c5;
  background: rgba(126, 249, 198, 0.1);
  outline: none;
}

.hero-pathway-label {
  flex: 1;
}

.hero-pathway-arrow {
  color: #a8f0c5;
  font-size: 1.1rem;
}

.hero-kicker {
  margin: 0 0 1.1rem;
  color: rgba(203, 236, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(86, 204, 242, 0.38);
}

.hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}

.hero-line {
  display: block;
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.hero-line--primary {
  font-size: clamp(3.2rem, 6vw, 7.2rem);
  font-weight: 800;
  text-shadow: 0 0 20px rgba(126, 249, 198, 0.12), 0 0 38px rgba(86, 204, 242, 0.15);
}

.hero-line--typed {
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  font-weight: 700;
  color: #8feeff;
  text-shadow: 0 0 18px rgba(86, 204, 242, 0.48), 0 0 40px rgba(86, 204, 242, 0.28);
}

.typed-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 5.2ch;
  color: #8feeff;
}

.typed-skill {
  display: inline-block;
  color: #8feeff;
}

.typed-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(121, 255, 176, 0.8);
  font-size: 0.72em;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-shadow: 0 0 8px rgba(121, 255, 176, 0.24);
}

.typed-check.is-visible {
  opacity: 1;
  transform: scale(1);
}

.cursor {
  display: none !important;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  max-width: 720px;
  margin: 1.6rem auto 2rem;
  color: rgba(220, 234, 245, 0.85);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 192px;
  padding: 0.98rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #52d5ff 0%, #3b82f6 100%);
  color: #031522;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  background: rgba(7, 28, 45, 0.7);
  border: 1px solid rgba(143, 238, 255, 0.32);
  color: #e9faff;
  box-shadow: 0 0 18px rgba(86, 204, 242, 0.12);
}

.hero-metrics {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.hero-metrics li {
  min-width: 128px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 157, 171, 0.2);
  border-radius: 18px;
  background: rgba(5, 20, 31, 0.34);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(143, 238, 255, 0.06);
}

.hero-metrics strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
  color: #f5fbff;
}

.hero-metrics span {
  display: block;
  color: rgba(206, 224, 236, 0.8);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-robot-walker {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 29px;
  overflow: hidden;
  pointer-events: none;
}

.hero-robot {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 29px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.38));
  animation: robot-heading-walk 12s linear 2s infinite alternate;
}

.hero-robot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: robot-walk-bob 760ms ease-in-out 2s infinite alternate;
}

.robot-head,
.robot-body,
.robot-body-panel,
.robot-neck,
.robot-waist,
.robot-foot,
.robot-hand,
.robot-jaw,
.robot-shoulder,
.robot-limb-plate {
  fill: url(#robotArmor);
  stroke: #405763;
  stroke-width: 1.5;
}

.robot-antenna,
.robot-head-highlight,
.robot-chest-detail,
.robot-limb-highlight,
.robot-visor-glint,
.robot-core-detail,
.robot-head-seam,
.robot-actuator {
  fill: none;
  stroke: #e8f3f0;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.robot-body-panel {
  fill: rgba(30, 54, 66, 0.72);
  stroke: #8ea2a9;
}

.robot-ear,
.robot-visor {
  fill: url(#robotVisor);
  stroke: #526a75;
  stroke-width: 1.5;
}

.robot-limb-shell {
  fill: none;
  stroke: url(#robotArmor);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.robot-joint {
  fill: #263b47;
  stroke: #b6c7ca;
  stroke-width: 2;
}

.robot-core-ring {
  fill: none;
  stroke: #a8f0c5;
  stroke-width: 1.5;
  opacity: 0.78;
}

.robot-bolt {
  fill: #102631;
  stroke: #c4d2d1;
  stroke-width: 1;
}

.robot-eye,
.robot-antenna-light {
  fill: url(#robotCore);
  filter: drop-shadow(0 0 4px rgba(46, 196, 255, 0.8));
}

.robot-eye {
  fill: #9fffee;
}

.robot-status {
  fill: #a8f0c5;
  filter: drop-shadow(0 0 3px rgba(168, 240, 197, 0.85));
}

.robot-core {
  fill: url(#robotCore);
}

.robot-core-detail {
  stroke: #c8fff6;
  stroke-width: 1;
}

.robot-jaw {
  fill: #70838c;
}

.robot-arm,
.robot-leg {
  transform-box: view-box;
}

.robot-arm-left {
  transform-origin: 35px 65px;
}

.robot-arm-right {
  transform-origin: 73px 65px;
}

.robot-leg-left {
  transform-origin: 45px 101px;
}

.robot-leg-right {
  transform-origin: 64px 101px;
}

.hero-pathways .robot-arm-left,
.hero-pathways .robot-leg-right {
  animation: robot-walk-swing 760ms ease-in-out 2s infinite alternate;
}

.hero-pathways .robot-arm-right,
.hero-pathways .robot-leg-left {
  animation: robot-walk-swing 760ms ease-in-out 2s infinite alternate-reverse;
}

@keyframes robot-heading-walk {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 20px);
  }
}

@keyframes robot-walk-swing {
  from {
    transform: rotate(-16deg);
  }
  to {
    transform: rotate(16deg);
  }
}

@keyframes robot-walk-bob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(2px);
  }
}

.agile-subpage {
  background: #edf2ef;
  padding: 0 0 48px;
  color: #11212d;
}

.tutorial-page-shell {
  width: min(1500px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 760px;
  display: flex;
  background: rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(16, 32, 51, 0.06);
}

.tutorial-sidebar {
  width: 260px;
  background: #eef4ee;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px 14px 22px 18px;
}

.agile-subpage .tutorial-sidebar {
  background:
    linear-gradient(rgba(5, 30, 20, 0.76), rgba(5, 30, 20, 0.86)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=900&q=85") center / cover;
  border-right-color: rgba(235, 244, 239, 0.22);
}

.tutorial-title {
  font-size: clamp(1.3rem, 1.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.9rem;
  color: #102533;
}

.agile-subpage .tutorial-title {
  color: #f1f7f1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.accordion-collapse {
  display: block;
}

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

.leftmenu {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0;
}

.leftmenu a {
  display: block;
  color: #1d2b35;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.agile-subpage .leftmenu a {
  color: rgba(241, 247, 241, 0.9);
}

.leftmenu a:hover,
.leftmenu a:focus-visible {
  color: #0e8e5f;
}

.agile-subpage .leftmenu a:hover,
.agile-subpage .leftmenu a:focus-visible {
  color: #a8f0c5;
}

.tutorial-main {
  flex: 1;
  background: #f7f8f6;
  padding: 0 24px 28px;
}

.page-header-strip {
  min-height: 78px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #dde5df;
  margin-bottom: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.08rem;
  color: #213b46;
  font-weight: 500;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #213b46;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  color: #0e8e5f;
}

.home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(14, 142, 95, 0.07);
  color: #0e8e5f;
}

.crumb-separator {
  color: #7f8f94;
}

.crumb-current {
  font-weight: 700;
}

.top-reasons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 16px 0 28px;
}

.reason-box {
  min-width: 170px;
  padding: 1.1rem 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e1e6e2;
  border-radius: 12px;
  text-align: center;
  color: #3a7ae4;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(17, 33, 45, 0.06);
  border-radius: 16px;
  margin-bottom: 28px;
}

.tab {
  appearance: none;
  border: 1px solid #dfe7e4;
  background: rgba(255, 255, 255, 0.55);
  color: #1b2f39;
  border-radius: 12px;
  padding: 1rem 1.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  border-color: rgba(14, 142, 95, 0.9);
  color: #0c7f5a;
  box-shadow: inset 0 0 0 1px rgba(14, 142, 95, 0.18);
}

.tutorial-content-card {
  padding: 0 8px;
}

.pi-plan-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 0;
}

.pi-plan-pdf {
  display: block;
  width: min(100%, 1120px);
  height: 760px;
  border: 1px solid #dfe7e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.flow-chart-image {
  display: block;
  width: min(76%, 820px);
  height: auto;
  margin: 12px auto 0;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  object-fit: contain;
  background: #fff;
  cursor: pointer;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.image-modal[hidden] {
  display: none !important;
}

.image-modal.is-open {
  display: flex;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 14, 0.82);
  backdrop-filter: blur(4px);
}

.image-modal-content {
  position: relative;
  width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 18px 18px 14px;
  background: rgba(6, 15, 21, 0.85);
  border: 1px solid rgba(143, 238, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(2, 8, 18, 0.6);
}

.image-modal-content img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.image-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  font-size: 2.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  z-index: 10;
}

.tutorial-content-card h1 {
  font-size: clamp(3rem, 4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.07em;
  color: #162d39;
  margin-bottom: 0.7rem;
}

.updated {
  font-size: 1.2rem;
  color: #536a77;
  margin-bottom: 2.2rem;
}

.tutorial-content-card p {
  max-width: 1180px;
  font-size: clamp(1.2rem, 1.6vw, 1.7rem);
  line-height: 1.55;
  color: #334d5d;
  margin-bottom: 1.2rem;
}

.tutorial-content-card.manual-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 12px 36px;
}

.tutorial-content-card.manual-content h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0 0 0.75rem;
}

.tutorial-content-card.manual-content .manual-intro,
.tutorial-content-card.manual-content p {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.65;
  color: #405762;
  margin-bottom: 0.8rem;
}

.manual-content .manual-section {
  border-top: 1px solid #dce5e0;
  padding: 1.2rem 0;
}

.ai-sustainability-spotlight {
  padding: 56px 0 64px;
  background:
    linear-gradient(rgba(244, 247, 243, 0.88), rgba(237, 243, 239, 0.9)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1800&q=85") center / cover;
  border-top: 1px solid #dfe7e4;
}

.ai-sustainability-title {
  margin: 0 0 1.25rem;
  color: #173b43;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.ai-sustainability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: 2rem;
}

.ai-sustainability-copy {
  color: #173b43;
}

.ai-sustainability-points {
  background: #f5faf7;
  border: 1px solid #dfe7e4;
  border-radius: 16px;
  padding: 1rem 1.2rem;
}

.ai-sustainability-points ol {
  margin: 0;
  padding-left: 1.4rem;
  color: #334d5d;
  line-height: 1.7;
  font-size: 1.06rem;
}

.ai-sustainability-description {
  margin: 0 0 1.5rem;
  color: #334d5d;
  font-size: 1.08rem;
  line-height: 1.75;
}

.ai-sustainability-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border: 1px solid #176b73;
  border-radius: 4px;
  color: #fff;
  background: #176b73;
  font-weight: 700;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ai-sustainability-link:hover,
.ai-sustainability-link:focus-visible {
  background: #12565d;
  transform: translateY(-1px);
}

.ai-sustainability-video {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.ai-sustainability-video video {
  display: block;
  width: 100%;
}

.video-player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
}

.video-player-stage .video-embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.qa-video-dialog {
  width: min(94vw, 1100px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: visible;
  border: 0;
  color: #fff;
  background: transparent;
}

.qa-video-dialog::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}

.qa-video-dialog__content {
  position: relative;
  padding: 3rem 0 0;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.qa-video-dialog__player .video-player-stage {
  max-height: 82vh;
  border-radius: 12px;
}

.qa-video-dialog__close {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  right: 0.65rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.qa-video-dialog__status {
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  margin: 0;
  font-size: 0.875rem;
}

.qa-video-dialog__status:empty {
  display: none;
}

.mobile-video-fullscreen-open,
.mobile-video-fullscreen-close {
  display: none;
}

.video-player-stage:fullscreen {
  display: grid;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  place-items: center;
  border-radius: 0;
  background: #000;
}

.video-player-stage:fullscreen .video-embed {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) and (pointer: coarse) {
  .mobile-video-fullscreen-open,
  .mobile-video-fullscreen-close {
    position: absolute;
    z-index: 2;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font: inherit;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .mobile-video-fullscreen-open {
    display: inline-flex;
    top: 0.5rem;
    right: 0.5rem;
  }

  .mobile-video-fullscreen-close {
    display: none;
    top: 1rem;
    right: 1rem;
  }

  .video-player-stage:fullscreen .mobile-video-fullscreen-open {
    display: none;
  }

  .video-player-stage:fullscreen .mobile-video-fullscreen-close {
    display: inline-flex;
  }
}

.video-attribution {
  margin: 0.65rem 0.15rem 0.1rem;
  color: #52636b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.video-attribution a {
  color: #176b73;
}

.video-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 21, 27, 0.12);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 1.8rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.video-preview-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  color: #fff;
}

.video-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  opacity: 0.9;
}

.video-preview-text strong {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.1;
  color: #fff;
}

.video-watch-btn {
  margin-top: 0.5rem;
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.manual-content h2 {
  color: #173b43;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 0.7rem;
}

@media (max-width: 760px) {
  .ai-sustainability-grid {
    grid-template-columns: 1fr;
  }
}

.manual-content h3 {
  color: #173b43;
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
}

.manual-content ol,
.manual-content ul {
  max-width: 780px;
  padding-left: 1.35rem;
  color: #334d5d;
  line-height: 1.65;
}

.manual-content li {
  padding-left: 0.2rem;
  margin: 0.35rem 0;
}

.manual-content strong {
  color: #173b43;
}

.highlights-section {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 360px;
  padding: 48px 0 56px;
  background-color: #17231b;
  background-image: url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1800&q=85");
  background-position: center 52%;
  background-size: cover;
}

.highlights-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 17, 10, 0.38);
}

.highlights-content {
  position: relative;
  z-index: 1;
}

.highlights-title {
  margin-bottom: 1.4rem;
  color: #f0d58e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.highlight-card {
  position: relative;
  display: flex;
  min-height: 142px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(236, 207, 143, 0.72);
  border-radius: 12px;
  background: rgba(25, 34, 25, 0.76);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(244, 220, 165, 0.1);
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(7px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.highlight-card::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(236, 207, 143, 0.28);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.highlight-card:hover {
  transform: translateY(-3px);
  border-color: #f0d58e;
  background: rgba(36, 43, 30, 0.88);
}

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 0.55rem;
  padding: 6px;
  border-radius: 10px;
  background: rgba(227, 199, 131, 0.18);
}

.highlight-card span {
  color: #f0d58e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  font-weight: 700;
  line-height: 1.2;
}

.footer {
  background-color: #17231b;
  background-image:
    linear-gradient(rgba(9, 17, 10, 0.72), rgba(9, 17, 10, 0.78)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1800&q=85");
  background-position: center;
  background-size: cover;
  padding: 20px 0;
  border-top: 1px solid rgba(225, 195, 126, 0.24);
  overflow: hidden;
}

.footer-about {
  width: min(900px, calc(100% - 24px));
  margin: 0 auto 24px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.7fr);
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

.footer-info {
  padding: 10px 0 10px 0;
  color: #f8f1e8;
  background: rgba(9, 14, 18, 0.18);
  border: none;
  border-radius: 0;
  max-width: 100%;
}

.footer-info h3 {
  margin-bottom: 0.6rem;
  color: #f0d58e;
  font-size: clamp(1.5rem, 1.9vw, 1.9rem);
  font-weight: 800;
}

.profile-line {
  margin: 0.2rem 0;
  color: #f8f1e8;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-line strong,
.about-box strong {
  color: #f0d58e;
}

.about-box {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(226, 197, 132, 0.2);
}

.about-box p {
  margin-top: 0.3rem;
  color: #f8f1e8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  overflow: hidden;
}

.footer-photo {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  display: block;
  border: 3px solid rgba(226, 197, 132, 0.76);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.footer {
  overflow-x: hidden;
}

.footer-join-card {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 30px 28px;
  background: rgba(250, 250, 246, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.join-header {
  margin-bottom: 1.5rem;
}

.join-badge {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(100, 161, 255, 0.12);
  border: 1px solid rgba(70, 115, 255, 0.2);
  color: #0f172a;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.join-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.join-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 800;
}

.join-wa-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #1da851);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.join-wa-button:hover,
.join-wa-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(37, 211, 102, 0.3);
}

.join-wa-button svg {
  width: 1.2rem;
  height: 1.2rem;
}

.join-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.join-form label {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: #17212d;
  font-size: 0.96rem;
  font-weight: 600;
}

.phone-field {
  min-width: 0;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.join-form select,
.join-form input {
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.join-form select {
  width: 90px;
  min-width: 90px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #f0d58e 50%), linear-gradient(135deg, #f0d58e 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.1rem;
}

.join-form .gender-select {
  width: 100%;
  min-width: 0;
}

.join-form input::placeholder {
  color: rgba(17, 24, 39, 0.5);
}

.join-form select:focus,
.join-form input:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.join-form button {
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.22);
}

.join-form button:hover,
.join-form button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 211, 102, 0.34);
}

.footer-social-banner {
  width: 100%;
}

.footer-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.footer-social-links a {
  width: 48px;
  height: 48px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 900;
  opacity: 0;
  animation: footer-social-appear 900ms ease-out both;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.footer-social-links a:nth-child(1) {
  background: #0a66c2;
  color: #ffffff;
  animation-delay: 250ms;
}

.footer-social-links a:nth-child(2) {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
  color: #ffffff;
  animation-delay: 1s;
}

.footer-social-links a:nth-child(3) {
  background: #1877f2;
  color: #ffffff;
  animation-delay: 1.75s;
}

.footer-social-links a:nth-child(4) {
  background: #25d366;
  color: #ffffff;
  animation-delay: 2.5s;
}

.footer-social-links a:hover,
.footer-social-links a:focus-visible {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.06);
}

@keyframes footer-social-appear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .back-to-top {
    transition: none;
  }

  .hero-robot {
    left: calc(50% - 10px);
    animation: none;
  }

  .hero-robot svg {
    animation: none;
  }

  .hero-pathways .robot-arm-left,
  .hero-pathways .robot-arm-right,
  .hero-pathways .robot-leg-left,
  .hero-pathways .robot-leg-right {
    animation: none;
    transform: none;
  }

  .footer-social-links a {
    animation: none;
    opacity: 1;
  }
}

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

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

@media (max-width: 900px) {
  .highlights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    min-height: 520px;
    padding: 0;
  }

  .hero-shell {
    position: absolute;
    top: 16px;
    right: 16px;
    width: min(340px, calc(100% - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hero-pathways {
    flex: 0 1 auto;
    width: 100%;
  }

  .footer-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 0;
  }

  .nav-actions {
    margin: 0;
    margin-left: auto;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.3rem);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(9, 17, 29, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  body.light-theme .nav {
    background: rgba(255, 255, 255, 0.97);
  }

  .nav.open {
    display: flex;
  }

  .hero {
    min-height: 540px;
  }

  .hero-shell {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .hero-bg-slide {
    inset: 0;
    background-position: center center;
  }

  .hero-feature-caption {
    left: 20px;
    width: calc(100% - 40px);
    bottom: 48px;
    transform: none;
    top: auto;
  }

  .hero-feature-caption h1,
  .hero-feature-caption h2 {
    margin-bottom: 12px;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .hero-feature-caption ul {
    gap: 7px;
    font-size: 0.88rem;
    line-height: 1.32;
  }

  .footer-about {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px;
  }

  .footer-info {
    padding: 18px 14px;
  }

  .footer-info h3 {
    font-size: 1.8rem;
  }

  .profile-line {
    font-size: 1rem;
  }

  .about-box p {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .footer-photo {
    width: min(100%, 260px);
    height: auto;
  }

  .tutorial-page-shell {
    flex-direction: column;
    min-height: auto;
  }

  .tutorial-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .tutorial-main {
    padding: 0 14px 20px;
    overflow-x: hidden;
  }

  .flow-chart-image {
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
  }

  .image-modal-content {
    width: min(94vw, 760px);
    padding: 14px 14px 12px;
  }

  .image-close {
    width: 40px;
    height: 40px;
    font-size: 2rem;
    top: -12px;
    right: -12px;
  }
}

@media (max-width: 420px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .hero-kicker {
    letter-spacing: 0.06em;
    font-size: 0.62rem;
  }

  .hero-line--primary {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .hero-line--typed {
    font-size: clamp(1.2rem, 7vw, 1.8rem);
  }

  .highlight-card {
    min-height: 130px;
  }

  .footer-about {
    padding: 18px 12px;
  }

  .footer-info h3 {
    font-size: 1.7rem;
  }

  .footer-photo {
    width: min(100%, 240px);
    height: auto;
  }
}

/* Keep the portfolio readable between desktop and phone layouts. */
@media (min-width: 641px) and (max-width: 1100px) {
  .nav-container {
    min-height: 72px;
  }

  .nav {
    gap: 0.55rem;
  }

  .nav a {
    padding: 0.5rem 0.6rem;
    font-size: 0.76rem;
  }

  .nav-actions {
    margin-right: 0.65rem;
  }

  .hero {
    min-height: auto;
    padding-top: 68px;
    padding-bottom: 58px;
  }

  .hero-shell {
    width: min(100% - 40px, 700px);
  }

  .hero-pathways {
    width: 100%;
  }

  .footer-about {
    grid-template-columns: minmax(0, 1.3fr) minmax(210px, 0.7fr);
    gap: 18px;
    padding: 0;
  }

  .footer-photo {
    width: min(100%, 240px);
    height: auto;
  }

  .footer-join-card {
    padding: 24px 20px;
  }

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

  .join-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-container {
    min-height: 68px;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.6rem 0;
  }

  .nav-actions {
    margin: 0 0 0 auto;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.3rem);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(9, 17, 29, 0.98);
    box-shadow: var(--shadow);
  }

  body.light-theme .nav {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 0.8rem 0.9rem;
  }

  .hero-pathways {
    min-width: 0;
  }

  .ai-sustainability-spotlight {
    padding: 42px 0 48px;
  }

  .ai-sustainability-points {
    padding: 0.9rem 1rem;
  }

  .ai-sustainability-points ol {
    font-size: 0.96rem;
    line-height: 1.65;
  }

  .qa-video-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: hidden;
  }

  .qa-video-dialog__content {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 0;
    place-items: center;
    border-radius: 0;
  }

  .qa-video-dialog__player {
    width: 100%;
    height: 100%;
  }

  .qa-video-dialog__player .video-player-stage {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
  }

  .qa-video-dialog__close {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
  }

  .footer-join-card {
    padding: 22px 18px;
  }

  .join-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .join-wa-button {
    width: 100%;
    justify-content: center;
  }

  .join-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .join-form button {
    width: 100%;
  }

  .footer-social-links {
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .hero-kicker {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
  }

  .hero-pathways-heading {
    padding-right: 0;
  }

  .hero-robot-walker {
    opacity: 0.65;
    pointer-events: none;
  }

  .hero-pathway-link {
    min-height: 46px;
    font-size: 0.84rem;
  }

  .highlights-section {
    min-height: 0;
    padding: 40px 0;
  }

  .highlights-grid {
    gap: 12px;
  }

  .highlight-card {
    min-width: 0;
    min-height: 132px;
  }

  .highlight-card span {
    font-size: 1rem;
  }

  .footer-about,
  .footer-join-card {
    width: calc(100% - 32px);
  }

  .footer-about {
    gap: 14px;
  }

  .footer-photo {
    width: min(100%, 260px);
    height: auto;
  }

  .join-header h3 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .join-form label {
    min-width: 0;
  }

  .phone-input-wrap {
    gap: 8px;
  }

  .join-form select {
    min-width: 82px;
    width: 82px;
  }
}

@media (max-width: 380px) {
  .container,
  .hero-shell {
    width: calc(100% - 28px);
  }

  .nav-actions {
    gap: 0.45rem;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    width: 40px;
  }

  .hero-line--primary {
    font-size: clamp(2rem, 11.5vw, 2.7rem);
  }

  .hero-line--typed {
    font-size: clamp(1.15rem, 6.6vw, 1.55rem);
  }

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

  .highlight-card {
    min-height: 126px;
  }

  .footer-join-card {
    padding: 19px 14px;
  }

  .footer-social-links {
    gap: 9px;
  }

  .footer-social-links a {
    width: 42px;
    height: 42px;
  }
}

@supports (padding: max(0px)) {
  .header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 430px) {
  .footer-social-links a {
    opacity: 1;
    animation: none;
  }

  .join-form input,
  .join-form select {
    font-size: 16px;
  }
}
