/* Novo AI Academy V5.0 additions. Loaded after v3.css on every page. */

/* ---------- touch targets: primary controls at least 44 x 44 CSS px on phones and tablets ---------- */
@media (max-width: 1023px) {
  .btn, .btn--sm, .select, select, input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea,
  .faq summary, details > summary, [role=tab], .wa-opts a, .cookie .btn { min-height: 44px; }
  .site-footer nav a, .site-footer .contact-list a, .social-list a, .lr-nav a, .linklike,
  .site-footer .bottom a, .site-footer .bottom button, a.link-arrow, a.tl, .trustbar a, .path-list a,
  .crumbs a, .breadcrumb a, nav[aria-label="Breadcrumb"] a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-header .brand { min-height: 44px; display: inline-flex; align-items: center; }
  label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 44px; align-items: center; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  .site-footer nav li + li { margin-top: 0; }
  .contact-list li { min-height: 44px; }
}
:where(a, button, summary, select, input, textarea, [role=tab]):focus-visible { outline: 3px solid var(--focus, #1d4ed8); outline-offset: 2px; }

/* ---------- placeholders that must be replaced before publishing ---------- */
.ph-block { border: 1px dashed var(--highlight); border-radius: var(--r-md); padding: var(--s-4); background: color-mix(in oklab, var(--highlight) 7%, transparent); }

/* ---------- homepage V5 ---------- */
.v5-next { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 var(--s-5); padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in oklab, var(--primary) 45%, transparent); background: color-mix(in oklab, var(--primary) 12%, transparent); font-size: var(--fs-sm); }
.v5-next strong { color: var(--primary-fg); }
@media (max-width: 699px) { .hero .hero-visual, .hero .promise { display: none; } .hero .hero-trust { margin-top: var(--s-4); } }

.v5-programs { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.v5-prog { display: flex; flex-direction: column; gap: var(--s-3); }
.v5-prog h3 { font-size: var(--fs-lg); margin: 0; }
.v5-prog .for { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.v5-prog .v5-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; font-size: var(--fs-sm); }
.v5-prog .v5-facts dt { color: var(--text-faint); font-size: var(--fs-xs); }
.v5-prog .v5-facts dd { margin: 0; font-weight: 600; }
.v5-prog .price { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--border); display: grid; gap: 2px; }
.v5-prog .price .now { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.v5-prog .tools-line { font-size: var(--fs-xs); color: var(--text-faint); margin: 0; }
.v5-more { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); font-size: var(--fs-sm); }

.v5-why { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); padding: 0; list-style: none; }
.v5-why li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4); }
.v5-why h3 { font-size: var(--fs-md); margin: 0 0 4px; }
.v5-why p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }

.v5-two { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .v5-two { grid-template-columns: 1fr 1fr; align-items: start; } }
.v5-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.v5-steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--s-3); align-items: start; }
.v5-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); color: var(--accent); padding-top: 2px; }
.v5-steps strong { display: block; }
.v5-acc { display: grid; gap: var(--s-2); }
.v5-acc details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.v5-acc summary { cursor: pointer; padding: 12px 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.v5-acc summary::-webkit-details-marker { display: none; }
.v5-acc summary::after { content: '+'; font-family: var(--font-mono); color: var(--text-faint); }
.v5-acc details[open] summary::after { content: '–'; }
.v5-acc .acc-a { padding: 0 16px 14px; font-size: var(--fs-sm); color: var(--text-muted); }
.v5-acc .acc-a p { margin: 0 0 6px; }

.v5-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.v5-table th, .v5-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.v5-table th { font-size: var(--fs-xs); color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.v5-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
@media (max-width: 599px) {
  .v5-table.stack thead { display: none; }
  .v5-table.stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .v5-table.stack td { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; border: 0; padding: 4px 12px; }
  .v5-table.stack td::before { content: attr(data-label); color: var(--text-faint); font-size: var(--fs-xs); font-weight: 600; }
}
.v5-local { color: var(--primary-fg); font-weight: 600; }

.v5-founder { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 760px) { .v5-founder { grid-template-columns: 220px 1fr; } }
.v5-founder img { width: 100%; max-width: 220px; height: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r-lg); }
.v5-founder details { margin-top: var(--s-4); }

.v5-contact { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.v5-contact .card h3 { font-size: var(--fs-md); margin: 0 0 var(--s-3); }
.v5-contact .row { display: flex; gap: 10px; align-items: center; min-height: 44px; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.v5-contact .row:first-of-type { border-top: 0; }
.v5-contact .row span:last-child { min-width: 0; overflow-wrap: anywhere; }
.v5-contact .row span:first-child { color: var(--text-faint); min-width: 5.5rem; font-size: var(--fs-xs); }
.v5-contact .muted-note { font-size: var(--fs-xs); color: var(--text-faint); margin: var(--s-3) 0 0; }

.v5-compare td:nth-child(2), .v5-compare td:nth-child(3), .v5-compare th:nth-child(2), .v5-compare th:nth-child(3) { text-align: center; }

/* ---------- cookie banner V5 + preferences dialog ---------- */
.cookie.cookie--v5 .btn-row { flex-wrap: wrap !important; }
.cookie.cookie--v5 .btn-row > .btn { flex: 1 1 auto !important; }
.cookie.cookie--v5 .btn-row > .btn { min-height: 44px; }
.cookie .btn--choice { --_bg: var(--surface-2); --_fg: var(--text); font-weight: 650; }
.consent-dlg { width: min(560px, calc(100% - 24px)); border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 0; }
.consent-dlg::backdrop { background: rgb(0 0 0 / .55); }
.consent-dlg form { padding: var(--s-5); display: grid; gap: var(--s-4); }
.consent-dlg h2 { font-size: var(--fs-lg); margin: 0; }
.consent-dlg .cat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: start; padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.consent-dlg .cat p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); grid-column: 1; }
.consent-dlg .cat label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; grid-row: 1 / span 2; grid-column: 2; font-size: var(--fs-sm); }
.consent-dlg .cat strong { grid-column: 1; }
.consent-dlg .always { font-size: var(--fs-xs); color: var(--text-faint); grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.consent-dlg .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.consent-dlg .btn-row .btn { flex: 1 1 140px; min-height: 44px; }

/* ---------- preview-only tracking inspector ---------- */
.trk-insp { position: fixed; left: 12px; bottom: 12px; z-index: 80; max-width: min(460px, calc(100% - 24px)); background: #111827; color: #e5e7eb; border: 1px solid #374151; border-radius: 12px; font: 12px/1.45 var(--font-mono); box-shadow: 0 12px 30px -12px #000; }
.trk-insp summary { cursor: pointer; padding: 10px 14px; min-height: 40px; }
.trk-insp .trk-body { padding: 0 14px 12px; max-height: 50vh; overflow: auto; }
.trk-insp ol { margin: 6px 0 0; padding-left: 18px; }
.trk-insp li { margin-bottom: 6px; }
.trk-insp li span { color: #9ca3af; word-break: break-all; }
.trk-insp li em { display: block; color: #6ee7b7; font-style: normal; }
.cookie:not([hidden]) ~ .trk-insp { display: none; }

/* ---------- resources V5 ---------- */
.res-card { display: flex; flex-direction: column; gap: var(--s-3); }
.res-card .res-cover { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; object-position: top; border-radius: var(--r-md); border: 1px solid var(--border); background: #fff; max-height: 240px; }
.res-card .meta { font-size: var(--fs-xs); color: var(--text-faint); margin: 0; }
.res-card .pr { margin-top: auto; }

/* ---------- pricing note ---------- */
.price-approx-note { font-size: var(--fs-xs); color: var(--text-faint); }

/* V5.0 touch-target overrides: these beat the older, more specific component rules on phones and tablets */
@media (max-width: 1023px) {
  .site-footer a, .site-footer button, .cur select, select[data-currency], [role=tab], .toc a, .lr-link,
  .v5-next a, .v5-more a, .v5-contact .row a, .muted-note a, .dl-rows dd a, .final a.btn { min-height: 44px !important; }
  .site-footer a, .v5-next a, .v5-more a, .v5-contact .row a, .muted-note a, .dl-rows dd a, .toc a, .lr-link { display: inline-flex !important; align-items: center; }
  .check, .seg label, label.check { min-height: 44px; }
}

.consent-dlg .btn-row .btn, .final .btn-row .btn { white-space: normal; }
.ai-data-analyst-fix, .page-hero .btn-row .btn, .section .btn-row > .btn { max-width: 100%; white-space: normal; }
@media (max-width: 380px) { .mobile-cta .btn { padding-inline: 10px; font-size: .85rem; } }
.prose table, main table:not(.v5-table) { display: block; overflow-x: auto; max-width: 100%; }

@media (max-width: 479px) { a.btn, button.btn { max-width: 100%; white-space: normal; text-align: center; } }

@media (max-width: 1023px) { .spec h3 a, .card h3 > a { display: inline-flex !important; align-items: center; min-height: 44px; } }

.trk-insp { bottom: 16px; }
@media (max-width: 1023px) { .trk-insp { position: static; max-width: none; margin: 16px; } }
