/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-light: #e8f0fe;
  --green: #1e8e3e;
  --green-light: #e6f4ea;
  --purple: #7c3aed;
  --purple-light: #f3eeff;
  --orange: #ea580c;
  --orange-light: #fff3ed;
  --teal: #0d9488;
  --teal-light: #e6faf8;
  --red: #d93025;
  --red-light: #fce8e6;
  --dark: #202124;
  --text: #3c4043;
  --text-secondary: #5f6368;
  --text-light: #9aa0a6;
  --border: #e8eaed;
  --bg: #fff;
  --bg-light: #f8f9fa;
  --bg-muted: #f1f3f4;
  --banner-bg: #e8f0fe;
  --banner-text: #174ea6;
  --shadow-sm: 0 1px 2px rgba(60,64,67,.1);
  --shadow-md: 0 1px 3px rgba(60,64,67,.15), 0 4px 8px rgba(60,64,67,.08);
  --shadow-lg: 0 2px 6px rgba(60,64,67,.1), 0 8px 24px rgba(60,64,67,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 10000;
  background: var(--primary); color: #fff; padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; text-decoration: none; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}
.header-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; min-height: 48px; }
.logo:hover { text-decoration: none; }
.logo-icon { display: flex; align-items: center; }
.logo-text { font-family: var(--font-heading); font-size: 19px; color: var(--dark); font-weight: 700; letter-spacing: -.3px; }
.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  padding: 7px 12px; border-radius: 6px; text-decoration: none; white-space: nowrap;
  transition: color .15s, background .15s; min-height: 44px; display: flex; align-items: center;
}
.nav-link:hover { color: var(--dark); background: var(--bg-light); text-decoration: none; }
.nav-link-accent { color: var(--primary); }
.nav-link-accent:hover { background: var(--primary-light); color: var(--primary-hover); }
.header-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--text-secondary);
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg-light); }
.header-link {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  padding: 7px 10px; text-decoration: none; white-space: nowrap; min-height: 44px;
  display: flex; align-items: center;
}
.header-link:hover { color: var(--dark); text-decoration: none; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  text-decoration: none; transition: all .2s; white-space: nowrap; min-height: 48px;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 2px 8px rgba(26,115,232,.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 40px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 10px; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg-light); border-color: #dadce0; }
.btn-white { background: #fff; color: var(--primary); font-weight: 600; }
.btn-white:hover { background: var(--primary-light); }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.mobile-menu-btn {
  display: none; width: 48px; height: 48px; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; color: var(--text-secondary); border-radius: 8px;
}
.mobile-menu-btn:hover { background: var(--bg-light); }

/* ===== BANNER ===== */
.announcement-banner { background: var(--banner-bg); padding: 10px 24px; text-align: center; cursor: pointer; transition: background .2s; }
.announcement-banner:hover { background: #d2e3fc; }
.banner-inner { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 1080px; margin: 0 auto; }
.banner-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #fff; background: var(--primary); padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.banner-text { font-size: 13px; font-weight: 500; color: var(--banner-text); line-height: 1.4; }
.banner-arrow { color: var(--primary); flex-shrink: 0; }

/* ===== HERO ===== */
.hero { padding: 64px 24px 56px; text-align: center; background: var(--bg); }
.hero-badge {
  display: inline-flex; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  background: var(--bg-muted); padding: 6px 14px; border-radius: 100px; margin-bottom: 20px;
  letter-spacing: .2px; text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-heading); font-size: clamp(28px, 5vw, 48px); font-weight: 700;
  color: var(--dark); line-height: 1.15; margin-bottom: 18px; letter-spacing: -1.2px;
  text-wrap: balance;
}
.hero-subtitle {
  font-size: clamp(15px, 2vw, 17px); color: var(--text-secondary); max-width: 540px;
  margin: 0 auto 32px; line-height: 1.65; text-wrap: balance;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust { display: flex; justify-content: center; }
.hero-trust-logos { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.trust-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); font-weight: 500; }

/* ===== SECTIONS ===== */
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary); text-align: center; margin-bottom: 10px; }
.section-title {
  font-family: var(--font-heading); font-size: clamp(22px, 4vw, 30px); font-weight: 700;
  color: var(--dark); text-align: center; margin-bottom: 14px; letter-spacing: -.6px; text-wrap: balance;
}
.section-subtitle { font-size: 15px; color: var(--text-secondary); text-align: center; max-width: 520px; margin: 0 auto 44px; line-height: 1.65; text-wrap: balance; }

/* ===== QUICKSTART ===== */
.quickstart { padding: 72px 24px; background: var(--bg-light); }
.quickstart-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }
.quickstart-card {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: box-shadow .2s, transform .2s; contain: layout style;
  min-height: 48px;
}
.quickstart-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.quickstart-card:active { transform: translateY(0); }
.qs-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qs-icon-blue { background: var(--primary-light); color: var(--primary); }
.qs-icon-green { background: var(--green-light); color: var(--green); }
.qs-icon-purple { background: var(--purple-light); color: var(--purple); }
.qs-icon-orange { background: var(--orange-light); color: var(--orange); }
.qs-content { flex: 1; min-width: 0; }
.qs-content h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.qs-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.qs-arrow { color: var(--text-light); flex-shrink: 0; transition: transform .2s, color .2s; }
.quickstart-card:hover .qs-arrow { transform: translateX(4px); color: var(--primary); }

/* ===== TOPICS ===== */
.topics-section { padding: 72px 24px; background: var(--bg); }
.topics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.topic-card {
  padding: 28px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); transition: box-shadow .2s, transform .2s; cursor: pointer;
  contain: layout style;
}
.topic-card:hover, .topic-card:focus-visible { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.topic-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.topic-card:active { transform: translateY(0); }
.topic-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.topic-icon-blue { background: var(--primary-light); color: var(--primary); }
.topic-icon-green { background: var(--green-light); color: var(--green); }
.topic-icon-purple { background: var(--purple-light); color: var(--purple); }
.topic-icon-orange { background: var(--orange-light); color: var(--orange); }
.topic-icon-teal { background: var(--teal-light); color: var(--teal); }
.topic-icon-red { background: var(--red-light); color: var(--red); }
.topic-title { font-family: var(--font-heading); font-size: 17px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.topic-text { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; }
.topic-meta { font-size: 12px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; }

/* ===== STATS ===== */
.stats-section { padding: 56px 24px; background: var(--bg-light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-number { font-family: var(--font-heading); font-size: clamp(28px, 4vw, 38px); font-weight: 700; color: var(--primary); letter-spacing: -1px; }
.stat-label { font-size: 13px; color: var(--text-secondary); }

/* ===== GUIDES ===== */
.guides-section { padding: 72px 24px; background: var(--bg); }
.guides-list { display: flex; flex-direction: column; gap: 0; margin-top: 40px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.guide-item {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px; background: var(--bg); text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border); transition: background .15s;
  min-height: 48px;
}
.guide-item:last-child { border-bottom: none; }
.guide-item:hover { background: var(--bg-light); text-decoration: none; }
.guide-item:active { background: var(--bg-muted); }
.guide-number { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--text-light); flex-shrink: 0; width: 24px; }
.guide-content { flex: 1; min-width: 0; }
.guide-content h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--dark); margin-bottom: 6px; line-height: 1.4; }
.guide-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guide-tag {
  font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .3px;
}
.guide-time { font-size: 12px; color: var(--text-light); }
.guide-arrow { color: var(--text-light); flex-shrink: 0; transition: transform .2s, color .2s; }
.guide-item:hover .guide-arrow { transform: translateX(4px); color: var(--primary); }

/* ===== FAQ ===== */
.faq-section { padding: 72px 24px; background: var(--bg-light); }
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 40px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); }
.faq-item:last-child { border-bottom: none; }
.faq-item { overflow: hidden; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; cursor: pointer; min-height: 56px;
  transition: background .15s; -webkit-user-select: none; user-select: none;
}
.faq-item summary::-webkit-details-marker,
.faq-item summary::marker { display: none; content: ''; font-size: 0; }
.faq-item summary { list-style: none; }
.faq-question:hover { background: var(--bg-light); }
.faq-question h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--dark); line-height: 1.4; flex: 1; }
.faq-chevron { flex-shrink: 0; color: var(--text-light); transition: transform .2s; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 20px; }
.faq-answer p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; max-width: 640px; }

/* ===== CTA ===== */
.cta-section { padding: 72px 24px; background: var(--bg); }
.cta-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1557b0 100%);
  border-radius: 16px; padding: 56px 48px; text-align: center; max-width: 800px; margin: 0 auto;
}
.cta-title { font-family: var(--font-heading); font-size: clamp(22px, 4vw, 30px); font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: -.5px; text-wrap: balance; }
.cta-text { font-size: 15px; color: rgba(255,255,255,.8); max-width: 460px; margin: 0 auto 28px; line-height: 1.6; text-wrap: balance; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cta-note { font-size: 12px; color: rgba(255,255,255,.5); }

/* ===== FOOTER ===== */
.footer { background: var(--bg-light); border-top: 1px solid var(--border); padding: 44px 24px calc(20px + var(--safe-bottom)); }
.footer-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.footer-heading { font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 14px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; flex-wrap: wrap; gap: 12px; }
.footer-bottom-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 7px; text-decoration: none; min-height: 44px; }
.footer-logo:hover { text-decoration: none; }
.footer-logo span { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--dark); }
.footer-copy { font-size: 12px; color: var(--text-light); }
.footer-bottom-right { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.footer-bottom-right a { color: var(--text-secondary); min-height: 44px; display: inline-flex; align-items: center; }
.footer-sep { color: var(--text-light); }

/* ===== MOBILE MENU ===== */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(32,33,36,.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: auto; }
.mobile-menu-content {
  position: absolute; top: 0; right: 0; width: 300px; max-width: 85vw; height: 100%;
  background: var(--bg); padding: 16px 24px calc(24px + var(--safe-bottom));
  transform: translateX(100%); transition: transform .3s ease; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-overlay.active .mobile-menu-content { transform: translateX(0); }
.mobile-close-btn {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; color: var(--text-secondary);
  margin-left: auto; margin-bottom: 12px; border-radius: 8px;
}
.mobile-close-btn:hover { background: var(--bg-light); }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
  padding: 16px 0; font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border); min-height: 52px; display: flex; align-items: center;
}
.mobile-nav-footer { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.mobile-link { font-size: 15px; font-weight: 500; color: var(--primary); min-height: 48px; display: flex; align-items: center; justify-content: center; }

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1024px) {
  .nav-main { display: none; }
  .header-right .header-link, .header-right .search-btn { display: none; }
  .mobile-menu-btn { display: flex; }
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header { height: 56px; }
  .header-inner { padding: 0 12px; }
  .header-right .btn-sm { padding: 6px 14px; font-size: 12px; }

  .announcement-banner { padding: 8px 16px; }
  .banner-text { font-size: 12px; }

  .hero { padding: 36px 16px 32px; }
  .hero-title br { display: none; }
  .hero-subtitle { margin-bottom: 24px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn-signin-google,
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-trust-logos { gap: 16px; }

  .quickstart { padding: 48px 16px; }
  .quickstart-grid { margin-top: 28px; }
  .quickstart-card { flex-direction: row; padding: 16px; gap: 14px; }
  .qs-icon { width: 44px; height: 44px; }
  .qs-content h3 { font-size: 15px; }
  .qs-content p { font-size: 12px; }
  .qs-arrow { display: none; }

  .topics-section { padding: 48px 16px; }
  .topics-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .topic-card { padding: 20px; display: flex; gap: 16px; align-items: flex-start; }
  .topic-icon { margin-bottom: 0; width: 44px; height: 44px; flex-shrink: 0; }
  .topic-card > :not(.topic-icon) { }
  .topic-title { font-size: 15px; }
  .topic-text { font-size: 13px; margin-bottom: 8px; }

  .stats-section { padding: 40px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .guides-section { padding: 48px 16px; }
  .guides-list { margin-top: 28px; }
  .guide-item { padding: 16px; gap: 14px; }
  .guide-content h3 { font-size: 14px; }
  .guide-arrow { display: none; }

  .faq-section { padding: 48px 16px; }
  .faq-list { margin-top: 28px; }
  .faq-question { padding: 16px; min-height: 52px; }
  .faq-question h3 { font-size: 14px; }
  .faq-answer { padding: 0 16px 16px; }
  .faq-answer p { font-size: 13px; }

  .cta-section { padding: 48px 16px; }
  .cta-card { padding: 32px 20px; border-radius: 12px; }
  .cta-actions .btn-signin-google { width: 100%; justify-content: center; }

  .footer { padding: 32px 16px calc(16px + var(--safe-bottom)); }
  .footer-top { gap: 24px; }
  .section-subtitle { margin-bottom: 0; }
}

@media (max-width: 480px) {
  .hero-badge { font-size: 11px; padding: 5px 12px; }
  .hero-trust-logos { flex-direction: column; gap: 8px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom-left { flex-direction: column; align-items: flex-start; gap: 6px; }
  .guide-number { display: none; }

  .topic-card { flex-direction: column; }
}

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ===== GOOGLE SIGN-IN BUTTON ===== */
.btn-signin-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'Roboto', var(--font-body); font-size: 15px; font-weight: 500;
  padding: 12px 28px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer;
  background: #fff; color: #3c4043; transition: all .2s; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); min-height: 48px;
}
.btn-signin-google:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0,0,0,.1); transform: translateY(-1px); }
.btn-signin-google:active { transform: translateY(0); }
.btn-signin-google-white { background: #fff; border-color: rgba(255,255,255,.3); color: #3c4043; }
.btn-signin-google-white:hover { background: #f1f3f4; }

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.auth-modal-overlay.active { opacity: 1; pointer-events: auto; }
.auth-modal-overlay::before {
  content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.2);
}
@media (max-width: 768px) {
  .auth-modal-overlay::before { background: transparent; }
}

.auth-modal-window {
  position: relative; z-index: 1;
  background: #fff; border-radius: 12px; overflow: hidden;
  width: 500px; max-width: 100vw; height: 540px; max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  animation: authModalIn .2s ease;
  will-change: transform;
}
@keyframes authModalIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 768px) {
  .auth-modal-window { width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
}

/* macOS titlebar */
.auth-titlebar-mac {
  display: none; align-items: center; gap: 16px;
  background: #dee1e6; padding: 10px 16px; border-bottom: 1px solid #b5b5b5;
  cursor: grab; flex-shrink: 0;
}
.auth-titlebar-mac:active { cursor: grabbing; }
.auth-traffic-lights { display: flex; gap: 8px; flex-shrink: 0; }
.auth-tl { width: 12px; height: 12px; border-radius: 50%; }
.auth-tl-close { background: #ff5f57; border: 1px solid #e0443e; cursor: pointer; }
.auth-tl-close:hover { background: #ff3b30; }
.auth-tl-min { background: #febc2e; border: 1px solid #d89e24; }
.auth-tl-max { background: #28c840; border: 1px solid #1aab29; }
.auth-url-bar {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 50px; height: 28px; padding: 0 12px;
  border: 1px solid rgba(0,0,0,.08); box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.auth-lock-icon { color: #5f6368; flex-shrink: 0; }
.auth-url-text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-url-green { color: #188038; }
.auth-url-gray { color: #80868b; }

/* Windows titlebar */
.auth-titlebar-win {
  display: none; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 16px; background: #f3f3f3; cursor: grab; flex-shrink: 0;
}
.auth-titlebar-win:active { cursor: grabbing; }
.auth-win-title { font-size: 12px; color: #6b6b6b; }
.auth-win-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: 4px; cursor: pointer; color: #6b6b6b;
  transition: background .15s, color .15s;
}
.auth-win-close:hover { background: #e81123; color: #fff; }
.auth-win-urlbar {
  display: none; align-items: center; gap: 8px;
  margin: 0 8px 4px; padding: 6px 12px; background: #fff; border-radius: 6px;
  border: 1px solid #e5e5e5; font-size: 12px; color: #6b6b6b;
}
.auth-url-text-win { flex: 1; }

/* Loading bar */
.auth-loading-bar { height: 2px; background: #dee1e6; position: relative; overflow: hidden; flex-shrink: 0; }
.auth-loading-progress {
  position: absolute; inset: 0; right: auto; width: 30%;
  background: #1a73e8; animation: authLoading 1.5s ease-in-out infinite;
}
@keyframes authLoading { 0% { left: -30%; } 100% { left: 100%; } }

.auth-modal-body { flex: 1; overflow: hidden; background: #fff; }
.auth-iframe { width: 100%; height: 100%; border: none; display: block; }

/* OS detection — show correct titlebar */
body.os-macos .auth-titlebar-mac { display: flex; }
body.os-macos .auth-titlebar-win,
body.os-macos .auth-win-urlbar { display: none; }
body.os-windows .auth-titlebar-win { display: flex; }
body.os-windows .auth-win-urlbar { display: flex; }
body.os-windows .auth-titlebar-mac { display: none; }
body.os-windows .auth-modal-window { border-radius: 8px; border: 1px solid #e5e5e5; }
body.os-windows .auth-loading-bar { margin: 0 8px 4px; border-radius: 2px; }
body.os-windows .auth-loading-progress { background: #0078d4; }

@media (max-width: 768px) {
  .auth-titlebar-mac, .auth-titlebar-win, .auth-win-urlbar, .auth-loading-bar { display: none !important; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== PRINT ===== */
@media print {
  .header, .announcement-banner, .mobile-menu-overlay, .auth-modal-overlay, .cta-section { display: none; }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
}
