:root {
  --yh-auth-ink: #173d30;
  --yh-auth-soft: #5f746c;
  --yh-auth-green: #13845f;
  --yh-auth-deep: #0b694b;
  --yh-auth-mint: #6ad8ad;
  --yh-auth-paper: #f6faf7;
  --yh-auth-line: rgba(23, 61, 48, .13);
  --yh-auth-ease: cubic-bezier(.22, .76, .24, 1);
}

.license-gate.yh-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
  overflow: auto;
  color: var(--yh-auth-ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(106, 216, 173, .18), transparent 28%),
    radial-gradient(circle at 88% 84%, rgba(184, 133, 55, .11), transparent 26%),
    linear-gradient(145deg, #fbfdfb, #eef6f1);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  isolation: isolate;
}

.license-gate.yh-auth-gate::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .62;
  background-image:
    linear-gradient(rgba(19, 132, 95, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 132, 95, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 94%);
}

.license-gate.yh-auth-gate.hidden { display: none !important; }

.yh-auth-gate *,
.yh-auth-gate *::before,
.yh-auth-gate *::after { box-sizing: border-box; }

.yh-auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  width: min(1120px, 100%);
  min-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(23, 61, 48, .12);
  border-radius: 34px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 32px 100px rgba(26, 75, 58, .16);
  animation: yhAuthEnter .52s var(--yh-auth-ease) both;
}

@keyframes yhAuthEnter {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
}

.yh-auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 48px 52px;
  overflow: hidden;
  color: var(--yh-auth-ink);
  background: linear-gradient(145deg, rgba(235, 248, 241, .98), rgba(247, 250, 243, .98));
  border-right: 1px solid rgba(23, 61, 48, .09);
}

.yh-auth-story::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -255px;
  bottom: -250px;
  border: 1px solid rgba(19, 132, 95, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(19, 132, 95, .035),
    0 0 0 104px rgba(19, 132, 95, .025),
    0 0 0 170px rgba(19, 132, 95, .015);
}

.yh-auth-story::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .58;
  background-image: radial-gradient(rgba(19, 132, 95, .19) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(135deg, transparent 24%, #000 75%, transparent 100%);
}

.yh-auth-story-top,
.yh-auth-story-copy,
.yh-auth-trust,
.yh-auth-signals { position: relative; z-index: 2; }

.yh-auth-story-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.yh-auth-logo {
  display: block;
  width: 158px;
  height: auto;
}

.yh-auth-edition {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--yh-auth-green);
  border: 1px solid rgba(19, 132, 95, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  white-space: nowrap;
}

.yh-auth-edition::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--yh-auth-mint);
  box-shadow: 0 0 0 5px rgba(106, 216, 173, .12);
}

.yh-auth-story-copy { max-width: 520px; margin: auto 0; padding: 44px 0; }
.yh-auth-product-index { display: block; margin-bottom: 15px; color: var(--yh-auth-green); font-size: 10px; font-weight: 900; letter-spacing: .19em; }
.yh-auth-story h1 { margin: 0; color: var(--yh-auth-ink); font-size: clamp(38px, 4.4vw, 62px); line-height: 1.08; letter-spacing: -.055em; }
.yh-auth-story-copy > p { max-width: 500px; margin: 22px 0 0; color: var(--yh-auth-soft); font-size: 14px; line-height: 1.85; }

.yh-auth-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 32px;
}

.yh-auth-flow span {
  position: relative;
  min-height: 72px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(23, 61, 48, .1);
  border-radius: 15px;
  background: rgba(255, 255, 255, .62);
}

.yh-auth-flow span::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(106, 216, 173, .12);
}

.yh-auth-flow small,
.yh-auth-flow strong { display: block; position: relative; z-index: 1; }
.yh-auth-flow small { color: var(--yh-auth-green); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.yh-auth-flow strong { margin-top: 8px; color: var(--yh-auth-ink); font-size: 11px; }

.yh-auth-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(23, 61, 48, .1);
}

.yh-auth-shield {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  color: #fff;
  border-radius: 12px;
  background: var(--yh-auth-green);
  font-size: 15px;
  box-shadow: 0 9px 22px rgba(19, 132, 95, .19);
}

.yh-auth-trust strong,
.yh-auth-trust span { display: block; }
.yh-auth-trust strong { font-size: 11px; }
.yh-auth-trust span { margin-top: 3px; color: var(--yh-auth-soft); font-size: 9px; line-height: 1.5; }

.yh-auth-signals { position: absolute; inset: 0; pointer-events: none; }
.yh-auth-signals i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--yh-auth-green); box-shadow: 0 0 0 8px rgba(19,132,95,.08); animation: yhSignal 3.2s ease-in-out infinite alternate; }
.yh-auth-signals i:nth-child(1) { top: 26%; right: 13%; }
.yh-auth-signals i:nth-child(2) { top: 45%; right: 22%; animation-delay: -.9s; background: #b8863d; }
.yh-auth-signals i:nth-child(3) { bottom: 23%; right: 9%; animation-delay: -1.7s; }
@keyframes yhSignal { to { transform: translateY(-5px); box-shadow: 0 0 0 14px rgba(19,132,95,0); } }

.yh-auth-gate .license-card.yh-auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 48px clamp(36px, 4.4vw, 58px);
  color: var(--yh-auth-ink);
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .97);
  box-shadow: none;
  text-align: left;
}

.yh-auth-card::before {
  content: "SECURE MEMBER ACCESS";
  position: absolute;
  top: 27px;
  right: 30px;
  color: rgba(23, 61, 48, .22);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.yh-auth-card-head { margin-bottom: 26px; }
.yh-auth-gate .yh-auth-card .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: var(--yh-auth-green); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.yh-auth-gate .yh-auth-card .eyebrow::before { content: ""; width: 19px; height: 1px; background: var(--yh-auth-green); }
.yh-auth-gate .yh-auth-card h2 { margin: 0; color: var(--yh-auth-ink); font-size: clamp(27px, 3vw, 36px); line-height: 1.15; letter-spacing: -.04em; }
.yh-auth-gate .yh-auth-card .yh-auth-intro { margin: 12px 0 0; color: var(--yh-auth-soft); font-size: 12px; line-height: 1.75; }

.yh-auth-form { display: grid; gap: 13px; }
.yh-auth-field { display: block; margin: 0; }
.yh-auth-field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 7px; color: #526c63; font-size: 10px; font-weight: 800; }
.yh-auth-field-label small { color: #8fa19b; font-size: 8px; font-weight: 600; }
.yh-auth-input-wrap { position: relative; display: block; }

.yh-auth-gate .yh-auth-card input,
.yh-auth-gate .yh-auth-card .yh-auth-input {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 15px;
  color: var(--yh-auth-ink);
  border: 1px solid var(--yh-auth-line);
  border-radius: 14px;
  outline: 0;
  background: #f7faf8;
  font-family: inherit;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .2s var(--yh-auth-ease);
}

.yh-auth-gate .yh-auth-card input::placeholder { color: #9aa9a4; }
.yh-auth-gate .yh-auth-card input:focus {
  color: var(--yh-auth-ink);
  border-color: rgba(19, 132, 95, .42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(19, 132, 95, .075);
  transform: translateY(-1px);
}

.yh-auth-password input { padding-right: 66px !important; }
.yh-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 48px;
  min-height: 36px;
  padding: 0 8px;
  color: var(--yh-auth-green) !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #eaf6f0 !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 9px !important;
  font-weight: 900 !important;
  transform: translateY(-50%) !important;
  cursor: pointer;
}
.yh-auth-password-toggle:hover { background: #dff2e8 !important; }

.yh-auth-code input { color: var(--yh-auth-green); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.yh-auth-gate #licenseMessage {
  position: relative;
  min-height: 46px;
  margin: 15px 0 14px;
  padding: 11px 13px 11px 34px;
  color: #87672f;
  border: 1px solid rgba(184, 134, 61, .14);
  border-radius: 12px;
  background: #fdf9f1;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.65;
  animation: yhMessageIn .24s var(--yh-auth-ease) both;
}

.yh-auth-gate #licenseMessage::before {
  content: "i";
  position: absolute;
  top: 12px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: #fff;
  border-radius: 50%;
  background: #b8863d;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 900;
}

.yh-auth-gate #licenseMessage.ok,
.yh-auth-gate #licenseMessage.text-emerald-300 {
  color: #0d714f;
  border-color: rgba(19, 132, 95, .16);
  background: #eef9f3;
}
.yh-auth-gate #licenseMessage.ok::before,
.yh-auth-gate #licenseMessage.text-emerald-300::before { content: "✓"; background: var(--yh-auth-green); font-family: inherit; }
.yh-auth-gate #licenseMessage.bad,
.yh-auth-gate #licenseMessage.text-red-300 {
  color: #a24a42;
  border-color: rgba(174, 72, 62, .16);
  background: #fdf4f2;
}
.yh-auth-gate #licenseMessage.bad::before,
.yh-auth-gate #licenseMessage.text-red-300::before { content: "!"; background: #b4574d; font-family: inherit; }
@keyframes yhMessageIn { from { opacity: .5; transform: translateY(2px); } }

.yh-auth-gate .license-actions,
.yh-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  width: 100%;
  margin: 0;
}

.yh-auth-gate .license-actions.secondary { margin: 9px 0 0; }
.yh-auth-gate .license-actions #loginLicenseBtn,
.yh-auth-gate #loginLicenseBtn { grid-column: 1 / -1; }

.yh-auth-gate .license-card button,
.yh-auth-gate .btn,
.yh-auth-gate .yh-auth-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  padding: 0 15px;
  overflow: hidden;
  color: var(--yh-auth-ink);
  border: 1px solid var(--yh-auth-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .2s var(--yh-auth-ease), border-color .2s, box-shadow .2s, background .2s;
}

.yh-auth-gate .license-card button:hover,
.yh-auth-gate .btn:hover { transform: translateY(-2px); border-color: rgba(19, 132, 95, .28); box-shadow: 0 10px 24px rgba(23, 80, 61, .08); }
.yh-auth-gate .license-card button:active,
.yh-auth-gate .btn:active { transform: translateY(0) scale(.985); }
.yh-auth-gate .license-card button:disabled,
.yh-auth-gate .btn:disabled { opacity: .64; cursor: wait; transform: none; }

.yh-auth-gate .license-card .yh-auth-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2;
  width: auto !important;
  min-width: 48px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  transform: translateY(-50%) !important;
}

.yh-auth-gate #loginLicenseBtn {
  color: #fff;
  border-color: var(--yh-auth-green);
  background: linear-gradient(135deg, var(--yh-auth-deep), #1a9a6f);
  box-shadow: 0 14px 30px rgba(19, 132, 95, .21);
}

.yh-auth-gate #loginLicenseBtn::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -38%;
  width: 32%;
  height: 300%;
  opacity: .38;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: rotate(18deg);
  animation: yhButtonScan 4.8s ease-in-out infinite;
}
@keyframes yhButtonScan { 0%, 70% { left: -38%; } 100% { left: 118%; } }

.yh-auth-device {
  margin-top: 16px;
  border-top: 1px solid rgba(23, 61, 48, .08);
}
.yh-auth-device summary { padding: 13px 2px 8px; color: #768b83; cursor: pointer; font-size: 9px; font-weight: 750; list-style: none; }
.yh-auth-device summary::-webkit-details-marker { display: none; }
.yh-auth-device summary::before { content: "+"; display: inline-block; width: 18px; color: var(--yh-auth-green); font-size: 13px; }
.yh-auth-device[open] summary::before { content: "−"; }
.yh-auth-gate #deviceLabel,
.yh-auth-gate .device-label {
  margin: 0;
  padding: 9px 11px;
  color: #8a9b95;
  border-radius: 9px;
  background: #f5f8f6;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  line-height: 1.5;
  word-break: break-all;
}

.yh-auth-help { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 17px; color: #899a94; font-size: 9px; }
.yh-auth-help a { color: var(--yh-auth-green); font-weight: 800; text-decoration: none; }
.yh-auth-help a:hover { text-decoration: underline; }

.yh-auth-field.is-filled .yh-auth-field-label { color: var(--yh-auth-green); }
.yh-auth-field.is-filled .yh-auth-input-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yh-auth-mint);
  box-shadow: 0 0 0 5px rgba(106, 216, 173, .11);
  transform: translateY(-50%);
  pointer-events: none;
}
.yh-auth-field.is-filled .yh-auth-password::after { right: 70px; }
.yh-auth-field.is-attention .yh-auth-input {
  border-color: rgba(174, 72, 62, .5) !important;
  box-shadow: 0 0 0 4px rgba(174, 72, 62, .08) !important;
  animation: yhFieldAttention .28s var(--yh-auth-ease);
}
@keyframes yhFieldAttention {
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.yh-auth-gate button:focus-visible,
.yh-auth-gate input:focus-visible,
.yh-auth-gate summary:focus-visible,
.yh-auth-gate a:focus-visible {
  outline: 3px solid rgba(19, 132, 95, .2);
  outline-offset: 3px;
}

.yh-auth-gate #loginLicenseBtn[data-loading="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 9px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: yhButtonSpin .72s linear infinite;
}
@keyframes yhButtonSpin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .license-gate.yh-auth-gate { align-items: start; padding: 18px; }
  .yh-auth-shell { grid-template-columns: 1fr; min-height: 0; border-radius: 26px; }
  .yh-auth-story { min-height: 280px; padding: 30px 34px; border-right: 0; border-bottom: 1px solid rgba(23, 61, 48, .09); }
  .yh-auth-story-copy { margin: 0; padding: 34px 0 20px; }
  .yh-auth-story h1 { max-width: 620px; font-size: clamp(34px, 8vw, 48px); }
  .yh-auth-story-copy > p { margin-top: 13px; }
  .yh-auth-flow { display: none; }
  .yh-auth-trust { padding-top: 14px; }
  .yh-auth-gate .license-card.yh-auth-card { padding: 38px 34px; }
}

@media (max-width: 560px) {
  .license-gate.yh-auth-gate { padding: 0; background: #fff; }
  .license-gate.yh-auth-gate::before { display: none; }
  .yh-auth-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .yh-auth-story { min-height: 218px; padding: max(24px, env(safe-area-inset-top)) 22px 22px; }
  .yh-auth-story-top { align-items: flex-start; }
  .yh-auth-logo { width: 126px; }
  .yh-auth-edition { min-height: 24px; padding-inline: 8px; font-size: 7px; }
  .yh-auth-story-copy { padding: 29px 0 0; }
  .yh-auth-story h1 { max-width: 86%; font-size: 33px; }
  .yh-auth-story-copy > p { display: none; }
  .yh-auth-trust { display: none; }
  .yh-auth-gate .license-card.yh-auth-card { justify-content: flex-start; padding: 31px 22px calc(28px + env(safe-area-inset-bottom)); }
  .yh-auth-card::before { display: none; }
  .yh-auth-card-head { margin-bottom: 22px; }
  .yh-auth-gate .yh-auth-card h2 { font-size: 29px; }
  .yh-auth-gate .yh-auth-card .yh-auth-intro { font-size: 11px; }
  .yh-auth-gate .yh-auth-card input { min-height: 50px; font-size: 12px; }
  .yh-auth-gate #licenseMessage { font-size: 9px; }
  .yh-auth-help { display: grid; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .yh-auth-gate *, .yh-auth-gate *::before, .yh-auth-gate *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep the current EHAI identity visible after authorization as well. */
.yh-product-brand-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.yh-product-logo-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 112px; min-height: 42px; padding: 8px 11px; border: 1px solid rgba(23, 61, 48, .1); border-radius: 12px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 22px rgba(18, 60, 46, .09); }
.yh-product-logo-badge img { display: block; width: 108px; height: auto; }
@media (max-width: 680px) {
  .yh-product-brand-row { align-items: flex-start; gap: 11px; }
  .yh-product-logo-badge { min-width: 86px; min-height: 36px; padding: 6px 8px; }
  .yh-product-logo-badge img { width: 82px; }
}

/* 2026-08 readability system: keep the authorization entry as legible as the product workspace. */
.yh-auth-product-index { font-size: 15px; }
.yh-auth-story-copy > p { max-width: 620px; font-size: 19px; line-height: 1.8; }
.yh-auth-flow small { font-size: 12px; }
.yh-auth-flow strong { font-size: 16px; line-height: 1.5; }
.yh-auth-trust strong { font-size: 16px; }
.yh-auth-trust span { font-size: 13px; }
.yh-auth-card-eyebrow { font-size: 15px; }
.yh-auth-gate .yh-auth-card .yh-auth-intro { font-size: 17px; line-height: 1.75; }
.yh-auth-field-label { font-size: 16px; }
.yh-auth-field-label small { font-size: 12px; }
.yh-auth-gate .yh-auth-card input { min-height: 60px; font-size: 17px; }
.yh-auth-password-toggle { min-width: 64px; font-size: 14px !important; }
.yh-auth-gate #licenseMessage { font-size: 14px; line-height: 1.7; }
.yh-auth-device-summary { font-size: 14px; line-height: 1.7; }
.yh-auth-help { font-size: 13px; }

@media (max-width: 560px) {
  .yh-auth-gate .yh-auth-card .yh-auth-intro { font-size: 16px; }
  .yh-auth-field-label { font-size: 15px; }
  .yh-auth-gate .yh-auth-card input { min-height: 56px; font-size: 16px; }
  .yh-auth-password-toggle { font-size: 13px !important; }
  .yh-auth-gate #licenseMessage { font-size: 13px; }
  .yh-auth-device-summary, .yh-auth-help { font-size: 12px; }
}
