:root {
  color-scheme: light;
  --bg: #f4ede6;
  --bg-alt: #eee5dc;
  --surface: rgba(250, 246, 241, 0.84);
  --surface-strong: rgba(253, 250, 246, 0.94);
  --surface-muted: rgba(248, 242, 236, 0.78);
  --text: #241d1c;
  --text-strong: #171112;
  --muted: #6f625d;
  --muted-soft: #9a8e89;
  --line: rgba(61, 44, 45, 0.1);
  --line-strong: rgba(61, 44, 45, 0.18);
  --accent: #772c39;
  --accent-strong: #5e1f2b;
  --accent-soft: rgba(119, 44, 57, 0.08);
  --accent-wash: rgba(119, 44, 57, 0.14);
  --success: #5a6a60;
  --danger: #8c3d35;
  --shadow-lg: 0 26px 64px rgba(52, 38, 36, 0.08);
  --shadow-md: 0 16px 34px rgba(52, 38, 36, 0.06);
  --radius-panel: 34px;
  --radius-card: 28px;
  --radius-control: 18px;
  --max-width: 1180px;
  --font-ui: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --font-display: "Aptos Display", "Aptos", "Segoe UI Variable Display", "Segoe UI Variable Text", sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Geeza Pro", Tahoma, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-ui);
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.75), transparent 22%),
    linear-gradient(180deg, #fbf7f2 0%, var(--bg) 42%, var(--bg-alt) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 0;
}

body::before {
  top: -38vw;
  width: min(1080px, 90vw);
  height: min(1080px, 90vw);
  border: 1px solid rgba(119, 44, 57, 0.05);
}

body::after {
  top: 12rem;
  width: min(820px, 72vw);
  height: min(820px, 72vw);
  border: 1px solid rgba(119, 44, 57, 0.04);
}

::selection {
  background: rgba(119, 44, 57, 0.18);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-orbit {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
}

.page-orbit-left {
  top: -10rem;
  left: -8rem;
  width: 26rem;
  height: 26rem;
  background: rgba(119, 44, 57, 0.13);
}

.page-orbit-right {
  top: 12rem;
  right: -9rem;
  width: 28rem;
  height: 28rem;
  background: rgba(111, 122, 128, 0.1);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 30px 0 72px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px) saturate(110%);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 18%, transparent 82%, rgba(119, 44, 57, 0.02)),
    radial-gradient(circle at top right, rgba(119, 44, 57, 0.04), transparent 30%);
  pointer-events: none;
}

.site-header,
.schedule-header,
.step-actions,
.schedule-actions,
.detail-row,
.suggestion-button,
.header-meta,
.brand-lockup {
  display: flex;
  align-items: center;
}

.site-header,
.schedule-header {
  justify-content: space-between;
}

.site-header {
  gap: 18px;
  margin-bottom: 20px;
}

.brand-lockup {
  gap: 16px;
  min-width: 0;
}

.brand-seal {
  width: 66px;
  height: 66px;
  padding: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(119, 44, 57, 0.16);
  background: rgba(255, 252, 248, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.brand-copy,
.hero-copy,
.lookup-intro,
.table-header,
.note-copy,
.step-card,
.match-card,
.timeline-card,
.stat-card {
  position: relative;
  z-index: 1;
}

.brand-copy,
.brand-title,
.eyebrow,
.hero-text,
.section-copy,
.step-copy,
.helper-text,
.suggestions-label,
.table-header p,
.schedule-subtitle,
.meta-copy,
.note-label,
.note-copy,
.stat-label,
.timeline-day,
.timeline-prep,
.timeline-date,
.match-card p {
  margin: 0;
}

.eyebrow,
.note-label,
.step-badge,
.stat-label,
.suggestions-label,
.table-header p,
.helper-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-title {
  margin-top: 5px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.header-meta {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-copy {
  color: var(--muted);
  font-size: 13px;
}

.hero-panel,
.lookup-panel,
.schedule-panel {
  padding: 42px;
}

.lookup-panel,
.schedule-panel {
  margin-top: 20px;
}

.hero-grid,
.lookup-layout {
  display: grid;
  gap: 34px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.8fr);
  align-items: center;
}

.hero-copy h1,
.lookup-intro h2,
.step-card h2,
.schedule-header h2,
.table-header h3,
.timeline-card h3,
.match-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 11ch;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 0.98;
}

.hero-text,
.section-copy,
.step-copy,
.schedule-subtitle,
.table-header p,
.match-card p,
.note-copy {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 38rem;
  margin-top: 18px;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.hero-note {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 252, 248, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.note-title {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.lookup-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.lookup-intro h2 {
  max-width: 12ch;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.02;
}

.section-copy {
  max-width: 32rem;
  margin-top: 16px;
  font-size: 15px;
}

.detail-list {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.detail-row {
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  color: var(--text-strong);
  font-weight: 600;
  text-align: right;
}

.arabic-inline,
.arabic-name,
.name-input,
.suggestion-copy strong {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  unicode-bidi: plaintext;
}

.flow-shell {
  position: relative;
}

.flow-shell::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: clamp(180px, 26vw, 280px);
  height: clamp(180px, 26vw, 280px);
  border: 1px solid rgba(119, 44, 57, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.step-card,
.match-card,
.stat-card,
.timeline-card,
.table-card {
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.step-card {
  max-width: 100%;
  padding: 32px;
  border-radius: var(--radius-card);
}

.step-card h2 {
  margin-top: 16px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.step-copy {
  max-width: 34rem;
  margin-top: 12px;
  font-size: 15px;
}

.lookup-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.field-label {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
}

.name-input {
  min-height: 68px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-strong);
  color: var(--text-strong);
  font-size: 1.35rem;
  text-align: right;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.name-input::placeholder {
  color: var(--muted-soft);
}

.name-input:focus-visible {
  outline: none;
  border-color: rgba(119, 44, 57, 0.35);
  box-shadow: 0 0 0 6px rgba(119, 44, 57, 0.12);
  background: rgba(255, 252, 248, 0.98);
}

.primary-button,
.secondary-button,
.ghost-button,
.suggestion-button {
  appearance: none;
  border: 1px solid transparent;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  font-size: 15px;
  font-weight: 600;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fbf7f2;
  box-shadow: 0 14px 28px rgba(119, 44, 57, 0.14);
}

.secondary-button,
.ghost-button,
.suggestion-button {
  border-color: var(--line);
  background: rgba(255, 252, 248, 0.78);
  color: var(--text-strong);
}

.ghost-button {
  background: rgba(248, 242, 236, 0.68);
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.suggestion-button:hover,
.suggestion-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(119, 44, 57, 0.22);
  box-shadow: var(--shadow-md);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.helper-text {
  min-height: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

.helper-text.is-error {
  color: var(--danger);
}

.helper-text.is-success {
  color: var(--success);
}

.suggestions {
  margin-top: 20px;
}

.suggestions-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.suggestion-button {
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  text-align: left;
}

.suggestion-copy {
  min-width: 0;
}

.suggestion-copy strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: right;
}

.suggestion-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-card {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding: 26px;
  border-radius: 24px;
}

.match-card h3 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.35;
}

.match-card p {
  font-size: 14px;
}

.step-actions,
.schedule-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.step-actions {
  margin-top: 20px;
}

.schedule-header {
  gap: 22px;
  align-items: flex-start;
}

.schedule-header h2 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.24;
}

.schedule-subtitle {
  max-width: 44rem;
  margin-top: 14px;
  font-size: 15px;
}

.stats-grid,
.cards-grid {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 30px;
}

.stat-card {
  padding: 20px;
  border-radius: 22px;
}

.stat-value {
  margin-top: 12px;
  color: var(--text-strong);
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.timeline-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
}

.timeline-card::before,
.timeline-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.timeline-card::before {
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-wash), transparent);
}

.timeline-card::after {
  top: 18px;
  right: 18px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(119, 44, 57, 0.08);
  border-radius: 50%;
}

.timeline-card h3 {
  margin-top: 18px;
  font-size: 1.8rem;
  line-height: 1.1;
}

.timeline-date {
  margin-top: 14px;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
}

.timeline-day {
  margin-top: 8px;
  font-size: 14px;
}

.timeline-prep {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.table-card {
  margin-top: 20px;
  border-radius: 28px;
  overflow: hidden;
}

.table-header {
  padding: 24px 24px 0;
}

.table-header h3 {
  font-size: 1.55rem;
}

.table-wrap {
  overflow: auto;
  padding: 18px 24px 24px;
}

.detail-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.detail-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-table tbody tr:last-child td {
  border-bottom: none;
}

.detail-table td strong {
  display: inline-block;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
}

.detail-table td::before {
  display: none;
  content: attr(data-label);
}

.hidden {
  display: none !important;
}

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

  .primary-button,
  .secondary-button,
  .ghost-button,
  .suggestion-button,
  .name-input {
    transition: none;
  }
}

@media (max-width: 1024px) {
  .hero-grid,
  .lookup-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .lookup-intro h2 {
    max-width: none;
  }

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

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

@media (max-width: 760px) {
  body::before,
  body::after {
    display: none;
  }

  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 14px;
    padding-bottom: 34px;
  }

  .panel {
    backdrop-filter: none;
  }

  .site-header,
  .schedule-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-meta {
    justify-content: flex-start;
  }

  .hero-panel,
  .lookup-panel,
  .schedule-panel {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .schedule-actions,
  .step-actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .stats-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  .detail-table {
    min-width: 0;
  }

  .detail-table thead {
    display: none;
  }

  .detail-table,
  .detail-table tbody,
  .detail-table tr,
  .detail-table td {
    display: block;
    width: 100%;
  }

  .detail-table tbody {
    display: grid;
    gap: 12px;
  }

  .detail-table tr {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 252, 248, 0.74);
  }

  .detail-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
  }

  .detail-table tr td:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .detail-table td::before {
    display: block;
    flex: 0 0 40%;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(calc(100% - 14px), var(--max-width));
  }

  .panel {
    border-radius: 26px;
  }

  .brand-seal {
    width: 58px;
    height: 58px;
  }

  .step-card,
  .hero-note,
  .match-card,
  .stat-card,
  .timeline-card,
  .table-header,
  .table-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page-orbit,
  .site-header,
  .hero-panel,
  .lookup-panel,
  .schedule-actions {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .step-card,
  .match-card,
  .stat-card,
  .timeline-card,
  .table-card {
    border: none;
    box-shadow: none;
    background: #fff;
  }

  .schedule-panel {
    display: block !important;
    padding: 0;
    margin: 0;
  }
}
