/* ==========================================================================
   Glint web — shell, layout and legibility layer. Loaded after reference.css.

   Fixed sizes at every width: body 15px, meta 13px, nothing below 12px. Responsiveness
   comes from layout changes only (never zoom or a scale factor):

     < 768        mobile: top bar + bottom tabs, no sidebar, edge-to-edge feed
     768 – 1263   icon-only sidebar (72px), top bar, feed column, no right rail
     ≥ 1264       full sidebar (244px) + top bar + feed (520px) + sticky right rail (320px)
     ≥ 1400       the whole shell is centred in a 1400px band; nothing stretches (4K included)

   Colours and type come from tokens.css (tokens/tokens.json → "web"); see docs/design-tokens.md.
   ========================================================================== */

:root {
  --header-h: 64px;
  --shell-max: 1400px;
  --shell-gutter: 0px;
  --feed-w: 520px;
  --rail-w: 320px;
  --feed-media-max: min(calc(100vh - 200px), 750px);
  --sidebar-w: 244px;
  --layout-web-sidebar: 244px;
  --layout-web-feed-max: var(--feed-w);
  --card-radius: 12px;
  --scroll-thumb: color-mix(in srgb, var(--text-primary) 28%, transparent);
}
@media (min-width: 1400px) { :root { --shell-gutter: calc((100vw - var(--shell-max)) / 2); } }
@media (min-width: 768px) and (max-width: 1263px) { :root { --sidebar-w: 72px; --layout-web-sidebar: 72px; } }
@media (max-width: 767px) { :root { --sidebar-w: 0px; --layout-web-sidebar: 0px; } }
/* The DM page keeps the same sidebar as every other page (reference.css widened it to 240px at ≥1024). */
body.page-direct { --sidebar-w: 244px; }
@media (min-width: 768px) and (max-width: 1263px) { body.page-direct { --sidebar-w: 72px; } }

/* --- Type ------------------------------------------------------------------ */

html, body { background: var(--bg-base); }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
input, textarea, select, button { font-family: var(--font-ui); }
.input, .textarea, .select { font-size: 15px; }
.t-meta { font-size: 13px; }
.t-micro, .badge, .pill { font-size: 12px; }
/* Display face only for the wordmark. */
.t-display, .legal-title, .error-code, .profile-name { font-family: var(--font-ui); font-weight: 700; letter-spacing: -0.01em; }
.design-heading h1 { font-size: 24px; line-height: 1.25; }
.design-heading p { font-size: 15px; color: var(--text-secondary); }
.design-card-heading h2 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.design-card-heading > a { font-size: 14px; font-weight: 600; }
.explore-hero > div > span, .discovery-post-head .post-sub, .tile-hover span { font-size: 12px; }
.discovery-post-head .username, .discovery-post-caption { font-size: 13px; }
.discovery-rail .user-row-sub, .rail .user-row-sub, .user-row-sub { font-size: 14px; }
.discovery-rail .user-row-text .username-row { font-size: 14px; }
.username { font-weight: 600; }

/* Secondary grey only for meta: names, captions, menu labels stay primary. */
.post-sub, .post-head-line, .caption, .caption-text, .menu-item, .nav-item, .rail-head span, .home-profile h2,
.user-row-text .username-row, .likes-line { color: var(--text-primary); }
span.post-sub, time, .t-secondary, .user-row-sub, .caption-more, .field-hint { color: var(--text-secondary); }

/* --- Scrollbars: hidden until the area is hovered (thin overlay style) ------- */

* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
:not(html):hover { scrollbar-color: var(--scroll-thumb) transparent; }
html { scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color 200ms; }
html.is-scrolling { scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
:not(html):hover::-webkit-scrollbar-thumb, html.is-scrolling::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb); }
::-webkit-scrollbar-corner { background: transparent; }

/* --- Buttons and inputs -------------------------------------------------------- */

.btn { border-radius: 8px; font-size: 15px; font-weight: 600; min-height: 36px; }
.btn-sm { font-size: 14px; min-height: 32px; }
.btn-lg { font-size: 16px; }
.btn-secondary { background: var(--bg-raised); color: var(--text-primary); }
.btn-secondary:hover { background: color-mix(in srgb, var(--bg-raised) 88%, var(--text-primary)); }
.icon-btn { color: var(--text-primary); }
.icon-btn:hover { color: color-mix(in srgb, var(--text-primary) 60%, transparent); }
.icon { flex: none; }
.input, .textarea, .select { background: var(--bg-raised); border-color: transparent; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); background: var(--bg-base); }

/* --- Menus ------------------------------------------------------------------- */

.menu { background: var(--bg-menu); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: var(--shadow-sheet); padding: 8px; }
.menu-item { min-height: 44px; padding: 10px 12px; gap: 12px; border-radius: 8px; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.menu-item .icon { width: 22px; height: 22px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-menu-hover); }
.menu-item .menu-chevron { width: 16px; height: 16px; color: var(--text-secondary); }
.menu-item form, form > .menu-item { width: 100%; }
.menu-sep { margin: 6px 4px; background: var(--border-subtle); }
.menu-head { padding: 4px 4px 8px; gap: 8px; color: var(--text-primary); }
.menu-head-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.theme-picker { gap: 8px; padding: 4px; }
.theme-option { font-size: 14px; font-weight: 600; color: var(--text-primary); border-color: var(--border-subtle); background: transparent; border-radius: 10px; padding: 12px 6px; }
.theme-option:hover { background: var(--bg-menu-hover); }
.theme-option[aria-checked="true"] { border-color: var(--brand-500); background: color-mix(in srgb, var(--brand-500) 10%, transparent); color: var(--text-primary); }

/* --- Sidebar (Instagram-style) ------------------------------------------------- */

.sidebar {
  left: var(--shell-gutter); width: var(--sidebar-w); padding: 8px 12px 16px; gap: 0;
  background: var(--bg-base); border-right: 1px solid var(--border-subtle);
  overflow: visible;
}
/* The sidebar fits without scrolling down to ~600px tall; below that it scrolls (the More popover then opens inside it). */
@media (max-height: 599px) { .sidebar { overflow-x: hidden; overflow-y: auto; } }
.sidebar-brand { height: 76px; padding: 20px 12px 16px; flex: none; display: flex; align-items: center; }
.sidebar-brand .wordmark { font-size: 28px; }
.sidebar-brand .wordmark img { height: 28px; width: auto; }
.sidebar-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.nav { flex: 0 0 auto; gap: 2px; }
.nav-item {
  height: 52px; min-height: 52px; padding: 12px; gap: 16px; border-radius: 8px;
  font-size: 16px; font-weight: 400; color: var(--text-primary); background: transparent;
  transition: background-color 120ms;
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item:hover .nav-icon { transform: scale(1.06); }
.nav-item:active .nav-icon { transform: scale(0.94); }
.nav-item[data-current], .nav-item.is-active { background: transparent; color: var(--text-primary); }
.nav-item[data-current]:hover, .nav-item.is-active:hover { background: var(--bg-hover); }
.nav-item[data-current] .nav-label, .nav-item.is-active .nav-label { font-weight: 700; }
.nav-icon, .nav-icon .icon { width: 24px; height: 24px; color: var(--text-primary); }
.nav-item .avatar { --size: 24px; }
.nav-item[data-current] .avatar::after { box-shadow: 0 0 0 2px var(--text-primary); inset: -3px; }
.nav-badge { top: -8px; left: 12px; box-shadow: 0 0 0 2px var(--bg-base); }
.nav-dot { top: -1px; right: -1px; width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--bg-base); background: var(--accent-flash); }
.nav-utilities { display: none; }
.nav-bottom { margin-top: auto; margin-bottom: 0; padding-top: 8px; }
.more-menu { left: 0; bottom: calc(100% + 4px); width: 266px; }
.sidebar-inspiration { display: none; }
@media (min-height: 920px) and (min-width: 1264px) {
  .sidebar-inspiration { display: block; margin: 16px 0 8px; padding: 16px; border-radius: 12px; background: var(--bg-raised); }
  .nav-bottom { margin-top: 0; }
  .sidebar-inspiration h2 { font-size: 16px; font-weight: 700; letter-spacing: 0; }
  .sidebar-inspiration p { font-size: 13px; color: var(--text-secondary); margin: 6px 0 12px; }
  .sidebar-inspiration .btn { font-size: 14px; }
}

/* Icon-only sidebar: 768–1263 and while a slide-over panel is open. */
@media (min-width: 768px) and (max-width: 1263px) {
  .sidebar { width: 72px; padding-inline: 12px; }
  .sidebar .nav-label, .sidebar .wordmark { display: none; }
  .sidebar .brand-mark { display: block; }
  .sidebar .sidebar-brand { padding: 20px 10px 16px; justify-content: flex-start; }
  .sidebar .nav-item { width: 48px; justify-content: center; padding: 12px; }
  .more-menu { left: 0; }
  .page-direct .sidebar { width: 72px; }
  .page-direct .sidebar .nav-label, .page-direct .sidebar .wordmark { display: none; }
  .page-direct .sidebar .brand-mark { display: block; }
}
.shell-panel-open .sidebar { width: 72px; }
.shell-panel-open .sidebar .nav-item { width: 48px; }

/* --- Main column and top bar ----------------------------------------------------- */

.main { margin-left: calc(var(--shell-gutter) + var(--sidebar-w)); margin-right: var(--shell-gutter); min-height: calc(100dvh - var(--header-h)); }
.page-direct .main, .dm { height: calc(100dvh - var(--header-h)); }

.desktop-header {
  position: sticky; top: 0; z-index: 31;
  margin-left: calc(var(--shell-gutter) + var(--sidebar-w)); margin-right: var(--shell-gutter);
  display: flex; align-items: center; gap: 16px; height: var(--header-h); padding: 0 24px;
  background: var(--bg-base); border-bottom: 1px solid var(--border-subtle);
}
.desktop-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--text-primary); transition: background-color 120ms;
}
.header-btn:hover { background: var(--bg-hover); }
.header-btn .icon { width: 24px; height: 24px; }
.header-btn .badge { position: absolute; top: 2px; right: 0; box-shadow: 0 0 0 2px var(--bg-base); }

/* Search: 40px pill, raised fill, no border, 20px icon. */
.desktop-search { position: relative; display: flex; align-items: center; flex: 1 1 auto; max-width: 680px; min-width: 0; height: auto; padding: 0; background: none; border-radius: 0; color: inherit; gap: 0; }
.desktop-search-field {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 8px 0 14px;
  border-radius: 999px; background: var(--bg-raised); color: var(--text-secondary); cursor: text;
  transition: box-shadow 120ms, background-color 120ms;
}
.desktop-search-field .icon { width: 20px; height: 20px; color: var(--text-secondary); }
.desktop-search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; background: transparent;
  color: var(--text-primary); font-size: 15px;
}
.desktop-search-field input::placeholder { color: var(--text-secondary); opacity: 1; }
.desktop-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.desktop-search-field:focus-within { background: var(--bg-base); box-shadow: 0 0 0 2px var(--brand-500); }
.desktop-search-field:focus-within .icon:first-child { color: var(--text-primary); }
.desktop-search-clear { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--text-secondary); color: var(--bg-base); flex: none; }
.desktop-search-clear .icon { width: 12px; height: 12px; color: var(--bg-base) !important; }
.desktop-search-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; place-items: center; background: var(--bg-raised); color: var(--text-primary); }
.desktop-search-toggle .icon { width: 20px; height: 20px; }
@media (min-width: 768px) and (max-width: 1023px) {
  .desktop-search { flex: 0 0 auto; }
  .desktop-search:not(.is-open) .desktop-search-field { display: none; }
  .desktop-search:not(.is-open) .desktop-search-toggle { display: grid; }
  .desktop-search.is-open { flex: 1 1 auto; }
}

/* Account chip + dropdown. */
.account-menu { position: relative; }
.desktop-account {
  display: flex; align-items: center; gap: 8px; width: auto; max-width: 240px; height: 40px;
  padding: 4px 10px 4px 4px; border-radius: 999px; background: transparent; color: var(--text-primary);
  transition: background-color 120ms;
}
.desktop-account:hover, .desktop-account[aria-expanded="true"] { background: var(--bg-hover); }
.desktop-account .avatar { --size: 32px; }
.desktop-account strong { font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.desktop-account .caret { width: 16px; height: 16px; color: var(--text-primary); transition: transform 150ms; }
.desktop-account[aria-expanded="true"] .caret { transform: rotate(180deg); }
.account-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; z-index: 60; }
.account-dropdown-head { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; color: var(--text-primary); }
.account-dropdown-head:hover { background: var(--bg-menu-hover); }
.account-dropdown-head .grow { display: grid; gap: 2px; min-width: 0; }
.account-dropdown-head strong { font-size: 16px; font-weight: 700; }
.account-dropdown-head .grow > span { font-size: 14px; color: var(--text-secondary); }
.account-dropdown form { margin: 0; }
@media (max-width: 1023px) { .desktop-account strong { display: none; } .desktop-account { padding-right: 8px; } }

/* --- Mobile top bar and bottom tabs (< 768) ------------------------------------------ */

.topbar { height: 52px; padding: 0 12px 0 16px; background: var(--bg-base); border-bottom: 1px solid var(--border-subtle); }
.topbar .wordmark img { height: 26px; width: auto; }
.topbar-actions { gap: 16px; }
.topbar .icon-btn { width: 40px; height: 40px; margin: 0; }
.topbar .icon-btn .icon { width: 24px; height: 24px; }
.topbar .icon-btn .nav-badge { top: 2px; left: auto; right: 0; box-shadow: 0 0 0 2px var(--bg-base); }
.topbar .icon-btn .nav-dot { top: 7px; right: 7px; }
.page-header h1 { font-size: 17px; font-weight: 700; }

.tabbar { --tabbar-h: 56px; background: var(--bg-base); border-top: 1px solid var(--border-subtle); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar { background: color-mix(in srgb, var(--bg-base) 90%, transparent); }
}
.tabbar ul { height: 56px; }
.tab { color: var(--text-primary); }
.tab > .icon, .tab > .avatar, .tab > .create-key { margin-top: 0; position: relative; z-index: 1; }
.tab .icon { width: 24px; height: 24px; }
/* Gmail-style active pill behind the icon (no dot). */
.tab::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 32px; margin: -16px 0 0 -28px;
  border-radius: 16px; background: transparent; transition: background-color 150ms;
}
.tab[data-current]::before { background: var(--bg-raised); }
.tab[data-current]::after, .tab-create::before { display: none; }
.tab .avatar { --size: 26px; }
.tab[data-current] .avatar::after { box-shadow: 0 0 0 2px var(--text-primary); inset: -2px; }
.tab-create .create-key { width: 40px; height: 32px; border-radius: 10px; }
.tab-create .create-key .icon { width: 20px; height: 20px; }
@media (max-width: 767px) {
  .main { margin: 0; min-height: 100dvh; padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .tabbar { height: calc(56px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(56px + env(safe-area-inset-bottom) + 12px); }
}

/* --- Panels (slide-overs) --------------------------------------------------------- */

.panel { left: calc(var(--shell-gutter) + 72px); background: var(--bg-base); }
.panel-title { font-size: 24px; font-weight: 700; }

/* --- Cards ------------------------------------------------------------------------ */

.post-card, .story-tray, .design-card, .home-profile, .rail-me, .discovery-post, .activity-section, .pd {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--card-radius); box-shadow: var(--shadow-card);
}
.rail-head { background: var(--bg-surface); border-color: var(--border-subtle); border-radius: var(--card-radius) var(--card-radius) 0 0; box-shadow: none; }
.rail-list { background: var(--bg-surface); border-color: var(--border-subtle); border-radius: 0 0 var(--card-radius) var(--card-radius); }
.caught-up { background: var(--bg-raised); border-radius: var(--card-radius); }
.caught-up h2 { font-size: 15px; font-weight: 700; } .caught-up p { font-size: 13px; color: var(--text-secondary); }

/* --- Feed: capped column + sticky right rail ------------------------------------------- */

.feed-layout { display: flex; justify-content: center; align-items: flex-start; gap: 32px; padding: 16px 24px 40px; }
.feed-col { flex: 0 1 var(--feed-w); width: 100%; max-width: var(--feed-w); min-width: 0; padding-top: 0; }
.rail {
  position: sticky; top: calc(var(--header-h) + 16px); align-self: flex-start; flex: none;
  width: var(--rail-w); max-height: calc(100dvh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 2px 8px 0;
}
.story-tray { padding: 12px 8px; margin-bottom: 16px; }
.story-name { font-size: 13px; color: var(--text-primary); max-width: 76px; }
.story-name.is-seen { color: var(--text-secondary); }
.post-card { padding: 0 12px 12px; margin-bottom: 16px; }
.post-head { padding: 12px 0; min-height: 0; gap: 10px; }
.post-head-line { font-size: 15px; }
.post-sub, .post-reposted { font-size: 14px; }
.post-body { font-size: 15px; padding: 0 2px; }
.post-actions { padding: 8px 2px 6px; gap: 16px; }
.post-actions .icon-btn .icon { width: 24px; height: 24px; }
.feed-section-title { font-size: 17px; font-weight: 700; }

/* Media: true aspect ratio, capped so the whole post fits the screen, letterboxed (never badly cropped). */
.post-media { border-radius: 8px; }
.post-card .post-media > .media, .post-card .post-media > .carousel { max-height: var(--feed-media-max); }
.post-card .post-media .media img, .post-card .post-media .media video { object-fit: contain; }
.post-card .post-media .media.is-full-frame, .post-card .post-media .media-video { background-color: #000 !important; }

/* Like: outline matches the other action icons; liked = bright red with a small pop. */
.action-like .liked, .action-like .liked .icon { color: var(--accent-flash); }
.icon-btn.pop { animation: like-pop 320ms cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes like-pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 70% { transform: scale(0.94); } 100% { transform: scale(1); } }

/* Right rail content. */
.home-profile { padding: 0 16px 16px; margin-bottom: 16px; }
.home-profile-cover { height: 72px; margin: 0 -16px -36px; }
.home-profile h2 { font-size: 17px; font-weight: 700; }
.home-profile > a { font-size: 14px; }
.home-profile > p { font-size: 15px; color: var(--text-primary); line-height: 1.4; }
.home-profile-stats { margin: 12px 0; }
.home-profile-stats strong { font-size: 16px; }
.home-profile-stats span { font-size: 13px; color: var(--text-secondary); }
.rail-head { padding: 14px 16px 6px; margin: 0; }
.rail-head span { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.rail-head .text-btn { font-size: 14px; font-weight: 600; color: var(--brand-400); }
.rail-list { padding: 4px 16px 12px; }
.rail .user-row { padding: 6px 0; gap: 12px; }
.rail .user-row .avatar { --size: 40px; }
.rail .user-row .btn, .discovery-rail .user-row .btn { font-size: 15px; min-height: 32px; padding: 6px 14px; }
.home-profile .btn { font-size: 15px; }
.rail .site-footer, .discovery-rail .site-footer { margin-top: 16px; padding-left: 4px; font-size: 12px; color: var(--text-secondary); }

/* Discovery / profile two-column pages: same centring and sticky rail. */
.discovery-layout, .profile-layout { padding: 16px 24px 40px; gap: 32px; grid-template-columns: minmax(0, 1fr) var(--rail-w); }
.discovery-rail { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; max-height: calc(100dvh - var(--header-h) - 32px); overflow-y: auto; }
@media (max-width: 1263px) {
  .discovery-layout, .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .discovery-rail { display: none; }
}

/* --- Breakpoints -------------------------------------------------------------------------- */

@media (max-width: 1263px) {
  .rail { display: none !important; }
  .feed-layout { padding: 16px 24px 40px; }
}
@media (max-width: 767px) {
  .desktop-header { display: none; }
  .feed-layout { padding: 0; gap: 0; }
  .feed-col { max-width: none; }
  .post-card, .story-tray { border-radius: 0; border-inline: 0; box-shadow: none; margin-bottom: 8px; }
  .post-card { padding: 0 12px 12px; }
  .post-media { border-radius: 4px; }
  .discovery-layout { padding: 12px; }
  .profile-layout { padding: 0; }
}

/* --- Auth (sign-in / sign-up): system type, 52px fields --------------------------------------- */

.auth-body { font-family: var(--font-ui); }
.auth-nav { padding: 20px 3%; gap: 48px; }
.auth-nav .wordmark img { height: 40px; width: auto; }
.auth-nav nav { gap: 32px; font-size: 15px; font-weight: 600; }
.auth-nav > .btn { min-height: 40px; font-size: 15px; }
.login-story h1 { font-size: clamp(36px, 3.6vw, 56px); line-height: 1.08; font-weight: 800; }
.login-story > p { font-size: 18px; line-height: 1.45; }
.login-features small { font-size: 14px; }
.login-features strong { font-size: 16px; }
.login-community { font-size: 16px; margin-top: 32px; }
.auth-col { max-width: 480px; padding: 36px 40px; border-radius: 16px; }
.login-heading, .signup-heading { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.login-subtitle { font-size: 16px; color: color-mix(in srgb, var(--text-primary) 80%, var(--bg-base)); margin: 6px 0 24px; }
.auth-tagline { font-size: 15px; font-weight: 500; color: color-mix(in srgb, var(--text-primary) 80%, var(--bg-base)); text-align: left; margin: 6px 0 20px; }
.auth-form { gap: 14px; }
.auth-form .btn-lg, .auth-col .btn-lg { height: 48px; min-height: 48px; font-size: 16px; margin-top: 4px; border-radius: 10px; }
.auth-or { font-size: 13px; margin: 16px 0; }
.auth-alt { margin-top: 20px; font-size: 15px; }
.auth-forgot { margin-top: 16px; font-size: 15px; font-weight: 600; }
.signup-story h2 { font-size: 40px; font-weight: 800; }
.signup-story > p { font-size: 16px; }
.signup-benefits p { font-size: 16px; }
.signup-story blockquote { font-size: 20px; }
.signup-story .wordmark img { height: 40px; width: auto; }

/* Floating-label field: 52px, typed text 16px, label centred until it floats to 12px. */
.float { position: relative; display: block; height: 52px; }
.float .input, .auth-form .input {
  height: 52px; min-height: 52px; padding: 22px 14px 6px; font-size: 16px; line-height: 22px;
  border-radius: 10px; background: var(--bg-raised); border: 1px solid transparent;
}
.float .input:focus { background: var(--bg-base); border-color: var(--brand-500); }
.float label {
  top: 26px; left: 15px; transform: translateY(-50%); font-size: 16px; line-height: 20px;
  color: var(--text-secondary); transition: top 150ms var(--ease-sheet), font-size 150ms;
}
.float .input:focus + label, .float .input:not(:placeholder-shown) + label { top: 15px; transform: translateY(-50%); font-size: 12px; line-height: 16px; }
.float .trailing .t-link { font-size: 14px; }

/* Email | Phone segmented control: equal 40px segments, no gap underneath. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; height: 44px; padding: 4px; gap: 4px; margin: 0; border-radius: 10px; background: var(--bg-raised); }
.seg button { height: 36px; min-height: 0; margin: 0; border-radius: 8px; font-size: 15px; font-weight: 600; line-height: 36px; color: var(--text-secondary); }
.seg button[aria-pressed="true"] { background: var(--bg-base); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

@media (max-width: 1023px) {
  .auth-col { padding: 28px; }
  .login-story h1 { font-size: 40px; }
}
@media (max-width: 767px) {
  .auth-col { padding: 28px 20px; }
  .auth-col .auth-card { padding: 0; }
  .auth-col .auth-alt { margin: 20px 0 0; padding: 16px 0 0; }
  .login-heading, .signup-heading { font-size: 24px; }
}
/* Short screens: the landing fits without scrolling. */
@media (min-width: 1024px) and (max-height: 880px) {
  .auth-nav { padding-block: 12px; }
  .auth-main { padding-bottom: 12px; }
  .login-story h1 { margin-block: 16px 12px; }
  .login-features { gap: 14px; margin-top: 20px; }
  .login-community { margin-top: 20px; }
  .auth-body > .site-footer { padding-block: 8px 12px; }
}
@media (min-width: 1024px) and (max-height: 740px) {
  .login-community { display: none; }
}
/* Desktop: legal links and "English ▾ · © Glint" share one footer row so login/sign-up fit 1366×640 (audit WL-06). */
@media (min-width: 1024px) {
  .auth-body > .site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 24px; }
}
@media (min-width: 1024px) and (max-height: 639px) {
  .auth-nav { padding-block: 6px 2px; }
  .auth-main { padding-block: 8px 4px; }
  .auth-body > .site-footer { padding-block: 4px 8px; }
  .auth-col { padding-block: 10px; }
  .auth-col .auth-forgot { margin-top: 8px; }
  .auth-col .auth-or { margin-block: 2px; }
}

/* Sign-up card: the generic `.auth-wrap:not(.login-wrap) .auth-col { margin: 20px 0 }` (reference.css) outranks
   `.signup-wrap .auth-col { margin: 0 }` and left a light band above and below the form column. */
.auth-body .auth-wrap.signup-wrap:not(.login-wrap) .auth-col { margin: 0; }
.auth-body .auth-wrap.signup-wrap { max-width: 980px; background: var(--bg-base); border-radius: 16px; }
.auth-body .signup-wrap .auth-col { padding: 40px; }
.signup-story { min-height: 640px; padding: 32px; }
.auth-card { align-content: start; }
.auth-body .signup-wrap .auth-col { align-content: center; }
.signup-card .signup-heading { margin-bottom: 0; }
/* reference.css pinned the DM page's sidebar to 240px / 16px padding at ≥1024. */
.page-direct .sidebar { width: var(--sidebar-w); padding-inline: 12px; }

/* Legibility floor on discovery / DM / reels side lists (sizes only; layout untouched). */
.dm-row-preview, .dm-row-time { font-size: 14px; }
.dm-note-name { font-size: 13px; }
.reels-playlist-item strong { font-size: 15px; line-height: 1.3; }
.reels-playlist-item small { font-size: 13px; }
.category-pills a { font-size: 14px; font-weight: 600; }
.discovery-rail small, .discovery-rail .user-row-sub { font-size: 13px; }

/* ── Auth pages follow the theme (light | dark | system) ─────────────────────────────────────────────
   The photo side is tuned through --auth-* tones: dark keeps the white copy over a dark scrim; light
   washes the photo pale and switches the copy to near-black so it stays AA-readable. */
.auth-body {
  --auth-ink: #FFFFFF; --auth-ink-2: rgba(255, 255, 255, 0.88); --auth-accent: var(--ring-to);
  --auth-scrim: var(--overlay-scrim); --auth-glass: #1a254766; --auth-glass-border: #ffffff55;
  --auth-panel: #ffffff24; --auth-panel-border: #ffffff40; --auth-hover: #ffffff1f;
}
[data-theme="light"] .auth-body {
  --auth-ink: #050505; --auth-ink-2: #3A3B3C; --auth-accent: #0D7A6C;
  --auth-scrim: linear-gradient(90deg, rgba(247, 249, 253, 0.93) 0%, rgba(247, 249, 253, 0.86) 34%, rgba(247, 249, 253, 0.58) 62%, rgba(247, 249, 253, 0.42) 100%);
  --auth-glass: rgba(255, 255, 255, 0.72); --auth-glass-border: rgba(13, 122, 108, 0.45);
  --auth-panel: rgba(255, 255, 255, 0.75); --auth-panel-border: rgba(0, 0, 0, 0.08); --auth-hover: rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: light) {
  [data-theme="system"] .auth-body {
    --auth-ink: #050505; --auth-ink-2: #3A3B3C; --auth-accent: #0D7A6C;
    --auth-scrim: linear-gradient(90deg, rgba(247, 249, 253, 0.93) 0%, rgba(247, 249, 253, 0.86) 34%, rgba(247, 249, 253, 0.58) 62%, rgba(247, 249, 253, 0.42) 100%);
    --auth-glass: rgba(255, 255, 255, 0.72); --auth-glass-border: rgba(13, 122, 108, 0.45);
    --auth-panel: rgba(255, 255, 255, 0.75); --auth-panel-border: rgba(0, 0, 0, 0.08); --auth-hover: rgba(0, 0, 0, 0.06);
  }
}
.auth-body:has(.auth-welcome-photo) { color: var(--auth-ink); }
.auth-body:has(.auth-welcome-photo)::before { background: var(--auth-scrim); }
.auth-body:has(.auth-welcome-photo) .auth-nav .wordmark { color: var(--auth-ink); }
.auth-body > .site-footer { color: var(--auth-ink-2); }
.welcome-pill { border-color: var(--auth-glass-border); background: var(--auth-glass); }
.welcome-pill .icon, .login-story h1 > span { color: var(--auth-accent); }
.login-features > div > span { border-color: var(--auth-accent); background: var(--auth-glass); color: var(--auth-accent); }
.login-features small { color: var(--auth-ink-2); }
.login-community { background: var(--auth-panel); border-color: var(--auth-panel-border); }
/* Light: the dark-ink wordmark over the washed photo. */
[data-theme="light"] .auth-nav .wordmark .brand-wordmark-dark { display: none; }
[data-theme="light"] .auth-nav .wordmark .brand-wordmark-light { display: block; }
@media (prefers-color-scheme: light) {
  [data-theme="system"] .auth-nav .wordmark .brand-wordmark-dark { display: none; }
  [data-theme="system"] .auth-nav .wordmark .brand-wordmark-light { display: block; }
}
/* Light: white form card with a hairline + soft shadow, near-black field text, readable disabled button. */
[data-theme="light"] .auth-col { border: 1px solid #E4E6EB; box-shadow: 0 12px 40px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06); }
[data-theme="light"] .auth-col .input { color: #050505; }
[data-theme="light"] .auth-col .btn-primary:disabled { opacity: 1; background: #DCE4FB; color: #2450D4; }
[data-theme="light"] .signup-benefits .icon { color: #0D7A6C; }
@media (prefers-color-scheme: light) {
  [data-theme="system"] .auth-col { border: 1px solid #E4E6EB; box-shadow: 0 12px 40px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06); }
  [data-theme="system"] .auth-col .input { color: #050505; }
  [data-theme="system"] .auth-col .btn-primary:disabled { opacity: 1; background: #DCE4FB; color: #2450D4; }
  [data-theme="system"] .signup-benefits .icon { color: #0D7A6C; }
}
.auth-body .auth-wrap.signup-wrap .auth-col { border: 0; }

/* Guest nav: sun / moon toggle before Sign Up. */
.auth-nav > .auth-theme { margin-left: auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--auth-ink); }
.auth-nav > .auth-theme:hover { background: var(--auth-hover); }
.auth-nav > .auth-theme:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.auth-nav > .auth-theme + .btn { margin-left: calc(12px - var(--auth-nav-gap, 48px)); }
.auth-nav { --auth-nav-gap: 48px; }
@media (min-width: 768px) and (max-width: 1023px) { .auth-nav { --auth-nav-gap: 35px; } }
@media (max-width: 767px) { .auth-nav { gap: 8px; --auth-nav-gap: 8px; } .auth-nav > .auth-theme + .btn { margin-left: 4px; } }
.auth-body:not(:has(.auth-welcome-photo)) .auth-nav > .auth-theme { color: var(--text-primary); }

/* "Get the app": Android APK badge (no store branding) + optional 32-bit link. */
.app-get { display: grid; gap: 10px; }
.app-get-title { font-size: 14px; font-weight: 600; }
.app-get-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.apk-badge {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 12px;
  border-radius: 10px; background: #050505; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none; transition: transform 120ms, background 120ms;
}
.apk-badge:hover { background: #1c1e21; text-decoration: none; }
.apk-badge:active { transform: scale(0.98); }
.apk-badge:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.apk-badge .apk-robot { width: 26px; height: 26px; color: #3DDC84; flex: none; }
.apk-badge .apk-arrow { width: 18px; height: 18px; opacity: 0.8; flex: none; margin-left: 2px; }
.apk-text { display: grid; line-height: 1.1; text-align: left; }
.apk-text small { font-size: 11px; font-weight: 500; letter-spacing: 0.02em; opacity: 0.85; }
.apk-text strong { font-size: 17px; font-weight: 700; }
.apk-alt { font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
/* Under the form (inside the card). */
.app-get-card { justify-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.app-get-card .app-get-title { color: var(--text-secondary); }
.app-get-card .app-get-links { justify-content: center; }
.app-get-card .apk-alt { color: var(--text-secondary); }
.app-get-card .apk-alt:hover { color: var(--text-primary); }
/* Photo side (desktop). */
.app-get-hero { margin-top: 26px; justify-items: start; }
.app-get-hero .app-get-title { color: var(--auth-ink); font-size: 15px; }
.app-get-hero .apk-alt { color: var(--auth-ink-2); }
@media (min-width: 1024px) and (max-height: 880px) { .login-story .app-get-hero { margin-top: 18px; } }
@media (max-width: 767px) {
  .app-get-hero { display: none; }
  .app-get-card { margin-top: 16px; padding-top: 14px; gap: 8px; }
  .app-get-card .app-get-title { font-size: 13px; }
  .apk-badge { min-height: 44px; padding-block: 4px; }
  .apk-text strong { font-size: 15px; }
  .auth-nav > .auth-theme { width: 40px; height: 40px; }
}
/* Phones: the copy sits on top of the photo, so the light wash is even top to bottom. */
@media (max-width: 767px) {
  [data-theme="light"] .auth-body { --auth-scrim: rgba(247, 249, 253, 0.86); }
}
@media (max-width: 767px) and (prefers-color-scheme: light) {
  [data-theme="system"] .auth-body { --auth-scrim: rgba(247, 249, 253, 0.86); }
}

/* Login hero: start near the top instead of floating mid-height (no big gap under the nav). */
@media (min-width: 1024px) { .login-wrap { align-items: start; } .login-story { padding-top: 8px; } }

/* Guest nav: no Sign Up button (the forms link to each other); the theme toggle sits at the right. */
.auth-nav > .auth-theme { margin-left: auto; }

/* Login / sign-up on short laptop screens (e.g. 1366×768 at 125% → ~620px tall): fit one screen by
   tightening the layout — features in two columns, less vertical padding — not by shrinking the type. */
@media (min-width: 1024px) and (max-height: 820px) {
  .auth-nav { padding-block: 10px; }
  .auth-main { padding-top: 0; padding-bottom: 16px; }
  .login-story { padding-block: 0; }
  .welcome-pill { padding: 6px 12px; }
  .login-story h1 { font-size: clamp(34px, 3.2vw, 46px); margin: 12px 0 8px; }
  .login-story > p { font-size: 16px; }
  .login-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-top: 16px; }
  .login-features > div { gap: 12px; }
  .login-features > div > span { width: 40px; height: 40px; border-radius: 12px; }
  .login-story .app-get-hero { display: grid; margin-top: 22px; }
  .login-wrap .auth-col .app-get { display: none; }
  .auth-col { padding: 22px 32px; }
  .login-heading, .signup-heading { font-size: 24px; }
  .login-subtitle { margin: 2px 0 14px; font-size: 15px; }
  .auth-form { gap: 10px; }
  .float { height: 48px; }
  .auth-or { margin: 10px 0; }
  .auth-col .auth-alt { margin-top: 12px; padding-top: 12px; }
  .auth-col .app-get { margin-top: 12px; }
}

/* Login / sign-up fill exactly one screen on any laptop/desktop height: the main area takes the height
   left under the nav and centres both columns in it; vertical spacing scales with the screen height
   (type stays readable), so nothing is cut off and there's no empty band at the bottom. */
@media (min-width: 1024px) {
  .auth-body { min-height: 100dvh; display: flex; flex-direction: column; }
  .auth-body > .auth-main { flex: 1 0 auto; display: flex; align-items: center; min-height: calc(100dvh - 72px); padding-block: clamp(8px, 2.5vh, 40px); }
  .auth-body > .auth-main > .auth-wrap { width: 100%; }
  .login-wrap { align-items: center; }
  .login-story { padding-top: 0; }
  .auth-col { padding: clamp(18px, 3.2vh, 36px) clamp(24px, 2.6vw, 40px); }
  .auth-form { gap: clamp(8px, 1.5vh, 14px); }
  .float { height: clamp(44px, 6.6vh, 52px); }
  .auth-form .btn-lg, .auth-col .btn-lg { height: clamp(42px, 6vh, 48px); min-height: 0; }
  .login-heading, .signup-heading { font-size: clamp(22px, 3.6vh, 28px); }
  .login-subtitle { margin: 2px 0 clamp(10px, 2.2vh, 24px); }
  .auth-or { margin-block: clamp(6px, 1.4vh, 16px); }
  .login-story h1 { font-size: clamp(32px, min(3.4vw, 7vh), 56px); margin: clamp(8px, 2vh, 24px) 0 clamp(6px, 1.4vh, 18px); }
  .login-features { gap: clamp(10px, 1.8vh, 22px) 20px; margin-top: clamp(12px, 2.4vh, 30px); }
}

/* Get-the-app block: title clearly separated from the badges; App Store badge matches the APK one. */
.app-get { gap: 12px; }
.app-get-title { margin: 0; line-height: 1.3; }
.ios-badge .apk-robot { color: #fff; }
.ios-badge[aria-disabled="true"] { opacity: 0.85; }
/* Desktop shows the app badges on the photo side only (no duplicate under the form); guest nav aligns with the content width. */
@media (min-width: 1024px) {
  .login-wrap .auth-col .app-get { display: none; }
  .auth-nav { max-width: 1450px; margin-inline: auto; width: 100%; box-sizing: border-box; }
}

/* Login / sign-up, final layout rules (override the adaptive block above):
   - fields are always a full 52px with a 12px gap (the shrinking .float box made the focused field
     overlap the password field);
   - content starts right under the nav (no big gap above the hero) and the whole page fits the
     screen height; the floated label is 12px and clearly readable. */
@media (min-width: 1024px) {
  .float { height: 52px; }
  .auth-form { gap: 12px; }
  .float .input:focus { background: var(--bg-raised); }
  .float .input:focus + label, .float .input:not(:placeholder-shown) + label { top: 14px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
  .float .input { padding-top: 24px; }
  .auth-body > .auth-main { align-items: flex-start; min-height: 0; padding-top: clamp(8px, 2.5vh, 32px); padding-bottom: 16px; }
  .auth-nav { padding-block: 14px 6px; }
}
@media (min-width: 1024px) and (max-height: 720px) {
  .login-story h1 { font-size: clamp(30px, 6vh, 44px); margin: 10px 0 6px; }
  .welcome-pill { padding: 5px 12px; }
  .login-story > p { font-size: 15px; }
  .login-features { margin-top: 10px; gap: 8px 20px; }
  .login-story .app-get-hero { margin-top: 12px; }
  .auth-col { padding: 18px 28px; }
  .login-subtitle { margin-bottom: 10px; }
  .auth-or { margin-block: 6px; }
  .auth-col .auth-alt { margin-top: 8px; padding-top: 8px; }
  .auth-form .btn-lg, .auth-col .btn-lg { height: 44px; }
}

/* ── Light auth pages, Facebook-soft: a mid-tone cool-gray wash over the photo (not a white glare),
   #F0F2F5 page, white form card with a soft shadow, #F0F2F5 fields, #1C1E21 / #65676B text and a
   readable disabled button (brand blue at 55% with white text). ─────────────────────────────────── */
[data-theme="light"] .auth-body {
  --auth-ink: #1C1E21; --auth-ink-2: #4B4F56;
  --auth-scrim: linear-gradient(90deg, rgba(225, 229, 236, 0.82) 0%, rgba(225, 229, 236, 0.76) 34%, rgba(225, 229, 236, 0.62) 62%, rgba(225, 229, 236, 0.55) 100%);
  --auth-glass: rgba(255, 255, 255, 0.6); --auth-panel: rgba(255, 255, 255, 0.6);
  --text-primary: #1C1E21; --text-secondary: #65676B; --bg-raised: #F0F2F5; --border-subtle: #DADDE1;
  background-color: #F0F2F5;
}
@media (prefers-color-scheme: light) {
  [data-theme="system"] .auth-body {
    --auth-ink: #1C1E21; --auth-ink-2: #4B4F56;
    --auth-scrim: linear-gradient(90deg, rgba(225, 229, 236, 0.82) 0%, rgba(225, 229, 236, 0.76) 34%, rgba(225, 229, 236, 0.62) 62%, rgba(225, 229, 236, 0.55) 100%);
    --auth-glass: rgba(255, 255, 255, 0.6); --auth-panel: rgba(255, 255, 255, 0.6);
    --text-primary: #1C1E21; --text-secondary: #65676B; --bg-raised: #F0F2F5; --border-subtle: #DADDE1;
    background-color: #F0F2F5;
  }
}
@media (max-width: 767px) {
  [data-theme="light"] .auth-body { --auth-scrim: rgba(225, 229, 236, 0.8); }
}
@media (max-width: 767px) and (prefers-color-scheme: light) {
  [data-theme="system"] .auth-body { --auth-scrim: rgba(225, 229, 236, 0.8); }
}
[data-theme="light"] .auth-col {
  background: #FFFFFF; color: #1C1E21; border: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.10);
}
[data-theme="light"] .auth-col .input, [data-theme="light"] .auth-col select { background: #F0F2F5; color: #1C1E21; border-color: #F0F2F5; }
[data-theme="light"] .auth-col .float .input:focus { background: #F0F2F5; border-color: #2450D4; }
[data-theme="light"] .auth-col .login-subtitle, [data-theme="light"] .auth-col .auth-tagline, [data-theme="light"] .auth-col .t-meta, [data-theme="light"] .auth-col .field-hint { color: #65676B; }
[data-theme="light"] .auth-col .btn-primary:disabled { opacity: 1; background: color-mix(in srgb, #2450D4 55%, #FFFFFF); color: #FFFFFF; }
[data-theme="light"] .auth-col .seg button[aria-pressed="true"] { background: #FFFFFF; }
[data-theme="light"] .auth-body .auth-wrap.signup-wrap { background: #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.10); }
[data-theme="light"] .auth-body .signup-wrap .auth-col { box-shadow: none; }
[data-theme="light"] .signup-story { background: #E7EBF2; color: #1C1E21; }
@media (prefers-color-scheme: light) {
  [data-theme="system"] .auth-col { background: #FFFFFF; color: #1C1E21; border: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.10); }
  [data-theme="system"] .auth-col .input, [data-theme="system"] .auth-col select { background: #F0F2F5; color: #1C1E21; border-color: #F0F2F5; }
  [data-theme="system"] .auth-col .float .input:focus { background: #F0F2F5; border-color: #2450D4; }
  [data-theme="system"] .auth-col .login-subtitle, [data-theme="system"] .auth-col .auth-tagline, [data-theme="system"] .auth-col .t-meta, [data-theme="system"] .auth-col .field-hint { color: #65676B; }
  [data-theme="system"] .auth-col .btn-primary:disabled { opacity: 1; background: color-mix(in srgb, #2450D4 55%, #FFFFFF); color: #FFFFFF; }
  [data-theme="system"] .auth-col .seg button[aria-pressed="true"] { background: #FFFFFF; }
  [data-theme="system"] .auth-body .auth-wrap.signup-wrap { background: #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.10); }
  [data-theme="system"] .auth-body .signup-wrap .auth-col { box-shadow: none; }
  [data-theme="system"] .signup-story { background: #E7EBF2; color: #1C1E21; }
}

/* ── Sign-up fits one screen (1366×640 and up), like the login: the side panel no longer forces
   640px, spacing scales with the height, the "Get the app" badges move to the side panel on desktop
   (no extra block under the form) and the quote steps aside on short screens. Type stays ≥ 14px,
   fields 52px. ─────────────────────────────────────────────────────────────────────────────── */
.signup-story .app-get { display: none; }
@media (min-width: 1024px) {
  .signup-story { min-height: 0; padding: clamp(20px, 3.6vh, 34px) 32px; }
  .signup-story h2 { margin-top: clamp(14px, 4vh, 45px); font-size: clamp(30px, 5.4vh, 40px); }
  .signup-story > p { margin-top: 8px; }
  .signup-benefits { margin-top: clamp(14px, 3.4vh, 36px); gap: clamp(10px, 2.6vh, 28px); }
  .signup-story .app-get-hero { display: grid; margin-top: clamp(16px, 3.6vh, 34px); }
  .signup-story blockquote { padding-top: clamp(16px, 4vh, 50px); }
  .signup-wrap .auth-col .app-get-card { display: none; }
  .auth-body .signup-wrap .auth-col { padding: clamp(20px, 3.6vh, 40px) clamp(28px, 2.8vw, 40px); }
  .signup-wrap .auth-tagline { margin: 4px 0 clamp(10px, 2.2vh, 20px); }
  .signup-wrap .field-hint { font-size: 14px; line-height: 1.35; margin: 0; }
  .signup-wrap .auth-col .auth-alt { margin-top: clamp(10px, 2vh, 20px); padding-top: clamp(8px, 1.6vh, 16px); }
  .signup-wrap .signup-top { margin-bottom: 4px; }
  .signup-wrap .signup-progress { margin-bottom: clamp(8px, 1.8vh, 16px); }
  .signup-wrap .auth-intro { gap: 4px; }
  .signup-wrap .auth-intro .t-title-lg { font-size: 22px; }
}
/* Legibility floor on the sign-up steps (all widths): secondary copy ≥ 14px. */
.signup-wrap .auth-col .t-meta, .signup-wrap .step-count, .signup-wrap .terms-check, .signup-wrap .field-hint, .signup-wrap .otp-foot, .signup-wrap .otp-foot .t-link, .signup-wrap .debug-hint { font-size: 14px; line-height: 1.4; }
@media (min-width: 1024px) and (max-height: 820px) {
  .signup-story blockquote { display: none; }
  .signup-wrap .auth-glyph { display: none; }
}

/* ── Signed-in light theme, Facebook-soft: the frame's content area is #F0F2F5 so the white cards stand
   out (instead of white on near-white); the top bar stays a white surface with a hairline under it. */
html[data-theme="light"] { --fr-bg: #F0F2F5; --fr-page: #E4E6EB; }
html[data-theme="light"] body.is-signed-in .desktop-header::before { background: #FFFFFF; border-bottom: 1px solid var(--fr-line); }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] { --fr-bg: #F0F2F5; --fr-page: #E4E6EB; }
  html[data-theme="system"] body.is-signed-in .desktop-header::before { background: #FFFFFF; border-bottom: 1px solid var(--fr-line); }
}
/* Secondary buttons: Facebook's #E4E6EB, readable on the #F0F2F5 frame and on white cards alike. */
html[data-theme="light"] body.is-signed-in .btn-secondary { background: #E4E6EB; }
html[data-theme="light"] body.is-signed-in .btn-secondary:hover { background: #D8DADF; }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] body.is-signed-in .btn-secondary { background: #E4E6EB; }
  html[data-theme="system"] body.is-signed-in .btn-secondary:hover { background: #D8DADF; }
}
/* Controls that sit straight on the #F0F2F5 frame (fields, search, pills, hover rows) step one shade
   darker so they don't vanish into it; inside white cards #E4E6EB still reads as a soft field. */
html[data-theme="light"] body.is-signed-in .main { --bg-raised: #E4E6EB; --bg-hover: #E4E6EB; }
@media (prefers-color-scheme: light) {
  html[data-theme="system"] body.is-signed-in .main { --bg-raised: #E4E6EB; --bg-hover: #E4E6EB; }
}
