/* Prompt Olympiad — responsive overrides for Tilda export */

html {
  scroll-behavior: smooth;
}

html,
body {
  position: relative;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Prompt logo: keep aspect, don't crop/stretch like old PROD marks */
img[src*="prompt-logo"],
img[data-original*="prompt-logo"],
img[src*="prompt-logo-mark"],
img[data-original*="prompt-logo-mark"] {
  object-fit: contain !important;
  object-position: center center !important;
  height: auto !important;
  max-height: 100%;
}

/* Zero-blocks: avoid horizontal bleed on small screens */
.t396__artboard,
.t396__carrier,
.t396__filter,
.t-records,
.r {
  max-width: 100vw;
}

.t396 .tn-elem img.tn-atom__img {
  max-width: 100%;
}

@media screen and (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .tn-atom__button-content,
  .tn-atom__button-text {
    white-space: normal;
  }

  .t396__artboard {
    overflow: hidden !important;
  }

  img[src*="prompt-logo"],
  img[data-original*="prompt-logo"] {
    object-position: left center !important;
    width: auto !important;
    max-width: min(280px, 86vw) !important;
  }

  #rec1459378911 .tn-elem[data-elem-type="image"] {
    max-width: 100vw;
  }

  .t431,
  .t431__table,
  .t-table,
  .t-container {
    max-width: 100%;
  }

  .t431,
  .t431__table,
  .t-table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .t-popup__container,
  .t868__code-wrap,
  .t868__code-wrap > div {
    width: 100% !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 480px) {
  img[src*="prompt-logo"],
  img[data-original*="prompt-logo"] {
    max-width: min(220px, 82vw) !important;
  }
}

@media screen and (min-width: 641px) and (max-width: 959px) {
  img[src*="prompt-logo"],
  img[data-original*="prompt-logo"] {
    max-width: 420px !important;
  }

  .t396__artboard {
    overflow: hidden;
  }
}

@media screen and (min-width: 960px) and (max-width: 1199px) {
  img[src*="prompt-logo"],
  img[data-original*="prompt-logo"] {
    max-width: 560px !important;
  }
}

@media screen and (min-width: 1200px) {
  #rec1459378911 img[src*="prompt-logo"] {
    max-width: 1120px !important;
  }
}

.t868__code-wrap > div {
  max-width: 100%;
}

.t-body,
.tn-atom,
.t-title,
.t-descr,
.t-text {
  font-family: "Inter", Arial, sans-serif;
}


/* Hide emptied PROD vector shells */
img[src*="vector-empty-a"],
img[src*="vector-empty-b"],
img[data-original*="vector-empty-a"],
img[data-original*="vector-empty-b"] {
  display: none !important;
}

@media screen and (max-width: 640px) {
  .tn-atom,
  .tn-atom p,
  .t-descr,
  .t-text,
  .t396__elem[data-elem-type="text"] .tn-atom {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  #rec1459378911 .t396__elem[data-elem-type="text"] {
    max-width: calc(100vw - 30px) !important;
  }
}

img[src*="prod-logo-wide"], img[data-original*="prod-logo-wide"] { display:none !important; }


/* Force single hero brand on small screens if Zero JS mis-scales clones */
@media screen and (max-width: 959px) {
  #rec1459378911 .tn-elem[data-elem-type="image"] img[src*="prompt-logo"] {
    max-width: min(520px, 90vw) !important;
  }
}

@media screen and (max-width: 640px) {
  #rec1459378911 .tn-elem[data-elem-type="text"] .tn-atom {
    white-space: normal !important;
    max-width: 90vw !important;
  }
}


/* ===== Hero logo visibility by breakpoint (Prompt Olympiad) ===== */
#rec1459378911 .tn-elem[data-elem-id="1758078347757"],
#rec1459378911 .tn-elem[data-elem-id="1758079168558"],
#rec1459378911 .tn-elem[data-elem-id="175807949242170270"],
#rec1459378911 .tn-elem[data-elem-id="1758075254833"],
#rec1459378911 .tn-elem[data-elem-id="1758079770052"],
#rec1459378911 .tn-elem[data-elem-id="175819462585672280"] {
  display: none !important;
}

/* Desktop / large: main wide logo */
@media screen and (min-width: 960px) {
  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] {
    display: none !important;
  }
  #rec1459378911 .tn-elem[data-elem-id="175807838665451780"] {
    display: block !important;
  }
}

/* Mobile + tablet: compact logo */
@media screen and (max-width: 959px) {
  #rec1459378911 .t396__artboard,
  #rec1459378911 .t396__carrier,
  #rec1459378911 .t396__filter {
    overflow: hidden !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="175807838665451780"] {
    display: none !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] {
    display: block !important;
    left: 15px !important;
    top: 72px !important;
    width: 290px !important;
    height: 64px !important;
    transform: none !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] .tn-atom,
  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] img {
    width: 290px !important;
    max-width: 290px !important;
    height: 64px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758075330683"] {
    left: 15px !important;
    width: 290px !important;
    max-width: 290px !important;
    transform: none !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758075330683"] .tn-atom {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
}

@media screen and (min-width: 641px) and (max-width: 959px) {
  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] {
    left: 40px !important;
    width: 520px !important;
    height: 114px !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] .tn-atom,
  #rec1459378911 .tn-elem[data-elem-id="1758080521523"] img {
    width: 520px !important;
    max-width: 520px !important;
    height: 114px !important;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758075330683"] {
    left: 40px !important;
    width: 400px !important;
  }
}

/* Clean mobile brand (bypasses Tilda zero-scale clipping) */
.po-mobile-brand {
  display: none;
}

@media screen and (max-width: 640px) {
  .po-mobile-brand {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    box-sizing: border-box;
    padding: 0 20px;
    pointer-events: none;
  }

  .po-mobile-brand img {
    display: block !important;
    width: 82vw !important;
    max-width: 300px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .po-mobile-brand p {
    margin: 0;
    max-width: 86vw;
    color: #fff;
    font-family: "Inter", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
  }

  #rec1459378911 .tn-elem[data-elem-id="1758080521523"],
  #rec1459378911 .tn-elem[data-elem-id="175807838665451780"],
  #rec1459378911 .tn-elem[data-elem-id="1758075330683"] {
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Card borders (shared) */
#rec1328760381 .tn-elem[data-elem-id="175808702716516560"] .tn-atom,
#rec1328760381 .tn-elem[data-elem-id="1758086536120"] .tn-atom,
#rec1328760381 .tn-elem[data-elem-id="1758086536125"] .tn-atom,
#rec1332743101 .tn-elem[data-elem-id="175844321938311060"] .tn-atom,
#rec1332743101 .tn-elem[data-elem-id="175844321939944470"] .tn-atom,
#rec1332743101 .tn-elem[data-elem-id="175844321940838400"] .tn-atom,
#rec1329001881 .tn-elem[data-elem-id="175829146624267570"] .tn-atom,
#rec1329001881 .tn-elem[data-elem-id="175829146618713090"] .tn-atom,
#rec1329001881 .tn-elem[data-elem-id="175829146622163050"] .tn-atom,
#rec1329001881 .tn-elem[data-elem-id="1758085721262"] .tn-atom,
#rec1329001881 .tn-elem[data-elem-id="1758085721265"] .tn-atom,
#rec1331090701 .tn-elem[data-elem-id="175837018269684830"] .tn-atom,
#rec1331090701 .tn-elem[data-elem-id="175837018268974810"] .tn-atom,
#rec1331090701 .tn-elem[data-elem-id="175837018262649320"] .tn-atom {
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-sizing: border-box;
}

/* Code windows: green outline + macOS traffic-light dots */
#rec1328760361 .tn-elem[data-elem-id="1758083326344"],
#rec1330652951 .tn-elem[data-elem-id="1758083326344"],
#rec1328760361 .tn-elem[data-elem-id="1758083326346"],
#rec1330652951 .tn-elem[data-elem-id="1758083326346"] {
  --t396-borderwidth: 1.5px;
  --t396-borderstyle: solid;
  --t396-bordercolor: #84cca8;
}

#rec1328760361 .tn-elem[data-elem-id="1758083326344"] .tn-atom,
#rec1330652951 .tn-elem[data-elem-id="1758083326344"] .tn-atom {
  border: 1.5px solid #84cca8 !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  background-color: #000 !important;
}

#rec1328760361 .tn-elem[data-elem-id="1758083326346"] .tn-atom,
#rec1330652951 .tn-elem[data-elem-id="1758083326346"] .tn-atom {
  border: 1.5px solid #84cca8 !important;
  border-bottom: none !important;
  box-sizing: border-box !important;
  border-radius: 10px 10px 0 0 !important;
}

/* dots L→R: red, yellow, green (macOS) */
#rec1328760361 .tn-elem[data-elem-id="175808345386366380"] .tn-atom,
#rec1330652951 .tn-elem[data-elem-id="175808345386366380"] .tn-atom {
  background-color: #ff5f57 !important;
  border-radius: 50% !important;
}
#rec1328760361 .tn-elem[data-elem-id="1758083326349"] .tn-atom,
#rec1330652951 .tn-elem[data-elem-id="1758083326349"] .tn-atom {
  background-color: #febc2e !important;
  border-radius: 50% !important;
}
#rec1328760361 .tn-elem[data-elem-id="1758083326350"] .tn-atom,
#rec1330652951 .tn-elem[data-elem-id="1758083326350"] .tn-atom {
  background-color: #28c840 !important;
  border-radius: 50% !important;
}
#rec1331090701 .tn-elem[data-elem-id="175837018269684830"] .tn-atom,
#rec1331090701 .tn-elem[data-elem-id="175837018268974810"] .tn-atom,
#rec1331090701 .tn-elem[data-elem-id="175837018262649320"] .tn-atom,
#rec1332743101 .tn-elem[data-elem-id="175844321940838400"] .tn-atom {
  border-color: rgba(0,0,0,0.18) !important;
}
#rec1331008921 .t668__wrapper,
#rec1332779811 .t668__wrapper {
  border: 1px solid rgba(255,255,255,0.35) !important;
  border-radius: 12px !important;
  box-sizing: border-box;
}

/* Real footer block: clip off-canvas leftovers */
#rec1332771731 .t396__artboard,
#rec1332771731 .t396__carrier,
#rec1332771731 .t396__filter {
  overflow: hidden !important;
}

#rec1332771731 .tn-elem[data-elem-id="175820470540125880"],
#rec1332771731 .tn-elem[data-elem-id="175820470540714090"],
#rec1332771731 .tn-elem[data-elem-id="175820470541128220"],
#rec1332771731 .tn-elem[data-elem-id="175820470540416730"],
#rec1332771731 .tn-elem[data-elem-id="175820470540916110"],
#rec1332771731 .tn-elem[data-elem-id="175820472971144150"],
#rec1332771731 .tn-elem[data-elem-id="175820474622959270"] {
  display: none !important;
}

/*
  Empty Tilda #t-footer shell (rec1592274751) gets upscaled to ~100vh
  and creates blank scroll space after the real footer.
*/
#t-footer,
#rec1592274751,
#rec1592255211 {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#allrecords {
  overflow-x: clip;
}

body {
  overflow-x: hidden;
}

/* Организаторы: ITMO logo + Подробнее, no white cards */
#rec1331052721 .tn-elem[data-elem-id="175836962447116330"],
#rec1331052721 .tn-elem[data-elem-id="175836962449611780"],
#rec1331052721 .tn-elem[data-elem-id="175836964948422060"],
#rec1331052721 .tn-elem[data-elem-id="175836964946792640"],
#rec1331052721 .tn-elem[data-elem-id="175836964948185140"],
#rec1331052721 .tn-elem[data-elem-id="1758369747387"],
#rec1333028181 {
  display: none !important;
}

#rec1331052721 .tn-elem[data-elem-id="175836964947267110"] {
  display: block !important;
  width: 340px !important;
  height: 109px !important;
  top: 270px !important;
  left: 430px !important;
  transform: none !important;
}
#rec1331052721 .tn-elem[data-elem-id="175836964947267110"] .tn-atom,
#rec1331052721 .tn-elem[data-elem-id="175836964947267110"] img {
  width: 340px !important;
  height: 109px !important;
  max-width: 340px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Same box as logo → text centered under it */
#rec1331052721 .tn-elem[data-elem-id="175836981232475750"] {
  display: block !important;
  top: 395px !important;
  left: 430px !important;
  width: 340px !important;
  transform: none !important;
}
#rec1331052721 .tn-elem[data-elem-id="175836981232475750"] .tn-atom,
#rec1331052721 .tn-elem[data-elem-id="175836981232475750"] .tn-atom a {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  color: #fff !important;
  text-decoration: underline !important;
}

@media screen and (min-width: 960px) and (max-width: 1199px) {
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] {
    width: 300px !important;
    height: 96px !important;
    top: 245px !important;
    left: 330px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] .tn-atom,
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] img {
    width: 300px !important;
    height: 96px !important;
    max-width: 300px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836981232475750"] {
    top: 355px !important;
    left: 330px !important;
    width: 300px !important;
  }
}

@media screen and (min-width: 640px) and (max-width: 959px) {
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] {
    width: 260px !important;
    height: 83px !important;
    top: 235px !important;
    left: 190px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] .tn-atom,
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] img {
    width: 260px !important;
    height: 83px !important;
    max-width: 260px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836981232475750"] {
    top: 330px !important;
    left: 190px !important;
    width: 260px !important;
  }
  #rec1331052721 .t396__artboard,
  #rec1331052721 .t396__filter,
  #rec1331052721 .t396__carrier {
    height: 400px !important;
  }
}

@media screen and (max-width: 639px) {
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] {
    width: 230px !important;
    height: 74px !important;
    top: 220px !important;
    left: 45px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] .tn-atom,
  #rec1331052721 .tn-elem[data-elem-id="175836964947267110"] img {
    width: 230px !important;
    height: 74px !important;
    max-width: 230px !important;
  }
  #rec1331052721 .tn-elem[data-elem-id="175836981232475750"] {
    top: 305px !important;
    left: 45px !important;
    width: 230px !important;
  }
  #rec1331052721 .t396__artboard,
  #rec1331052721 .t396__filter,
  #rec1331052721 .t396__carrier {
    height: 380px !important;
  }
}

/*
  Nav is a Tilda flex-molecule. Absolute left overrides make it crooked.
  Spread items evenly with space-between; width hugs label text.
*/
@media screen and (min-width: 1200px) {
  #rec1459407731 .tn-group[data-group-id="176061938747854000"],
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] {
    left: calc(50% - 600px + 20px) !important;
    width: 1070px !important;
    height: 34px !important;
    overflow: visible !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] #molecule-176061938747854000,
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] #molecule-175828881464344740 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    column-gap: 0 !important;
    width: 100% !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] .tn-elem[data-elem-type="button"],
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] .tn-elem[data-elem-type="button"] {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] .tn-elem[data-elem-type="button"] .tn-atom,
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] .tn-elem[data-elem-type="button"] .tn-atom {
    width: auto !important;
    white-space: nowrap !important;
  }
}

@media screen and (min-width: 960px) and (max-width: 1199px) {
  #rec1459407731 .tn-group[data-group-id="176061938747854000"],
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] {
    left: calc(50% - 480px + 16px) !important;
    width: 840px !important;
    height: 34px !important;
    overflow: visible !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] #molecule-176061938747854000,
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] #molecule-175828881464344740 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    column-gap: 0 !important;
    width: 100% !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] .tn-elem[data-elem-type="button"],
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] .tn-elem[data-elem-type="button"] {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
  }

  #rec1459407731 .tn-group[data-group-id="176061938747854000"] .tn-elem[data-elem-type="button"] .tn-atom,
  #rec1459378911 .tn-group[data-group-id="175828881464344740"] .tn-elem[data-elem-type="button"] .tn-atom {
    width: auto !important;
    white-space: nowrap !important;
  }
}

#rec1332810631 .tn-elem[data-elem-id="175821102498531500"] {
  width: 90px !important;
}

/* Комьюнити: two-line title was overlapping the subtitle */
#rec1332743101 .tn-elem[data-elem-id="175844351719195500"] {
  height: auto !important;
  min-height: 96px !important;
}
#rec1332743101 .tn-elem[data-elem-id="175844351719195500"] .tn-atom {
  line-height: 1.1 !important;
  white-space: normal !important;
}
#rec1332743101 .tn-elem[data-elem-id="175844351719663450"] {
  top: 155px !important;
}

@media screen and (min-width: 960px) and (max-width: 1199px) {
  #rec1332743101 .tn-elem[data-elem-id="175844351719195500"] {
    min-height: 80px !important;
  }
  #rec1332743101 .tn-elem[data-elem-id="175844351719663450"] {
    top: 130px !important;
  }
}

@media screen and (min-width: 640px) and (max-width: 959px) {
  #rec1332743101 .tn-elem[data-elem-id="175844351719195500"] {
    min-height: 80px !important;
  }
  #rec1332743101 .tn-elem[data-elem-id="175844351719663450"] {
    top: 130px !important;
  }
}

@media screen and (max-width: 639px) {
  #rec1332743101 .tn-elem[data-elem-id="175844351719195500"] {
    min-height: 72px !important;
  }
  #rec1332743101 .tn-elem[data-elem-id="175844351719663450"] {
    top: 115px !important;
  }
}
