/* ==========================================================================
   WANT - Editorial Dating Concierge
   Design System & Architecture: Single Non-Scrollable Viewport (Instinct-Inspired)
   ========================================================================== */

:root {
  /* Editorial Palette inspired by User Artwork & Instinct */
  --bg-parchment: #FAF4EE;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-border: rgba(131, 18, 32, 0.12);

  /* Deep Wine & Burgundy Gradients */
  --wine-deep: #5E0814;
  --wine-base: #78101C;
  --wine-ruby: #B32034;
  --wine-soft: #D36875;
  --wine-tint: rgba(131, 18, 32, 0.06);
  --wine-tint-hover: rgba(131, 18, 32, 0.10);
  --wine-border: rgba(131, 18, 32, 0.22);

  /* Editorial Typography Colors */
  --text-headline: #4A151D;
  --text-body: #2B2526;
  --text-muted: #736C6B;
  --text-faint: #9E9796;

  /* Instinct Dark Elements */
  --dark-pill: #161314;
  --dark-pill-hover: #2E181D;

  /* Layout Constants (Strictly No Pills) */
  --radius-btn: 4px;
  --radius-card: 4px;
  --radius-input: 4px;
  --radius-pill: 4px; /* Fallback guard: guarantee zero pills */

  /* Transitions */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.35s var(--ease-editorial);

  /* Canonical Typography System (Strict AGENTS.md Law) */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Instrument Serif', Georgia, serif;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Eliminate browser default blue squircle focus rings on interactive elements */
button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
button:focus-visible,
a:focus,
a:focus-visible,
[role="button"]:focus,
[role="button"]:focus-visible {
  outline: none;
}

html {
  font-size: 16px;
  height: 100%;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  width: 100%;
  background-color: var(--bg-parchment);
  color: var(--text-body);
  font-family: 'Instrument Serif', Georgia, serif;
  user-select: text;
}

/* Ambient Editorial Background Graphic (Preloaded & Smooth In-Place Dissolve) */
.page-bg-graphic {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: image-set(
    url('want-bg.webp') type('image/webp'),
    url('want-bg.png') type('image/png')
  );
  background-image: -webkit-image-set(
    url('want-bg.webp') 1x,
    url('want-bg.png') 1x
  );
  background-image: url('want-bg.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: bgFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity;
}

@keyframes bgFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-bg-graphic {
    animation: none;
    opacity: 1;
  }
}

/* Aurora WebGL Background (React Bits Aurora Integration) */
.aurora-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 380px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 135% 115% at 22% 0%, rgba(0, 0, 0, 1) 38%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: radial-gradient(ellipse 135% 115% at 22% 0%, rgba(0, 0, 0, 1) 38%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0) 100%);
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.aurora-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.glow-top {
  width: 500px;
  height: 300px;
  top: -80px;
  left: 30%;
  background: radial-gradient(circle, rgba(255, 230, 233, 0.45) 0%, transparent 70%);
}

.glow-bottom {
  width: 600px;
  height: 350px;
  bottom: -100px;
  left: 20%;
  background: radial-gradient(circle, rgba(246, 215, 218, 0.35) 0%, transparent 70%);
}

@keyframes heartBreathe {
  0% { transform: scale(1) translate(0, 0); opacity: 0.85; }
  50% { transform: scale(1.08) translate(15px, 12px); opacity: 1; }
  100% { transform: scale(0.96) translate(-10px, -8px); opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   App Viewport Container
   -------------------------------------------------------------------------- */
.app-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Page Views (Landing View & Sign-In View) */
.page-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px clamp(14px, 2.4vw, 30px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth), visibility 0s 0.35s;
}

.page-view.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity var(--transition-smooth), visibility 0s 0s;
}

/* Master Editorial In-Place Fade (Strictly in place, zero bottom/top displacement) */
@keyframes editorialFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Staggered in-place entrance animation for landing page (Matches smooth aurora reveal) */
#landingView.active .view-header {
  animation: editorialFadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

#landingView.active .brand-manifesto-col {
  animation: editorialFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

#landingView.active .suite-showcase-col {
  animation: editorialFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both;
}

#landingView.active .view-footer {
  animation: editorialFadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
}

/* In-place entrance for Sign-In and Vault Login views (Zero slide-up) */
#signInView.active .signin-header,
#authView.active .signin-header {
  animation: editorialFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

#signInView.active .signin-card,
#authView.active .signin-card {
  animation: cardFadeIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* View Transition Support (Pure In-Place Crossfade, Zero Bottom/Top Displacements) */
::view-transition-old(root) {
  animation: 0.28s cubic-bezier(0.16, 1, 0.3, 1) both fadeOutInPlace;
}

::view-transition-new(root) {
  animation: 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both fadeInInPlace;
}

@keyframes fadeOutInPlace {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeInInPlace {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --------------------------------------------------------------------------
   VIEW 1: INSTINCT-STYLE EDITORIAL LANDING PAGE
   -------------------------------------------------------------------------- */

/* Header */
.view-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo-mark:hover {
  transform: scale(1.06);
}

.nav-channels {
  display: flex;
  align-items: center;
  gap: 24px;
}

.channel-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  color: #1A1616;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-shadow: none;
  box-shadow: none;
  transition: color 0.2s ease;
}

.channel-link:hover {
  color: var(--wine-base);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-shadow: none;
  box-shadow: none;
}

.member-login-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--wine-base);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(131, 18, 32, 0.4);
}

.member-login-link:hover {
  color: var(--wine-ruby);
  text-decoration-color: var(--wine-ruby);
}

.member-login-link .cta-chevron {
  font-size: 16px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.member-login-link:hover .cta-chevron {
  transform: translateX(3px);
}

/* Center Editorial Content Container */
.editorial-viewport-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 10px 0;
  position: relative;
  z-index: 2;
}

/* Dual-Pane Layout Grid */
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 1fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
  min-height: 0;
}

/* Column A: Brand & Manifesto */
.brand-manifesto-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}

/* Brand Hero & Masthead */
.brand-hero-block {
  width: 100%;
  margin-bottom: 20px;
}

.brand-logo-wrap {
  display: inline-block;
  margin-bottom: 6px;
  margin-left: -4px; /* Optical alignment: aligns main stem of 'w' with text below */
}

.brand-logo-img {
  display: block;
  width: clamp(130px, 11vw, 155px);
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply; /* Adobe Multiply overlay effect */
  filter: drop-shadow(0 2px 8px rgba(116, 14, 27, 0.07));
}

.brand-tagline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(21px, 2.3vw, 28px);
  font-weight: 400;
  font-style: normal;
  color: var(--text-headline);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 2px;
}

/* Prose Narrative (Editorial Instrument Serif with Generous Tracking) */
.prose-container {
  width: 100%;
  max-width: 580px;
}

.prose-p {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(19px, 1.8vw, 22.5px);
  line-height: 1.7;
  color: #1A1616;
  margin-bottom: 14px;
  letter-spacing: 0;
  text-wrap: pretty;
}

.prose-lead {
  font-size: clamp(20px, 1.95vw, 23.5px);
  line-height: 1.68;
  color: #1A1616;
}

/* Primary CTA & Pricing Micro-Note */
/* Primary CTA: Minimalist Editorial "text want ›" (No Pills) */
.cta-action-area {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.text-want-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(23px, 2.2vw, 27px);
  font-weight: 400;
  color: #1A1616;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 22, 22, 0.35);
  transition: all var(--transition-fast);
}

.text-want-cta:hover {
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

.cta-chevron {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.text-want-cta:hover .cta-chevron {
  transform: translateX(4px);
  color: var(--wine-ruby);
}

.pricing-note {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  line-height: 1.4;
  mix-blend-mode: multiply;
}

/* Column B: Minimalist Editorial Suite Table (Zero AI-Slop, No Pills) */
.suite-showcase-col {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: 0;
}

.suite-editorial-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  mix-blend-mode: multiply;
}

.suite-header {
  border-bottom: 1px solid rgba(131, 18, 32, 0.12);
  padding-bottom: 8px;
}

.suite-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 400;
  color: var(--text-headline);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.suite-caption {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 17px;
  color: var(--text-muted);
  letter-spacing: 0;
  line-height: 1.35;
}

/* Minimalist Editorial Table */
.suite-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2px;
}

.suite-row {
  cursor: pointer;
  border-bottom: 1px solid rgba(131, 18, 32, 0.08);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background-color 0.4s ease, color 0.4s ease;
  position: relative;
}

.suite-row:focus {
  outline: none;
}

.suite-row:focus-visible {
  outline: 1px solid var(--wine-border);
  outline-offset: -1px;
}

.suite-row:hover {
  background-color: rgba(131, 18, 32, 0.012);
}

.suite-row.active {
  background-color: rgba(131, 18, 32, 0.025);
}

.suite-row td {
  padding: 12px 8px;
  vertical-align: middle;
}

.suite-cell-num {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  width: 28px;
  transition: color 0.4s ease;
}

.suite-row.active .suite-cell-num {
  color: var(--wine-base);
  font-weight: 400;
}

.suite-cell-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-body);
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.4s ease;
}

.suite-row.active .suite-cell-title {
  color: var(--wine-base);
  font-style: normal;
}

.suite-cell-desc {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15.5px;
  color: var(--text-muted);
  text-align: right;
  font-style: italic;
  line-height: 1.38;
  letter-spacing: 0;
  transition: color 0.4s ease;
}

.suite-row.active .suite-cell-desc {
  color: #1A1616;
}

.suite-tagline {
  display: none;
}

.suite-cell-example {
  display: none;
}

/* Dynamic Excerpt Display (Silky Editorial Crossfade Cycling) */
.suite-excerpt-display {
  display: grid;
  grid-template-areas: "excerptCard";
  min-height: 125px;
  padding-top: 10px;
  overflow: hidden;
}

.excerpt-panel {
  grid-area: excerptCard;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Smooth liquid fade out */
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s step-end;
}

.excerpt-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* Buttery smooth fade in without jagged delay or text collision */
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
              visibility 0s linear 0.08s;
}

.excerpt-quote {
  font-family: var(--font-serif);
  font-size: clamp(17.5px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--text-headline);
  font-style: italic;
  margin-bottom: 8px;
  min-height: auto;
}

.excerpt-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-top: 1px dashed rgba(131, 18, 32, 0.12);
  padding-top: 8px;
}

.excerpt-context {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14.5px;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0;
}

/* Footer (Instinct-style bottom left layout) */
.view-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
  flex-shrink: 0;
  padding-top: 10px;
  font-family: 'Instrument Serif', Georgia, serif;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 13.5px;
  color: var(--text-muted);
}

.copyright {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer-legal-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-legal-link:hover {
  color: var(--wine-base);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-feature-note {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   VIEW 2: SIGN-IN FLOW (EXACT INSTINCT LOGIN MATCH - SCREENSHOT 3)
   -------------------------------------------------------------------------- */

.signin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
  border-radius: 0;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.back-btn:focus,
.back-btn:focus-visible,
.back-btn:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover,
.back-btn:focus-visible {
  color: var(--wine-base);
  background: none;
  background-color: transparent;
}

.back-arrow {
  font-size: 16px;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.back-btn:hover .back-arrow,
.back-btn:focus-visible .back-arrow {
  transform: translateX(-3px);
  color: var(--wine-ruby);
}


/* Centered Sign-In Container */
.signin-card-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 0;
}

.signin-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: cardFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.signin-card-header {
  margin-bottom: 24px;
}

.signin-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 400;
  color: var(--text-headline);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.signin-subtitle {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 24px;
  letter-spacing: 0;
}

/* Phone Input Form */
.phone-auth-form {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid rgba(131, 18, 32, 0.18);
  border-radius: var(--radius-input);
  height: 52px;
  padding: 2px 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 1px 4px rgba(74, 21, 29, 0.04);
}

.phone-input-wrapper:focus-within {
  border-color: var(--wine-base);
  box-shadow: 0 0 0 2px rgba(131, 18, 32, 0.12);
}

/* Country Button */
.country-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: color var(--transition-fast);
  font-family: inherit;
  flex-shrink: 0;
}

.country-select-btn:hover {
  background-color: transparent;
  color: var(--wine-base);
}

.country-flag {
  font-size: 19px;
  line-height: 1;
}

.country-dial-code {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-body);
}

.country-chevron {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1;
}

/* Phone Text Input */
.phone-text-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16.5px;
  color: var(--text-headline);
  caret-color: var(--wine-base);
  padding: 0 10px;
  letter-spacing: 0.02em;
}

.phone-text-input::placeholder {
  color: #B5AEA9;
}

/* Country Dropdown Popover */
.country-dropdown-popover {
  position: absolute;
  top: 58px;
  left: 0;
  width: 100%;
  background-color: #FFFFFF;
  border: 1px solid #D5CECA;
  border-radius: var(--radius-input);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  z-index: 50;
  max-height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownIn 0.2s var(--ease-editorial);
}

.country-dropdown-popover.hidden {
  display: none;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.country-search-box {
  padding: 8px;
  border-bottom: 1px solid #EEE9E5;
}

.country-search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E0D9D5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  caret-color: var(--wine-base);
}

.country-search-box input:focus {
  border-color: var(--wine-base);
  box-shadow: 0 0 0 2px rgba(131, 18, 32, 0.10);
}

.country-list {
  list-style: none;
  overflow-y: auto;
  max-height: 190px;
  padding: 4px 0;
}

.country-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.country-list-item:hover,
.country-list-item.selected {
  background-color: var(--wine-tint);
  color: var(--wine-base);
}

.country-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-item-code {
  font-weight: 500;
  color: var(--text-muted);
}

/* Legal Terms Note */
.legal-disclaimer {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 16px;
  text-align: center;
  max-width: 380px;
}

.legal-link {
  color: var(--text-body);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.legal-link:hover {
  color: var(--wine-base);
}

/* Submit Button Row & Button (Minimalist Editorial text link matching landing page) */
.auth-submit-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.send-code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(23px, 2.2vw, 27px);
  font-weight: 400;
  color: #1A1616;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 22, 22, 0.35);
  box-shadow: none;
  border-radius: 0;
  transition: all var(--transition-fast);
}

.send-code-btn:hover {
  background: none;
  box-shadow: none;
  transform: none;
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

.send-code-btn .cta-chevron {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.send-code-btn:hover .cta-chevron {
  transform: translateX(4px);
  color: var(--wine-ruby);
}

.send-code-btn:active {
  transform: none;
}

.send-code-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(131, 18, 32, 0.25);
  border-top-color: var(--wine-base);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner.hidden {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Auth Error Banner */
.auth-error-banner {
  margin-top: 12px;
  padding: 10px 14px;
  background-color: #FDF2F2;
  border: 1px solid #F7C8C8;
  border-radius: 8px;
  font-size: 13px;
  color: #B91C1C;
  line-height: 1.4;
  text-align: center;
}

.auth-error-banner.hidden {
  display: none;
}

/* Divider & Instant Channels */
.alt-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  width: 100%;
}

.divider-line {
  flex: 1;
  height: 1px;
  background-color: #E2DBD6;
}

.divider-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14.5px;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0.02em;
}

.instant-channels-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
}

.channel-action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 2px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  color: #1A1616;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 22, 22, 0.35);
  transition: all var(--transition-fast);
}

.channel-action-link:hover {
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

.channel-action-link .cta-chevron {
  font-size: 17px;
  line-height: 1;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.channel-action-link:hover .cta-chevron {
  transform: translateX(3px);
  color: var(--wine-ruby);
}

/* Already a member / Vault link in signin view */
.auth-dossier-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(131, 18, 32, 0.12);
  width: 100%;
}

.auth-dossier-label {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.auth-dossier-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16.5px;
  color: var(--wine-base);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(131, 18, 32, 0.4);
  transition: all var(--transition-fast);
}

.auth-dossier-link:hover {
  color: var(--wine-ruby);
  text-decoration-color: var(--wine-ruby);
}

/* --------------------------------------------------------------------------
   SUCCESS STATE (After Send Code)
   -------------------------------------------------------------------------- */
.signin-success-state {
  text-align: center;
  animation: cardFadeIn 0.35s var(--ease-editorial);
}

.signin-success-state.hidden {
  display: none;
}

.success-heart-emblem {
  font-size: 38px;
  margin-bottom: 12px;
  animation: heartPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 400;
  color: var(--text-headline);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.success-body {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 17.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.success-action-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

.whatsapp-direct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(23px, 2.2vw, 27px);
  font-weight: 400;
  color: #1A1616;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 22, 22, 0.35);
  box-shadow: none;
  border-radius: 0;
  transition: all var(--transition-fast);
}

.whatsapp-direct-btn:hover {
  background: none;
  box-shadow: none;
  transform: none;
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

.whatsapp-direct-btn .cta-chevron {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.whatsapp-direct-btn:hover .cta-chevron {
  transform: translateX(4px);
  color: var(--wine-ruby);
}

/* 6-Digit OTP Simulation */
.code-verification-area {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--wine-border);
  padding: 16px;
  border-radius: var(--radius-card);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.code-helper-text {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.otp-inputs-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.otp-digit {
  width: 42px;
  height: 48px;
  border: 1px solid rgba(131, 18, 32, 0.18);
  border-radius: 4px;
  background: #FFFFFF;
  text-align: center;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-headline);
  caret-color: var(--wine-base);
  outline: none;
  transition: all var(--transition-fast);
}

.otp-digit:focus {
  border-color: var(--wine-base);
  box-shadow: 0 0 0 2px rgba(131, 18, 32, 0.12);
}

.verify-otp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  color: #1A1616;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(26, 22, 22, 0.35);
  box-shadow: none;
  border-radius: 0;
  margin: 4px auto 0;
  transition: all var(--transition-fast);
}

.verify-otp-btn:hover {
  background: none;
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

.verify-otp-btn .cta-chevron {
  font-size: 17px;
  line-height: 1;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.verify-otp-btn:hover .cta-chevron {
  transform: translateX(3px);
  color: var(--wine-ruby);
}

.restart-btn {
  background: none;
  border: none;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 8px;
  transition: color var(--transition-fast);
}

.restart-btn:hover {
  color: var(--wine-base);
}

.signin-footer {
  text-align: center;
  flex-shrink: 0;
  padding-top: 10px;
}

.signin-footer-text {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Accessible Full-Bleed Legal & Policy Reader Dialog (88-90vw Editorial Reader)
   -------------------------------------------------------------------------- */
dialog.legal-modal {
  border: 1px solid rgba(131, 18, 32, 0.16);
  border-radius: 8px;
  background: #FAF4EE;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(131, 18, 32, 0.08);
  width: min(1080px, 92vw);
  max-width: 92vw;
  height: 86vh;
  max-height: 86vh;
  margin: auto;
  padding: 0;
  backdrop-filter: blur(24px);
  outline: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity 0.25s ease, transform 0.25s ease, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
  opacity: 0;
  transform: scale(0.97);
}

dialog.legal-modal:not([open]) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

dialog.legal-modal[open] {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.97);
  }
}

dialog.legal-modal::backdrop {
  background-color: rgba(26, 22, 22, 0);
  backdrop-filter: blur(0px);
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease, display 0.25s allow-discrete, overlay 0.25s allow-discrete;
}

dialog.legal-modal[open]::backdrop {
  background-color: rgba(26, 22, 22, 0.55);
  backdrop-filter: blur(4px);

  @starting-style {
    background-color: rgba(26, 22, 22, 0);
    backdrop-filter: blur(0px);
  }
}

/* Two-Column Side Panel Modal Inner */
.modal-inner {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

/* ==================== LEFT SIDE PANEL ==================== */
.modal-sidebar {
  width: 175px;
  min-width: 175px;
  max-width: 175px;
  background: rgba(250, 244, 238, 0.98);
  border-right: 1px solid rgba(131, 18, 32, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 0 16px;
  flex-shrink: 0;
  user-select: none;
}

.sidebar-header {
  padding: 0 16px 14px;
  border-bottom: 1px dashed rgba(131, 18, 32, 0.12);
  display: flex;
  align-items: center;
}

.sidebar-brand {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  line-height: 1;
  color: var(--wine-base);
  font-style: italic;
  letter-spacing: -0.01em;
}

/* Vertical Side Navigation Tabs */
.modal-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 6px;
  flex: 1;
  overflow-y: auto;
}

/* ZERO SQUARE HIGHLIGHTING ON CLICKING */
.modal-tab {
  background: none;
  border: none;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
  border-radius: 0;
  transition: color var(--transition-fast);
  width: 100%;
}

.modal-tab:focus,
.modal-tab:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.tab-index {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 14px;
  color: var(--text-faint);
  font-style: italic;
  width: 16px;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.tab-label {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.22;
  transition: color var(--transition-fast);
  white-space: normal;
}

.modal-tab:hover {
  background: none;
}

.modal-tab:hover .tab-label,
.modal-tab:hover .tab-index {
  color: var(--wine-base);
}

/* ZERO LEFT HIGHLIGHT STRIPE, ZERO BOX BACKGROUND */
.modal-tab.active {
  background: none;
  border: none;
  border-left: none;
  border-radius: 0;
}

.modal-tab.active::after {
  display: none;
}

.modal-tab.active .tab-index {
  color: var(--wine-base);
  font-weight: 500;
  font-style: italic;
}

.modal-tab.active .tab-label {
  color: var(--wine-base);
  font-style: italic;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(120, 16, 28, 0.45);
}

.sidebar-footer {
  padding: 10px 16px 0;
  border-top: 1px dashed rgba(131, 18, 32, 0.1);
}

.sidebar-note {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-faint);
}

/* ==================== RIGHT MAIN READING PANE ==================== */
.modal-main-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FAF4EE;
  overflow: hidden;
}

.modal-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 36px;
  border-bottom: 1px solid rgba(131, 18, 32, 0.09);
  flex-shrink: 0;
  background: rgba(250, 244, 238, 0.98);
}

.modal-pane-breadcrumb {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 15.5px;
  font-style: italic;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* Minimalist Editorial Close Link (Text Only, Zero ✕ Duplication) */
.modal-close-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-muted);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26, 22, 22, 0.25);
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}

.modal-close-link:focus,
.modal-close-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.modal-close-link:hover {
  color: var(--wine-base);
  text-decoration-color: var(--wine-base);
}

/* Scrollable Editorial Body Container (No excessive side gaps!) */
.modal-body-container {
  flex: 1;
  overflow-y: auto;
  padding: 32px 38px 56px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.modal-body-container::-webkit-scrollbar {
  width: 6px;
}

.modal-body-container::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body-container::-webkit-scrollbar-thumb {
  background: rgba(131, 18, 32, 0.18);
  border-radius: 3px;
}

.modal-body-container::-webkit-scrollbar-thumb:hover {
  background: var(--wine-base);
}

/* Content Tab Articles (Fills Pane Harmoniously) */
.modal-tab-content {
  max-width: 720px;
  margin: 0;
}

.modal-tab-content[hidden] {
  display: none;
}

.modal-tab-content.active {
  display: block;
  animation: legalContentFade 0.22s ease-out;
}

@keyframes legalContentFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-doc-header {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(131, 18, 32, 0.1);
  padding-bottom: 16px;
}

.modal-doc-meta {
  display: inline-block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: var(--wine-base);
  margin-bottom: 8px;
  letter-spacing: 0;
  text-transform: lowercase;
}

.modal-doc-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 32px;
  line-height: 1.15;
  color: var(--text-headline);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
}

/* Editorial Pullquote (Pure typography, zero left highlight stripes, zero boxes) */
.legal-pullquote {
  margin: 16px 0 24px;
  padding: 0;
  border: none;
  background: none;
}

.legal-pullquote p {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  line-height: 1.5;
  font-style: italic;
  color: var(--text-headline);
  margin: 0;
}

.legal-editorial-sub {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16.5px;
  font-style: italic;
  color: var(--wine-base);
  margin: 6px 0 14px;
}

/* Sections & Typography */
.legal-section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(131, 18, 32, 0.1);
}

.legal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section-heading {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-headline);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.legal-sec-num {
  color: var(--wine-base);
  font-style: italic;
  font-size: 19px;
}

.legal-section p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-body);
  margin-bottom: 12px;
}

.modal-tab-content code {
  background: rgba(131, 18, 32, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14.5px;
  color: var(--wine-base);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
}

.modal-terms-list {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
}

.modal-terms-list li {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 10px;
  padding-left: 18px;
  position: relative;
}

.modal-terms-list li::before {
  content: "-";
  position: absolute;
  left: 2px;
  color: var(--wine-base);
  font-size: 16px;
  line-height: 1;
  top: 1px;
}

/* Changelog Entries in Reader */
.changelog-entry {
  border-bottom: 1px dashed rgba(131, 18, 32, 0.12);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.changelog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.changelog-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.changelog-version {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  color: var(--wine-base);
}

.changelog-date {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: var(--text-faint);
  letter-spacing: 0;
  text-transform: lowercase;
}

.changelog-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  color: var(--text-headline);
  margin: 4px 0 6px;
}

.changelog-entry p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-body);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive Adaptations & Multi-Breakpoint Architecture
   -------------------------------------------------------------------------- */

/* 1. Large Desktop / Ample Viewport: Strict Non-Scrollable Instinct Salon */
@media (min-width: 861px) and (min-height: 701px) {
  html, body.viewport-locked {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    inset: 0;
  }

  .app-viewport {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .page-view {
    height: 100%;
    overflow: hidden;
  }
}

/* 2. Medium Laptops, iPads in Landscape, & Compact Desktop Windows (861px – 1180px) */
@media (min-width: 861px) and (max-width: 1180px) {
  .page-view {
    padding: 24px clamp(32px, 5vw, 64px);
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .editorial-grid {
    grid-template-columns: minmax(320px, 1.15fr) minmax(300px, 1fr);
    gap: clamp(24px, 3.5vw, 44px);
    max-width: 1060px;
  }

  .brand-logo-img {
    width: 135px;
  }

  .brand-tagline {
    font-size: clamp(23px, 2.3vw, 27px);
  }

  .prose-p {
    font-size: 19px;
    margin-bottom: 12px;
    line-height: 1.68;
    letter-spacing: 0;
  }

  .cta-action-area {
    margin-top: 18px;
    gap: 8px;
  }

  .text-want-cta {
    font-size: 25px;
  }

  .suite-editorial-container {
    max-width: 480px;
    gap: 14px;
  }

  .suite-title {
    font-size: 24px;
  }

  .suite-caption {
    font-size: 16.5px;
  }

  .suite-table td {
    padding: 10px 6px;
  }

  .suite-cell-title {
    font-size: 17.5px;
  }

  .suite-cell-desc {
    font-size: 13.5px;
  }

  .suite-excerpt-display {
    min-height: auto;
  }

  .excerpt-quote {
    font-size: 17.5px;
    min-height: auto;
  }
}

/* 3. Tablets in Portrait, Large Phones, & Narrow Windows (<= 860px) */
@media (max-width: 860px) {
  html, body.viewport-locked {
    position: static;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-viewport {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .page-view {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: visible;
    overflow-x: hidden;
    justify-content: flex-start;
    padding: 24px clamp(24px, 5vw, 48px) 44px;
  }

  .page-view[hidden],
  .page-view:not(.active) {
    display: none !important;
  }

  .view-header {
    flex-shrink: 0;
    margin-bottom: 24px;
  }

  .editorial-viewport-content {
    flex: none;
    width: 100%;
    padding: 0;
    margin-bottom: 32px;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 680px;
    margin: 0 auto;
  }

  .brand-manifesto-col {
    align-items: flex-start;
    width: 100%;
  }

  .brand-hero-block {
    margin-bottom: 16px;
  }

  .brand-logo-img {
    width: 140px;
  }

  .brand-tagline {
    font-size: 25px;
  }

  .prose-p {
    font-size: 19.5px;
    line-height: 1.7;
    margin-bottom: 14px;
    letter-spacing: 0;
  }

  .cta-action-area {
    margin-top: 18px;
    gap: 8px;
  }

  .text-want-cta {
    font-size: 26px;
  }

  .suite-showcase-col {
    justify-content: flex-start;
    width: 100%;
  }

  .suite-editorial-container {
    max-width: 100%;
    gap: 16px;
  }

  .suite-title {
    font-size: 25px;
  }

  .suite-caption {
    font-size: 17px;
  }

  .suite-table td {
    padding: 14px 10px;
    vertical-align: top;
  }

  .suite-cell-num {
    width: 32px;
    font-size: 20px;
    line-height: 1.25;
    padding-top: 15px;
  }

  .suite-cell-title {
    width: 175px;
    vertical-align: top;
    white-space: normal;
    padding-right: 16px;
  }

  .suite-title-text {
    display: block;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-body);
  }

  .suite-tagline {
    display: block;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 13.5px;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
  }

  .suite-cell-desc {
    display: none;
  }

  .suite-cell-example {
    display: table-cell;
    vertical-align: top;
    text-align: left;
    padding: 14px 4px 14px 12px;
  }

  .suite-example-quote {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 16px;
    line-height: 1.48;
    font-style: italic;
    color: #2C2627;
    margin: 0;
  }

  .suite-excerpt-display {
    display: none;
  }

  .view-footer {
    flex-shrink: 0;
    width: 100%;
    padding-top: 24px;
    border-top: 1px solid rgba(131, 18, 32, 0.08);
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
  }

  .footer-left .footer-legal-link,
  .footer-left .copyright {
    font-size: 14px;
  }

  .footer-feature-note {
    display: block;
    font-size: 14px;
    color: var(--text-faint);
  }

  /* Sign-in View Tablet / Mobile Layout */
  .signin-header {
    margin-bottom: 20px;
  }

  .signin-card-container {
    padding: 16px 0 32px;
  }

  /* Legal Reader Tablet / Medium Mobile Sheet */
  dialog.legal-modal {
    width: 100vw;
    max-width: 100vw;
    height: 94dvh;
    max-height: 94dvh;
    margin: auto auto 0 auto;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.32);
  }

  .modal-inner {
    flex-direction: column;
  }

  .modal-sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(131, 18, 32, 0.12);
    padding: 10px 16px 8px;
    justify-content: flex-start;
  }

  .sidebar-header {
    padding: 0 4px 6px;
    border-bottom: none;
  }

  .modal-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding: 4px 0;
    gap: 8px;
    scrollbar-width: none;
  }

  .modal-tabs::-webkit-scrollbar {
    display: none;
  }

  .modal-tab {
    width: auto;
    padding: 6px 10px;
    white-space: nowrap;
    border-radius: 4px;
    border-left: none;
  }

  .modal-tab.active {
    border-left: none;
    border-bottom: 2px solid var(--wine-base);
    border-radius: 2px;
  }

  .tab-index {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .modal-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(131, 18, 32, 0.08);
  }

  .modal-body-container {
    padding: 22px 20px 48px;
  }

  .modal-tab-content {
    max-width: 100%;
  }

  .modal-doc-title {
    font-size: 26px;
  }

  .legal-section-heading {
    font-size: 20px;
  }

  .legal-pullquote {
    margin: 14px 0 20px;
    padding: 0;
  }
}

/* 4. Compact Mobile Phones (<= 520px) */
@media (max-width: 520px) {
  .page-view {
    padding: 20px 20px 40px;
  }

  .nav-channels {
    gap: 14px;
    font-size: 17px;
  }

  .brand-logo-img {
    width: 125px;
  }

  .brand-tagline {
    font-size: 23px;
    margin-top: 4px;
  }

  .prose-p {
    font-size: clamp(18.5px, 4.8vw, 20.5px);
    line-height: 1.68;
    margin-bottom: 12px;
    letter-spacing: 0;
  }

  .prose-lead {
    font-size: clamp(19.5px, 5.1vw, 21.5px);
    line-height: 1.65;
  }

  .cta-action-area {
    margin-top: 16px;
    gap: 6px;
  }

  .text-want-cta {
    font-size: 24px;
  }

  .pricing-note {
    font-size: 12.5px;
    line-height: 1.35;
  }

  .editorial-grid {
    gap: 30px;
  }

  .suite-title {
    font-size: 23px;
  }

  .suite-caption {
    font-size: 15.5px;
  }

  .suite-table td {
    padding: 10px 4px;
    vertical-align: middle;
  }

  .suite-cell-num {
    font-size: 18px;
    line-height: 1;
    width: 24px;
    padding-top: 0;
  }

  .suite-cell-title {
    font-size: 16.5px;
    width: auto;
    white-space: nowrap;
    padding-right: 0;
    vertical-align: middle;
  }

  .suite-title-text {
    display: inline;
    font-size: 16.5px;
  }

  .suite-tagline {
    display: none !important;
  }

  .suite-cell-desc {
    display: table-cell !important;
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 12.5px;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    letter-spacing: 0;
    vertical-align: middle;
  }

  .suite-cell-example {
    display: none !important;
  }

  .suite-excerpt-display {
    display: grid !important;
    min-height: auto;
    padding-top: 8px;
  }

  .excerpt-quote {
    font-size: 16.5px;
    line-height: 1.5;
    min-height: auto;
  }

  .excerpt-footer {
    padding-top: 6px;
  }

  .excerpt-context {
    font-size: 13px;
  }

  .footer-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
  }

  .footer-left .footer-legal-link,
  .footer-left .copyright {
    font-size: 13px;
  }

  .footer-feature-note {
    font-size: 13px;
  }

  /* Sign-in View Mobile Phone Layout */
  .signin-card-container {
    padding: 16px 0 28px;
  }

  .signin-card {
    padding: 0 4px;
  }

  .signin-title {
    font-size: 28px;
  }

  .signin-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .phone-input-wrapper {
    height: 48px;
    padding: 2px 6px;
  }

  .country-flag {
    font-size: 18px;
  }

  .country-dial-code {
    font-size: 14px;
  }

  .phone-text-input {
    font-size: 16px; /* 16px prevents iOS Safari automatic zoom */
    padding: 0 6px;
  }

  .send-code-btn {
    font-size: 23px;
  }

  .channel-action-link {
    font-size: 18px;
  }

  /* Legal Reader Mobile Phone Ultra-Optimization */
  dialog.legal-modal {
    height: 96dvh;
    max-height: 96dvh;
    border-radius: 4px 4px 0 0;
  }

  .modal-sidebar {
    padding: 8px 14px 6px;
  }

  .modal-tabs {
    gap: 6px;
  }

  .modal-tab {
    font-size: 15px;
    padding: 5px 8px;
  }

  .modal-body-container {
    padding: 16px 14px 36px;
  }

  .modal-doc-title {
    font-size: 22px;
  }

  .modal-doc-meta {
    font-size: 14px;
  }

  .legal-pullquote {
    margin: 12px 0 18px;
    padding: 0;
  }

  .legal-pullquote p {
    font-size: 17.5px;
    line-height: 1.45;
  }

  .legal-section-heading {
    font-size: 18.5px;
  }

  .legal-sec-num {
    font-size: 16px;
  }

  .legal-section p,
  .modal-terms-list li {
    font-size: 14px;
    line-height: 1.62;
  }
}

/* 5. Short Viewport Heights (<= 700px) */
@media (max-height: 700px) {
  html, body.viewport-locked {
    position: static;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .app-viewport {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .page-view {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 100dvh;
    overflow-y: visible;
    padding: 18px clamp(16px, 3.5vw, 36px) 28px;
  }

  .brand-hero-block {
    margin-bottom: 8px;
  }

  .brand-logo-img {
    width: 115px;
  }

  .brand-tagline {
    font-size: 20px;
    margin-top: 1px;
  }

  .prose-p {
    font-size: 15.5px;
    margin-bottom: 6px;
    line-height: 1.4;
  }

  .cta-action-area {
    margin-top: 10px;
    gap: 4px;
  }

  .text-want-cta {
    font-size: 22px;
  }

  .suite-editorial-container {
    gap: 8px;
  }

  .suite-title {
    font-size: 20px;
  }

  .suite-caption {
    font-size: 15px;
  }

  .suite-table td {
    padding: 6px 4px;
  }

  .suite-cell-title {
    font-size: 15.5px;
  }

  .suite-cell-desc {
    font-size: 13px;
  }

  .suite-excerpt-display {
    height: 105px;
    min-height: 105px;
  }

  .excerpt-quote {
    font-size: 15px;
    line-height: 1.35;
    min-height: 56px;
    margin-bottom: 4px;
  }

  .excerpt-footer {
    padding-top: 4px;
  }

  .signin-card-header {
    margin-bottom: 12px;
  }

  .view-footer {
    padding-top: 8px;
  }
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
