/* ============================================================================
   Smartentre Design System v2 — shared public pages (P.3).
   Loaded after site.css by About, Contact, FAQ, the Academy public pages and
   the legacy capability pages. One system, different compositions: these are
   the page-level layouts those pages share; tokens, header, footer, buttons,
   forms, the contact block, product UI and the CTA band come from site.css.
   Version with ?v= like site.css (1-week cache).
   ========================================================================= */

.pg { display: block; }

/* ── 1. Hero: copy, optionally beside a visual ─────────────────────────── */
.pg-hero { display: grid; gap: var(--space-7) var(--grid-gap); padding-block: var(--space-7) var(--section-m); }
.pg-hero > * { min-width: 0; }
.pg-hero h1 { margin-top: var(--space-3); max-width: 18ch; font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem); line-height: 1.04; letter-spacing: -0.035em; }
.pg-hero__sub { margin-top: var(--space-5); font-size: var(--text-body-lg); color: var(--site-text-secondary); max-width: 46ch; }
.pg-hero .actions { margin-top: var(--space-6); }
.pg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); margin-top: var(--space-5); }
.pg-price__from { font-size: var(--text-body-sm); color: var(--site-text-muted); }
.pg-price__value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--site-text); }
.pg-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-5); list-style: none; padding: 0; font-size: var(--text-body-sm); color: var(--site-text-secondary); }
.pg-meta li { display: inline-flex; align-items: center; gap: var(--space-2); }
.pg-meta li::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--site-text); }
@media (min-width: 1024px) {
  .pg-hero--split { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; padding-block: var(--space-8) var(--section-m); }
  .pg-hero--split > :first-child { grid-column: 1 / span 6; }
  .pg-hero--split > :last-child { grid-column: 8 / span 5; }
}

/* ── 2. Sections and ruled rows ────────────────────────────────────────── */
.pg-section { padding-block: var(--section-m); }
.pg-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.pg-head p { font-size: var(--text-body-lg); color: var(--site-text-secondary); max-width: 52ch; }

/* Rows: heading left, content right — a spec sheet, not a stack of cards. */
.rows { border-top: 1px solid var(--site-line); }
.rows > * { display: grid; gap: var(--space-3) var(--grid-gap); padding-block: var(--space-6); border-bottom: 1px solid var(--site-border-strong); }
.rows__head { font-size: var(--text-h3); }
.rows__body { min-width: 0; }
.rows__body > p { font-size: var(--text-body-lg); line-height: 1.65; color: var(--site-text-secondary); max-width: 60ch; }
.rows__body > p + p { margin-top: var(--space-3); }
.rows__body strong { color: var(--site-text); font-weight: 600; }
.rows__body .btn--text { margin-top: var(--space-2); }
@media (min-width: 900px) {
  .rows > * { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-block: var(--space-7); }
  .rows__head { grid-column: 1 / span 4; }
  .rows__body { grid-column: 5 / span 8; }
}

/* Plain bullet list (square ink markers) */
.dot-list { list-style: none; padding: 0; }
.dot-list li { position: relative; padding: var(--space-3) 0 var(--space-3) var(--space-6); border-bottom: 1px solid var(--site-border); color: var(--site-text); }
.dot-list li:first-child { border-top: 1px solid var(--site-border); }
.dot-list li::before { content: ""; position: absolute; left: 2px; top: calc(var(--space-3) + 0.6em); width: 7px; height: 7px; border-radius: 1.5px; background: var(--site-text); }
.rows__body .check-list li:last-child { border-bottom: 1px solid var(--site-border-strong); }

/* Numbered list: only for real sequences. */
.num-list { list-style: none; padding: 0; counter-reset: n; border-top: 1px solid var(--site-line); }
.num-list li { counter-increment: n; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-4); border-bottom: 1px solid var(--site-border); color: var(--site-text); }
.num-list li::before { content: counter(n, decimal-leading-zero); padding-top: 0.2em; font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); }

/* A quiet route back to the current offer (legacy pages). */
.route-back { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5); margin-block: var(--space-7); padding: var(--space-4) var(--space-5); border: 1px solid var(--site-border-strong); border-radius: var(--radius-md); background: var(--site-surface); }
.route-back p { font-weight: 600; color: var(--site-text); }

/* ── 3. About ──────────────────────────────────────────────────────────── */
.focus-list .rows__head { display: grid; gap: var(--space-1); }
.focus-list .rows__head span { font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: 600; letter-spacing: 0; color: var(--site-text-muted); }
.facts-table { margin: 0; }
.facts-table > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-1) var(--space-5); padding-block: var(--space-3); border-bottom: 1px solid var(--site-border); font-size: 0.9375rem; }
.facts-table > div:first-child { border-top: 1px solid var(--site-border-strong); }
.facts-table dt { color: var(--site-text-muted); }
.facts-table dd { margin: 0; font-weight: 500; color: var(--site-text); overflow-wrap: anywhere; }
@media (max-width: 479.98px) { .facts-table > div { grid-template-columns: minmax(0, 1fr); } }

/* ── 4. Contact ────────────────────────────────────────────────────────── */
.contact-email { margin-top: var(--space-4); font-size: var(--text-body); color: var(--site-text-secondary); }
.home-contact__list { margin-top: var(--space-6); }
.home-contact__list .check-list li { font-size: var(--text-body-sm); }
.home-contact__list > p { font-size: var(--text-body-sm); font-weight: 600; color: var(--site-text); }
.home-contact__list .check-list { margin-top: var(--space-2); }
.pg--contact + .site-footer { border-top: 1px solid var(--site-border-strong); }

/* ── 5. FAQ: ruled accordion ───────────────────────────────────────────── */
.faq-list { max-width: 56rem; padding-block: var(--space-5) var(--section-m); }
.faq-item { border-bottom: 1px solid var(--site-border-strong); }
.faq-item:first-child { border-top: 1px solid var(--site-line); }
.faq-item__q { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem); line-height: 1.35; letter-spacing: -0.01em; }
.faq-item__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.faq-item__toggle:hover > span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.faq-item__toggle:focus-visible { outline-offset: 4px; }
.faq-item__icon { position: relative; flex-shrink: 0; width: 20px; height: 20px; margin-top: 0.15em; color: var(--site-text-muted); }
.faq-item__icon::before, .faq-item__icon::after { content: ""; position: absolute; top: 9px; left: 3px; right: 3px; height: 2px; border-radius: 1px; background: currentColor; transition: transform var(--dur) var(--ease); }
.faq-item__icon::after { transform: rotate(90deg); }
.faq-item__toggle[aria-expanded="true"] .faq-item__icon { color: var(--site-text); }
.faq-item__toggle[aria-expanded="true"] .faq-item__icon::after { transform: rotate(0deg); }
.faq-item__a { padding-bottom: var(--space-6); max-width: var(--prose-max); font-size: 1.0625rem; line-height: 1.7; color: var(--site-text-secondary); }
.faq-item__a .btn--text { margin-top: var(--space-2); }

/* ── 6. Academy course page ────────────────────────────────────────────── */
/* Curriculum: native <details>, so it works and is keyboard-accessible without JS. */
.curriculum { border-top: 1px solid var(--site-line); }
.module { border-bottom: 1px solid var(--site-border-strong); }
.module > summary {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-5);
  cursor: pointer;
  list-style: none;
}
.module > summary::-webkit-details-marker { display: none; }
.module > summary:focus-visible { outline-offset: 2px; }
.module__num { grid-row: 1 / span 2; padding-top: 0.35em; font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); }
.module__title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--site-text); }
.module__count { display: inline-flex; align-items: center; gap: var(--space-3); padding-top: 0.2em; font-size: var(--text-label); color: var(--site-text-muted); white-space: nowrap; }
.module__desc { grid-column: 2 / -1; font-size: 0.9375rem; color: var(--site-text-secondary); max-width: 60ch; }
.module__icon { position: relative; width: 16px; height: 16px; color: var(--site-text-muted); }
.module__icon::before, .module__icon::after { content: ""; position: absolute; top: 7px; left: 2px; right: 2px; height: 2px; border-radius: 1px; background: currentColor; transition: transform var(--dur) var(--ease); }
.module__icon::after { transform: rotate(90deg); }
.module[open] .module__icon::after { transform: rotate(0deg); }
.module__lessons { list-style: none; padding: 0 0 var(--space-5) calc(2.5rem + var(--space-3)); }
.module__lessons li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); padding-block: var(--space-2); border-top: 1px solid var(--site-border); font-size: 0.9375rem; color: var(--site-text); }
.module__lessons li span:first-child { font-family: var(--font-mono); font-size: var(--text-mono); color: var(--site-text-muted); padding-top: 0.15em; }
@media (max-width: 639.98px) {
  .module > summary { grid-template-columns: 2rem minmax(0, 1fr); }
  .module__count { grid-column: 2; padding-top: 0; }
  .module__lessons { padding-left: 0; }
}

/* Learn → Try → Build → Continue */
.loop { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); list-style: none; padding: 0; }
.loop li { display: inline-flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--site-text); }
.loop li + li::before { content: "→"; font-family: var(--font-body); font-weight: 400; color: var(--site-text-muted); }

/* ── 7. Academy: one track's courses ───────────────────────────────────── */
/* Ruled columns like the tracks above; status first, one action per course.
   From 1024px the three columns are equal (gap, divider drawn in it) and every
   row lines up across them (subgrid). */
.courses { display: grid; list-style: none; padding: 0; border-top: 1px solid var(--site-line); }
.course-item { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-block: var(--space-6) var(--space-7); }
.course-item + .course-item { border-top: 1px solid var(--site-border-strong); }
.course-item__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.course-item__title { margin-top: var(--space-4); font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.course-item__text { margin-top: var(--space-2); color: var(--site-text-secondary); max-width: 44ch; }
.course-item .pg-meta { margin-top: var(--space-4); }
.course-item__offer { margin-top: var(--space-4); font-size: var(--text-body-sm); line-height: 1.55; color: var(--site-text-secondary); }
.course-item__offer strong { color: var(--site-text); font-weight: 600; }
.course-item__action { margin-top: auto; padding-top: var(--space-6); }
/* Long LV/RU button labels wrap inside a narrow column instead of overflowing it. */
.course-item .btn:not(.btn--text) { white-space: normal; text-align: center; padding-block: var(--space-2); }
@media (min-width: 1024px) {
  .courses { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); column-gap: calc(var(--space-6) * 2); }
  .course-item { position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; justify-items: start; align-content: start; }
  .course-item + .course-item { border-top: 0; }
  .course-item + .course-item::before { content: ""; position: absolute; inset-block: 0; left: calc(var(--space-6) * -1); border-left: 1px solid var(--site-border-strong); }
  .course-item__action { align-self: end; }
}
/* A label above a section title stays a label (.pg-head p would make it body text). */
.pg-head .label { font-size: var(--text-label); color: var(--site-text-muted); max-width: none; }
/* Text links in a CTA band wrap like text, the arrow staying after the last word. */
.cta-band__copy .btn--text { display: inline-block; white-space: normal; text-align: left; line-height: 1.5; padding-block: 10px; }
.cta-band__copy .btn--text .btn__arrow { display: inline-block; margin-left: var(--space-2); }

/* Long LV/RU button labels wrap on small phones instead of widening the page. */
@media (max-width: 480px) {
  .pg .btn:not(.btn--text) { white-space: normal; text-align: center; padding-block: var(--space-2); }
}
