/* FluentPlex's public pages (app/views/sites/fluentplex; design "FluentPlex Home"): its header and footer,
   and its home page. Colors are the theme's names (FluentPlex's on its public pages: Site::FLUENTPLEX_THEME);
   the home page's demo is in each language's own (--d-…, FluentplexHelper). */

/* Header */
.fpsite-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 48px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.fpsite-header .brand-mark { --mark-size: 40px; }
.fpsite-nav { display: flex; align-items: center; gap: 4px; }
.fpsite-nav__link { padding: 10px 14px; border-radius: 999px; font-size: 15px; color: var(--text-body); text-decoration: none; }
.fpsite-nav__link:hover, .fpsite-nav__link[aria-current="page"] { background: var(--sand); color: var(--ink); text-decoration: none; }
.fpsite-nav__cta {
  display: inline-flex; align-items: center; justify-content: center; margin-inline-start: 6px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--clay); color: var(--text-on-accent); font-size: 15px; font-weight: 600; text-decoration: none;
}
.fpsite-nav__cta:hover { background: var(--clay-hover); color: var(--text-on-accent); text-decoration: none; }
.fpsite-header__phone { display: none; align-items: center; gap: 4px; }
.fpsite-header__sign-in { display: flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.fpsite-menu { position: relative; }
.fpsite-menu__button {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; list-style: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); font-size: 18px; color: var(--ink);
}
.fpsite-menu__button::-webkit-details-marker { display: none; }
.fpsite-menu__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
  padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-menu);
}
.fpsite-menu__link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.fpsite-menu__link:hover { background: var(--sand); text-decoration: none; }
.fpsite-menu__list .fpsite-nav__cta { margin: 6px 0 0; }

/* Footer */
.fpsite-footer {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 28px 48px; border-top: 1px solid var(--line); background: var(--paper);
}
.fpsite-footer__brand { display: flex; flex-direction: column; gap: 8px; }
.fpsite-footer .brand-mark { --mark-size: 30px; }
.fpsite-footer .brand__name { font-size: 22px; }
.fpsite-footer__tagline { font-size: 14px; color: var(--text-muted); }
.fpsite-footer__links { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: 15px; }
.fpsite-footer__links a { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-body); }

/* Home page (design "FluentPlex Home v2") */
.fphome { background: var(--paper); color: var(--ink); }
.fphome__hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center;
  max-width: 1280px; margin: 0 auto; padding: 60px 48px 64px;
}
.fphome__copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.fphome__title {
  margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 54px; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance;
}
.fphome__title em { color: var(--green); }
.fphome__lead { margin: 0; max-width: 580px; font-size: 18px; line-height: 1.6; color: var(--text-body); text-wrap: pretty; }
.fphome__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.fphome__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; text-align: center;
}
.fphome__btn:hover { text-decoration: none; }
.fphome__btn--primary { background: var(--clay); color: var(--text-on-accent); }
.fphome__btn--primary:hover { background: var(--clay-hover); color: var(--text-on-accent); }
.fphome__btn--outline { border-color: var(--ink); color: var(--ink); padding: 0 24px; }
.fphome__btn--outline:hover { background: var(--ink); color: var(--paper); }
.fphome__btn--light { align-self: flex-start; min-height: 48px; padding: 0 22px; background: #FFFFFF; color: #17182B; font-size: 15px; }
.fphome__btn--light:hover { color: #17182B; background: #ECEAE3; }
.fphome__btn--block { width: 100%; min-height: 48px; font-size: 15px; margin-top: auto; }
.fphome__note { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.fphome__muted-sm { font-size: 13px; color: var(--text-muted); }

/* The demo: each language in its own look (--d-…), whatever the site's colors */
.fphome__demo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fphome__demo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fphome__demo-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.fphome__tabs { display: grid; grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr)); gap: 2px; width: 360px; max-width: 100%; padding: 3px; background: var(--sand); border-radius: 999px; }
.fphome__tab {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 6px; border: none; border-radius: 999px;
  background: transparent; color: var(--ink); font: inherit; cursor: pointer; white-space: nowrap;
}
.fphome__tab bdi { font-family: var(--d-font); font-size: 14px; font-weight: 500; line-height: 1.2; }
.fphome__tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.fphome__tab:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
.fphome__demo-set { display: flex; flex-direction: column; gap: 10px; }
.fphome__demo-set[hidden] { display: none; }
.fphome__reader {
  display: flex; flex-direction: column; gap: 14px; padding: 20px 22px;
  background: var(--d-paper); border: 1px solid var(--d-line); border-radius: 20px; color: var(--d-ink);
}
.fphome__reader-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--d-muted); }
.fphome__reader-title { font-family: var(--d-font); font-size: 15px; color: var(--d-ink); }
.fphome__reader-title[dir="rtl"] { font-size: 17px; }
.fphome__level { padding: 2px 8px; border-radius: 6px; background: var(--d-tag); color: var(--d-ink); font-weight: 700; font-family: var(--font-sans); }
.fphome__sentence { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 8px; font-family: var(--d-font); font-size: 28px; line-height: 1.4; color: var(--d-ink); }
.fphome__sentence[dir="rtl"] { font-size: 30px; line-height: 2; }
.fphome__word { display: inline-flex; flex-direction: column; align-items: center; padding: 0 4px; border-bottom: 1.5px dotted var(--d-dotted); border-radius: 6px 6px 2px 2px; }
.fphome__word.is-selected { background: var(--d-selected); border-bottom: 2px solid var(--d-selected-line); }
.fphome__reading { font-family: var(--font-sans); font-size: 12px; line-height: 1.3; color: var(--d-muted); }
.fphome__translation { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--d-line); font-size: 14px; line-height: 1.5; color: var(--d-muted); }
.fphome__explained { font-size: 12px; font-weight: 600; }
.fphome__genius { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; background: var(--d-dark); border-radius: 20px; color: #FFFFFF; }
.fphome__genius-head { display: flex; align-items: center; gap: 10px; }
.fphome__avatar {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--d-accent); font-family: var(--d-font); font-size: 15px; line-height: 1;
}
.fphome__genius-name { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #D3D0DA; font-family: var(--font-sans); }
.fphome__parts { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.fphome__part {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px;
  background: var(--d-raised); border: 1px solid var(--d-raised-line); border-radius: 10px;
}
.fphome__part-text { font-family: var(--d-font); font-size: 22px; line-height: 1.3; }
.fphome__part-gloss { font-size: 12px; color: #D3D0DA; }
.fphome__equals { display: flex; align-items: center; padding: 0 2px; font-size: 18px; color: #D3D0DA; }
.fphome__meaning { display: flex; align-items: center; padding: 6px 12px; border-radius: 10px; background: var(--d-highlight); color: var(--d-ink); font-size: 15px; font-weight: 700; }
.fphome__note-text { margin: 0; font-size: 15px; line-height: 1.65; }
.fphome__taught { font-family: var(--d-font); font-size: 1.2em; }
.fphome__taught--bold { font-size: 1.05em; font-weight: 700; }

/* Sections */
.fphome__section { display: flex; flex-direction: column; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 0 48px 56px; }
.fphome__section--pillars { padding-top: 56px; border-top: 1px solid var(--line); max-width: none; }
.fphome__section--pillars > * { width: 100%; max-width: 1184px; margin-inline: auto; }
.fphome__section-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
/* A page of its own built from the home page's parts (/languages): its first section, its heading and a note. */
.fphome__section--first { padding-top: 56px; }
.fphome__section-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.fphome__muted { font-size: 14px; color: var(--text-muted); }
.fphome__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--green); }
.fphome__eyebrow--on-dark { color: #3FC2A8; }
.fphome__h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 42px; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; max-width: 720px; }
.fphome__h2--sm { font-size: 36px; line-height: 1.15; }
.fphome__h3 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 26px; line-height: 1.2; }
.fphome__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--link, var(--clay)); }

/* Pillars: read, learn, practice */
.fphome__pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fphome__pillar { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.fphome__pillar-key { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--link, var(--clay)); }
.fphome__pillar-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 10px; background: var(--clay-soft); color: var(--link, var(--clay));
}
.fphome__pillar-demo { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--text-body); }
.fphome__pillar-demo strong { color: var(--green); }
.fphome__pillar-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-body); }
.fphome__bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fphome__bar span { display: block; height: 100%; background: var(--green); }
.fphome__slide-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.fphome__slide-dots { display: flex; gap: 3px; }
.fphome__slide-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.fphome__slide-dots span.is-done { background: var(--link, var(--clay)); }
.fphome__slide-title { font-family: var(--font-serif); font-weight: 500; font-size: 19px; line-height: 1.2; color: var(--ink); }
.fphome__speaking { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green); }
.fphome__speaking .icon { width: 16px; height: 16px; }
.fphome__wave { display: flex; align-items: center; gap: 2px; height: 14px; }
.fphome__wave span { width: 3px; border-radius: 2px; background: var(--green); }
.fphome__caption { align-self: flex-start; padding: 8px 12px; border-radius: 12px; border-end-start-radius: 4px; background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.45; }
.fphome__plan-mini-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fphome__plan-mini-head strong { color: var(--ink); }
.fphome__plan-mini-head span { font-size: 13px; font-weight: 700; color: var(--link, var(--clay)); }
.fphome__plan-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fphome__plan-mini li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.fphome__plan-mini li > span:first-child {
  display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  border: 1.5px dashed var(--line-strong); font-size: 11px; font-weight: 700; color: var(--text-muted);
}
.fphome__plan-mini li.is-done { color: var(--text-muted); }
.fphome__plan-mini li.is-done > span:first-child { background: var(--green); border: 1.5px solid var(--green); color: var(--paper); }
.fphome__plan-mini li.is-done > span:last-child { text-decoration: line-through; }

/* Languages */
.fphome__langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fphome__lang { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.fphome__lang--soon { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--text-body); }
.fphome__lang-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fphome__lang-names { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.fphome__lang-native { font-family: var(--d-font, var(--font-serif)); font-size: 28px; line-height: 1.3; color: var(--ink); }
.fphome__lang-name { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.fphome__soon { padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.fphome__lang-offer { font-size: 14px; line-height: 1.5; color: var(--text-body); }
.fphome__lang-start {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--link, var(--clay)); text-decoration: none; white-space: nowrap;
}

/* Free and Pro */
.fphome__plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fphome__plan { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.fphome__plan--pro { border: 2px solid #4A3FD6; }
.fphome__plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fphome__plan-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.fphome__plan-tag { padding: 2px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; }
.fphome__price-line { display: flex; align-items: baseline; gap: 6px; }
.fphome__price { font-family: var(--font-serif); font-size: 34px; line-height: 1; }
.fphome__per { font-size: 14px; color: var(--text-muted); }
.fphome__ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fphome__ticks li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; }
.fphome__ticks li::before { content: "✓"; color: var(--green); font-weight: 700; }
.fphome__ticks--on-dark li { color: #D3D0DA; }
.fphome__ticks--on-dark li::before { color: #3FC2A8; }

/* Teachers: a dark band in both themes */
.fphome__teach {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; padding: 40px;
  background: var(--band, #17182B); border: 1px solid var(--band-line, #17182B); color: #FFFFFF; border-radius: 22px;
}
.fphome__teach-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fphome__wordmark { font-family: "Newsreader", Georgia, serif; font-weight: 500; }
.fphome__wordmark em { color: #3FC2A8; }
.fphome__teach-lead { margin: 0; padding: 14px 16px; background: #2C2E4A; border: 1px solid #4A4D6E; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.fphome__class { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; background: #24263F; border: 1px solid #383B58; border-radius: 16px; }
.fphome__class-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fphome__class-name { font-size: 15px; font-weight: 700; }
.fphome__class-code, .fphome__class-assignment { font-size: 12px; color: #B8BAD0; }
.fphome__class-assignment { font-size: 13px; }
.fphome__class-code bdi { color: #FFFFFF; letter-spacing: 1px; font-weight: 700; }
.fphome__class-title { font-family: var(--d-font, inherit); font-size: 16px; color: #FFFFFF; }
.fphome__class-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.fphome__class-student { font-weight: 600; }
.fphome__class-status { color: #D3D0DA; white-space: nowrap; }
.fphome__class-bar { height: 6px; border-radius: 6px; background: #383B58; overflow: hidden; }
.fphome__class-bar span { display: block; height: 100%; background: #A9A3FF; }
.fphome__class-bar span.is-done { background: #3FC2A8; }

/* Our commitments */
.fphome__trust { padding: 24px 48px; border-top: 1px solid var(--line); }
.fphome__trust ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.fphome__trust li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.4; color: var(--text-body); }
.fphome__trust .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--green); }

/* Narrower screens: the hero and grids stack, then the phone layout (design "Home v2", 375 px). */
@media (max-width: 1100px) {
  .fphome__langs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .fphome__hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .fphome__pillars, .fphome__teach { grid-template-columns: minmax(0, 1fr); }
  .fphome__langs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fphome__title { font-size: 46px; }
}
@media (max-width: 760px) {
  .fpsite-header { padding-block: 12px; padding-inline: 16px 12px; }
  .fpsite-header .brand-mark { --mark-size: 34px; }
  .fpsite-header .brand__name { font-size: 23px; }
  .fpsite-nav { display: none; }
  .fpsite-header__phone { display: flex; }
  .fpsite-footer { flex-direction: column; padding: 24px 16px 30px; }
  .fphome__hero { padding: 28px 16px 36px; gap: 28px; }
  .fphome__title { font-size: 36px; }
  .fphome__lead { font-size: 16px; }
  .fphome__ctas { flex-direction: column; }
  .fphome__tabs { width: 100%; }
  .fphome__reader, .fphome__genius { padding: 16px; }
  .fphome__sentence { font-size: 23px; }
  .fphome__sentence[dir="rtl"] { font-size: 25px; }
  .fphome__part-text { font-size: 19px; }
  .fphome__section { padding: 0 16px 36px; }
  .fphome__section--pillars, .fphome__section--first { padding-top: 36px; }
  .fphome__h2 { font-size: 30px; }
  .fphome__h2--sm { font-size: 28px; }
  .fphome__h3 { font-size: 23px; }
  .fphome__langs, .fphome__plans { grid-template-columns: minmax(0, 1fr); }
  .fphome__teach { padding: 24px 18px; }
  .fphome__trust { padding: 22px 16px; }
  .fphome__trust ul { justify-content: flex-start; }
}
/* The Arabic interface: its own sans for headings (InterfaceLocale's fonts), a little smaller and roomier. */
html[lang="ar"] .fphome__title { font-size: 46px; line-height: 1.4; letter-spacing: 0; }
html[lang="ar"] .fphome__h2, html[lang="ar"] .fphome__h3 { letter-spacing: 0; line-height: 1.3; }
@media (max-width: 760px) { html[lang="ar"] .fphome__title { font-size: 31px; } }

/* Dark (design "Home v2", dark frames): the home page and its header and footer follow the device's setting. The
   demo cards keep each language's own light reading surface; buttons keep FluentPlex's indigo, links and jade turn
   lighter (all at least 4.5:1); the teachers band becomes a raised card. Other FluentPlex pages stay light for now. */
@media (prefers-color-scheme: dark) {
  body:has(.fphome) {
    --paper: #17182B; --card: #24263F; --sand: #2C2E4A; --sand-hover: #34365A; --field: #24263F;
    --line: #383B58; --line-soft: #2C2E4A; --line-mid: #4A4D6E; --line-strong: #4A4D6E; --line-dashed: #6B6E8A;
    --ink: #FFFFFF; --text: #FFFFFF; --text-body: #D3D0DA; --text-muted: #B8BAD0; --text-faint: #8E90A8;
    --clay: #4A3FD6; --clay-hover: #5A50E0; --clay-soft: #2C2A5A; --link: #A9A3FF;
    --green: #3FC2A8; --green-deep: #3FC2A8; --green-soft: #173B39;
    --band: #24263F; --band-line: #383B58;
    background: var(--paper); color: var(--ink); color-scheme: dark;
  }
  body:has(.fphome) .fphome__btn--outline:hover { background: #FFFFFF; color: #17182B; }
  body:has(.fphome) .fpsite-nav__link:hover { color: #FFFFFF; }
  body:has(.fphome) .fphome__link, body:has(.fphome) .fphome__lang-start { color: var(--link); }
}
