:root {
  --navy-950: #041019;
  --navy-900: #071a27;
  --navy-800: #0a2232;
  --navy-700: #0f3346;
  --teal: #0f5f6e;
  --gold: #e6b95c;
  --gold-hi: #f6d891;
  --gold-lo: #b8862f;
  --cream: #f8f3e6;
  --cream-2: #efe6cf;
  --ink: #13202a;
  --ink-dim: #4a5a66;
  --text: #e9eef1;
  --dim: #a3b4bf;
  --red: #c4262e;
  --radius: 18px;
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 18px; }
h3 { font-size: 1.3rem; margin-bottom: 8px; }
p { margin: 0 0 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.eyebrow--dark { color: var(--gold-lo); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #1d1505;
  box-shadow: 0 6px 20px rgba(230, 185, 92, .25), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn--gold:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(230, 185, 92, .35), inset 0 1px 0 rgba(255,255,255,.5); }
.btn--sm { padding: 10px 18px; font-size: .92rem; }
.btn--lg { padding: 18px 30px; font-size: 1.08rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 26, 39, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(230, 185, 92, .12);
}
.top__row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.25rem/1 var(--serif); }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--dim); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 600px at 80% 10%, rgba(15, 95, 110, .55), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(230, 185, 92, .10), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  padding: 72px 0 96px;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--dim); margin: 22px 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.soon { display: inline-flex; align-items: center; gap: 10px; color: var(--dim); font-size: .95rem; }
.soon__dot { width: 8px; height: 8px; border-radius: 50%; background: #5cc28a; box-shadow: 0 0 0 4px rgba(92, 194, 138, .18); }
.facts {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(4, auto); gap: 8px 28px;
  color: var(--dim); font-size: .9rem;
}
.facts strong { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--text); }

.hero__art { position: relative; height: 600px; }
.phone {
  margin: 0;
  width: 270px;
  padding: 9px;
  border-radius: 36px;
  background: linear-gradient(160deg, #1d2a33, #05090c);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255,255,255,.05);
}
.phone img { border-radius: 28px; width: 100%; }
.phone--front { position: absolute; right: 16px; top: 30px; transform: rotate(3deg); z-index: 2; }
.phone--back  { position: absolute; left: 10px; top: 0; transform: rotate(-6deg); opacity: .9; }

/* Sections */
.section { padding: 104px 0; }
.section:nth-of-type(odd):not(.section--cream) { background: var(--navy-900); }
#tutor { background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); }
#game  { background: var(--navy-800); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--rev .split__copy { order: 2; }
.split__copy p { color: var(--dim); font-size: 1.05rem; }
.split__art { display: flex; justify-content: center; gap: 22px; }
.split__art .phone { width: 240px; }
.phone--offset { margin-top: 70px; }

.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ticks li {
  position: relative; padding-left: 34px; color: var(--dim);
}
.ticks li::before {
  content: "♠"; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; display: grid; place-items: center;
  font-size: 13px; color: var(--navy-900);
  background: var(--gold); border-radius: 6px;
}
.ticks li:nth-child(2n)::before { content: "♥"; color: var(--red); background: var(--cream); }
.ticks li:nth-child(3n)::before { content: "♦"; color: var(--red); background: var(--cream); }
.ticks li:nth-child(4n)::before { content: "♣"; color: var(--navy-900); background: var(--gold); }
.ticks strong { color: var(--text); font-weight: 600; }

/* Cream systems section */
.section--cream {
  background:
    radial-gradient(900px 400px at 50% 0%, #fffaf0, transparent 70%),
    var(--cream);
  color: var(--ink);
}
.section--cream h2, .section--cream h3 { color: var(--ink); }
.center { text-align: center; max-width: 760px; margin: 0 auto; }
.center__lead { color: var(--ink-dim); font-size: 1.1rem; }
.section--steps .center { margin-bottom: 48px; }

.chips { list-style: none; padding: 0; margin: 36px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; }
.chips li {
  padding: 10px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--cream-2);
  font: 600 .98rem/1 var(--sans); color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.chips--small { margin-top: 40px; }
.chips--small li { font-weight: 500; font-size: .88rem; padding: 8px 14px; background: transparent; color: var(--ink-dim); }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.card {
  background: #fff; border: 1px solid var(--cream-2); border-radius: var(--radius);
  padding: 28px 26px;
}
.card p { color: var(--ink-dim); margin: 0; }
.card--gold {
  background: linear-gradient(170deg, var(--navy-800), var(--navy-700));
  border-color: transparent; color: var(--text);
  box-shadow: 0 20px 40px rgba(10, 34, 50, .25);
}
.section--cream .card--gold h3 { color: var(--gold); }
.card--gold p { color: var(--dim); }

/* Steps */
.section--steps { background: var(--navy-900); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li {
  background: linear-gradient(170deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius);
  padding: 28px 26px;
}
.steps p { color: var(--dim); margin: 0; }
.steps__n {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 18px;
  border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  font: 600 1.1rem/1 var(--serif);
}

/* Final CTA */
.final { padding: 40px 0 110px; background: var(--navy-900); }
.final__box {
  text-align: center; padding: 64px 24px;
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(15, 95, 110, .6), transparent 70%),
    linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid rgba(230, 185, 92, .25);
}
.final__box img { margin: 0 auto 22px; border-radius: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.final__box p { color: var(--dim); max-width: 34em; margin: 0 auto 30px; font-size: 1.08rem; }

/* Footer */
.foot { border-top: 1px solid rgba(255,255,255,.06); background: var(--navy-950); color: var(--dim); font-size: .9rem; }
.foot__row { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--gold); }

/* Responsive */
@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .split--rev .split__copy { order: 0; }
  .hero__art { height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
  .cards3, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .top__row { justify-content: space-between; }
  .hero { padding: 44px 0 64px; }
  .facts { grid-template-columns: repeat(2, auto); }
  .hero__art { height: 440px; }
  .phone { width: 210px; }
  .phone--front { right: 0; }
  .phone--back { left: 0; }
  .section { padding: 72px 0; }
  .split__art .phone { width: 160px; padding: 6px; border-radius: 24px; }
  .split__art .phone img { border-radius: 19px; }
  .phone--offset { margin-top: 40px; }
  .foot__row { flex-direction: column; justify-content: center; gap: 6px; height: auto; padding: 22px 24px; }
}

/* "From our projects" cross-promotion (cross-promo.js) */
.xp__card { position: relative; border-radius: 16px; background: rgba(4,16,25,.95); border: 1px solid rgba(230,185,92,.32);
  padding: 16px; color: var(--text); box-shadow: 0 18px 40px rgba(0,0,0,.6); transition: transform .26s ease, opacity .26s ease; }
.xp__card--flip { transform: rotateY(90deg); opacity: 0; }
.xp--float { position: fixed; left: 24px; bottom: 24px; z-index: 40; width: 320px; max-width: calc(100vw - 32px);
  perspective: 1000px; display: none; }
.xp--float.xp--on { display: block; animation: xp-in .3s ease; }
@keyframes xp-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.xp--inline { display: none; max-width: var(--wrap); margin: 32px auto; padding: 0 16px; perspective: 1000px; }
@media (max-width: 767px) { .xp--inline { display: block; } .xp--float { display: none !important; } }
.xp__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1); }
.xp__label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold); }
.xp__close { width: 44px; height: 44px; margin: -12px -10px -12px 0; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: none; color: var(--dim); cursor: pointer; }
.xp__close:hover { color: #fff; background: rgba(255,255,255,.1); }
.xp__close:focus-visible, .xp__cta:focus-visible, .xp__footlink:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.xp__row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.xp__icon { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: contain; background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.15); }
.xp__titles { min-width: 0; }
.xp__name { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.xp__headline { margin: 0; font: 700 14px/1.35 var(--sans); color: #fff; }
.xp__text { margin: 0 0 14px; font-size: 12.5px; line-height: 1.55; color: #cbd5e1; }
.xp__cta { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; background: #E85D04; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.xp__cta:hover { background: #C74A00; }
.xp__play { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: 4px;
  font-size: 13px; font-weight: 600; color: var(--gold); text-decoration: none; }
.xp__play:hover { text-decoration: underline; }
.xp__play[hidden] { display: none; }
.xp__play:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.xp__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.xp__footlink { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0;
  color: var(--dim); font: inherit; font-size: .85rem; cursor: pointer; }
.xp__footlink svg { color: var(--gold); }
.xp__footlink:hover { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .xp__card, .xp--float.xp--on { transition: none; animation: none; } }

/* Google Play download button */
.btn--store { gap: 10px; background: #0b0f14; color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn--store:hover { transform: translateY(-1px); border-color: var(--gold); }
.final__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* "How the computer plays" page */
.hero--page { padding: 64px 0 72px; }
.page__intro > * { max-width: 860px; }
.facts--page { margin-top: 28px; }
.section--page { background: var(--navy-900); }
.section--page:nth-of-type(odd) { background: var(--navy-800); }
.prose > p, .prose > h2, .prose > .prose__h3, .prose > .ticks, .prose > .limits, .prose > .callout { max-width: 880px; }
.prose > p { color: var(--dim); font-size: 1.05rem; }
.prose strong { color: var(--text); }
.prose--dark > p { color: var(--ink-dim); }
.prose--dark strong { color: var(--ink); }
.prose__h3 { margin: 48px 0 6px; font-size: 1.45rem; }
.limits { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.limits li { position: relative; padding-left: 34px; color: var(--dim); }
.limits li::before {
  content: "–"; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; display: grid; place-items: center;
  font: 700 15px/1 var(--sans); color: var(--gold);
  border: 1px solid rgba(230, 185, 92, .55); border-radius: 6px;
}
.limits--dark li { color: var(--ink-dim); }
.limits--dark li::before { color: var(--gold-lo); border-color: var(--gold-lo); }
.limits strong { color: var(--text); font-weight: 600; }
.limits--dark strong { color: var(--ink); }
.callout {
  margin: 40px 0 0; padding: 26px 28px; border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(15, 95, 110, .35), rgba(15, 51, 70, .6));
  border: 1px solid rgba(230, 185, 92, .25);
}
.callout h3 { color: var(--gold); }
.callout p { color: var(--dim); margin: 0; }
.table-wrap { overflow-x: auto; margin: 34px 0 8px; border-radius: var(--radius); border: 1px solid var(--cream-2); background: #fff; }
.levels { width: 100%; border-collapse: collapse; font-size: .95rem; color: var(--ink); }
.levels caption { caption-side: bottom; text-align: left; padding: 12px 18px 16px; color: var(--ink-dim); font-size: .85rem; }
.levels th, .levels td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--cream-2); vertical-align: top; }
.levels th { font: 600 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-lo); }
.levels td:first-child { font-weight: 600; white-space: nowrap; }
.levels td:nth-child(3), .levels td:nth-child(4) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.levels tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #1d1505; font: 600 .7rem/1.4 var(--sans); vertical-align: middle; }
.cards3--tight { margin-top: 32px; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
.dodont__col {
  padding: 26px 26px 28px; border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
}
.dodont__col .ticks, .dodont__col .limits { margin-top: 14px; }
.dodont__col--not h3 { color: var(--gold); }
#ai { background: linear-gradient(180deg, var(--navy-800), var(--navy-700)); border-top: 1px solid rgba(230, 185, 92, .14); border-bottom: 1px solid rgba(230, 185, 92, .14); padding: 80px 0; }
.teaser { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.teaser p { color: var(--dim); font-size: 1.05rem; }
.teaser__cta { display: flex; justify-content: flex-end; }
@media (max-width: 960px) {
  .dodont, .teaser { grid-template-columns: 1fr; }
  .teaser__cta { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .levels:not(.simple) thead { display: none; }
  .levels:not(.simple) tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--cream-2); }
  .levels:not(.simple) tbody tr:last-child { border-bottom: 0; }
  .levels:not(.simple) td { display: block; border: 0; padding: 3px 18px; white-space: normal !important; }
  .levels:not(.simple) td:first-child { font-size: 1.05rem; }
  .levels:not(.simple) td:nth-child(3)::before { content: "Tricks below double dummy: "; color: var(--ink-dim); }
  .levels:not(.simple) td:nth-child(4)::before { content: "Contracts made: "; color: var(--ink-dim); }
  .dodont__col { padding: 22px 20px; }
}
.chips__note { text-align: center; color: var(--ink-dim); font-size: .92rem; max-width: 640px; margin: 16px auto 0; }

/* "How to play bridge" page */
.red { color: var(--red); }
.toc { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 30px; }
.toc a {
  padding: 7px 14px; border-radius: 999px; text-decoration: none; font-size: .88rem; color: var(--dim);
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03);
}
.toc a:hover { color: var(--text); border-color: var(--gold); }
.ranks, .suits, .hcp { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.ranks span {
  min-width: 42px; padding: 10px 0; text-align: center; border-radius: 10px;
  background: #fff; border: 1px solid var(--cream-2); font: 600 1.1rem/1 var(--serif); color: var(--ink);
}
.suits span {
  padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--cream-2);
  font: 600 1rem/1 var(--sans); color: var(--ink);
}
.suits span.red { color: var(--red); }
.hcp span {
  padding: 12px 18px; border-radius: 12px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(230, 185, 92, .35); color: var(--dim); font-size: 1rem;
}
.hcp b { font: 600 1.25rem/1 var(--serif); color: var(--gold); margin-right: 6px; }
.callout--light { background: #fff; border-color: var(--cream-2); }
.callout--light h3 { color: var(--gold-lo); }
.callout--light p { color: var(--ink-dim); }
.levels.simple td:first-child, .auction td { font: 600 1.05rem/1.2 var(--serif); }
.prose > .table-wrap { max-width: 640px; }
.auction { width: 100%; border-collapse: collapse; color: var(--ink); text-align: center; }
.auction caption { caption-side: bottom; text-align: left; padding: 12px 18px 16px; color: var(--ink-dim); font-size: .85rem; }
.auction th { padding: 12px; font: 600 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-lo); border-bottom: 1px solid var(--cream-2); }
.auction td { padding: 12px; }
.steps--list { margin-top: 30px; }
.prose__gap { margin-top: 32px; }
.center__dim { color: var(--dim); font-size: 1.08rem; }
.try__cta { margin-top: 40px; }
.glossary { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin: 26px 0 0; max-width: 880px; }
.glossary dt { font: 600 1.05rem/1.4 var(--serif); color: var(--ink); }
.glossary dd { margin: 0; color: var(--ink-dim); }
@media (max-width: 640px) {
  .glossary { grid-template-columns: 1fr; gap: 2px; }
  .glossary dd { margin-bottom: 12px; }
  .ranks span { min-width: 34px; padding: 8px 0; font-size: 1rem; }
}
#learn { background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); }
