/* Static pale-blue atmosphere, with no background image or 3D wave. */
.home .sky {
  background: radial-gradient(ellipse at 18% 12%, rgba(161, 191, 245, .22), transparent 56%), radial-gradient(ellipse at 84% 8%, rgba(166, 195, 245, .18), transparent 54%), linear-gradient(180deg, #edf2fa 0%, #f5f7fb 44%, var(--bg) 82%, var(--bg) 100%);
}
.home .sky .cloud { opacity: .18; animation: none; will-change: auto; }
.home .sky .grid {
  opacity: 1;
  background-image: linear-gradient(rgba(21, 36, 67, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 36, 67, .02) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .36) 45%, transparent 80%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .36) 45%, transparent 80%);
}
.hero { position: relative; isolation: isolate; overflow: hidden; }
/* Also suppress a legacy art node if an older page or theme script moves it. */
.home .hero-art { display: none; background: none; animation: none; will-change: auto; }
/* Clear lens: no frosted white fill. The vendor owns the host's refraction. */
#analyzer .article-box {
  border: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 58%, rgba(222, 239, 255, .04));
  -webkit-backdrop-filter: blur(1.1px) saturate(145%);
  backdrop-filter: blur(1.1px) saturate(145%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .88), inset 0 -1px 1px rgba(104, 151, 210, .18), inset 1px 0 1px rgba(255, 255, 255, .6), inset -1px 0 1px rgba(223, 239, 255, .4), 0 3px 10px -7px rgba(26, 63, 123, .18), 0 16px 36px -24px rgba(26, 63, 123, .28);
}
#analyzer .article-box::before {
  z-index: 0;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .18) 39%, rgba(129, 170, 222, .28) 72%, rgba(255, 255, 255, .85));
}
#analyzer .article-box:focus-within {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 1px rgba(104, 151, 210, .2), inset 1px 0 1px rgba(255, 255, 255, .65), 0 0 0 3px rgba(75, 125, 220, .085), 0 16px 36px -24px rgba(26, 63, 123, .28);
}
#analyzer .article-box > textarea,
#analyzer .article-box > .box-row { position: relative; z-index: 1; }
#analyzer .glass-surface {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  opacity: 1;
  background: linear-gradient(150deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .015) 35%, transparent 64%, rgba(209, 230, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(148, 183, 229, .13);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Compact article composer and account gate. */
#analyzer .article-box {
  width: min(880px, 100%);
  padding: 12px;
  border-radius: 24px;
}
#analyzer .article-box textarea {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  padding: 6px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#analyzer .analyze-btn {
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: #426eec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 3px 8px rgba(37, 83, 189, .12);
}
#analyzer .analyze-btn:hover { background: #315bd1; }
#analyzer .analyze-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-open { overflow: hidden; }
.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100svh - 40px);
  padding: 34px;
  border: 1px solid #fff;
  border-radius: 26px;
  background: #fbfcff;
  color: var(--navy);
  box-shadow: 0 32px 100px rgba(16, 34, 70, .20);
}
.auth-dialog::backdrop { background: rgba(26, 43, 73, .24); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.auth-close { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-soft); }
.auth-close:hover { background: #eaf0f9; }
.auth-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.auth-logo { display: block; width: 94px; height: auto; margin-bottom: 28px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid #e3eaf5; border-radius: 12px; background: #edf2fa; margin-bottom: 26px; }
.auth-tabs button { flex: 1; padding: 8px; font-size: 13px; border-radius: 8px; color: var(--ink-soft); }
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 5px #16345b12; }
.auth-dialog h2 { margin: 0 0 10px; font: 500 24px/1.25 Montserrat, "DM Sans", sans-serif; letter-spacing: -.03em; }
#auth-description { margin: 0 0 24px; font-size: 14px; color: var(--ink-soft); }
.auth-label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 500; }
.auth-input { display: block; width: 100%; padding: 12px 13px; border: 1px solid #dde5f1; border-radius: 11px; font: inherit; font-size: 14px; background: #f6f8fc; color: #67758c; }
.auth-input:disabled { opacity: 1; }
.auth-submit { display: block; width: 100%; padding: 12px; margin-top: 23px; background: #34445f; border-radius: 12px; color: white; font-size: 14px; font-weight: 500; }
.auth-submit:disabled { cursor: not-allowed; opacity: .52; }
.auth-status { margin: 20px 0 0; padding-top: 17px; border-top: 1px solid #e3eaf5; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 560px) {
  #analyzer .article-box { border-radius: 22px; }
  .auth-dialog { padding: 30px 24px 25px; }
}

/* Shuding Liquid Glass backing for the composer, account cards, and quick links. */
.has-liquid-glass { isolation: isolate; }
.liquid-glass-layer {
  opacity: 0;
  transition: opacity .18s ease;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 45%, rgba(206, 227, 250, .12));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 2px rgba(92, 127, 176, .13), inset 1px 0 1px rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
}
#analyzer .article-box.has-liquid-glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 58%, rgba(222, 239, 255, .04));
}
#analyzer .article-box.has-liquid-glass .glass-surface {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* If backdrop filtering itself is unavailable, retain a readable lightweight pane. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #analyzer .article-box,
  #analyzer .article-box.has-liquid-glass { background: rgba(247, 251, 255, .38); }
}
.hero-links .pill.has-liquid-glass {
  background: rgba(255, 255, 255, .20);
  border-color: rgba(255, 255, 255, .8);
  box-shadow: 0 1px 2px rgba(21, 36, 67, .06), 0 8px 18px -13px rgba(21, 36, 67, .35);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.hero-links .pill.has-liquid-glass:hover { background: rgba(255, 255, 255, .5); }
.site-header .cta {
  color: var(--navy);
  background: rgba(255, 255, 255, .32);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 3px 8px rgba(21, 36, 67, .07), inset 0 -1px 1px rgba(92, 127, 176, .15);
}
.site-header .cta:hover { background: rgba(255, 255, 255, .6); }
.auth-dialog.has-liquid-glass {
  background: linear-gradient(145deg, rgba(252, 254, 255, .82), rgba(237, 245, 255, .67));
}
.auth-email-hint, .auth-email-error { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.auth-email-hint { color: var(--ink-soft); }
.auth-email-error { color: #b42318; }
.auth-input[aria-invalid="true"] { border-color: #cf5757; }


/* The header contracts into a floating glass bar as the page scrolls. */
.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-header .nav-inner {
  width: 100%;
  border: 1px solid transparent;
  transition: max-width .36s cubic-bezier(.22, 1, .36, 1), height .36s cubic-bezier(.22, 1, .36, 1), background-color .25s, border-color .25s, border-radius .36s, box-shadow .25s;
}
.site-header[data-scrolled] {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.site-header[data-scrolled] .nav-inner {
  max-width: min(1120px, calc(100% - 48px));
  height: 58px;
  border-color: rgba(255, 255, 255, .78);
  border-radius: 36px;
  background: rgba(248, 251, 255, .68);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: 0 2px 7px rgba(27, 55, 95, .035), inset 0 -1px 1px rgba(99, 131, 173, .13);
}
@media (max-width: 900px) {
  .site-header { height: 64px; }
  .site-header .nav-inner { height: 64px; }
  .site-header[data-scrolled] .nav-inner {
    max-width: calc(100% - 20px);
    height: 52px;
    padding-inline: 14px;
    border-radius: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .nav-inner { transition: none; }
}

/* Disable native page-edge rubber banding without locking the document scroll. */
html, body.home { overscroll-behavior: none; }

.liquid-glass-layer[data-ready] { opacity: 1; }

.auth-plan { margin: 0 0 18px; padding: 10px 12px; border: 1px solid #d7e5fb; border-radius: 10px; background: #eaf3ff; color: #2857a4; font-size: 13px; }
