:root {
  --ink: #17211f;
  --muted: #64748b;
  --line: #dbe3ee;
  --page: #f7faf9;
  --panel: #ffffff;
  --accent: #11846f;
  --accent-dark: #076553;
  --accent-soft: #e7f7f1;
  --red: #ef4a32;
  --gold: #ffd95a;
  --shadow: 0 24px 70px rgb(17 24 39 / 12%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  overflow-x: hidden;
}

header,
main,
footer {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 24px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-dark);
  font-size: 1.55rem;
  font-weight: 950;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff4d1;
  box-shadow: 0 10px 24px rgb(17 24 39 / 10%);
}

.rocket-logo {
  width: 34px;
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-weight: 850;
}

nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
  text-decoration: none;
}

.hero {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--accent);
  border-radius: 24px;
  background: var(--panel);
  padding: clamp(28px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  max-width: min(880px, 100%);
  font-size: clamp(2.35rem, 6vw, 4.7rem);
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

h2 {
  color: var(--accent-dark);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 780px;
  color: #334155;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 700;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 13px 18px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 16px 32px rgb(17 132 111 / 22%);
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-dark);
  box-shadow: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

.article-stack {
  display: grid;
  gap: 20px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.mini-card {
  gap: 10px;
  padding: 20px;
}

.mini-card h2 {
  font-size: 1.3rem;
}

.mini-card a {
  color: var(--accent-dark);
  text-decoration: none;
}

.mini-card a:hover {
  text-decoration: underline;
}

article,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 16px 42px rgb(17 24 39 / 7%);
}

article {
  display: grid;
  gap: 14px;
}

ul,
ol {
  margin: 0;
  padding-left: 22px;
}

li + li {
  margin-top: 7px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  font-size: 0.96rem;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

th,
td {
  border: 1px solid var(--line);
  padding: 11px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 950;
}

.example {
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  background: #fff9df;
  padding: 14px 16px;
  color: #3f3320;
  font-weight: 800;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.image-strip img {
  display: block;
  width: 100%;
  height: clamp(220px, 22vw, 310px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  object-fit: contain;
  object-position: center;
  padding: 10px;
  box-shadow: 0 12px 28px rgb(17 24 39 / 8%);
}

.practice-list strong {
  color: var(--accent-dark);
}

.sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  display: grid;
  gap: 12px;
}

.sidebar-card a {
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: none;
}

.cta-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 30px;
  color: var(--muted);
  font-weight: 800;
}

footer a {
  color: var(--accent-dark);
  text-decoration: none;
}

@media (max-width: 860px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .image-strip {
    grid-template-columns: 1fr;
  }

  .image-strip img {
    height: auto;
    max-height: none;
  }

  .sidebar {
    position: static;
  }
}

.seo-practice-tab {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 900;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 14px 18px;
  font: inherit;
  font-weight: 950;
  box-shadow: 0 18px 44px rgb(17 24 39 / 18%);
  cursor: pointer;
}

.seo-practice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 940;
  background: rgb(15 23 42 / 36%);
  backdrop-filter: blur(2px);
}

.seo-practice-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 950;
  width: min(1120px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid rgb(15 128 111 / 26%);
  border-top: 6px solid var(--accent);
  border-radius: 28px;
  background: #fff;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 34px 90px rgb(15 23 42 / 28%);
}

.seo-practice-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 950;
  cursor: pointer;
}

.seo-practice-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 44px;
}

.seo-practice-kicker {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-practice-score {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.seo-practice-score strong {
  display: block;
  color: var(--accent);
  font-size: 2.1rem;
  line-height: 1;
}

.seo-practice-score span:last-child strong {
  color: #b91c1c;
}

.seo-practice-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.seo-practice-answer input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 16px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 850;
  box-shadow: inset 6px 6px 14px rgb(148 163 184 / 15%), inset -6px -6px 14px #fff;
}

.seo-practice-answer input {
  min-height: 68px;
  font-size: clamp(1.6rem, 4vw, 3rem);
}

.seo-practice-answer button,
.seo-practice-rounds button,
.seo-practice-accents button {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--accent-dark);
  padding: 12px 18px;
  font: inherit;
  font-weight: 950;
  box-shadow: 8px 8px 18px rgb(148 163 184 / 18%), -8px -8px 18px #fff;
  cursor: pointer;
}

.seo-practice-answer button {
  min-width: 118px;
  background: var(--accent);
  color: #fff;
}

.seo-practice-rounds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.seo-practice-rounds button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.seo-practice-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.seo-practice-card > div {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 16px 42px rgb(17 24 39 / 7%);
}

.seo-practice-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.seo-practice-card strong {
  display: block;
  margin-top: 10px;
  color: var(--accent-dark);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.seo-practice-accents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.seo-practice-accents button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

.seo-practice-feedback {
  min-height: 30px;
  margin-top: 14px;
  color: #b91c1c;
  font-weight: 950;
}

.seo-practice-feedback.good {
  color: var(--accent-dark);
}

.seo-practice-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.seo-practice-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.seo-practice-finish {
  margin-top: 18px;
  border: 1px solid var(--gold);
  border-radius: 22px;
  background: #fffdf1;
  padding: 18px;
}

.seo-practice-finish h3 {
  color: var(--red);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.vocab-word-table td:first-child {
  color: var(--accent-dark);
  font-weight: 950;
}

.vocab-demo {
  display: grid;
  gap: 20px;
  border: 1px solid rgb(15 128 111 / 20%);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f2fbf7);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.vocab-demo .kicker {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 6px 12px;
}

.vocab-demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  align-items: start;
}

.vocab-demo-item {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.vocab-demo-card {
  width: 100%;
  min-height: 112px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  perspective: 900px;
}

.vocab-demo-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 112px;
  transition: transform 420ms ease;
  transform-style: preserve-3d;
}

.vocab-demo-card.flipped .vocab-demo-card-inner {
  transform: rotateX(180deg);
}

.vocab-demo-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  text-align: center;
  box-shadow: 8px 8px 18px rgb(148 163 184 / 16%), -8px -8px 18px #fff;
  backface-visibility: hidden;
  overflow-wrap: anywhere;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 950;
}

.vocab-demo-back {
  color: var(--accent-dark);
  transform: rotateX(180deg);
}

.vocab-demo-actions {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.vocab-demo-actions button,
.vocab-demo-check {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  padding: 9px 12px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.vocab-demo-actions button {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.vocab-demo-actions button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.vocab-demo-practice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 4px;
}

.vocab-demo-practice input {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 850;
}

.vocab-demo-result {
  min-height: 28px;
  color: #b91c1c;
  font-weight: 950;
}

.vocab-demo-result.good {
  color: var(--accent-dark);
}

.vocab-note {
  border-left: 5px solid var(--gold);
  border-radius: 16px;
  background: #fff9df;
  padding: 14px 16px;
  color: #3f3320;
  font-weight: 850;
}

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

.vocab-topic-grid a {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  color: var(--accent-dark);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 12px 28px rgb(17 24 39 / 8%);
}

@media (max-width: 720px) {
  header,
  main,
  footer {
    padding-inline: 14px;
  }

  nav {
    gap: 8px;
  }

  nav a {
    padding: 8px 12px;
  }

  .hero {
    padding: 24px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3rem);
    letter-spacing: -0.02em;
  }

  .seo-practice-modal {
    top: 12px;
    bottom: 12px;
    transform: translateX(-50%);
    max-height: none;
  }

  .seo-practice-head,
  .seo-practice-score {
    display: grid;
  }

  .seo-practice-card,
  .seo-practice-answer {
    grid-template-columns: 1fr;
  }

  .seo-practice-tab {
    right: 12px;
    bottom: 14px;
    padding: 12px 14px;
  }

  .vocab-demo-grid,
  .vocab-topic-grid {
    grid-template-columns: 1fr;
  }

  .vocab-demo-practice {
    grid-template-columns: 1fr;
  }
}
