:root {
  --bg: #eff2ff;
  --surface: #ffffff;
  --surface-soft: #f8f9ff;
  --line: #d9def5;
  --text: #1b234f;
  --text-muted: #4e5682;
  --accent: #4348c8;
  --accent-strong: #2c32ad;
  --shadow: 0 12px 30px rgba(25, 36, 92, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Lexend", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 100% 0%, #dbe1ff 0%, #eff2ff 65%);
}

a {
  color: var(--accent-strong);
}

.page-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 144px;
  height: auto;
}

.page-header nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.page-header nav a {
  font-weight: 600;
  text-decoration: none;
}

.page-header nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 20px 32px;
}

.intro,
.controls-panel,
.questions-wrapper,
.info-card,
.examples-card,
.faq-card,
.cta,
.archive-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.intro {
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--text-muted);
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  line-height: 1.1;
}

.intro p {
  margin: 12px 0 0;
  line-height: 1.6;
  max-width: 72ch;
}

.intro-highlights {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-highlights span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #d2d8f4;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #28347d;
  font-weight: 700;
  font-size: 0.95rem;
}

.controls-panel {
  margin-bottom: 14px;
}

.controls-panel h2,
.info-card h2,
.examples-card h2,
.faq-card h2,
.questions-wrapper > h2,
.cta h2,
.archive-card h2 {
  margin: 0;
}

.controls-panel p,
.questions-wrapper > p,
.info-card > p,
.examples-card > p,
.faq-card > p,
.cta p,
.archive-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  margin: 10px 0 0;
  color: var(--text-muted);
  min-height: 1.3em;
}

.status.error {
  color: #b51f3b;
}

.questions-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-card {
  border: 1px solid #ccd2f2;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
}

.question-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
}

.question-media {
  margin-top: 10px;
  border: 1px solid #d7dcf6;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.question-media-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  background: #ffffff;
}

.answer-options {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.answer-option {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d7dcf6;
  border-radius: 10px;
  background: #ffffff;
}

.answer-option-label {
  min-width: 1.8em;
  font-weight: 700;
  color: #3640b3;
}

.answer-option-text {
  color: #24306a;
}

.answer-block {
  margin-top: 10px;
}

.answer-block summary {
  cursor: pointer;
  color: #3c45b4;
  font-weight: 700;
}

.answer-block p {
  margin: 8px 0 0;
  color: #30376e;
  font-weight: 600;
}

.info-card,
.examples-card,
.faq-card,
.cta {
  margin-top: 14px;
}

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

.info-item {
  border: 1px solid #d4daf6;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 16px;
}

.info-item h3 {
  margin: 0;
  font-size: 1.02rem;
}

.info-item p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.example-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: example-counter;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.example-card {
  position: relative;
  counter-increment: example-counter;
  border: 1px solid #d4daf6;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 16px 16px 16px 60px;
}

.example-card::before {
  content: counter(example-counter);
  position: absolute;
  top: 16px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e1e6ff;
  color: #2f38a5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.example-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.example-options {
  margin: 10px 0 0;
  color: #313a70;
  line-height: 1.6;
}

.example-card details {
  margin-top: 10px;
}

.example-card summary,
.faq-list summary {
  cursor: pointer;
  color: #3c45b4;
  font-weight: 700;
}

.example-card details p,
.faq-list details p {
  margin: 8px 0 0;
  color: #30376e;
  line-height: 1.6;
}

.faq-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid #d4daf6;
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.archive-card {
  margin-top: 14px;
}

.cta-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-links {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.archive-links a {
  display: block;
  padding: 12px 14px;
  border: 1px solid #d0d6f3;
  border-radius: 12px;
  background: var(--surface-soft);
  text-decoration: none;
  font-weight: 700;
}

.archive-links a:hover {
  border-color: #b8c1ef;
  background: #ffffff;
}

.store-link {
  display: inline-flex;
}

.store-badge {
  width: min(100%, 180px);
  height: auto;
}

@media (max-width: 900px) {
  .info-grid,
  .example-list,
  .questions-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions button {
    flex: 1 1 200px;
  }
}
