/* Site layout. All colour decisions belong to the existing dop themes. */
html:root { --studio-gutter: clamp(16px, 3.6vw, 48px); }
html :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Site navigation keeps its scroll, menu, language and app-mode behaviour. */
html body header.ghd.ghd {
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
html .ghd .ghd-logo img { border-radius: 9px; }

html .ghd .ghd-nm { letter-spacing: -.035em; }
html .ghd :is(.nv-burger,.vth,.vlang__btn) {
  border-radius: 10px; box-shadow: none;
}

html .gsheet__lnk { border-radius: 10px; }

/* Guest entry: the image is the actual cover and opens the free lesson. */
.hero.studio-landing {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  grid-template-areas: "mast mast" "intro feature" "help proof";
  align-items: center; gap: clamp(24px,4vw,56px);
  max-width: 1256px; padding: 0 var(--studio-gutter) clamp(30px,5vw,70px);
  text-align: left;
}
.studio-mast {
  grid-area: mast; display: flex; align-items: center; gap: 10px;
  min-height: 68px; border-bottom: 1px solid var(--line);
  font-size: 18px; font-weight: 800; letter-spacing: -.045em;
}
.studio-mast img { width: 38px; height: 38px; border-radius: 10px; }

.studio-mast .hero-login {
  position: static; margin-left: auto; border-radius: 9px; box-shadow: none;
}
.studio-intro { grid-area: intro; }
.studio-intro h1 {
  font-size: clamp(48px,5.9vw,82px); letter-spacing: -.065em;
  line-height: 1.02; margin: 0; max-width: 12ch;
}
.studio-intro h1 span {
  display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.studio-intro .hero-sub { margin: 20px 0 0; max-width: 46ch; }
.studio-intro .hero-cta { justify-content: start; gap: 10px; margin-top: 23px; }
.studio-intro .btn, .studio-landing ~ main .btn { border-radius: 10px; box-shadow: none; }

.studio-feature {
  grid-area: feature; min-width: 0; display: block; text-decoration: none;
  border-radius: 20px; overflow: hidden;
}
.studio-feature > img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.studio-feature-caption {
  position: relative; display: grid; gap: 4px; padding: 16px 62px 20px 20px;
}
.studio-feature-caption > span { font-size: 14px; }
.studio-feature-caption strong { font-size: clamp(20px,2vw,29px); line-height: 1.12; letter-spacing: -.035em; }
.studio-feature-caption i {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  font: 24px/1 system-ui;
}
.studio-landing .hero-have, .studio-landing .hero-proof {
  margin: 0; border: 0; box-shadow: none; border-radius: 0;
  border-top: 1px solid var(--line); padding: 14px 0 0;
}
.studio-landing .hero-have { grid-area: help; max-width: 58ch; }
.studio-landing .hero-proof { grid-area: proof; }
.studio-landing ~ main .section-head { text-align: start; margin-inline: 0; }
.studio-landing ~ main .section-title { letter-spacing: -.045em; }
.studio-landing ~ main :is(.value-card,.plan,.perk,.only-card) { border-radius: 16px; box-shadow: none; }
#phrase-demo { scroll-margin-top: 18px; border-inline-start: 5px solid var(--accent); margin-bottom: 35px; }

/* Subscriber entry: recent activity, a featured catalog, then a directory. */
html body header.hv2-topbar {
  border: 0; box-shadow: none; position: static;
}
html .hv2-topbar__inner {
  max-width: 1224px; padding: clamp(21px,4vw,50px) var(--studio-gutter) 18px;
  box-sizing: border-box; justify-content: space-between;
}
html .hv2-topbar__hello { gap: 12px; min-width: 0; }
html .hv2-topbar__hello strong { font-size: 15px; font-weight: 600; }
html .hv2-topbar__hello .hv2-topbar__q {
  font-size: clamp(26px,3.5vw,48px); line-height: 1.07;
  font-weight: 800; letter-spacing: -.05em; margin: 4px 0 0;
}
html .hv2-topbar__avatar { border-radius: 13px; width: 44px; height: 44px; box-shadow: none; }
html .hv2-topbar__stat { border-radius: 10px; box-shadow: none; }
html #dop-hub.hv2 {
  max-width: 1224px; margin-inline: auto; padding: 0 var(--studio-gutter) 32px;
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start;
}
#dop-hub .hv2-sec {
  min-width: 0; min-height: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px;
}
#dop-hub .hv2-sec__inner { padding: clamp(18px,2.5vw,32px); gap: 16px; }
#dop-hub .hv2-sec__head { gap: 7px; }
#dop-hub .hv2-sec__eyebrow { display: none; }
#dop-hub .hv2-sec__title { font-size: clamp(24px,2.4vw,36px); letter-spacing: -.045em; }
#dop-hub .hv2-sec__lead { max-width: 48ch; font-size: 16px; line-height: 1.42; }
#dop-hub .hv2-sec__cta { padding-inline: 13px; border-radius: 9px; }
#dop-hub .hv2-sec__foot { border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
#dop-hub :is(.hv2-sec--catalog,.hv2-sec--mine) { grid-column: 1/-1; }

#dop-hub .hv2-sec--catalog .hv2-sec__inner {
  display: grid; align-items: center; grid-template-columns: minmax(0, .9fr) minmax(0,1.1fr);
  grid-template-areas: "head visual" "foot visual"; gap: 15px 20px;
}
#dop-hub .hv2-sec--catalog .hv2-sec__head { grid-area: head; }
#dop-hub .hv2-sec--catalog .hv2-sec__title { font-size: clamp(32px,4.1vw,59px); line-height: 1.03; }

#dop-hub .hv2-sec--catalog .hv2-sec__foot { grid-area: foot; }

#dop-hub .hv2-sec--catalog .hv2-sec__preview { grid-area: visual; min-height: 0; padding: 12px 0; }

#dop-hub .hv2-sec:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Catalog and shelves: use the cover once, with title and actions below it. */
html.cat-mode #app-mn .studio-catalog-head {
  margin: 0 0 18px; display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 24px;
}
.studio-catalog-head h1 { margin: 0; font-size: clamp(32px,4.3vw,57px); line-height: 1.05; letter-spacing: -.055em; }
.studio-catalog-head a { font-size: 14px; }
#studio-result-count { margin: 6px 0 0; font-size: 15px; }
#empty .studio-show-all {
  display: block; margin: 16px auto 0; padding: 11px 18px; border: 0; border-radius: 10px;
   font: inherit; font-weight: 650; cursor: pointer;
}
html.cat-mode #grid .card {
  border: 1px solid var(--line);
  border-radius: 14px; padding: 0; overflow: hidden; box-shadow: none;
}
html.cat-mode #grid .card-cover { margin: 0; border-radius: 0; }
html.cat-mode #grid .card-body { padding: 13px 15px 14px; }
html.cat-mode #grid .card-title { font-size: clamp(18px,1.35vw,22px); line-height: 1.22; letter-spacing: -.027em; }

html.cat-mode #app-hdr { box-shadow: none; border-bottom: 1px solid var(--line); }
html :is(#books-hero,#daily-hero,.slovar-hero,.kino-hero,.sec-hero,.crs-head,.uch-skin .uh) {
  text-align: start; box-shadow: none;
}
html :is(#books-hero,#daily-hero,.slovar-hero,.kino-hero,.sec-hero,.crs-head,.uch-skin .uh) .kh-dog {
  float: right; width: clamp(60px,11vw,138px); height: auto; max-height: 145px; object-fit: contain;
  margin: 0 0 8px 12px;
}
html :is(.bh-inner,.dh-inner,.kh-inner,.crs-head,.uch-skin .uh) { display: flow-root; text-align: start; }
html :is(.bh-title,.dh-title,.kh-title,.crs-title,.st-title h1,.si-h1,.sv-h1) {
  margin-inline: 0; max-width: 100%; font-size: clamp(30px,4.1vw,56px); line-height: 1.07;
  letter-spacing: -.052em; text-align: start;
}
html :is(.bh-sub,.dh-sub,.kh-sub,.crs-sub) { text-align: start; max-width: 56ch; margin-inline: 0; }
html :is(.bh-meta,.dh-meta) { justify-content: flex-start; }
html :is(#books-hero,#daily-hero) :is(.bh-inner,.dh-inner) {
  display: flow-root; padding: clamp(18px,3vw,34px); text-align: start;
  border-radius: 18px; border: 1px solid var(--line);
}
html[data-theme] :is(#books-hero,#daily-hero) :is(.bh-title,.dh-title) {
  font-size: clamp(30px,4.1vw,56px); letter-spacing: -.052em;
}
html :is(#books-hero,#daily-hero) :is(.bh-sub,.dh-sub) { margin-block: 10px 14px; }
html :is(#books-hero,#daily-hero) :is(.bh-meta,.dh-meta) { justify-content: start; }
html .sec-hero .kh-inner { display: flow-root; text-align: start; }
html .kch .sec-hero .kh-dog { min-height: 0; }
html :is(.book-card,.daily-card,.kino-folder,.crs-lang,.dk-card,.fav-card,.mm-card,.put-card,.kch-tile,.st-level,.gh-tile) {
  border-radius: 13px; box-shadow: none;
}

html :is(.books-sec-title,.kino-h2,.crs-lang__title,.put-h2,.dk-h,.rv-h,.profile-name) { letter-spacing: -.04em; }
html .crs-lesson-link { border-radius: 9px; }
html .crs-lesson-head { text-align: start; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
html :is(.crs-lesson-title,.gt-h1,.deck-title,.kino-film-name,.df-top h1) { letter-spacing: -.045em; line-height: 1.12; }
html :is(.crs-lead,.crs-dlg,.crs-hw,.df-notice,.kino-film-item,.kino-tile,.kx-empty) {
  border-radius: 12px; box-shadow: none;
}
html .kino-film-hero { border-radius: 16px; }
html .kino-film-hero-txt { min-width: 0; }
html .kino-tile-title { letter-spacing: -.025em; }
html .ce .gh-fold > .gh-cat { border-radius: 10px; }
html :is(.sv-main,.si-main) { max-width: 78ch; }
html :is(.sv-section,.si-words) { border-top: 1px solid var(--line); padding-block-start: 16px; }
html .sc-topbar { border-bottom: 1px solid var(--line); }

/* The reading surface stays quiet. Word states, IPA, SRS colours and subtitles
  keep their own rules, including the learner's custom reader settings. */
html :is(.wb-title,.hero-title,.title-card h1,.wrap > .h1) { letter-spacing: -.04em; line-height: 1.12; }
html :is(.feature,.title-card,.wb-il-head,.fcard-face,.m-deck__card,.kino-demo,.st-hero) { border-radius: 16px; }
html .feature .feature-title { letter-spacing: -.035em; }
html .wrap .title-card { box-shadow: none; border-inline-start: 4px solid var(--accent); }

html .rpanel { border-radius: 10px; }
html :is(.dk-head,.mm-head,.rv-wrap > .rv-h) { margin-bottom: 14px; }

/* Account, subscription, forms, support, legal and status screens. */
html .page-body > .card {
  border: 1px solid var(--line); border-radius: 18px; box-shadow: none;
}

html .page-body :is(.profile-card,.sub-card,.faq details,.lgx-paid,.legacy-banner) { border-radius: 12px; box-shadow: none; }
html .page-body :is(.lgx-h,.card-wide > h1,.card > h1) { letter-spacing: -.04em; line-height: 1.14; }
html .page-body :is(.field,.lgx-o,.btn,.tp-card) { border-radius: 10px; }
html .page-body .btn--grad { box-shadow: none; }
html .page-body .card:has(.lgx-form) { text-align: start; border-top: 5px solid var(--accent-strong); }
html .page-body .lgx-h, html .page-body .lgx-sub { text-align: start; }
html .page-body .lgx-paid a { white-space: normal; }
html .page-body :is(.legal-intro,.requisites,.cookies-table,.practice .step) { border-radius: 12px; }

@media (max-width: 760px) {
  .hero.studio-landing { grid-template-columns: minmax(0,1fr); grid-template-areas: "mast" "intro" "feature" "help" "proof"; gap: 20px; }
  .studio-mast { min-height: 58px; }
  .studio-intro h1 { font-size: clamp(43px,11vw,66px); max-width: 13ch; }
  .studio-intro .hero-sub { font-size: 16px; margin-top: 12px; line-height: 1.48; }
  .studio-intro .hero-cta { margin-top: 16px; }
  .studio-intro .hero-cta .btn { width: auto; min-height: 44px; padding: 10px 14px; font-size: 14px; }
  .studio-feature-caption { padding-block: 12px 15px; }
  html #dop-hub.hv2 { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #dop-hub .hv2-sec--catalog .hv2-sec__inner { grid-template-columns: minmax(0,1fr); grid-template-areas: "head" "visual" "foot"; }
  html .hv2-topbar__inner { gap: 12px; }
  html .hv2-topbar__stats { gap: 8px; }
  html .hv2-topbar__stat { min-width: 0; display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 12px; }
  html .hv2-topbar__stat b { font-size: 17px; }
  html .page-body.pb-wide > .card-wide { padding-inline: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-feature, #dop-hub .hv2-sec * { scroll-behavior: auto; }
}

/* New controls use the same roles as the original landing and catalog. */
.studio-mast b { color: var(--accent); }
.studio-feature {
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line);
}
.studio-feature-caption > span, #studio-result-count { color: var(--muted); }
.studio-feature-caption i { background: var(--accent-soft); color: var(--accent); }
#empty .studio-show-all { background: var(--accent-strong); color: var(--on-accent); }
