:root {
  --cream: #FBF7F0;
  --ink: #1F1A17;
  --ink-soft: #2A2521;
  --muted: #6B615A;
  --muted-light: #8C8078;
  --orange: #E4572E;
  --orange-dark: #C9461F;
  --rust: #B83E1A;
  --sand: #F5E6D8;
  --line: #EDE6DA;
  --line-strong: #E4DBCD;
  --dark-line: #5A504A;
  --dark-panel: #3A332E;
  --dark-muted: #C9BFB4;
  --surface: #fff;
  --board-slot: #332C28;
  --white-18: rgba(255, 255, 255, .18);
  --white-42: rgba(255, 255, 255, .42);
  --white-55: rgba(255, 255, 255, .55);
  --white-74: rgba(255, 255, 255, .74);
  --white-78: rgba(255, 255, 255, .78);
  --white-82: rgba(255, 255, 255, .82);
  --ink-overlay: rgba(31, 26, 23, .85);
  --shadow-accent: rgba(228, 87, 46, .7);
  --shadow-ink-40: rgba(31, 26, 23, .4);
  --shadow-ink-06: rgba(31, 26, 23, .06);
  --shadow-ink-42: rgba(31, 26, 23, .42);
  --shadow-ink-50: rgba(31, 26, 23, .5);
  --shell: 1160px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

a { color: var(--rust); text-decoration: none; }
a:hover { color: var(--orange); }

img, svg { display: block; }

.page {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.page > main { flex: 1 0 auto; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
}

.page-placement {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 24px 28px;
}

.page-placement--top { padding-top: 12px; }
.page-placement--mid { padding-top: 40px; padding-bottom: 0; }

@media (max-width: 1023px) {
  .page-placement--top { display: none; }
}

@media (max-width: 1025px) {
  .box970x250-apps { display: none !important; }
}

@media (max-width: 991px) {
  .box160x600-sticky { display: none !important; }
}

@media (max-width: 783px) {
  .box728x90,
  .page-placement--mid { display: none !important; }
}

/* ---------- Notice ---------- */

.notice {
  background: var(--orange);
  color: var(--surface);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  padding: 11px 24px;
}

/* ---------- Nav ---------- */

.nav {
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.nav__logo { display: flex; }
.nav__logo img { height: 30px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.nav__link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.nav__link:hover { color: var(--orange); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
}
.nav__cta:hover { background: var(--orange); color: var(--surface); }

/* ---------- Hero ---------- */

.hero {
  padding: 40px 28px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px 56px;
  align-items: center;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--rust);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero__title {
  font: 900 clamp(42px, 5.4vw, 70px)/1 'Chivo', sans-serif;
  letter-spacing: -.03em;
  margin: 0 0 22px;
  max-width: 12ch;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--orange); }

.hero__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 34px;
  max-width: 46ch;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 30px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--surface);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 14px 30px -12px var(--shadow-accent);
}
.btn-primary:hover { background: var(--orange-dark); color: var(--surface); }

.hero__store {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.3;
}
.hero__store strong { color: var(--ink); }

/* ---------- Hero board ---------- */

.hero__stage {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 560px;
}

.board {
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 30px 70px -28px var(--shadow-ink-40), 0 2px 6px var(--shadow-ink-06);
  overflow: hidden;
}

.board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px 22px;
  gap: 12px;
}
.board__bar img { height: 20px; width: auto; }

.board__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board__timer {
  font: 700 13px 'Chivo', sans-serif;
  letter-spacing: .04em;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.board__pause {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
}

.board__canvas {
  background: var(--ink-soft);
  margin: 0 12px;
  border-radius: 18px;
  padding: 8px 10px;
}

.board__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.board__svg .slot {
  fill: var(--board-slot);
  stroke: var(--dark-line);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.board__svg .edge {
  fill: none;
  stroke: var(--white-55);
  stroke-width: .9;
}

.board__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 18px;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
}
.board__foot .muted { color: var(--muted); }

/* ---------- Categories ---------- */

.cats {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 28px;
}

.cats__inner {
  display: flex;
  align-items: center;
  gap: 28px 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.cats__copy {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.5;
}
.cats__copy strong { color: var(--ink); }

.cats__grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cat {
  position: relative;
  width: 104px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--line-strong);
  flex: none;
}
.cat img { width: 100%; height: 100%; object-fit: cover; }

.cat__label {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 8px;
}
.cat__label span {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ink-overlay);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Sections ---------- */

.section { padding: 72px 28px 40px; }
.section--how { padding-top: 96px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.section__title {
  font: 900 clamp(32px, 4vw, 48px)/1.05 'Chivo', sans-serif;
  letter-spacing: -.025em;
  margin: 0;
  max-width: 16ch;
}

.section__note {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36ch;
  text-wrap: pretty;
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step__num {
  font: 900 56px/1 'Chivo', sans-serif;
  color: var(--orange);
  letter-spacing: -.04em;
}

.step h3 {
  font: 900 22px/1.15 'Chivo', sans-serif;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.step p,
.feature p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Difficulty ---------- */

.sizes {
  background: var(--ink);
  border-radius: 32px;
  padding: clamp(32px, 5vw, 64px);
  color: var(--surface);
}

.sizes .section__head { margin-bottom: 44px; }

.sizes .section__title {
  font-size: clamp(30px, 3.6vw, 44px);
  max-width: 16ch;
}

.sizes .section__note { color: var(--dark-muted); max-width: 34ch; }

.sizes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.size {
  background: transparent;
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.size__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.size__svg path {
  fill: var(--dark-panel);
  stroke: var(--orange);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.size__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.size__meta b { font: 900 22px/1 'Chivo', sans-serif; }
.size__meta span { font-size: 15px; color: var(--dark-muted); }

/* ---------- Features ---------- */

.section--features .section__title { margin-bottom: 44px; max-width: 18ch; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}

.feature h3 {
  font: 900 20px/1.2 'Chivo', sans-serif;
  margin: 0 0 8px;
}

/* ---------- Install ---------- */

.install {
  background: var(--orange);
  border-radius: 32px;
  padding: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  align-items: center;
  color: var(--surface);
}

.install__title {
  font: 900 clamp(34px, 4.2vw, 52px)/1.02 'Chivo', sans-serif;
  letter-spacing: -.03em;
  margin: 0 0 18px;
  max-width: 14ch;
  text-wrap: balance;
}

.install__copy {
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.55;
  max-width: 40ch;
  text-wrap: pretty;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  padding: 17px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 17px;
  font-weight: 700;
}
.btn-dark:hover { background: var(--surface); color: var(--ink); }

.install__badge { display: flex; justify-content: center; }

.install__disc {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  box-shadow: 0 30px 60px -20px var(--shadow-ink-50);
}
.install__disc img { width: 88px; height: 88px; }

/* ---------- Footer ---------- */

.footer {
  padding: 56px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__top img { height: 26px; width: auto; }

.footer__links {
  display: flex;
  gap: 10px 26px;
  flex-wrap: wrap;
}
.footer__links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.footer__links a:hover { color: var(--orange); }
.footer__links a img[alt="Your Privacy Choices"] {
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
}

.footer__legal {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted-light);
}

/* ---------- Legal pages ---------- */

.legal-container.container,
.legal-container > .container.static-view {
  width: calc(100% - 56px);
  max-width: var(--shell);
  margin: 32px auto 72px;
  padding: clamp(28px, 4vw, 52px) !important;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 20px 52px -42px var(--shadow-ink-42);
  color: var(--ink);
}

.legal-container h1 {
  margin: 0 0 30px;
  padding: 0 !important;
  font: 900 clamp(34px, 4vw, 48px)/1.08 'Chivo', sans-serif;
  letter-spacing: -.03em;
  text-align: left !important;
}

.legal-container :is(h2, h3, h4) {
  margin: 34px 0 12px;
  color: var(--ink);
  font-family: 'Chivo', sans-serif;
  line-height: 1.25;
  text-align: left !important;
}

/* Legacy legal copy stores its section headings as centered paragraphs. */
.legal-container p[style*="text-align: center"] {
  text-align: left !important;
}

.legal-container p,
.legal-container li {
  max-width: 82ch;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.legal-container a { color: var(--rust); }
.legal-container a:hover { color: var(--orange); }

/* Yii integration */
.notice:empty { display: none; }
.notice .alert {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.nav__cta.btn-primary {
  padding: 11px 20px;
  background: var(--ink);
  box-shadow: none;
  font-size: 15px;
}
.nav__cta.btn-primary:hover { background: var(--orange); }
.how-hero {
  padding: 72px 28px 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 40px 56px;
}
.how-hero__copy { min-width: 0; }
.how-hero__stage { max-width: 500px; }
.how-hero .pill { width: fit-content; }
.how-controls .feature { border-color: var(--dark-muted); }
.how-controls .feature h3 { color: var(--surface); }
.how-controls .feature p { color: var(--dark-muted); }
.how-rating {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 18px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--white-18);
}
.how-rating__stars {
  color: var(--orange);
  font-size: 22px;
  letter-spacing: .08em;
  line-height: 1;
}
.how-rating__score {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--dark-muted);
}
.how-rating__score strong { color: var(--surface); font: 900 18px/1 'Chivo', sans-serif; }
.how-rating p {
  margin: 0;
  color: var(--dark-muted);
  font-size: 15px;
  line-height: 1.4;
  justify-self: end;
  text-align: right;
}
.after-install {
  background: var(--orange);
  border-radius: 32px;
  padding: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  color: var(--surface);
}
.after-install__eyebrow {
  margin: 0 0 12px;
  color: var(--white-78);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.after-install__title {
  max-width: 12ch;
  margin: 0 0 18px;
  font: 900 clamp(34px, 4.2vw, 52px)/1.02 'Chivo', sans-serif;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.after-install__copy { margin: 0; max-width: 38ch; font-size: 18px; line-height: 1.55; }
.after-install__list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--white-42);
}
.after-install__list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 17px 0;
  border-bottom: 1px solid var(--white-42);
}
.after-install__list span { min-width: 30px; color: var(--white-74); font: 800 13px/1.45 'Chivo', sans-serif; }
.after-install__list strong { display: block; font: 900 18px/1.25 'Chivo', sans-serif; }
.after-install__list p { margin: 3px 0 0; color: var(--white-82); font-size: 15px; line-height: 1.4; }
.fdbc-img-holder {
  background: var(--cream);
}
.fdbck-header-holder {
  background: var(--orange);
}

#starScore {
  margin-left: -20px !important;
}
@media (max-width: 620px) {
  .nav { padding: 18px 20px; }
  .nav__links { gap: 14px; }
  .hero, .section, .how-hero { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 22px; }
  .cats { padding-left: 20px; padding-right: 20px; }
  .nav__cta.btn-primary { width: 100%; justify-content: center; }
  .how-rating { grid-template-columns: 1fr; align-items: start; gap: 10px; }
  .how-rating p { justify-self: start; text-align: left; }
  .after-install { grid-template-columns: 1fr; }
  .legal-container.container,
  .legal-container > .container.static-view { width: calc(100% - 40px); margin: 20px auto 48px; border-radius: 22px; }
}
