:root {
  --ink: #171820;
  --ink-soft: #3f4452;
  --paper: #f7f8f0;
  --paper-strong: #fffdf2;
  --line: #d7d2b9;
  --red: #d94132;
  --yellow: #f2c94c;
  --green: #4f9d5d;
  --teal: #1f9a9a;
  --blue: #2f6fbd;
  --shadow: 0 18px 44px rgba(23, 24, 32, 0.13);
  --radius: 6px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 24, 32, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 24, 32, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(23, 24, 32, 0.1);
  background: rgba(247, 248, 240, 0.92);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.brand span {
  overflow-wrap: anywhere;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-menu a {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  color: var(--ink);
  background: rgba(217, 65, 50, 0.1);
  outline: none;
}

.site-menu .external-link {
  color: #fff;
  background: var(--ink);
}

.site-menu .external-link:hover,
.site-menu .external-link:focus-visible {
  color: #fff;
  background: var(--red);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper-strong);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  content: "";
}

.nav-toggle-icon::before {
  transform: translateY(-6px);
}

.nav-toggle-icon::after {
  transform: translateY(4px);
}

.hero-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 54px 0 32px;
  border-bottom: 1px solid rgba(23, 24, 32, 0.11);
  background:
    linear-gradient(135deg, rgba(217, 65, 50, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(31, 154, 154, 0.15), transparent 38%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  gap: clamp(28px, 5vw, 62px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
}

.hero-lede {
  max-width: 62ch;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
  outline: none;
}

.button-primary {
  color: #fff;
  background: var(--red);
}

.button-secondary {
  background: var(--yellow);
}

.button-dark {
  color: #fff;
  background: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.hero-stats div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(23, 24, 32, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 242, 0.8);
}

.hero-stats dt {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stats dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1280 / 860;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 8px 8px 0 var(--ink);
}

.section,
.intro-band {
  padding: clamp(60px, 9vw, 104px) 0;
}

.section-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.intro-band {
  background: var(--paper-strong);
  border-bottom: 1px solid rgba(23, 24, 32, 0.11);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 28px;
  align-items: stretch;
}

.intro-grid p,
.section-heading p,
.detail-card p,
.faq-list p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.quick-panel {
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
}

.quick-panel h2 {
  font-size: 1.5rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.loop-card,
.detail-card {
  min-height: 230px;
  padding: 22px;
  border: 1px solid rgba(23, 24, 32, 0.16);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.loop-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loop-card:nth-child(2) {
  border-top: 6px solid var(--teal);
}

.loop-card:nth-child(3) {
  border-top: 6px solid var(--green);
}

.loop-card:nth-child(4) {
  border-top: 6px solid var(--blue);
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: #fff;
  background: var(--red);
  font-weight: 900;
}

.loop-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.section-contrast {
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    var(--ink);
  background-size: 22px 22px;
}

.section-contrast .section-kicker,
.section-contrast .section-heading p {
  color: var(--yellow);
}

.mode-table {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.mode-row {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1.4fr;
  min-height: 64px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mode-row:first-child {
  border-top: 0;
}

.mode-row span {
  display: flex;
  align-items: center;
  padding: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  line-height: 1.35;
}

.mode-row span:first-child {
  border-left: 0;
  font-weight: 850;
}

.mode-head {
  color: var(--ink);
  background: var(--yellow);
  font-weight: 900;
}

.mode-head span {
  border-color: rgba(23, 24, 32, 0.18);
}

.strategy-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

.strategy-heading {
  margin-bottom: 0;
}

.planner {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 6px 6px 0 var(--ink);
}

.planner label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid rgba(23, 24, 32, 0.12);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  line-height: 1.45;
}

.planner input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

.planner-output {
  display: block;
  min-height: 44px;
  padding: 12px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--ink);
  font-weight: 850;
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-card {
  border-top: 6px solid var(--red);
}

.detail-card:nth-child(2) {
  border-top-color: var(--green);
}

.detail-card:nth-child(3) {
  border-top-color: var(--teal);
}

.detail-card h2 {
  font-size: 1.55rem;
}

.faq-section {
  background: var(--paper-strong);
  border-top: 1px solid rgba(23, 24, 32, 0.11);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid rgba(23, 24, 32, 0.14);
  border-radius: var(--radius);
  background: #fff;
}

.faq-list summary {
  min-height: 58px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 850;
}

.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
}

.site-footer {
  padding: 30px 0;
  color: #fff;
  background: var(--ink);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-brand {
  color: #fff;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-menu {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-strong);
    box-shadow: var(--shadow);
  }

  .site-menu.is-open {
    display: flex;
  }

  .hero-inner,
  .intro-grid,
  .strategy-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-visual {
    order: -1;
  }

  .hero-visual img {
    max-height: 420px;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  .section-inner,
  .hero-inner {
    width: min(100% - 24px, 1160px);
  }

  .brand span {
    max-width: 190px;
  }

  h1 {
    max-width: 9ch;
  }

  .hero-stats,
  .loop-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .mode-table {
    border: 0;
    background: transparent;
  }

  .mode-row,
  .mode-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 10px;
    border: 1px solid rgba(23, 24, 32, 0.14);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--paper-strong);
  }

  .section-contrast .mode-row {
    border-color: rgba(255, 255, 255, 0.18);
  }

  .mode-head {
    display: none;
  }

  .mode-row span {
    min-height: 44px;
    padding: 12px;
    border-top: 1px solid rgba(23, 24, 32, 0.1);
    border-left: 0;
  }

  .mode-row span:first-child {
    border-top: 0;
    color: #fff;
    background: var(--red);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
