:root {
  color-scheme: light;
  --ink: #172524;
  --muted: #5c6b68;
  --line: #d9e7e3;
  --paper: #f7fbfa;
  --panel: #ffffff;
  --teal: #166f75;
  --teal-dark: #0f4d52;
  --coral: #db6755;
  --gold: #c9922d;
  --shadow: 0 18px 60px rgba(15, 77, 82, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

button,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(247, 251, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--teal-dark);
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.language-picker select {
  min-width: 126px;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  z-index: -2;
}

.hero-shade {
  z-index: -1;
  background: rgba(247, 251, 250, 0.74);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(320px, 520px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: min(1180px, calc(100% - 36px));
  min-height: min(760px, calc(100vh - 72px));
  margin: 0 auto;
  padding: clamp(38px, 8vw, 96px) 0;
}

.intro {
  max-width: 720px;
}

.kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 740px;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.subhead {
  max-width: 620px;
  margin: 22px 0 0;
  color: #2d403d;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.quote-panel {
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

#topicLabel {
  color: var(--teal-dark);
  font-weight: 800;
}

blockquote {
  min-height: 220px;
  margin: 24px 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 750;
  line-height: 1.3;
}

.quote-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.primary-action,
.secondary-action,
.topic,
.quote-item button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  padding: 0 22px;
  color: #ffffff;
  background: var(--teal);
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action,
.topic,
.quote-item button {
  padding: 0 18px;
  color: var(--teal-dark);
  background: #e8f4f2;
}

.secondary-action:hover,
.topic:hover,
.quote-item button:hover {
  background: #d7ebe7;
}

.ad-band {
  display: grid;
  width: min(1180px, calc(100% - 36px));
  min-height: 92px;
  place-items: center;
  margin: 26px auto;
  color: #7f8d89;
  background: #ffffff;
  border: 1px dashed #bfd3ce;
  border-radius: 8px;
  font-size: 0.82rem;
}

.quick-tools,
.fresh-section,
.language-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) 0;
}

.quick-tools {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(24px, 5vw, 60px);
}

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

.topic {
  min-width: 0;
  overflow-wrap: anywhere;
}

.topic.is-active {
  color: #ffffff;
  background: var(--coral);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.quote-item {
  display: grid;
  gap: 18px;
  align-content: space-between;
  min-height: 210px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-item p {
  margin: 0;
  color: #243735;
  font-weight: 650;
}

.quote-item button {
  justify-self: start;
}

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

.language-links a {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 10px;
  color: var(--teal-dark);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
}

.language-links a:hover {
  border-color: var(--gold);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 92px;
  padding: 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
}

[dir="rtl"] .topbar,
[dir="rtl"] .hero-content,
[dir="rtl"] .quick-tools {
  direction: rtl;
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero-content,
  .quick-tools {
    grid-template-columns: 1fr;
  }

  .hero-content {
    align-items: start;
    min-height: auto;
  }

  blockquote {
    min-height: 160px;
  }

  .topic-grid,
  .quote-list,
  .language-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 12px;
    padding: 10px 16px;
  }

  .language-picker span {
    display: none;
  }

  .language-picker select {
    min-width: 112px;
  }

  .hero-content,
  .quick-tools,
  .fresh-section,
  .language-section,
  .ad-band {
    width: min(100% - 24px, 1180px);
  }

  .quote-actions {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .topic-grid,
  .quote-list,
  .language-links {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-wrap: wrap;
  }
}
