/* Login and /tariffs. Shared base, header, buttons, tariff cards and footer live in public.css. */
body.tariff-checkout-open { overflow: hidden; }

/* Login */
.access-shell {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  min-height: max(740px, calc(100vh - 86px));
  min-height: max(740px, calc(100dvh - 86px));
}
.access-art {
  position: relative;
  overflow: hidden;
  padding: 58px var(--pad-x);
  border-right: 1px solid var(--line);
}
.access-art h1 {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: clamp(56px, 6.2vw, 96px);
  font-weight: 600;
  line-height: 1.04;
}
.access-art__note {
  position: absolute;
  z-index: 1;
  bottom: 52px;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}
.access-thread {
  position: absolute;
  top: calc(58% - 377px);
  left: 68%;
  width: 975px;
  aspect-ratio: 3 / 2;
  transform: translateX(-68%);
  pointer-events: none;
}
.access-thread > img { display: block; width: 100%; height: 100%; user-select: none; }

.access-card {
  align-self: center;
  width: min(100%, 560px);
  padding: 56px 66px 48px;
}
.access-card h2 { margin-top: 20px; font-size: clamp(48px, 5vw, 68px); line-height: .93; }
.access-lead {
  max-width: 300px;
  margin: 17px 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.access-plan-note, .tariffs-bonus {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-left: 3px solid var(--red);
  background: #e8dfd3;
  font-size: 14px;
  line-height: 1.45;
}
.access-form { display: grid; gap: 10px; }
.access-form > label, .tariffs-checkout__form > label:first-child {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.access-form input, .tariffs-checkout__form > input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}
.access-form input:focus, .tariffs-checkout__form > input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px #d94b3524;
}
.password-field { position: relative; }
.password-field input { padding-right: 96px; }
.password-field button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.access-consents {
  display: grid;
  gap: 11px;
  margin: 14px 0 2px;
  padding: 16px;
  border: 1px solid var(--line);
}
.access-consents legend { padding: 0 6px; font-size: 13px; font-weight: 700; }
.access-consents > p { margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.access-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 500 !important;
  line-height: 1.45;
}
.access-consent input { width: 18px; min-height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.access-consent a { color: var(--ink); text-underline-offset: 3px; }
.access-consent--optional { padding-top: 10px; border-top: 1px solid var(--line); }
.access-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-top: 12px;
  padding: 0 17px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--ivory);
  font-weight: 700;
  cursor: pointer;
}
.access-submit span { font-size: 19px; }
.access-submit:disabled { cursor: wait; opacity: .65; }

.access-error {
  padding: 12px 14px;
  border-left: 3px solid var(--red);
  background: #f8e2dd;
  color: #9e2d1d;
  font-size: 14px;
  line-height: 1.4;
}
.access-hint { margin: 18px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.access-support { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; }
.access-page .legal-modal__page-link, .tariffs-page .legal-modal__page-link { color: var(--ink); }

/* Tariffs */
.tariffs-page { min-height: 100vh; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom, 0); }
.tariffs-account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tariffs-account > div { display: grid; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.tariffs-account .button { flex-shrink: 0; }
.tariffs-account span { color: var(--muted); font-size: 13px; }
.tariffs-main { padding: 64px var(--pad-x) 84px; }
.tariffs-intro { max-width: 880px; margin-bottom: 42px; }
.tariffs-intro h1 {
  margin: 16px 0;
  font-size: clamp(58px, 8vw, 112px);
  letter-spacing: -.045em;
  line-height: .9;
}
.tariffs-intro > p:last-of-type { max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.tariffs-bonus { max-width: 700px; }
.tariffs-grid { max-width: 1200px; }
.tariffs-grid .price-card { transition: transform .2s ease, outline-color .2s ease; }
.tariffs-grid .price-card.is-selected {
  outline: 3px solid var(--red);
  outline-offset: 4px;
  transform: translateY(-4px);
}
.tariffs-checkout-backdrop {
  position: fixed;
  z-index: 9;
  inset: 0;
  background: #322d2980;
  backdrop-filter: blur(3px);
}
.tariffs-checkout {
  position: fixed;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  background: var(--ink);
  color: var(--ivory);
  box-shadow: 0 24px 70px #322d2966;
  transform: translate(-50%, -50%);
}
.tariffs-checkout__summary { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.tariffs-checkout__summary > div { display: grid; gap: 4px; }
.tariffs-checkout__summary strong { font-family: var(--font-display); font-size: 29px; font-weight: 500; }
.tariffs-checkout__summary span, .tariffs-checkout small { color: #d5ccc0; font-size: 13px; line-height: 1.45; }
.tariffs-checkout__close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  border: 0;
  background: transparent;
  color: var(--ivory);
  font-size: 28px;
  cursor: pointer;
}
.tariffs-checkout__form { display: grid; gap: 11px; margin-top: 17px; }
.tariffs-checkout__form > input { border-color: #94887d; background: #4b4540; color: var(--ivory); }
.tariffs-checkout .access-consent { color: #eee4d9; }
.tariffs-checkout .access-consent a { color: #fff; }
.tariffs-checkout__submit { min-height: 48px; }
.tariffs-checkout__error {
  margin: 0;
  padding: 10px 12px;
  background: #71362c;
  color: #fff0e8;
  font-size: 14px;
  line-height: 1.4;
}
.tariffs-payment-state {
  position: fixed;
  z-index: 11;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(440px, calc(100% - 40px));
  padding: 16px 18px;
  background: var(--ink);
  color: var(--ivory);
  box-shadow: 0 18px 50px #322d2940;
  line-height: 1.45;
  transform: translateX(-50%);
}
.tariffs-payment-state a { margin-left: 8px; color: #fff; }

@media (max-width: 650px) {
  /* Phone login: straight to the form, only the eyebrow stays above it. */
  .access-shell { display: block; min-height: 0; }
  .access-art { height: auto; padding: 28px var(--pad-x) 0; border: 0; overflow: visible; }
  .access-art h1, .access-art__note, .access-thread { display: none; }
  .access-wide-break { display: none; }
  .access-card { width: 100%; padding: 14px var(--pad-x) 36px; }
  .access-card__eyebrow { display: none; }
  .access-card h2 { margin-top: 0; font-size: 36px; }
  .access-lead { margin: 10px 0 18px; }

  .public-header:has(.tariffs-account) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .tariffs-account { display: contents; }
  .tariffs-account > div { grid-column: 1; grid-row: 2; gap: 4px; font-size: 14px; text-align: left; }
  .tariffs-account .button { grid-column: 2; grid-row: 1; justify-self: end; min-height: 42px; padding-inline: 13px; }
  #openAppLink { grid-row: 2; grid-column: 2; }
  .tariffs-main { padding: 45px var(--pad-x) 58px; }
  .tariffs-intro h1 { font-size: clamp(44px, 10vw, 68px); }
  .tariffs-checkout { width: calc(100% - 28px); max-height: calc(100dvh - 28px); }
}
