* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; }
body { background: var(--surface-light); color: var(--text-on-light); font-family: Raleway, sans-serif; }

/* The sales page's own colours. Today's page uses #63B175 for text and for the buy buttons and the guarantee band; every
   use that fails the accessibility audit takes the nearest shade of that green that passes, the brand's secondary greens
   where one fits. */
main {
  --slate: #525e74;
  --cell-light: #efefef;
  --green-on-light: #4b965c;
  --green-text-on-slate: #82c191;
  --green-band: #418250;
}

main :is(h1, h2, h3, p, ul) { margin: 0; }

.sales-hero { padding: 40px 5% 36px; text-align: center; }
.sales-hero h1 { color: var(--heading-on-light); font-size: 30px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.hero-divider { background: var(--heading-on-light); height: 2px; margin: 22px auto 0; width: 170px; }

/* The two plan cards on the light grey band: Yearly white with a slate top border, Lifetime black with a gold top border and set lower. */
.plans { background: #f4f4f4; padding: 56px 5%; }
.plans-inner { display: grid; grid-template-columns: 1fr 1fr; margin: 0 auto; max-width: 1140px; }
.plan-card { background: var(--surface-light); border-top: 10px solid var(--slate); color: var(--text-on-light); min-width: 0; padding: 20px 8% 48px; text-align: center; }
.plan-card:nth-child(2) { background: #000; border-top-color: #e2b024; color: var(--text-on-dark); margin-top: 30px; }
.plan-badge { display: block; margin: 0 auto 24px; width: 150px; }
.plan-heading { color: var(--green-on-light); font-size: 30px; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.plan-card:nth-child(2) .plan-heading { color: var(--brand-accent); }
.plan-subtitle { font-size: 15px; font-weight: 700; margin-top: 18px; }
.plan-features { list-style: none; margin: 28px 0 32px; padding: 0; }
.plan-features li { align-items: center; border-bottom: 1px solid var(--border-on-light); display: flex; font-size: 15px; gap: 10px; justify-content: center; padding: 12px 0; }
.plan-features li:last-child { border-bottom: 0; }
.plan-card:nth-child(2) .plan-features li { border-bottom-color: var(--divider-on-dark); }
.check-mark { color: var(--heading-on-light); flex: none; height: 20px; width: 20px; }
.plan-card:nth-child(2) .check-mark { color: var(--text-on-dark); }
/* The Roadmap link sits inside a line of text, so it shows by more than colour. */
.plan-features a { color: var(--link-on-light); text-decoration: underline; }
.plan-card:nth-child(2) .plan-features a { color: var(--brand-accent); }
.plan-button { background: var(--green-on-light); border-radius: 3px; color: #fff; display: block; font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 auto; max-width: 320px; padding: 20px 16px; text-decoration: none; }
.plan-card:nth-child(2) .plan-button { padding: 24px 16px; }
.plan-button:hover { background: var(--green-band); }

/* The prices, filled in by regional-pricing.js. The note is today's dashed gold box between the hero heading and the cards; it
   shows only for a country with a regional price. Each card's button is one row holding the price paid, both at 20px bold (large
   text for the contrast rule) with 16px at each side so the longest label, with the flag, stays on one row inside the button's
   320px cap. The line above the button and the Pricing details under it show only once there is something to put in them; both
   take their card's text colour, so they are white on the Lifetime card. */
.regional-note { border: 2px dashed #f8d480; font-size: 15px; line-height: 1.55; margin: 0 auto 36px; max-width: 1140px; padding: 20px; text-align: center; width: 90%; }
.plan-full { font-size: 17px; margin-bottom: 14px; }
.plan-full:empty { display: none; }
.plan-full s { font-weight: 700; }
.plan-vat-note { font-size: 15px; white-space: nowrap; }
.plan-button img { display: inline-block; margin: 0 0.2em; vertical-align: -1px; }
.plan-details { font-size: 14px; margin: 12px auto 0; max-width: 320px; text-align: left; }
.plan-details[hidden] { display: none; }
.plan-details summary { color: var(--heading-on-light); cursor: pointer; text-align: center; text-decoration: underline; }
.plan-card:nth-child(2) .plan-details summary { color: var(--text-on-dark); }
.plan-details table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.plan-details td { border-bottom: 1px solid var(--border-on-light); padding: 3px 4px; }
.plan-card:nth-child(2) .plan-details td { border-bottom-color: var(--divider-on-dark); }
.plan-details td:last-child { text-align: right; white-space: nowrap; }
.plan-details .total td { border-bottom: 0; font-weight: 700; }

.team { padding: 48px 5% 20px; text-align: center; }
.team p { font-size: 18px; line-height: 1.6; margin-bottom: 14px; }
.team a { color: var(--link-on-light); font-size: 18px; font-weight: 700; text-decoration: none; }
.team a:hover { text-decoration: underline; }

/* The course grid: three cells a row on a checkerboard fixed by position, light grey then slate. */
.course-grid-section { margin: 0 auto; max-width: 1140px; padding-top: 24px; width: 90%; }
.grid-intro { color: var(--heading-on-light); font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 26px; }
.course-grid { display: grid; gap: 28px 0; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; }
.grid-cell { align-items: center; background: var(--cell-light); display: flex; flex-direction: column; min-width: 0; padding: 32px 20px; text-align: center; }
.grid-cell:nth-child(even) { background: var(--slate); color: var(--text-on-dark); }
.grid-icon { display: block; margin-bottom: 14px; width: 150px; }
.grid-title { color: var(--green-on-light); font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; overflow-wrap: anywhere; }
.grid-cell:nth-child(even) .grid-title { color: var(--green-text-on-slate); }
.grid-title a { color: inherit; text-decoration: none; }
/* A title mixing links with plain text must show its links by more than colour. */
.grid-title a:not(:only-child) { text-decoration: underline; }
.grid-title a:hover { text-decoration: underline; }
.grid-description { font-size: 14px; line-height: 1.5; }
.plan-details summary:focus-visible { outline: 3px solid var(--focus-ring-on-light); outline-offset: 3px; }
.grid-cell:nth-child(even) a:focus-visible, .plan-card:nth-child(2) :is(a, summary):focus-visible { outline-color: var(--focus-ring-on-dark); }

.intellij { align-items: flex-start; display: flex; gap: 14px; margin: 44px auto 40px; max-width: 1140px; width: 90%; }
.intellij-title { color: var(--heading-on-light); font-size: 14px; font-weight: 700; line-height: 1.5; }
.intellij-text { font-size: 14px; line-height: 1.5; margin-top: 6px; }

.guarantee { align-items: center; background: var(--green-band); color: #fff; display: flex; gap: 60px; padding: 56px 10%; }
.sales-guarantee { flex: none; width: 300px; }
.guarantee-content { flex: 1; min-width: 0; }
.guarantee h2 { font-size: 30px; line-height: 1.25; overflow-wrap: anywhere; }
.guarantee-divider { background: #fff; height: 2px; margin: 16px 0 24px; width: 80px; }
.guarantee p { font-size: 18px; line-height: 1.6; margin-bottom: 14px; }

@media (max-width: 768px) {
  .sales-hero h1 { font-size: 26px; }
  .plans { padding: 32px 5%; }
  .plans-inner { grid-template-columns: 1fr; }
  .plan-card { padding: 20px 6% 40px; }
  .plan-card:nth-child(2) { margin-top: 0; }
  .course-grid { grid-template-columns: 1fr; gap: 20px 0; }
  .intellij { flex-direction: column; gap: 10px; }
  .guarantee { flex-direction: column; gap: 28px; padding: 40px 5%; }
  .sales-guarantee { width: 240px; }
}
