:root {
  --brand: #1b4332;
  --brand-deep: #143728;
  --accent: #cf4e24;
  --gold: #d4860b;
  --canvas: #f7f2ec;
  --surface: #ffffff;
  --ink: #1f241f;
  --muted: rgba(31, 36, 31, 0.68);
  --muted-brand: rgba(27, 67, 50, 0.65);
  --line: rgba(27, 67, 50, 0.12);
  --soft-line: rgba(27, 67, 50, 0.09);
  --shadow-sm: 0 8px 18px rgba(27, 67, 50, 0.05);
  --shadow-card: 0 16px 26px rgba(27, 67, 50, 0.06);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --font-body: "IBM Plex Sans Arabic", sans-serif;
  --font-display: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input {
  font: inherit;
}

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

.container-xl {
  width: min(1280px, calc(100% - 40px));
  max-width: 1280px;
  padding-inline: 0;
}

.site-header {
  height: 88px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(27, 67, 50, 0.06);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 35px rgba(27, 67, 50, 0.08);
}

.navbar,
.nav-shell {
  min-height: 88px;
}

.navbar {
  padding-block: 0;
}

.navbar-brand {
  margin: 0;
  padding: 0;
}

.brand-logo {
  width: 97px;
  height: 54px;
  object-fit: contain;
}

.navbar-nav {
  gap: 28px;
}

.navbar .nav-link {
  position: relative;
  padding: 32px 0 28px;
  color: rgba(31, 36, 31, 0.65);
  font-size: 14px;
  white-space: nowrap;
}

.navbar .nav-link::after {
  position: absolute;
  right: 50%;
  bottom: 21px;
  width: 0;
  height: 2px;
  content: "";
  background: var(--accent);
  border-radius: 99px;
  transform: translateX(50%);
  transition: width 0.25s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--brand);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 28px;
}

.nav-actions {
  direction: ltr;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

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

.btn-sm {
  min-height: 42px;
  padding: 9px 18px;
  font-size: 13px;
}

.btn-brand {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 22px -15px rgba(27, 67, 50, 0.7);
}

.btn-brand:hover,
.btn-brand:focus-visible {
  color: var(--surface);
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.btn-outline-brand {
  color: var(--brand);
  background: var(--surface);
  border-color: rgba(27, 67, 50, 0.35);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus-visible {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.language-btn {
  min-width: 72px;
  color: var(--brand);
  background: var(--canvas);
  border-color: var(--line);
}

.login-btn {
  min-width: 125px;
}

.section-heading {
  width: min(660px, 100%);
  margin: 0 auto 40px;
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 16px;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -1px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 31px;
}

.section-heading-right {
  width: auto;
  max-width: 620px;
  margin: 0;
  text-align: right;
}

/* Hero */
.hero-section {
  position: relative;
  height: 754px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 280px 170px at 78% 18%, rgba(255,255,255,0.75), transparent 72%),
    radial-gradient(ellipse 245px 175px at 12% 82%, rgba(255,255,255,0.62), transparent 72%),
    linear-gradient(105deg, #f7f2ec 0%, #faf8f4 50%, #f7f2ec 100%);
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.hero-section::before {
  top: -195px;
  left: 75px;
  width: 980px;
  height: 980px;
  background: linear-gradient(148deg, rgba(255,255,255,0.28), rgba(27,67,50,0.018));
  border-radius: 35% 65% 58% 42%;
  transform: rotate(-12deg);
}

.hero-section::after {
  right: 420px;
  bottom: -250px;
  width: 440px;
  height: 510px;
  background: linear-gradient(138deg, rgba(255,255,255,0.25), rgba(27,67,50,0.012));
  border-radius: 52% 48% 56% 44%;
}

.hero-layout {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: 600px 620px;
  column-gap: 60px;
  align-items: start;
  padding-block: 40px 72px;
  direction: ltr;
}

.hero-chat-wrap {
  position: relative;
  width: 600px;
  height: 642px;
  direction: rtl;
}

.chat-card {
  position: relative;
  width: 600px;
  height: 642px;
  padding: 17px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  box-shadow: 0 30px 70px -34px rgba(27, 67, 50, 0.15);
  backdrop-filter: blur(9px);
}

.chat-head {
  height: 59px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.online {
  order: 3;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 16px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.online i {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
}

.chat-title {
  order: 2;
  flex: 1;
  text-align: right;
}

.chat-title b,
.chat-title small {
  display: block;
}

.chat-title b {
  color: var(--brand);
  font-size: 16px;
}

.chat-title small {
  margin-top: 2px;
  color: rgba(37, 41, 32, 0.72);
  font-size: 12px;
}

.assistant-icon {
  order: 1;
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  background: var(--brand);
  border-radius: 13px;
}

.assistant-icon img {
  width: 21px;
  height: 21px;
}

.chat-body {
  height: 427px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 16px;
  overflow: hidden;
}

.message {
  width: fit-content;
  max-width: 88%;
  padding: 16px;
  color: var(--brand);
  font-size: 14px;
  line-height: 25px;
}

.message small {
  display: block;
  margin-top: 8px;
  color: rgba(37, 41, 32, 0.65);
  font-size: 11px;
  line-height: 17px;
}

.message-user {
  align-self: flex-start;
  color: var(--ink);
  background: var(--canvas);
  border-radius: 16px 16px 16px 4px;
}

.message-assistant {
  align-self: flex-end;
  background: var(--surface);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 6px 18px -12px rgba(27, 67, 50, 0.18);
}

.compact-message {
  padding-block: 16px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.message-meta small {
  margin: 0;
}

.source-pill {
  padding: 6px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.typing {
  align-self: flex-end;
  padding: 8px 16px;
  color: var(--muted-brand);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 6px 18px -12px rgba(27, 67, 50, 0.18);
  font-size: 12px;
}

.typing i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-inline: 3px;
  background: var(--gold);
  border-radius: 50%;
}

.suggestion-list {
  height: 52px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow: hidden;
  direction: rtl;
}

.suggestion-list button {
  min-height: 36px;
  padding: 8px 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.chat-input {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  direction: ltr;
}

.chat-input span {
  flex: 1;
  color: rgba(37, 41, 32, 0.48);
  font-size: 14px;
  text-align: right;
  direction: rtl;
}

.chat-input button {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  border: 0;
  border-radius: 11px;
}

.send-button {
  color: var(--surface);
  background: var(--brand);
}

.voice-button {
  color: var(--gold);
  background: var(--canvas);
}

.analysis-card {
  position: absolute;
  z-index: 3;
  top: 50px;
  left: 622px;
  width: 176px;
  height: 126px;
  padding: 17px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(27, 67, 50, 0.08);
  font-size: 11px;
}

.analysis-card b,
.analysis-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analysis-card b {
  margin-bottom: 9px;
  font-size: 12px;
}

.analysis-card b span {
  color: var(--gold);
}

.analysis-card > span {
  margin-top: 7px;
}

.analysis-card i {
  color: var(--brand);
  font-style: normal;
}

.hero-replies {
  position: absolute;
  bottom: -54px;
  left: -30px;
  width: 162px;
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
}

.hero-replies img {
  width: 16px;
  height: 16px;
}

.hero-copy {
  width: 620px;
  margin-top: 67px;
  text-align: right;
  direction: rtl;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 8px 16px;
  margin-bottom: 24px;
  color: var(--brand);
  background: var(--canvas);
  border-radius: 999px;
  font-size: 14px;
}

.eyebrow span {
  color: var(--gold);
}

.hero-copy h1 {
  margin: 0;
  color: var(--brand);
  font-size: 64px;
  font-weight: 700;
  line-height: 86px;
  letter-spacing: -1.7px;
}

.accent-title {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.accent-title::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  width: 100%;
  height: 6px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.7;
  transform: rotate(-1deg);
}

.hero-copy > p {
  width: 491px;
  margin: 24px 0 24px auto;
  color: rgba(31, 36, 31, 0.76);
  font-size: 18px;
  line-height: 32px;
}

.hero-actions {
  display: flex;
  gap: 8px;
}

.hero-points {
  width: 620px;
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 25px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.hero-points i {
  color: var(--gold);
  font-style: normal;
}

/* Trust row */
.trust-strip {
  height: 87px;
  border-bottom: 1px solid var(--line);
}

.trust-strip .container-xl {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-brand);
  font-size: 14px;
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-strip i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
}

/* Tools */
.tools-section {
  height: 807px;
  padding-block: 104px;
  background: var(--surface);
}

.tools-grid {
  height: 456px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 130px 156px 130px;
  gap: 20px;
  direction: ltr;
}

.tool-card {
  direction: rtl;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.tool-main {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  padding: 25px;
}

.dialogue-tool {
  grid-column: 4 / 7;
  grid-row: 1;
  padding: 25px;
}

.analysis-tool {
  grid-column: 4 / 7;
  grid-row: 2;
  padding: 25px;
}

.question-tool {
  grid-column: 1 / 3;
}

.answer-tool {
  grid-column: 3 / 5;
}

.search-tool {
  grid-column: 5 / 7;
}

.compact-tool {
  grid-row: 3;
  padding: 17px;
  border-radius: 20px;
}

.tool-card-head,
.tool-card-footer,
.small-tool-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.active-topic {
  padding: 8px;
  color: var(--accent);
  background: rgba(207, 78, 36, 0.08);
  border-radius: 999px;
  font-size: 12px;
}

.tool-name,
.small-tool-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
}

.tool-main h3 {
  font-size: 18px;
}

.tool-icon {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  background: rgba(27, 67, 50, 0.08);
  border-radius: 11px;
}

.tool-icon img {
  width: 18px;
  height: 18px;
}

.small-tool-title .tool-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.small-tool-title .tool-icon img {
  width: 16px;
  height: 16px;
}

.question-box {
  height: 141px;
  margin-block: 16px;
  padding: 16px;
  background: var(--canvas);
  border-radius: 16px;
}

.question-box b {
  display: block;
  color: var(--brand);
  font-size: 14px;
  font-weight: 500;
}

.question-box p,
.tool-card > p {
  margin: 8px 0 0;
  color: rgba(27, 67, 50, 0.6);
  font-size: 12px;
  line-height: 21px;
}

.tool-card-footer .btn {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 12px;
}

.tag {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 8px;
  color: var(--brand);
  background: rgba(27, 67, 50, 0.07);
  border-radius: 999px;
  font-size: 12px;
}

.mini-progress {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.mini-progress i {
  height: 6px;
  flex: 1;
  background: var(--line);
  border-radius: 3px;
}

.mini-progress .on {
  background: var(--brand);
}

.mini-note {
  padding: 8px 16px;
  color: rgba(27, 67, 50, 0.75);
  background: var(--canvas);
  border-radius: 10px;
  font-size: 12px;
}

.analysis-tool .mini-note {
  margin-top: 14px;
}

.compact-tool h3 {
  font-size: 14px;
}

.compact-tool del {
  display: block;
  margin: 10px 0;
  color: rgba(27, 67, 50, 0.45);
  font-size: 12px;
}

.compact-tool .mini-note {
  margin-top: 11px;
}

.compact-tool .amber {
  color: var(--gold);
  background: rgba(212, 134, 11, 0.1);
}

.compact-tool > p {
  margin-top: 8px;
}

.search-note {
  color: rgba(27, 67, 50, 0.55);
}

/* Benefits */
.benefits-section {
  height: 751px;
  padding-block: 112px;
  background: var(--canvas);
}

.benefits-grid {
  direction: rtl;
}

.benefit-card {
  height: 384px;
  padding: 25px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
}

.benefit-card h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
}

.benefit-card > p {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 26px;
}

.benefit-demo {
  margin-top: 16px;
  padding: 17px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.context-demo {
  min-height: 178px;
  padding-top: 33px;
  padding-bottom: 20px;
}

.context-demo > small {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.context-data {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.context-data b {
  color: var(--muted);
  font-weight: 400;
}

.context-data i {
  color: var(--accent);
  font-style: normal;
}

.clarity {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  color: var(--brand);
  font-size: 12px;
}

.meter {
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  background: var(--line);
  border-radius: 10px;
}

.meter i {
  display: block;
  width: 84%;
  height: 100%;
  margin-left: auto;
  background: var(--accent);
  border-radius: inherit;
}

.reply-options {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.reply-options > div {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 12px;
}

.reply-options b {
  color: var(--brand);
}

.reply-options span {
  color: var(--muted);
}

.accent-text {
  color: var(--accent) !important;
}

.chart-demo {
  min-height: 194px;
  padding-top: 30px;
  padding-bottom: 20px;
}

.chart-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.chart-title b {
  color: var(--brand);
  font-size: 18px;
}

.chart-title small {
  color: var(--muted);
  font-size: 12px;
}

.bars {
  height: 76px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-block: 16px 10px;
}

.bars i {
  height: 35%;
  flex: 1;
  background: rgba(212, 134, 11, 0.28);
  border-radius: 6px 6px 3px 3px;
}

.bars i:nth-child(1) { height: 92%; background: var(--gold); }
.bars i:nth-child(2) { height: 74%; background: var(--accent); }
.bars i:nth-child(3) { height: 62%; background: var(--gold); }
.bars i:nth-child(4) { height: 42%; }
.bars i:nth-child(5) { height: 46%; }
.bars i:nth-child(6) { height: 34%; }

.positive-note,
.warning-note {
  display: block;
  margin-top: 5px;
  color: var(--brand);
  font-size: 12px;
}

.warning-note {
  color: var(--accent);
}

/* How it works */
.how-section {
  height: 704px;
  padding-block: 112px;
  background: var(--surface);
}

.how-grid {
  display: grid;
  grid-template-columns: 661px 563px;
  gap: 56px;
  align-items: center;
  direction: ltr;
}

.process-preview {
  position: relative;
  height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: 49px;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 28px;
  direction: rtl;
}

.process-preview::before {
  position: absolute;
  top: 94px;
  right: 210px;
  width: 230px;
  height: 250px;
  content: "";
  border-right: 2px dashed var(--soft-line);
  transform: rotate(18deg);
}

.process-card {
  position: relative;
  z-index: 1;
  width: 510px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px -20px rgba(27, 67, 50, 0.14);
}

.process-offset {
  margin-right: 56px;
}

.process-card b,
.process-card small {
  display: block;
}

.process-card b {
  color: var(--brand);
  font-size: 16px;
}

.process-card small {
  margin-top: 4px;
  color: rgba(37, 41, 32, 0.72);
  font-size: 12px;
}

.process-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  color: var(--gold);
  background: var(--canvas);
  border-radius: 11px;
}

.process-icon.coral { color: var(--accent); }
.process-icon.gold { color: var(--gold); }

.process-result {
  min-height: 72px;
  margin-bottom: 0;
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.process-result b,
.process-result small {
  color: var(--surface);
}

.process-result strong {
  color: var(--accent);
  font-size: 24px;
}

.how-copy {
  width: 563px;
  direction: rtl;
}

.how-copy .section-heading {
  margin-bottom: 32px;
}

.steps {
  padding: 0 16px 0 0;
  margin: 0;
  list-style: none;
}

.steps li {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-right: 26px;
}

.steps li:not(:last-child)::before {
  position: absolute;
  top: 39px;
  right: 18px;
  width: 2px;
  height: 26px;
  content: "";
  background: var(--line);
}

.steps li > span {
  position: absolute;
  top: -2px;
  right: -20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--canvas);
  background: var(--brand);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.steps b,
.steps small {
  display: block;
}

.steps b {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 16px;
}

.steps small {
  margin-top: 7px;
  color: var(--muted-brand);
  font-size: 14px;
}

/* Library */
.library-section {
  width: calc(100% - 44px);
  height: 711px;
  margin-inline: auto;
  padding-block: 112px;
  background: var(--surface);
}

.library-container {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  direction: ltr;
}

.library-heading .btn {
  min-height: 46px;
  padding: 11px 20px;
  font-size: 14px;
  direction: rtl;
}

.library-heading .section-heading {
  direction: rtl;
}

.library-heading .section-heading h2 {
  margin-bottom: 8px;
}

.library-heading .section-heading p {
  font-size: 18px;
}

.library-grid {
  display: grid;
  grid-template-columns: 544px 701px;
  gap: 24px;
  align-items: stretch;
  justify-content: center;
  direction: ltr;
}

.media-list {
  height: 353px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  direction: rtl;
}

.media-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 80px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.media-card > div {
  flex: 1;
}

.media-card em,
.media-card h3,
.media-card p,
.media-card a {
  display: block;
  margin: 0;
}

.media-card em {
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
}

.media-card h3 {
  margin-top: 5px;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.media-card p {
  color: var(--muted-brand);
  font-size: 12px;
}

.media-card a {
  margin-top: 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.video-card {
  height: 80px;
}

.video-card figure {
  position: relative;
  width: 92px;
  height: 50px;
  flex: 0 0 92px;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  border-radius: 12px;
}

.video-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card figure span {
  position: absolute;
  bottom: 5px;
  left: 5px;
  padding: 2px 6px;
  color: var(--surface);
  background: rgba(27, 67, 50, 0.85);
  border-radius: 6px;
  font-size: 9px;
}

.qa-card {
  min-height: 108px;
  background: var(--canvas);
  border-color: transparent;
}

.qa-card h3 {
  margin-top: 3px;
}

.qa-card > div > span {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.qa-icon {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 12px;
}

.audio-card {
  height: 101px;
}

.audio-card > img {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  object-fit: cover;
  border-radius: 12px;
}

.play {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  color: var(--surface);
  background: var(--brand);
  border-radius: 50%;
  font-size: 10px;
}

.book-feature {
  height: 353px;
  display: flex;
  align-items: stretch;
  gap: 28px;
  padding: 33px;
  overflow: hidden;
  color: var(--surface);
  background: var(--brand);
  border: 1px solid rgba(27, 67, 50, 0.1);
  border-radius: 24px;
  direction: ltr;
}

.book-feature > img {
  width: 210px;
  height: 287px;
  flex: 0 0 210px;
  object-fit: cover;
  border-radius: 16px;
}

.book-copy {
  flex: 1;
  padding-top: 4px;
  text-align: right;
  direction: rtl;
}

.tag-gold {
  margin: 0;
  color: var(--gold);
  background: rgba(212, 134, 11, 0.16);
  font-size: 11px;
}

.book-copy h3 {
  margin: 22px 0 12px;
  color: var(--surface);
  font-size: 30px;
  font-weight: 700;
  line-height: 39px;
}

.book-copy p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 25px;
}

.book-copy small {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.book-copy .btn {
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 18px;
  font-size: 14px;
}

/* Progress */
.progress-section {
  height: 927px;
  padding-block: 112px;
  background: var(--surface);
}

.progress-section .section-heading h2 {
  font-size: 40px;
  line-height: 54px;
}

.summary-grid {
  height: 186px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  direction: rtl;
}

.summary-card {
  padding: 25px;
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.summary-card h3 {
  margin: 0 0 20px;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
}

.summary-card p {
  margin: 9px 0;
  color: var(--ink);
  font-size: 12px;
}

.strengths-card p::first-letter {
  color: var(--brand);
}

.improve-card p::first-letter {
  color: var(--gold);
}

dl {
  margin: 0;
}

dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
}

dt {
  color: var(--muted);
  font-weight: 400;
}

dd {
  margin: 0;
  color: var(--brand);
  font-weight: 700;
}

.next-card {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.next-card h3,
.next-card dd {
  color: var(--surface);
}

.next-card dt {
  color: rgba(255, 255, 255, 0.65);
}

.progress-grid {
  height: 344px;
  display: grid;
  grid-template-columns: 546px 710px;
  gap: 24px;
  margin-top: 32px;
  direction: ltr;
}

.feature-list {
  display: grid;
  gap: 16px;
  direction: rtl;
}

.feature-list > div {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.feature-list b {
  flex: 1;
  color: var(--brand);
  font-size: 14px;
}

.feature-list span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--canvas);
  border-radius: 12px;
}

.progress-panel {
  height: 342px;
  padding: 33px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 24px;
  direction: rtl;
}

.progress-panel > h3 {
  margin: 0 0 24px;
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
}

.progress-inside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.progress-inside > div {
  height: 134px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.progress-inside small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tags span {
  display: inline-block;
  margin: 4px 2px;
  padding: 7px 9px;
  color: var(--brand);
  background: var(--canvas);
  border-radius: 999px;
  font-size: 10px;
}

.recent-training .bars {
  height: 64px;
  margin: 4px 0 0;
}

.last-note {
  height: 70px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.last-note > span {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  color: var(--gold);
  background: var(--canvas);
  border-radius: 11px;
}

.last-note b,
.last-note p {
  display: block;
  margin: 0;
  font-size: 12px;
}

.last-note b {
  color: var(--brand);
}

.last-note p {
  margin-top: 3px;
  color: var(--muted);
}

/* Starting point */
.starting-section {
  height: 568px;
  padding-block: 72px;
  background: var(--canvas);
}

.starting-section .section-heading {
  margin-bottom: 64px;
}

.starting-section .section-heading h2 {
  font-size: 42px;
  line-height: 55px;
}

.starting-section .section-heading p {
  font-size: 18px;
  line-height: 32px;
}

.starting-grid {
  display: grid;
  grid-template-columns: 420.5px 391px 420.5px;
  gap: 24px;
  direction: ltr;
}

.start-card {
  height: 257px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 31px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  direction: rtl;
}

.start-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--canvas);
  border-radius: 14px;
}

.start-icon img {
  width: 24px;
  height: 24px;
}

.start-card h3 {
  width: 100%;
  margin: 12px 0 8px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  text-align: right;
}

.start-card p {
  width: 100%;
  min-height: 36px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 27px;
  text-align: right;
}

.start-card .btn {
  min-height: 52px;
  padding: 13px 24px;
  font-size: 16px;
}

.featured-start {
  height: 255px;
  padding: 20px;
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.start-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
}

.recommended {
  padding: 8px 16px;
  color: var(--surface);
  background: rgba(207, 78, 36, 0.9);
  border-radius: 999px;
  font-size: 11px;
}

.featured-start .start-icon {
  background: rgba(255, 255, 255, 0.14);
}

.featured-start h3,
.featured-start p {
  color: var(--surface);
}

.featured-start p {
  color: rgba(247, 242, 236, 0.82);
}

.featured-start .btn {
  color: var(--brand);
  background: var(--canvas);
}

/* Disclaimer */
.notice-section {
  height: 356px;
  display: flex;
  align-items: center;
  background: var(--surface);
}

.notice-card {
  min-height: 132px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 33px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.notice-card > div {
  flex: 1;
}

.notice-card h2 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 28px;
}

.notice-icon {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* CTA and footer */
.cta-wrap {
  height: 491px;
  padding-block: 48px;
  background: var(--surface);
}

.cta-panel {
  position: relative;
  height: 387px;
  overflow: hidden;
  padding: 104px 64px 96px;
  color: var(--surface);
  background: var(--brand);
  border-radius: 32px;
  text-align: center;
}

.cta-panel::before,
.cta-panel::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.cta-panel::before {
  top: -160px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: rgba(247, 242, 236, 0.06);
}

.cta-panel::after {
  bottom: -120px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: rgba(207, 78, 36, 0.18);
}

.cta-panel h2,
.cta-panel p,
.cta-actions {
  position: relative;
  z-index: 1;
}

.cta-panel h2 {
  margin: 0;
  font-family: "Tajawal", var(--font-body);
  font-size: 48px;
  font-weight: 700;
  line-height: 58px;
}

.cta-panel p {
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.68);
  font-family: "Tajawal", var(--font-body);
  font-size: 16px;
  line-height: 29px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.site-footer {
  height: 406px;
  padding: 88px 56px 32px;
  color: rgba(255, 255, 255, 0.68);
  background: var(--brand);
}

.footer-shell {
  max-width: 1328px;
  margin-inline: auto;
  padding-inline: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 268px 268px 268px 348px;
  gap: 40px;
  direction: ltr;
}

.footer-links,
.footer-brand {
  direction: rtl;
  text-align: right;
}

.footer-links h3 {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.8px;
}

.footer-links a {
  display: block;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--surface);
}

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

.footer-logo {
  width: 120px;
  height: 56px;
  object-fit: contain;
}

.footer-brand p {
  width: 340px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 27px;
}

.socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  direction: ltr;
}

.socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 25px;
  color: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .navbar-nav { gap: 18px; }
  .navbar .nav-link { font-size: 13px; }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
  }

  .hero-chat-wrap,
  .chat-card,
  .hero-copy,
  .hero-points {
    width: 100%;
  }

  .analysis-card { display: none; }
  .hero-copy h1 { font-size: 52px; line-height: 72px; }
  .hero-copy > p { width: 100%; }

  .library-grid { grid-template-columns: 43% 57%; width: 100%; }
  .book-feature { gap: 20px; padding: 28px; }
  .book-feature > img { width: 180px; flex-basis: 180px; }
  .book-copy h3 { font-size: 25px; line-height: 34px; }

  .starting-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 991.98px) {
  .site-header,
  .navbar,
  .nav-shell {
    height: auto;
    min-height: 72px;
  }

  .brand-logo { height: 48px; }

  .navbar-collapse {
    margin-top: 10px;
    padding: 0 0 20px;
    background: var(--surface);
  }

  .navbar-nav {
    align-items: stretch !important;
    gap: 0;
  }

  .navbar .nav-link {
    padding: 10px 0;
  }

  .navbar .nav-link::after { display: none; }
  .nav-actions { justify-content: flex-end; padding-top: 10px; }

  .section-heading h2 {
    font-size: 38px;
    line-height: 48px;
  }

  .hero-section,
  .tools-section,
  .benefits-section,
  .how-section,
  .library-section,
  .progress-section,
  .starting-section,
  .notice-section,
  .cta-wrap,
  .site-footer {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .hero-section { padding-block: 56px 84px; }

  .hero-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 56px;
    padding: 0;
  }

  .hero-copy {
    margin: 0;
    text-align: center;
  }

  .hero-copy > p { margin-inline: auto; }
  .hero-actions,
  .hero-points { justify-content: center; }
  .hero-points { gap: 20px; }

  .hero-chat-wrap,
  .chat-card {
    width: min(600px, 100%);
    margin-inline: auto;
  }

  .hero-replies { left: 0; }

  .trust-strip {
    height: auto;
    padding-block: 24px;
  }

  .trust-strip .container-xl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .tools-section,
  .benefits-section,
  .how-section,
  .library-section,
  .progress-section {
    padding-block: 80px;
  }

  .tools-grid {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .tool-main,
  .dialogue-tool,
  .analysis-tool,
  .question-tool,
  .answer-tool,
  .search-tool {
    grid-column: auto;
    grid-row: auto;
  }

  .tool-main { grid-column: 1 / 3; }

  .benefits-grid {
    max-width: 640px;
    margin-inline: auto;
  }

  .benefit-card { height: auto; min-height: 350px; }

  .how-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 56px;
  }

  .how-copy,
  .process-preview {
    width: min(661px, 100%);
  }

  .how-copy .section-heading { text-align: center; }

  .library-heading {
    align-items: center;
    gap: 24px;
  }

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

  .media-list {
    width: min(701px, 100%);
    height: auto;
    margin-inline: auto;
  }

  .book-feature {
    grid-row: 1;
    width: min(701px, 100%);
    margin-inline: auto;
  }

  .summary-grid {
    height: auto;
    grid-template-columns: 1fr 1fr;
  }

  .summary-card { min-height: 186px; }

  .progress-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .feature-list { grid-template-columns: 1fr 1fr; }

  .progress-panel {
    grid-row: 1;
    width: 100%;
  }

  .starting-section { padding-block: 72px; }

  .starting-grid {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin-inline: auto;
  }

  .start-card,
  .featured-start { height: auto; min-height: 255px; }

  .notice-section { padding-block: 80px; }
  .cta-wrap { padding-bottom: 80px; }
  .cta-panel { height: auto; min-height: 340px; }

  .site-footer { padding: 72px 32px 28px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / 3; grid-row: 1; align-items: center; text-align: center; }
  .footer-brand p { width: min(420px, 100%); text-align: center; }
}

@media (max-width: 575.98px) {
  .container-xl,
  .library-container {
    width: calc(100% - 32px);
  }

  .btn { min-height: 48px; padding: 12px 18px; font-size: 14px; }

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

  .section-heading h2,
  .progress-section .section-heading h2,
  .starting-section .section-heading h2 {
    font-size: 30px;
    line-height: 40px;
    letter-spacing: -0.5px;
  }

  .section-heading p,
  .starting-section .section-heading p,
  .library-heading .section-heading p {
    font-size: 14px;
    line-height: 26px;
  }

  .hero-section { padding-top: 42px; }
  .hero-copy h1 { font-size: 40px; line-height: 56px; }
  .hero-copy > p { font-size: 15px; line-height: 29px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-points { display: grid; grid-template-columns: 1fr 1fr; }

  .hero-chat-wrap,
  .chat-card { height: 580px; }
  .chat-card { padding: 12px; }
  .chat-head { height: 57px; }
  .chat-body { height: 386px; }
  .message { max-width: 94%; padding: 12px; font-size: 12px; line-height: 22px; }
  .suggestion-list { display: none; }
  .chat-input { margin-top: 12px; }
  .hero-replies { display: none; }

  .trust-strip .container-xl { grid-template-columns: 1fr; }

  .tools-section,
  .benefits-section,
  .how-section,
  .library-section,
  .progress-section { padding-block: 64px; }

  .tools-grid { display: block; }
  .tool-card { margin-bottom: 16px; }
  .tool-main { padding: 18px; }
  .active-topic { font-size: 10px; }
  .question-box { height: auto; min-height: 130px; }

  .benefit-card { min-height: 0; }

  .process-preview {
    height: auto;
    min-height: 420px;
    padding: 38px 18px;
  }

  .process-card { width: calc(100% - 24px); }
  .process-offset { margin-right: 24px; }
  .how-copy { width: 100%; }
  .steps { padding-right: 20px; }
  .steps small { font-size: 12px; }

  .library-heading {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
  }

  .library-heading .section-heading { text-align: center; }
  .library-heading .btn { align-self: center; }

  .book-feature {
    height: auto;
    flex-direction: column;
    padding: 24px;
  }

  .book-feature > img {
    width: 100%;
    height: 220px;
    flex-basis: auto;
  }

  .book-copy h3 { font-size: 24px; line-height: 34px; }

  .media-card { gap: 10px; padding: 12px; }
  .media-card h3 { font-size: 14px; }
  .qa-card { min-height: 125px; }

  .summary-grid { grid-template-columns: 1fr; }
  .progress-inside { grid-template-columns: 1fr; }
  .progress-panel { height: auto; padding: 22px; }
  .progress-panel > h3 { font-size: 21px; }
  .last-note { height: auto; }
  .feature-list { grid-template-columns: 1fr; }

  .starting-section .section-heading { margin-bottom: 40px; }
  .notice-card { flex-direction: column-reverse; padding: 24px; }
  .notice-card h2 { font-size: 18px; }

  .cta-wrap { padding-bottom: 64px; }
  .cta-panel { min-height: 360px; padding: 72px 20px; border-radius: 24px; }
  .cta-panel h2 { font-size: 34px; line-height: 46px; }
  .cta-actions { flex-direction: column; }

  .site-footer { padding-inline: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand { grid-column: 1 / 3; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Inline validation message rendered directly under the field it belongs to. */
.field-error {
  display: block;
  margin-top: 6px;
  color: #b3261e;
  font-size: 13px;
  line-height: 20px;
}

.field-error[hidden] {
  display: none;
}

[aria-invalid="true"] {
  border-color: #b3261e;
}

/* Avatars: an uploaded or Google picture fills the circle its initials used to sit in. */
.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.user-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.dashboard-avatar,
.account-avatar,
.account-summary-avatar {
  overflow: hidden;
  padding: 0;
}
