/* Public website (landing, pricing and legal pages), served by src/site-routes.js.
   The light colour tokens mirror the :root block at the top of styles.css, so the
   site matches the app without downloading the whole app stylesheet. theme.css
   loads after this file and supplies the dark-mode values and the theme toggle. */
:root {
  --ink: #24313e;
  --ink-2: #44515e;
  --muted: #65717c;
  --paper: #f7f6f2;
  --paper-2: #f0f2ef;
  --card: #ffffff;
  --line: #e3e5e4;
  --line-2: #cbd2d3;
  --forest: #147d80;
  --forest-2: #106367;
  --mint: #e7f2f1;
  --mint-2: #b8dbd8;
  --amber: #a96918;
  --amber-soft: #fbefd9;
  --shadow: 0 10px 35px rgba(35, 49, 62, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body.site {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
.site main {
  flex: 1;
}
.site main:focus {
  outline: none;
}
.site a {
  color: var(--forest-2);
}
.site h1,
.site h2,
.site h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}
:focus-visible {
  outline: 3px solid rgba(49, 120, 96, 0.45);
  outline-offset: 2px;
}
.site-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-wrap.narrow {
  max-width: 760px;
}

/* Skip link and draft notice */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus {
  top: 8px;
}
.site-draft {
  padding: 10px 16px;
  background: var(--amber-soft);
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.placeholder {
  padding: 0 3px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 700;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
}
.brand-mark svg {
  width: 18px;
  height: 18px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--forest-2);
}

/* Buttons */
.site .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 750;
  text-decoration: none;
}
.site .button.primary {
  background: var(--forest);
  color: white;
}
.site .button.primary:hover {
  background: var(--forest-2);
}
.site .button.secondary {
  background: var(--card);
  border: 1px solid var(--line-2);
  color: var(--ink);
}

/* Landing */
.hero {
  padding: 48px 0 40px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--forest-2);
  font-weight: 750;
  font-size: 14px;
}
/* The headline matches the sign-in page: heavy, tight and set close. */
.site .hero h1 {
  max-width: 12em;
  margin: 0 0 20px;
  font-size: clamp(38px, 6.4vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

/* The hero's example: a lesson being wrapped up, then what follows. It is a
   picture of the app, so nothing in it looks clickable: it is labelled
   "Example" and shows plain values rather than buttons. */
.wrap-demo {
  margin: 0;
  max-width: 460px;
  width: 100%;
  user-select: none;
}
.wrap-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}
.wrap-tag {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wrap-sheet {
  padding: 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--paper);
}
.wrap-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.wrap-head p {
  margin: 0;
}
.wrap-head b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.wrap-head span,
.wrap-fee {
  color: var(--muted);
  font-size: 14px;
}
.wrap-fee {
  white-space: nowrap;
}
.wrap-row {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.wrap-label {
  color: var(--muted);
  font-size: 14px;
}
.wrap-row:last-child {
  border-bottom: 0;
}
.wrap-then {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
}
.wrap-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.wrap-results li {
  position: relative;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-sm);
  background: var(--mint);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.wrap-results li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 10px;
  height: 6px;
  margin-top: -5px;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}
/* The page's one moment of motion: what happens after the wrap-up. */
@media (prefers-reduced-motion: no-preference) {
  .wrap-results li {
    animation: result-in 0.45s ease-out both;
  }
  .wrap-results li:nth-child(1) {
    animation-delay: 0.5s;
  }
  .wrap-results li:nth-child(2) {
    animation-delay: 0.75s;
  }
  .wrap-results li:nth-child(3) {
    animation-delay: 1s;
  }
}
@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.lead {
  max-width: 38em;
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}
.hero-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.site-section {
  padding: 48px 0;
}
.site .site-section h2 {
  margin: 0 0 20px;
  font-size: clamp(26px, 4.4vw, 34px);
  letter-spacing: -0.035em;
}
/* Sections with the heading beside the content on wide screens. Every
   section shares the same left edge. */
.split {
  display: grid;
  gap: 4px;
}
.prose p {
  max-width: 38em;
  margin: 0 0 14px;
  color: var(--ink-2);
}
.section-lead {
  margin: -8px 0 24px;
  color: var(--ink-2);
}
.section-note {
  color: var(--muted);
  font-size: 14px;
}
.features,
.trust-list,
.plans ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.features {
  display: grid;
  gap: 28px 32px;
}
.feature {
  padding-top: 14px;
  border-top: 2px solid var(--forest);
}
.plan {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.feature p {
  margin: 0;
  color: var(--ink-2);
}
.trust {
  background: var(--mint);
}
.trust-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.plans {
  display: grid;
  gap: 14px;
}
.plan h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
/* The selected card is outlined; clicking a card selects it (site.js). */
.plan {
  border-width: 2px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.plan:hover {
  border-color: var(--mint-2);
}
.plan.selected {
  border-color: var(--forest);
  box-shadow: 0 14px 40px rgba(20, 125, 128, 0.16);
}
.plan-price {
  margin: 0;
  color: var(--ink-2);
}
.plan-price .amount {
  color: var(--ink);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.plan-yearly {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.plan-students {
  margin: 0 0 12px;
  font-weight: 750;
}
.plans li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
  color: var(--ink-2);
}
.plans li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}
.plan {
  display: flex;
  flex-direction: column;
}
.plan ul {
  flex: 1;
}
.plan-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 14px;
}
.plan-action .button {
  width: 100%;
}
.plan-badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest-2);
  font-size: 13px;
  font-weight: 750;
}
.faq {
  border-top: 1px solid var(--line-2);
}
.site details {
  border-bottom: 1px solid var(--line-2);
}
.site summary {
  min-height: 52px;
  padding: 14px 0;
  font-weight: 700;
  cursor: pointer;
}
.site details p {
  max-width: 38em;
  margin: 0;
  padding: 0 0 18px;
  color: var(--ink-2);
}
.about,
.contact {
  background: var(--card);
}
.about-body {
  display: grid;
  gap: 24px;
}
.about-card {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--mint);
}
.about-person {
  display: flex;
  align-items: center;
  gap: 14px;
}
.about-person p {
  margin: 0;
  line-height: 1.3;
}
.about-person b {
  display: block;
  font-size: 18px;
}
.about-person span {
  color: var(--ink-2);
  font-size: 14px;
}
.about-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}
.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}
.about-facts li {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
}
.about-quote {
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--forest);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.contact {
  border-top: 1px solid var(--line);
}

/* Legal pages */
.legal {
  padding-top: 32px;
  padding-bottom: 48px;
}
.legal h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 6vw, 40px);
}
.legal h2 {
  margin: 36px 0 10px;
  font-size: 22px;
}
.legal h3 {
  margin: 24px 0 8px;
  font-size: 18px;
}
.legal ul,
.legal ol {
  padding-left: 24px;
}
.legal li {
  margin-bottom: 6px;
}
.legal blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--forest);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card);
}
.legal code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--paper-2);
  font-size: 0.92em;
}
.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.legal th,
.legal td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal tr:last-child td {
  border-bottom: 0;
}
.legal th {
  background: var(--paper-2);
}

/* Footer */
.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 10px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 650;
}
.footer-nav a[aria-current='page'] {
  color: var(--forest-2);
}
.site-footer p {
  margin: 0;
}

@media (min-width: 720px) {
  .hero {
    padding: 80px 0 64px;
  }
  .site-section {
    padding: 64px 0;
  }
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plans {
    max-width: 880px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
  }
  .wrap-demo {
    justify-self: end;
  }
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 48px;
    align-items: start;
  }
}
@media (max-width: 420px) {
  .site .brand {
    font-size: 17px;
  }
}

/* Short draft notice on phones */
.draft-short {
  display: none;
}
@media (max-width: 719px) {
  .draft-long {
    display: none;
  }
  .draft-short {
    display: inline;
  }
}

/* Header on phones and upright tablets: "Log in" and a menu button; the links
   open in a panel under the header (site.js). 960px covers every phone either
   way up, so turning a phone doesn't swap the header. */
.header-login,
.menu-toggle,
.site .site-nav .nav-trial {
  display: none;
}
.site-header {
  position: relative;
}
@media (max-width: 959px) {
  .site .header-login {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: auto;
    padding: 0 10px;
    color: var(--ink);
    font-weight: 650;
    font-size: 15px;
    text-decoration: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle svg {
    width: 22px;
    height: 22px;
  }
  .menu-toggle .menu-close-icon,
  .menu-toggle[aria-expanded='true'] .menu-open-icon {
    display: none;
  }
  .menu-toggle[aria-expanded='true'] .menu-close-icon {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
  }
  .site-nav.open {
    display: flex;
  }
  .site .site-nav a:not(.button) {
    min-height: 52px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .site .site-nav .nav-login {
    display: none;
  }
  .site .site-nav .nav-trial {
    display: inline-flex;
    margin-top: 16px;
  }
  .site-nav .theme-toggle {
    align-self: flex-start;
    margin-top: 12px;
  }
  .site-nav .theme-toggle .theme-label {
    display: inline;
    font-size: 14px;
  }
}

/* Pricing: Monthly/Yearly switch (shown by site.js) */
.billing-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--card);
}
.billing-switch[hidden] {
  display: none;
}
.billing-switch button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.billing-switch button span {
  color: var(--forest-2);
  font-size: 13px;
}
.billing-switch button[aria-pressed='true'] {
  background: var(--forest);
  color: white;
}
.billing-switch button[aria-pressed='true'] span {
  color: inherit;
}
.has-billing-switch .plan-yearly,
.has-billing-switch .plan-pay-yearly {
  display: none;
}

/* Pricing on phones: first few points, then "See all features" (site.js) */
.plan-more {
  display: none;
}
@media (max-width: 719px) {
  .js-plans .plan li.extra {
    display: none;
  }
  .js-plans .plan.show-all li.extra {
    display: list-item;
  }
  .js-plans .plan-more {
    display: block;
    align-self: flex-start;
    min-height: 44px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--forest-2);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
  }
}
