/* 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}
}
