@import './new-year.css';

edition-wordmark {
  --edition-type: 23px;
  display: inline-flex;
  align-items: center;
  gap: .09em;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  vertical-align: middle;
  white-space: nowrap;
  isolation: isolate;
  color: #006d59;
  font: italic 700 var(--edition-type)/1 Georgia, "Times New Roman", serif;
}
edition-wordmark[data-size="home"] { --edition-type: clamp(34px, 3.8vw, 48px); }
edition-wordmark[data-size="footer"] { --edition-type: 27px; }
edition-wordmark[data-size="small"] { --edition-type: 24px; }
edition-wordmark .edition-switch, edition-wordmark .edition-home {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .10em;
  min-height: 40px;
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
}
edition-wordmark .edition-home:hover { text-decoration: none; }
edition-wordmark .edition-city-word { display: block; color: #006c58; font-size: 1.06em; letter-spacing: -.06em; line-height: 1.02; }
.edition-caret {
  width: max(.45em, 14px);
  height: max(.45em, 14px);
  display: grid;
  place-items: center;
  color: #006c58;
  background: #e7f1ea;
  border-radius: 50%;
}
.edition-caret svg { width: 66%; height: 66%; }
.edition-switch:hover .edition-caret, .edition-switch[aria-expanded="true"] .edition-caret { color: white; background: #006c58; }
.edition-switch:focus-visible, .edition-home:focus-visible, .edition-picker button:focus-visible {
  outline: 2px solid #14765f;
  outline-offset: 3px;
  border-radius: 3px;
}
/* Both pieces use the original lettering. The small cut-outs separate the overlapping descenders. */
edition-wordmark .edition-near-word, edition-wordmark[data-city="leninogorsk"] .edition-city-word {
  display: block;
  font-size: 1em;
  height: 1.024em;
  background-image: url('/assets/brand-masthead.png');
  background-repeat: no-repeat;
  background-size: 7.096em 3.548em;
  mix-blend-mode: multiply;
  overflow: hidden;
  color: transparent;
  user-select: none;
}
edition-wordmark .edition-near-word {
  width: 3.8em;
  background-position: -1.112em -1.68em;
  clip-path: polygon(0 0, 88% 0, 88% 20%, 100% 20%, 100% 100%, 0 100%);
}
edition-wordmark[data-city="leninogorsk"] .edition-city-word {
  width: 5.656em;
  background-position: -.864em -.836em;
  clip-path: polygon(0 0, 100% 0, 100% 79%, 77% 79%, 77% 100%, 69% 100%, 69% 79%, 0 79%);
}
.site-footer edition-wordmark span { display: inline-flex; }
.site-footer edition-wordmark .edition-caret { display: grid; }
.site-footer edition-wordmark + span { display: block; margin-top: 4px; }
edition-wordmark[data-footer-identity] {
  flex-wrap: wrap;
  gap: 7px 13px;
}
edition-wordmark[data-footer-identity] .edition-home {
  display: grid;
  gap: 4px;
  align-content: center;
}
edition-wordmark[data-footer-identity] .edition-footer-title {
  color: #0b1c2e;
  letter-spacing: -.045em;
}
edition-wordmark[data-footer-identity] .edition-footer-title > span { color: #006c58; }
edition-wordmark[data-footer-identity] .edition-footer-domain {
  color: #4a6058;
  font: normal 12px/1.35 Arial, sans-serif;
}
edition-wordmark[data-footer-identity] .edition-switch {
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #d6e5db;
  border-radius: 6px;
  color: #175c4c;
  font: 600 12px/1.25 Arial, sans-serif;
}
.edition-lab-header { margin: 0 auto; padding: 12px 0; width: min(1080px, calc(100% - 32px)); }
@media (min-width: 900px) {
  /* The weather keeps its approved offset above the tools beside the shorter masthead. */
  .home .home-brand-row { min-height: 78px; }
  .home .home-tools { top: 15px; }
  .home header[data-weather-above] .home-brand-row { min-height: 0; }
  .home header[data-weather-above] .home-tools { top: 0; }
}
@media (min-width: 761px) {
  .home header[data-tools-below] .home-brand-row { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
  .home header[data-tools-below] .home-tools { align-self: flex-end; top: 0; }
}

dialog.edition-picker {
  box-sizing: border-box;
  width: min(660px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #d1dbd3;
  border-radius: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  color: #142821;
  background: #fffefa;
  box-shadow: 0 24px 100px #0b20234d;
  text-align: left;
  font: normal 16px/1.45 Arial, sans-serif;
  letter-spacing: normal;
}
.edition-picker *, .edition-picker *::before { box-sizing: border-box; }
dialog.edition-picker::backdrop { background: rgba(16,31,33,.43); backdrop-filter: blur(2px); }
body:has(dialog.edition-picker[open]) { overflow: hidden; }
.edition-picker-head {
  position: relative;
  padding: 29px 31px 24px;
  background-color: #eff1e8;
  background-image: linear-gradient(90deg, #f5f4ea 0%, #f5f4eafc 35%, #f5f4eae6 50%, #f5f4ea42 72%, #f5f4ea05 100%), url('/assets/home-lake.webp');
  background-size: cover;
  background-position: center, right 47%;
  border-bottom: 1px solid #dddcd0;
}
.edition-picker .edition-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #215e4c;
  font: 700 11px/1.3 Arial, sans-serif;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.edition-picker h2 {
  margin: 9px 0 5px;
  color: #142e26;
  font: bold clamp(32px, 4.5vw, 44px)/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -.047em;
}
.edition-picker-head p { margin: 0; color: #3f5249; font: 14px/1.55 Arial, sans-serif; }
.edition-picker .edition-dismiss {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 1px solid #fff9;
  background: #fffef8ef;
  color: #244339;
  border-radius: 50%;
  cursor: pointer;
}
.edition-picker .edition-dismiss:hover { background: white; box-shadow: 0 0 0 1px #699887; }
.edition-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 24px 27px 20px; }
.edition-picker .edition-option {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 50px;
  padding: 9px 10px;
  margin: 0;
  border: 1px solid #d7ddd5;
  border-radius: 7px;
  background: #fff;
  color: #1e302a;
  font: 600 14px/1.3 Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}
.edition-picker .edition-option:hover { background: #f0f5ec; border-color: #8eaf9c; }
.edition-picker .edition-option[aria-pressed="true"] { color: #005d49; background: #e8f3e9; border-color: #6a9d80; }
.edition-indicator {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #c2ccc3;
  border-radius: 50%;
}
.edition-indicator svg { visibility: hidden; }
.edition-option[aria-pressed="true"] .edition-indicator { color: white; background: #006a51; border-color: #006a51; }
.edition-option[aria-pressed="true"] .edition-indicator svg { visibility: visible; }
.edition-picker .edition-picker-foot {
  margin: 0;
  padding: 0 28px 22px;
  color: #526259;
  font: 13px/1.5 Arial, sans-serif;
}
@media (max-width: 760px) {
  .site .masthead, .site-header .masthead { flex-wrap: wrap; align-items: center; }
  .masthead time { margin-left: auto; }
  .masthead-account { margin-left: auto; }
  edition-wordmark[data-size="home"] { --edition-type: clamp(22px, 6.45vw, 38px); }
  edition-wordmark[data-size="home"][data-city="naberezhnye-chelny"] { --edition-type: clamp(16.5px, 5.15vw, 34px); }
  edition-wordmark[data-size="small"], edition-wordmark[data-size="footer"] { --edition-type: 21px; }
  .modal-top { flex-wrap: wrap; }
  .modal-top > button { margin-left: auto; }
}
@media (max-width: 570px) {
  .edition-options { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 17px 17px 13px; gap: 7px; }
  .edition-picker-head { padding: 24px 19px 19px; background-position: center, 55% 52%; }
  .edition-picker .edition-picker-foot { padding: 0 18px 17px; }
}
@media (max-width: 390px) {
  edition-wordmark[data-size="small"][data-city="naberezhnye-chelny"], edition-wordmark[data-size="footer"][data-city="naberezhnye-chelny"] { --edition-type: 18px; }
  .edition-picker .edition-option { font-size: 13px; padding: 8px; gap: 6px; }
}
@media (forced-colors: active), print {
  edition-wordmark .edition-near-word, edition-wordmark[data-city="leninogorsk"] .edition-city-word {
    width: auto; height: auto; background: none; clip-path: none; color: inherit; overflow: visible;
  }
}
@media print { .edition-picker, .edition-caret { display: none !important; } }
lr-scroll-compass {
  --compass-size: 56px;
  position: fixed; right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20; display: block; width: var(--compass-size); height: var(--compass-size);
}
lr-scroll-compass[hidden], body:has(dialog[open]) > lr-scroll-compass { display: none; }
.lr-compass-button {
  display: block; width: var(--compass-size); height: var(--compass-size);
  border: 0; border-radius: 50%; padding: 0; cursor: pointer;
  background: transparent url('/assets/scroll-compass.webp') center / contain no-repeat;
  filter: drop-shadow(0 2px 3px #132c3659);
}
.lr-compass-button:focus-visible { outline: 3px solid #f6c652; outline-offset: 3px; }
dialog lr-scroll-compass { position: sticky; margin-left: auto; width: 0; height: 0; bottom: 12px; right: auto; }
dialog .lr-compass-button { position: absolute; right: 0; bottom: 0; }
@media (max-width: 600px) {
  lr-scroll-compass { --compass-size: 52px; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media print { lr-scroll-compass { display: none !important; } }
