/*
 * Yote signed-out pages: sign in, forgot password, sign-in link, set password, the message
 * page, error and 404. Each page loads this file through auth_css() (head_include); the
 * engine's login.bundle.css is deliberately not loaded. Markup:
 * templates/includes/brand/auth_frame.html and the www/ templates.
 *
 * Two panels (docs/DESIGN.md §14.12): the brand panel on the paper canvas, the content on
 * the surface. Under 900 px the brand panel is a compact header above the content.
 * Light and dark come from the tokens: the device decides until the page's toggle sets
 * data-theme on <html>. Tokens only (design/tokens.css): no hex value here.
 * After editing this file, bump AUTH_CSS_REV in auth_frame.html (edge cache).
 *
 * Contract with the engine's login script (see www/login.html):
 *   - .for-forgot / .for-signup / .for-email-login / .for-login-with-email-link start
 *     hidden in CSS; .for-login must NOT be hidden in CSS, because jQuery .toggle(true)
 *     only clears the inline style and would leave a CSS-hidden section hidden.
 *   - .login-error-banner, .login-success-banner and .resend-link start hidden and are
 *     revealed by the script with display:flex.
 *   - a refused request adds .invalid to .page-card-body; a missing value adds .invalid to
 *     the field's .form-group and writes its .field-error.
 */

/* ==================================================================== */
/* Page frame                                                            */
/* ==================================================================== */

body:has(.ya) {
  background: var(--y-surface);
  color: var(--y-text);
  font-family: var(--y-font-ui);
  letter-spacing: normal; /* the engine's web bundle tracks body text out by 0.02em */
}

.ya .y-btn,
.ya .y-control,
.ya .y-label {
  letter-spacing: normal;
}

body:has(.ya) .page-content-wrapper,
body:has(.ya) .page-content-wrapper > main,
body:has(.ya) .page_content {
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body:has(.ya) .page-breadcrumbs,
body:has(.ya) .page-header-wrapper,
body:has(.ya) .page-footer,
body:has(.ya) .web-footer,
body:has(.ya) .navbar {
  display: none;
}

.hide,
.ya .hidden {
  display: none !important;
}

.ya {
  display: grid;
  grid-template-columns: minmax(26rem, 5fr) 7fr;
  min-height: 100vh;
  min-height: 100svh;
}

/* ---- left: the brand panel ----------------------------------------- */

.ya-brand {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-10);
  padding: var(--y-space-12) clamp(2.5rem, 5vw, 4.5rem);
  background: var(--y-bg);
  border-inline-end: 1px solid var(--y-border-subtle);
  overflow: hidden;
}

.ya-logo {
  display: inline-flex;
  line-height: 0;
  border-radius: var(--y-radius-sm);
}

.ya-logo:hover {
  text-decoration: none;
}

.ya-logo img {
  height: auto;
}

.ya-brand__body {
  margin-block: auto;
  max-width: 30rem;
}

.ya .ya-brand__headline {
  margin: 0;
  font-family: var(--y-font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2.25rem, 3.3vw, var(--y-text-5xl));
  line-height: 1.06;
  color: var(--y-text-strong);
  text-wrap: balance;
}

.ya-brand__modules {
  display: flex;
  flex-wrap: wrap;
  gap: var(--y-space-2);
  margin: var(--y-space-8) 0 0;
  padding: 0;
  list-style: none;
}

.ya-brand__modules li {
  padding: var(--y-space-1) var(--y-space-3);
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-full);
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  font-weight: 500;
  color: var(--y-text-secondary);
  white-space: nowrap;
}

.ya-brand__lead {
  margin: var(--y-space-4) 0 0;
  max-width: 26rem;
  font-size: var(--y-text-lg);
  line-height: var(--y-leading-lg);
  color: var(--y-text-secondary);
  text-wrap: pretty;
}

.ya-brand__cta {
  display: flex;
  align-items: center;
  gap: var(--y-space-3);
  margin-top: var(--y-space-8);
  font-size: var(--y-text-sm);
  color: var(--y-text-secondary);
}

.ya-brand__start {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 var(--y-space-4);
  border: 1px solid var(--y-border-strong, var(--y-border));
  border-radius: var(--y-radius-full);
  font-weight: 600;
  color: var(--y-text-strong);
  text-decoration: none;
}

.ya-brand__start:hover {
  background: var(--y-surface-hover, rgba(0, 0, 0, 0.04));
}

.ya-brand__start:focus-visible {
  outline: 2px solid var(--y-focus, currentColor);
  outline-offset: 2px;
}

/* On wide screens the brand panel carries "Get started"; under the form it is for phones. */
.ya-card__start {
  display: none;
  margin: var(--y-space-6) 0 0;
  font-size: var(--y-text-sm);
  color: var(--y-text-secondary);
  text-align: center;
}

.ya-brand__foot {
  margin: 0;
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-xs);
  font-weight: 500;
  color: var(--y-text-muted);
}

/* ---- right: the content panel -------------------------------------- */

.ya-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--y-space-6) clamp(1.5rem, 4vw, 3.5rem) var(--y-space-6);
  background: var(--y-surface);
}

.ya-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--y-space-3);
}

.ya-lang {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
}

.ya .ya-lang__item {
  min-width: 2.25rem;
  padding: var(--y-space-1) var(--y-space-2);
  border-radius: var(--y-radius-sm);
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-xs);
  font-weight: 600;
  text-align: center;
  color: var(--y-text-muted);
  text-decoration: none;
}

.ya .ya-lang__item:hover {
  color: var(--y-text);
  text-decoration: none;
}

.ya .ya-lang__item.is-active {
  background: var(--y-surface-sunken);
  color: var(--y-text-strong);
}

.ya-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-md);
  background: transparent;
  color: var(--y-text-secondary);
  cursor: pointer;
}

.ya-theme:hover {
  background: var(--y-surface-hover);
  color: var(--y-text);
}

.ya .ya-theme:focus-visible,
.ya .ya-lang__item:focus-visible,
.ya-foot a:focus-visible,
.ya-logo:focus-visible {
  outline: none;
  box-shadow: var(--y-focus-ring);
}

.ya-theme span {
  display: inline-flex;
  line-height: 0;
}

.ya-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: var(--y-space-10);
}

.ya-main > section,
.ya-main > .ya-card,
.ya-main > .ya-noscript {
  width: 100%;
  max-width: 24rem;
}

.for-forgot,
.for-signup,
.for-email-login,
.for-login-with-email-link {
  display: none;
}

.ya-noscript {
  margin: 0 0 var(--y-space-4);
  padding: var(--y-space-3) var(--y-space-4);
  border: 1px solid var(--y-warning-border);
  border-radius: var(--y-radius-md);
  background: var(--y-warning-bg);
  color: var(--y-warning-fg);
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
}

/* ==================================================================== */
/* The form block (flat on the panel)                                    */
/* ==================================================================== */

.ya-card {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-6);
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ya-card.invalid-login {
  animation: ya-shake var(--y-duration-slow) var(--y-ease-standard);
}

@keyframes ya-shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .ya-card.invalid-login {
    animation: none;
  }
}

.ya-card__head {
  display: block;
  margin: 0;
  padding: 0;
  text-align: start;
}

.ya-card__head .app-logo {
  display: none;
}

.ya .ya-card__title {
  margin: 0;
  font-family: var(--y-font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: var(--y-text-3xl);
  line-height: var(--y-leading-3xl);
  color: var(--y-text-strong);
}

.ya-card__subtitle {
  margin: var(--y-space-2) 0 0;
  font-size: var(--y-text-md);
  line-height: var(--y-leading-md);
  color: var(--y-text-secondary);
}

.ya-card__eyebrow {
  margin: 0 0 var(--y-space-2);
  font-size: var(--y-text-2xs);
  line-height: var(--y-leading-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--y-text-muted);
}

.ya-card form {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-6);
  margin: 0;
}

.ya-card__foot {
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  color: var(--y-text-secondary);
}

/* ==================================================================== */
/* Fields                                                                */
/* ==================================================================== */

.ya .page-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-5);
  padding: 0;
}

.ya .y-field {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-1-5);
  margin: 0;
}

/* A field with a link on its label's line ("Forgot password?"). The link follows the input in the
   page, so the keyboard reaches the input first; the grid draws it beside the label. */
.ya .y-field--aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--y-space-3);
  align-items: baseline;
}

.ya .y-field--aside > * {
  grid-column: 1 / -1;
}

.ya .y-field--aside > .y-label {
  grid-column: 1;
  grid-row: 1;
}

.ya .y-field--aside > .y-field-aside {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.ya .y-label {
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  font-weight: 500;
  color: var(--y-text);
}

.y-input {
  position: relative;
  display: flex;
  align-items: center;
}

.ya .y-control {
  width: 100%;
  height: var(--y-control-h-touch);
  padding: 0 var(--y-space-3);
  font-family: var(--y-font-ui);
  font-size: var(--y-text-md);
  line-height: var(--y-leading-md);
  color: var(--y-text);
  background: var(--y-surface);
  border: 1px solid var(--y-border-input);
  border-radius: var(--y-radius-md);
  box-shadow: none;
  outline: none;
  transition: border-color var(--y-duration-fast) var(--y-ease-standard),
    box-shadow var(--y-duration-fast) var(--y-ease-standard);
}

.ya .y-control::placeholder {
  color: var(--y-text-muted);
  opacity: 1;
}

.ya .y-control:hover {
  border-color: var(--y-border-strong);
}

.ya .y-control:focus {
  border-color: var(--y-border-focus);
  box-shadow: 0 0 0 3px var(--y-accent-subtle-hover);
  background: var(--y-surface);
}

/* room for the reveal button */
.ya .y-input:has(.y-toggle) .y-control {
  padding-inline-end: calc(var(--y-space-2) + 32px + var(--y-space-1));
}

.y-toggle {
  position: absolute;
  z-index: 1;
  inset-inline-end: var(--y-space-1-5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--y-radius-sm);
  background: transparent;
  color: var(--y-text-muted);
  cursor: pointer;
}

.y-toggle:hover {
  background: var(--y-surface-hover);
  color: var(--y-text);
}

.ya .y-toggle:focus-visible {
  outline: none;
  box-shadow: var(--y-focus-ring);
}

.y-toggle span {
  display: inline-flex;
  line-height: 0;
}

.y-toggle .y-toggle__off,
.y-toggle.is-revealed .y-toggle__on {
  display: none;
}

.y-toggle.is-revealed .y-toggle__off {
  display: inline-flex;
}

/* A field's own message, under the field. */
.ya .y-field-error {
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  color: var(--y-danger-fg);
}

.ya .y-field-error:empty {
  display: none;
}

.ya .form-group.invalid .y-control,
.ya .page-card-body.invalid .y-control {
  border-color: var(--y-danger-solid);
}

.ya .form-group.invalid .y-control:focus,
.ya .page-card-body.invalid .y-control:focus {
  box-shadow: 0 0 0 3px var(--y-danger-bg);
}

/* A refused request (written by the engine's script): the form's message, under the last
   field, same voice as a field message. */
.ya-form-error,
.ya-form-note {
  display: none;
  align-items: flex-start;
  gap: var(--y-space-2);
  margin: calc(-1 * var(--y-space-1)) 0 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
}

.ya-form-error {
  color: var(--y-danger-fg);
}

.ya-form-note {
  margin: 0;
  padding: var(--y-space-3);
  border-radius: var(--y-radius-md);
  background: var(--y-success-bg);
  color: var(--y-success-fg);
}

.ya-form-error .y-icon,
.ya-form-note .y-icon {
  flex: none;
  margin-top: 2px;
}

/* ==================================================================== */
/* Buttons and links                                                     */
/* ==================================================================== */

.y-actions {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-3);
}

.ya .y-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--y-space-2);
  width: 100%;
  height: var(--y-control-h-touch);
  margin: 0;
  padding: 0 var(--y-space-4);
  border: 1px solid transparent;
  border-radius: var(--y-radius-md);
  font-family: var(--y-font-ui);
  font-size: var(--y-text-md);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--y-duration-instant) var(--y-ease-standard),
    border-color var(--y-duration-instant) var(--y-ease-standard),
    transform var(--y-duration-instant) var(--y-ease-standard);
}

.ya .y-btn:active {
  transform: scale(0.98);
}

.ya .y-btn:focus-visible {
  outline: none;
  box-shadow: var(--y-focus-ring);
}

.ya .y-btn--primary,
.ya .y-btn--primary:not(:disabled):not(.disabled) {
  background: var(--y-accent);
  border-color: var(--y-accent);
  color: var(--y-accent-fg);
}

.ya .y-btn--primary:hover,
.ya .y-btn--primary:not(:disabled):not(.disabled):hover {
  background: var(--y-accent-hover);
  border-color: var(--y-accent-hover);
  color: var(--y-accent-fg);
  text-decoration: none;
}

.ya .y-btn--primary:disabled,
.ya .y-btn--primary.disabled {
  background: var(--y-surface-sunken);
  border-color: var(--y-border);
  color: var(--y-text-disabled);
  opacity: 1;
  cursor: not-allowed;
}

.ya .y-btn--secondary {
  background: var(--y-surface);
  border-color: var(--y-border-strong);
  color: var(--y-text);
  font-weight: 500;
}

.ya .y-btn--secondary:hover {
  background: var(--y-surface-hover);
  border-color: var(--y-border-strong);
  color: var(--y-text);
  text-decoration: none;
}

.ya .y-link {
  color: var(--y-text-link);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--y-radius-xs);
}

.ya .y-link:hover {
  color: var(--y-text-link-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ya .y-link--quiet {
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
}

.ya .y-link--back {
  display: inline-flex;
  align-items: center;
  gap: var(--y-space-1-5);
}

.y-hint {
  display: none;
  gap: var(--y-space-1);
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  color: var(--y-text-secondary);
}

.y-divider {
  display: flex;
  align-items: center;
  gap: var(--y-space-3);
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-xs);
  color: var(--y-text-muted);
}

.y-divider::before,
.y-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--y-border);
}

.y-sso,
.y-sso__list {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-2);
}

.y-sso__list img,
.y-sso__list svg:not(.y-icon) {
  width: 18px;
  height: 18px;
}


/* ==================================================================== */
/* Footer: "Powered by" and the PANEOTECH mark, the year, legal pages    */
/* ==================================================================== */

.ya-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--y-space-3) var(--y-space-6);
  padding-top: var(--y-space-5);
  border-top: 1px solid var(--y-border-subtle);
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-xs);
  color: var(--y-text-muted);
}

.ya-credit {
  display: inline-flex;
  align-items: center;
  gap: var(--y-space-2);
}

.ya-credit a {
  display: inline-flex;
  line-height: 0;
  border-radius: var(--y-radius-xs);
}

.ya-credit__logo {
  width: 120px;
  height: auto;
}

.ya-foot__meta {
  display: inline-flex;
  gap: var(--y-space-4);
  margin: 0;
}

.ya .ya-foot a {
  color: var(--y-text-muted);
  text-decoration: none;
}

.ya .ya-foot a:hover {
  color: var(--y-text);
  text-decoration: none;
}

/* ==================================================================== */
/* Notice pages: message, error, 404                                     */
/* ==================================================================== */

.ya-notice .ya-card__message {
  margin: 0;
  font-size: var(--y-text-base);
  line-height: var(--y-leading-md);
  color: var(--y-text-secondary);
}

.ya-notice .ya-card__head .ya-card__message {
  margin-top: var(--y-space-2);
}

.ya-notice .y-actions {
  flex-direction: row;
  flex-wrap: wrap;
}

.ya-notice .y-actions .y-btn {
  width: auto;
  flex: 1 1 auto;
}

.ya-trace {
  margin: 0;
  max-height: 20rem;
  overflow: auto;
  padding: var(--y-space-3);
  font-family: var(--y-font-mono);
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-sm);
  color: var(--y-text-secondary);
  background: var(--y-surface-sunken);
  border: 1px solid var(--y-border-subtle);
  border-radius: var(--y-radius-md);
  white-space: pre-wrap;
}

/* ==================================================================== */
/* The engine's dialog ("Password set", "Invalid link", "Missing value") */
/* ==================================================================== */

/* The website bundle paints the dialog's content, header and footer a fixed white and its
   title a fixed near-black, while the text inside follows the tokens: in dark mode that was
   light text on a white dialog (owner, 5 Oct 2026). Same rules as yote-web.css, repeated
   here because this file is versioned (AUTH_CSS_REV) and yote-web.css is not, so the edge
   would keep the old one for up to 12 hours. The dialog sits outside .ya, under <body>. */

body:has(.ya) .modal .modal-content,
body:has(.ya) .modal .modal-header,
body:has(.ya) .modal .modal-footer {
  background-color: var(--y-surface-raised);
  color: var(--y-text);
  border-color: var(--y-border);
}

body:has(.ya) .modal .modal-content {
  border: 1px solid var(--y-border);
  border-radius: var(--y-radius-lg);
  box-shadow: var(--y-shadow-xl);
}

body:has(.ya) .modal .modal-header .modal-title {
  color: var(--y-text-strong);
  font-weight: 600;
}

body:has(.ya) .modal .modal-body,
body:has(.ya) .modal .msgprint {
  color: var(--y-text);
}

body:has(.ya) .modal .btn-modal-close,
body:has(.ya) .modal .btn-modal-minimize {
  --icon-stroke: var(--y-text-secondary);
  color: var(--y-text-secondary);
  background: transparent;
}

body:has(.ya) .modal .btn-modal-close:hover {
  background: var(--y-surface-hover);
}

body:has(.ya) .modal-backdrop.show {
  background: var(--y-scrim);
  opacity: 1;
}

/* ==================================================================== */
/* Set password: the engine's strength meter, in our voice               */
/* ==================================================================== */

.ya .password-strength-group {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-1-5);
}

.ya .password-hint,
.ya .password-strength-message {
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  color: var(--y-text-muted);
}

.ya .password-strength-container {
  display: flex;
  align-items: center;
  gap: var(--y-space-3);
}

.ya .password-strength-label {
  flex: none;
  min-width: 4.5rem;
  font-size: var(--y-text-xs);
  line-height: var(--y-leading-xs);
  font-weight: 600;
  color: var(--y-text-secondary);
}

.ya .password-strength-bar-track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: var(--y-radius-full);
  background: var(--y-surface-sunken);
}

.ya .password-strength-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--y-text-muted);
  transition: width var(--y-duration-base) var(--y-ease-standard);
}

.ya .password-strength-bar-fill.strength-red { background: var(--y-danger-solid); }
.ya .password-strength-bar-fill.strength-orange { background: var(--y-warning-solid); }
.ya .password-strength-bar-fill.strength-blue { background: var(--y-accent); }
.ya .password-strength-bar-fill.strength-green { background: var(--y-success-solid); }

.ya .password-mismatch-message,
.ya .text-danger {
  margin: 0;
  font-size: var(--y-text-sm);
  line-height: var(--y-leading-sm);
  /* the website bundle's .text-danger is a fixed red with !important: 4.4:1 on white,
     3.9:1 on the dark surface. The token passes AA on both. */
  color: var(--y-danger-fg) !important;
}


/* ==================================================================== */
/* Phone and narrow screens: the brand panel is a compact header         */
/* ==================================================================== */

@media (max-width: 899px) {
  .ya {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .ya-brand {
    flex-direction: row;
    align-items: center;
    gap: var(--y-space-4);
    padding: var(--y-space-4) var(--y-space-6);
    padding-inline-end: 9rem; /* room for the controls, which sit on this row */
    border-inline-end: 0;
    border-bottom: 1px solid var(--y-border-subtle);
  }
  .ya-brand .ya-logo img {
    width: 72px;
  }
  .ya-brand__body,
  .ya-brand__foot {
    display: none;
  }

  /* the controls move up onto the header row: header = 16 + 41 (logo) + 16, control 32 */
  .ya {
    position: relative;
  }
  .ya-panel {
    position: static;
  }
  .ya-controls {
    position: absolute;
    inset-block-start: calc(var(--y-space-4) + 4px);
    inset-inline-end: var(--y-space-6);
  }
  .ya-panel {
    padding: var(--y-space-8) var(--y-space-6) var(--y-space-6);
  }
  .ya-main {
    justify-content: flex-start;
    padding-block: 0 var(--y-space-10);
  }
  .ya-main > section,
  .ya-main > .ya-card,
  .ya-main > .ya-noscript {
    max-width: 28rem;
  }
  .ya-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--y-space-3);
  }
}

@media (max-width: 480px) {
  .ya-notice .y-actions .y-btn {
    width: 100%;
  }
}

/* ==================================================================== */
/* Light and dark: one image per theme (logos), one icon per theme       */
/* ==================================================================== */

.ya .ya-on-dark,
.ya .ya-theme__sun {
  display: none;
}

.ya .ya-on-light {
  display: block;
}

.ya .ya-theme__moon {
  display: inline-flex;
}

:root[data-theme="dark"] .ya .ya-on-light,
:root[data-theme="dark"] .ya .ya-theme__moon {
  display: none;
}

:root[data-theme="dark"] .ya .ya-on-dark {
  display: block;
}

:root[data-theme="dark"] .ya .ya-theme__sun {
  display: inline-flex;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ya .ya-on-light,
  :root:not([data-theme="light"]) .ya .ya-theme__moon {
    display: none;
  }
  :root:not([data-theme="light"]) .ya .ya-on-dark {
    display: block;
  }
  :root:not([data-theme="light"]) .ya .ya-theme__sun {
    display: inline-flex;
  }
}

/* "New to Yote? Get started": the same weight as "Email me a sign-in link", right after it. */
.ya .ya-start {
  margin-top: var(--y-space-3);
}

/* The brand panel shows the real product: Yote's Home screen, cut out of its still (the window sits
   at x 92-1206 and y 63-730 of the 1296 x 730 image) and running off the panel's edge. */
.ya-brand__shot {
  width: 150%;
  margin: var(--y-space-8) 0 0;
  aspect-ratio: 1114 / 560;
  overflow: hidden;
  border: 1px solid var(--y-border);
  border-radius: 12px;
  background: var(--y-surface, #fff);
}
.ya-brand__shot .ya-brand__shot-img {
  width: 116.34%;
  max-width: none;
  height: auto;
  margin: -5.66% 0 0 -8.26%;
  vertical-align: top;
}

/* One screen, no scrolling, on a computer (owner, 4 Oct): the page is exactly the window's height,
   the brand panel is a little wider, and the product screen takes whatever height is left. */
@media (min-width: 900px) {
  .ya {
    grid-template-columns: 11fr 13fr;
    height: 100vh;
    height: 100svh;
    min-height: 0;
  }
  .ya-brand {
    height: 100vh;
    height: 100svh;
    gap: var(--y-space-6);
    padding-block: var(--y-space-8);
  }
  .ya-brand__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    margin-block: 0;
  }
  .ya .ya-brand__headline {
    max-width: 32rem;
    font-size: clamp(2rem, min(3vw, 5.2vh), 3.5rem);
  }
  .ya-brand__lead {
    max-width: 32rem;
  }
  .ya-brand__shot {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
    margin-top: var(--y-space-6);
  }
  .ya-panel {
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
  }
}

@media (min-width: 900px) and (max-height: 620px) {
  .ya-brand__shot {
    display: none;
  }
}
