/* LYNQ Academy v2.30.0 — critical mobile operability fixes; no visual redesign. */
:root{--mobile-safe-bottom:env(safe-area-inset-bottom,0px);--mobile-safe-top:env(safe-area-inset-top,0px)}
html{max-width:100%;text-size-adjust:100%;-webkit-text-size-adjust:100%;scroll-padding-top:92px}
body{max-width:100%;overflow-x:clip}
img,video,canvas,svg,iframe{max-width:100%}
img,video{height:auto}
pre,code,.code-block{max-width:100%;overflow-wrap:normal}
pre{overflow-x:auto;-webkit-overflow-scrolling:touch}
[data-scroll-table],.table-scroll,.responsive-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:430px){
  *,*:before,*:after{min-width:0}
  body{min-width:320px}
  main,section,article,aside,form,fieldset,.marketing-container,.container,.app-main,.app-content{min-width:0;max-width:100%}
  input,select,textarea{max-width:100%;font-size:16px!important}
  textarea{min-height:120px;resize:vertical}
  button,.button,[role="button"],summary,input[type="submit"],input[type="button"],input[type="reset"],select{min-height:44px}
  button,.button{touch-action:manipulation}
  .icon-button,.menu-button,.close-button,[data-close],[aria-label][type="button"]{min-width:44px;min-height:44px}
  .button{display:inline-flex;align-items:center;justify-content:center;text-align:center;white-space:normal}
  table{font-size:13px}
  /* Checkout: single column, readable price, non-overlapping CTA. */
  .checkout-layout,.checkout-grid,.checkout-shell,.checkout-profession-grid,.checkout-product-layout,.billing-checkout-layout{grid-template-columns:1fr!important;gap:16px!important}
  .checkout-main,.checkout-summary,.checkout-profession-main,.checkout-profession-summary,.checkout-card,.checkout-panel{width:100%!important;max-width:100%!important;padding:18px!important;border-radius:20px!important}
  .checkout-summary,.checkout-profession-summary{position:static!important;top:auto!important;bottom:auto!important;order:2}
  .checkout-price,.checkout-price-row,.checkout-total,.checkout-installment-card>div:first-child{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;align-items:start!important}
  .checkout-price strong,.checkout-total strong{font-size:clamp(28px,9vw,38px)!important;line-height:1.05!important;overflow-wrap:anywhere}
  .checkout-actions,.checkout-buttons,.payment-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .checkout-actions .button,.checkout-buttons .button,.payment-actions .button{width:100%!important;min-height:50px!important}
  .checkout-consent,.consent-line{align-items:start!important;gap:10px!important}
  .checkout-consent input,.consent-line input{width:20px!important;height:20px!important;min-width:20px!important;margin-top:2px!important}
  /* Free lesson: progressive content remains usable at 360/390. */
  .free-lesson-layout,.free-lesson-grid,.free-lesson-stage-grid,.free-lesson-result-grid,.free-lesson-shell{grid-template-columns:1fr!important;gap:16px!important}
  .free-lesson-page main,.free-lesson-main{padding-inline:12px!important}
  .free-lesson-card,.free-lesson-stage,.free-lesson-panel,.free-lesson-result{padding:18px!important;border-radius:20px!important}
  .free-lesson-progress,.free-lesson-stepper,.free-lesson-steps{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scroll-snap-type:x proximity}
  .free-lesson-progress>* ,.free-lesson-stepper>* ,.free-lesson-steps>*{scroll-snap-align:start;flex:0 0 auto}
  .free-lesson-actions,.free-lesson-buttons,.free-lesson-choice-grid,.free-lesson-options{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .free-lesson-actions .button,.free-lesson-buttons button,.free-lesson-option,.free-lesson-choice{width:100%!important;min-height:48px!important}
  .free-lesson-page video,.free-lesson-video video{width:100%!important;max-height:62vw!important;object-fit:cover;border-radius:16px}
  .free-lesson-page h1{font-size:clamp(34px,10vw,48px)!important;overflow-wrap:anywhere}
  /* Career orientation. */
  .career-orientation-grid,.career-test-grid,.career-question-layout,.career-result-grid{grid-template-columns:1fr!important;gap:16px!important}
  .career-question,.career-card,.career-orientation-card,.career-result-card{padding:18px!important;border-radius:20px!important}
  .career-options,.career-answer-grid,.career-choice-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .career-option,.career-answer,.career-choice{width:100%!important;min-height:48px!important;padding:13px 14px!important;text-align:left}
  .career-progress{max-width:100%;overflow:hidden}
  /* Learner dashboard: one CTA, metrics do not crush. */
  .learner-dashboard-grid,.dashboard-grid,.dashboard-layout,.dashboard-progress-grid,.dashboard-skills-grid,.plan-layout{grid-template-columns:1fr!important;gap:14px!important}
  .dashboard-card,.learner-dashboard-card,.dashboard-next-step,.dashboard-progress,.dashboard-skills{padding:18px!important;border-radius:20px!important}
  .dashboard-primary-action,.dashboard-next-step .button{width:100%!important;min-height:50px!important}
  .dashboard-metrics,.journey-progress-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboard-tabs,.plan-tabs{max-width:100%;overflow-x:auto;display:flex!important;scrollbar-width:none}
  .dashboard-tabs a,.plan-tabs a{flex:0 0 auto;min-height:44px;display:flex;align-items:center}
  /* Lesson view and code/media. */
  .lesson-layout,.lesson-page-grid,.lesson-content-grid,.lesson-workspace{grid-template-columns:1fr!important}
  .lesson-sidebar,.course-sidebar{position:static!important;width:100%!important;max-height:none!important}
  .lesson-toolbar,.lesson-actions,.lesson-footer-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .lesson-toolbar button,.lesson-actions .button,.lesson-footer-actions .button{width:100%!important;min-height:48px!important}
  .lesson-content,.lesson-card,.lesson-section{padding-inline:16px!important}
  .lesson-content table{display:block;max-width:100%;overflow-x:auto}
  /* Practice/submission: upload and action rows stack; no fixed overlap. */
  .practice-layout,.practice-grid,.practice-submit-grid,.submission-grid,.practice-workspace{grid-template-columns:1fr!important;gap:14px!important}
  .practice-card,.practice-form,.practice-submit-card,.submission-card{padding:18px!important;border-radius:20px!important}
  .practice-actions,.submission-actions,.practice-upload-row,.artifact-upload-row{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;position:static!important}
  .practice-actions .button,.submission-actions .button,.practice-upload-row label,.artifact-upload-row label{width:100%!important;min-height:48px!important}
  .practice-rubric,.rubric-grid{max-width:100%;overflow-x:auto}
  /* Public verification. */
  .verify-layout,.verify-grid,.credential-grid,.verification-grid,.verify-evidence-grid{grid-template-columns:1fr!important;gap:14px!important}
  .verify-card,.verification-card,.credential-card,.verify-hero{padding:18px!important;border-radius:20px!important}
  .verify-qr,.verification-qr{width:min(220px,70vw)!important;height:auto!important;margin-inline:auto!important}
  .verify-url,.verification-url,.artifact-url{overflow-wrap:anywhere;word-break:break-word}
  .verify-actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .verify-actions .button{width:100%!important}
  /* Prevent fixed controls from covering iOS browser/home indicator. */
  .sticky-actions,.mobile-sticky-actions,.bottom-actions,.composer-sticky{padding-bottom:calc(12px + var(--mobile-safe-bottom))!important}
}
@media(max-width:370px){
  .dashboard-metrics,.journey-progress-grid{grid-template-columns:1fr!important}
  .checkout-main,.checkout-summary,.free-lesson-card,.practice-card,.verify-card{padding:15px!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
/* Below-the-fold rendering optimisation without changing design. */
@supports(content-visibility:auto){.marketing-page main>section:nth-of-type(n+3){content-visibility:auto;contain-intrinsic-size:1px 720px}}

/* LYNQ Academy v2.34.0 — layout and design consistency patch.
   The patch keeps the existing visual system and only improves hierarchy,
   responsiveness, readability, touch targets and state consistency. */

:root{
  --lynq-touch:44px;
  --lynq-control:48px;
  --lynq-card-radius:24px;
  --lynq-card-radius-mobile:20px;
  --lynq-shadow-soft:0 1px 0 rgba(255,255,255,.78),0 16px 48px rgba(24,31,22,.055);
  --lynq-shadow-hover:0 1px 0 rgba(255,255,255,.86),0 24px 72px rgba(24,31,22,.095);
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:96px}
body{overflow-x:clip;text-rendering:optimizeLegibility}
img,svg,video,canvas{max-width:100%}
img,video{height:auto}
button,input,select,textarea{font:inherit}
h1,h2,h3,.display-title{text-wrap:balance}
p,li,.card-description{text-wrap:pretty}
:where(a,button,input,select,textarea,summary,[role="button"],[tabindex]):focus-visible{
  outline:3px solid color-mix(in srgb,var(--green,#1d6b4b) 72%,#fff);
  outline-offset:3px;
}
:where(.button,button,[role="button"],summary,.icon-button,.admin-action,.tab-button){min-height:var(--lynq-touch)}
:where(.button.primary,.button.secondary,.button.ghost,.marketing-button,.public-button){display:inline-flex;align-items:center;justify-content:center;gap:10px}
:where(.button,.marketing-button,.public-button){border-radius:14px}
:where(.eyebrow,.kicker,.meta-label,.card-meta,.profession-public-card>small,.homepage-school-card small,.review-source,.status-label){font-size:max(11px,inherit);line-height:1.4}

/* Stable public containers and section rhythm. */
.marketing-container,.public-container,.profession-page-main{min-width:0}
.marketing-section,.public-section,.profession-page-section{padding-block:clamp(58px,7vw,96px)}
.marketing-section-header,.public-section-header,.home-schools-head,.career-discovery-professions-head{gap:20px}
.marketing-section-header>*,.public-section-header>*,.home-schools-head>*,.career-discovery-professions-head>*{min-width:0}

/* Cards: consistent elevation, padding and internal hierarchy. */
:where(.profession-public-card,.homepage-school-card,.pricing-plan-card,.pricing-card,.review-card,.academic-book-card,.business-program-public-card,.public-card,.marketing-card,.dashboard-card,.journey-card,.admin-card){
  min-width:0;
  border-radius:var(--lynq-card-radius);
  border-color:var(--line,#dde3dc);
  box-shadow:var(--lynq-shadow-soft);
}
:where(.profession-public-card,.homepage-school-card,.pricing-plan-card,.review-card,.academic-book-card,.business-program-public-card):hover{
  box-shadow:var(--lynq-shadow-hover);
}
.profession-public-card h3 a::after,.profession-public-card h3>a::after,.business-program-public-card h3 a::after{content:none!important;position:static!important;inset:auto!important}
.profession-public-card{overflow:hidden;min-height:0!important;padding:clamp(20px,2.4vw,28px)!important}
.profession-public-card>header{align-items:flex-start}
.profession-public-card h3{font-size:clamp(22px,2vw,30px)!important;line-height:1.16!important;overflow-wrap:anywhere}
.profession-public-card>p{font-size:clamp(14px,1.1vw,16px)!important;line-height:1.65!important;-webkit-line-clamp:4!important}
.profession-card-skills{gap:8px!important}
.profession-card-skills span{display:inline-flex;align-items:center;min-height:32px;padding:7px 11px!important;font-size:11px!important;line-height:1.35;border-radius:10px!important}
.profession-card-price{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:16px!important;align-items:end!important;margin-top:20px!important;padding-top:18px!important}
.profession-card-price strong{font-size:clamp(22px,2.1vw,32px)!important;line-height:1.08!important;overflow-wrap:anywhere}
.profession-card-price small,.profession-card-price span{font-size:12px!important;line-height:1.45!important}
.profession-public-card>footer{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin-top:22px!important;padding-top:18px!important}
.profession-public-card>footer a,.career-free-lesson-link{position:relative!important;z-index:2;min-height:48px!important;width:100%;justify-content:space-between!important;padding:0 16px!important;border-radius:13px!important;font-size:13px!important}

.homepage-school-card{overflow:hidden;padding:clamp(22px,2.5vw,30px)!important}
.homepage-school-card h3{font-size:clamp(26px,2.7vw,40px)!important;line-height:1.12!important;overflow-wrap:anywhere}
.homepage-school-card p{font-size:clamp(14px,1.25vw,17px)!important;line-height:1.65!important;-webkit-line-clamp:5!important}
.homepage-school-arrow{position:relative;z-index:2;min-height:48px!important;padding:0 16px!important;border-radius:13px!important;background:var(--green,#1e6648)!important;color:#fff!important;box-shadow:0 10px 26px rgba(26,91,63,.16)}
.homepage-school-arrow .icon{color:currentColor}

/* Pricing hierarchy and UZ/RU copy safety. */
:where(.pricing-plan-card,.pricing-card,.price-card){overflow:hidden;padding:clamp(24px,3vw,36px)!important}
:where(.pricing-plan-card,.pricing-card,.price-card) h2{font-size:clamp(38px,5vw,64px)!important;line-height:1.02!important}
:where(.pricing-plan-card,.pricing-card,.price-card) .price-display,
:where(.pricing-plan-card,.pricing-card,.price-card) .plan-price{overflow-wrap:anywhere}
:where(.pricing-plan-card,.pricing-card,.price-card) .price-meta{display:flex!important;flex-wrap:wrap;gap:6px 10px!important;line-height:1.5}
:where(.pricing-plan-card,.pricing-card,.price-card) .button{width:100%;min-height:52px}

/* Forms: iOS-safe font sizes, consistent errors and clear actions. */
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-height:48px;border-radius:13px}
:where(textarea){min-height:132px;resize:vertical}
:where(.form-grid,.field-grid,.checkout-form-grid,.admin-form-grid){min-width:0}
:where(.form-actions,.checkout-actions,.practice-actions,.admin-actions){display:flex;flex-wrap:wrap;gap:10px}
:where(.form-error,.field-error,.alert.error,.notice.error){border-radius:14px;line-height:1.55}
:where(.form-success,.alert.success,.notice.success){border-radius:14px;line-height:1.55}

/* Tables remain usable without expanding the document. */
:where(.table-wrap,.admin-table-wrap,.public-table-wrap,.rubric-table-wrap,.data-table-wrap){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:16px}
:where(table){max-width:100%}
:where(th,td){vertical-align:top}

/* Learner dashboard and plans: one action remains visually dominant. */
:where(.learner-dashboard,.journey-dashboard,.dashboard-layout,.learner-plan-layout){min-width:0}
:where(.journey-primary-card,.dashboard-primary-card,.continue-card){border-radius:28px;box-shadow:0 22px 72px rgba(20,31,22,.08)}
:where(.journey-primary-card,.dashboard-primary-card,.continue-card) .button{min-height:52px}
:where(.journey-progress-grid,.dashboard-metrics,.plan-stats,.skill-summary-grid){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
:where(.journey-progress-grid,.dashboard-metrics,.plan-stats,.skill-summary-grid)>*{min-width:0}
:where(.journey-skill-grid,.dashboard-skill-grid,.learner-plan-grid){gap:14px}

/* Lesson, practice and evidence screens. */
:where(.lesson-layout,.lesson-shell,.practice-layout,.practice-shell,.verify-layout,.skill-twin-layout){min-width:0}
:where(.lesson-content,.practice-content,.verify-content,.skill-twin-content){min-width:0}
:where(.lesson-content pre,.practice-content pre,.mentor-code,.code-block){max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
:where(.lesson-content table,.practice-content table,.verify-content table){display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
:where(.evidence-card,.rubric-card,.verification-card,.skill-card){min-width:0;overflow:hidden;border-radius:20px}
:where(.evidence-card a,.verification-card a,.artifact-link){overflow-wrap:anywhere;word-break:break-word}

/* Admin and operations pages. */
:where(.admin-shell,.admin-main,.admin-content,.operations-shell,.update-center-shell){min-width:0}
:where(.admin-grid,.operations-grid,.settings-grid){gap:14px}
:where(.admin-card,.operations-card,.update-card){padding:clamp(18px,2vw,26px)}
:where(.admin-toolbar,.operations-toolbar,.update-toolbar){display:flex;flex-wrap:wrap;gap:10px;align-items:center}
:where(.admin-toolbar .button,.operations-toolbar .button,.update-toolbar .button){min-height:44px}
:where(.status-pill,.badge,.chip){line-height:1.3}

/* Header, navigation and compact footer. */
.marketing-header,.public-header{backdrop-filter:saturate(140%) blur(16px);-webkit-backdrop-filter:saturate(140%) blur(16px)}
.marketing-mobile-nav a,.marketing-mobile-nav button{min-height:48px}
.marketing-footer summary{min-height:48px;display:flex;align-items:center;justify-content:space-between}
.marketing-footer a{line-height:1.5}

/* Empty/loading/error states feel intentional. */
:where(.empty-state,.loading-state,.error-state,.profession-empty,.homepage-review-empty){padding:clamp(26px,4vw,48px);border-radius:22px}
:where(.empty-state,.loading-state,.error-state) h2,:where(.empty-state,.loading-state,.error-state) h3{margin-top:0}

@media (max-width:900px){
  :where(.journey-progress-grid,.dashboard-metrics,.plan-stats,.skill-summary-grid){grid-template-columns:repeat(2,minmax(0,1fr))}
  :where(.admin-grid,.operations-grid,.settings-grid){grid-template-columns:1fr!important}
}

@media (max-width:720px){
  :root{--lynq-card-radius:var(--lynq-card-radius-mobile)}
  html{scroll-padding-top:82px}
  body{padding-bottom:env(safe-area-inset-bottom)}
  .marketing-container,.public-container,.profession-page-main{width:min(100% - 24px,1180px)!important}
  .marketing-section,.public-section,.profession-page-section{padding-block:52px!important}
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px!important}
  :where(.button,.marketing-button,.public-button){min-height:48px}
  :where(.form-actions,.checkout-actions,.practice-actions,.admin-actions){display:grid!important;grid-template-columns:1fr!important}
  :where(.form-actions,.checkout-actions,.practice-actions,.admin-actions)>.button,
  :where(.form-actions,.checkout-actions,.practice-actions,.admin-actions)>button{width:100%}
  .profession-public-card{padding:20px!important}
  .profession-public-card>header{display:flex!important;flex-wrap:wrap!important;gap:12px!important}
  .profession-card-badges{width:100%;justify-content:flex-start!important}
  .profession-public-card h3{font-size:24px!important}
  .profession-card-price{grid-template-columns:1fr!important;gap:9px!important}
  .profession-card-price>span{justify-self:start!important;text-align:left!important}
  .homepage-school-card{padding:22px!important}
  .homepage-school-card h3{font-size:30px!important}
  .homepage-school-arrow{width:100%!important;justify-content:space-between!important}
  :where(.pricing-plan-card,.pricing-card,.price-card){padding:24px 20px!important}
  :where(.pricing-plan-card,.pricing-card,.price-card) h2{font-size:42px!important}
  :where(.journey-progress-grid,.dashboard-metrics,.plan-stats,.skill-summary-grid){grid-template-columns:repeat(2,minmax(0,1fr))}
  :where(.learner-dashboard-nav,.journey-tabs,.dashboard-tabs,.profession-filter-row){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  :where(.learner-dashboard-nav,.journey-tabs,.dashboard-tabs,.profession-filter-row)::-webkit-scrollbar{display:none}
  :where(.learner-dashboard-nav,.journey-tabs,.dashboard-tabs,.profession-filter-row)>*{flex:0 0 auto}
  :where(.lesson-layout,.lesson-shell,.practice-layout,.practice-shell,.verify-layout,.skill-twin-layout,.checkout-layout,.checkout-grid){grid-template-columns:1fr!important}
  :where(.lesson-sidebar,.practice-sidebar,.checkout-summary){position:static!important;inset:auto!important;max-height:none!important}
  :where(.admin-toolbar,.operations-toolbar,.update-toolbar){align-items:stretch}
  :where(.admin-toolbar .button,.operations-toolbar .button,.update-toolbar .button){width:100%}
  .marketing-footer{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
}

@media (max-width:380px){
  .marketing-container,.public-container,.profession-page-main{width:calc(100% - 20px)!important}
  :where(.journey-progress-grid,.dashboard-metrics,.plan-stats,.skill-summary-grid){grid-template-columns:1fr}
  .profession-public-card h3{font-size:22px!important}
  .homepage-school-card h3{font-size:27px!important}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

