/* OutoMake — base styles */
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,500,0..1,0");
/* Reset and variables */
:root {
  /* Light, professional palette */
  --bg: #f5f5f5; /* Page body light-grey 5% */
  --surface: #ffffff;      /* Cards and chrome */
  --text: #0b1220;         /* Primary text */
  --muted: #4a5568;        /* Secondary text */
  --border: #e6eaf0;       /* Subtle borders */
  --primary: #2f6bff;      /* Brand accent */
  --primary-10: rgba(47, 107, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 2px 6px rgba(16,24,40,.08);
  /* Light cyan accent for product card background overlay */
  --brand-cyan-start: #def8ff;
  --brand-cyan-end: #f7fdff;
}

@supports (color: color-mix(in srgb, black 0%)) {
  :root { --primary-10: color-mix(in srgb, var(--primary) 12%, transparent); }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Itim", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg) !important; /* enforce site-wide body bg */
  line-height: 1.5;
  color-scheme: light;
}

/* Ensure hidden elements never flash */
[hidden] { display: none !important; }

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 16px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 10000;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.skip-link:focus { top: 12px; outline: 2px solid var(--primary); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff; /* white header */
  border-bottom: 1px solid rgba(17,24,39,0.06);
  box-shadow: 0 8px 20px rgba(16,24,40,0.06); /* shadow underneath */
}

/* Signup Banner (sticky under header) */
.signup-banner {
  position: sticky;
  top: 64px; /* below mobile header */
  z-index: 998;
  background: #eef4ff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(16,24,40,0.06);
}
.signup-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
}
.signup-banner .banner-text { color: #0b1220; font-weight: 700; letter-spacing: .2px; }
@media (min-width: 768px){
  .signup-banner { top: 72px; }
}
@media (max-width: 480px){
  .signup-banner-row { flex-wrap: wrap; gap: 8px; }
  .signup-banner .button { width: 100%; }
}

.header-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 16px;
  min-height: 64px;
}
.brand-logo { height: 44px; width: auto; display: block; object-fit: contain; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #6ea1ff 100%);
  color: white;
  font-size: 14px;
}

.brand-text { font-size: 1.05rem; }

.header-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
/* Search in header */
.search-wrap { justify-self: center; width: 15vw; max-width: 15vw; }
.search-form { position: relative; display: grid; grid-template-columns: 1fr; gap: 0; }
.search-input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px; /* pill */
  padding: 8px 44px 8px 14px; /* room for right icon button */
  font: inherit;
  background: #ffffff;
  transition: width .25s ease, box-shadow .2s ease, border-color .2s ease;
}
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  width: 30px;
  border-radius: 999px;
  border: 0;
  background: transparent; /* white background under it already */
  color: #0ec6b9; /* teal icon like mock */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-btn::before {
  content: 'search';
  font-family: 'Material Symbols Outlined';
  font-weight: 500; font-style: normal;
  font-variation-settings: 'FILL' 0,'wght' 500,'GRAD' 0,'opsz' 24;
}
.search-form:focus-within .search-input,
.search-input:hover { box-shadow: 0 2px 8px rgba(16,24,40,.08); border-color: #d1d5db; }
.search-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border:1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm), var(--shadow-md); z-index: 1002; padding: 6px; display: none; max-height: 240px; overflow:auto; }
.search-suggest .item { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; cursor: pointer; }
.search-suggest .item:hover { background: var(--primary-10); }

/* Mobile search */
.search-icon-btn { display: inline-flex; align-items:center; justify-content:center; width: 40px; height: 40px; border-radius: 10px; border:1px solid var(--border); background:#fff; }
.search-icon-btn::before { content: 'search'; font-family: 'Material Symbols Outlined'; font-weight: 500; font-style: normal; font-variation-settings: 'FILL' 0,'wght' 500,'GRAD' 0,'opsz' 24; }
.nav-search-mobile { padding: 8px 12px; }
.nav-search-mobile .search-form { grid-template-columns: 1fr; }
.nav-search-mobile .search-input { height: 42px; }
.nav-search-mobile .search-btn { height: 42px; }

@media (max-width: 768px){
  .search-wrap { display: none; }
}
@media (min-width: 769px){
  #open-search { display: none; }
  /* Show nav search inline on desktop and size to 15vw */
  .nav-search-mobile { display: inline-flex; padding: 0; }
  .site-nav .nav-search-mobile .search-input { width: 15vw; min-width: 180px; height: 38px; }
  .site-nav .nav-search-mobile .search-form:focus-within .search-input,
  .site-nav .nav-search-mobile .search-input:hover { width: 18vw; min-width: 220px; }
}

/* Mobile header sizing for wide logo */
@media (max-width: 768px){
  .brand-logo { height: 32px; }
  .site-header .container.header-bar { min-height: 56px; --header-vpad: 6px; }
  .header-actions { gap: 8px; }
}

@media (max-width: 360px){
  .brand-logo { height: 28px; }
  .site-header .container.header-bar { min-height: 52px; --header-vpad: 5px; }
}

/* Equalize header vertical spacing */
.site-header .container.header-bar { --header-vpad: 8px; padding-top: var(--header-vpad); padding-bottom: var(--header-vpad); align-items: center; }
.site-nav > ul, .header-actions { align-items: center; }

.credit-pill {
  font-size: 0.9rem;
  background: var(--primary-10);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.site-nav { background: #ffffff; }
.site-nav > ul {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: grid;
  gap: 6px;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
}
.site-nav a:hover { background: var(--primary-10); }
.site-nav .nav-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-nav .nav-link:hover { background: var(--primary-10); }

.site-nav .cta .button {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-nav .cta .button:hover { filter: brightness(1.05); }

/* Collapsible behavior for mobile: dropdown under header */
.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm), var(--shadow-md);
}
.site-nav[data-open="false"] { display: none; }
.site-nav[data-open="true"] { display: block; }

/* Auth launcher (Login + Get started) — mobile dropdown */
#primary-nav .auth-launcher {
  width: 100%;
}
#primary-nav[data-open="true"] .auth-launcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px; /* subtle gap between buttons */
}
#primary-nav[data-open="true"] .auth-launcher .button {
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

/* Desktop nav */
@media (min-width: 768px), (orientation: landscape) {
  .nav-toggle { display: none; }
  .site-header .container.header-bar { min-height: 72px; }
  .site-header { padding-bottom: 0; }
  .brand-logo { height: 48px; }

  /* Make nav inline within header grid */
  #primary-nav {
    position: static;
    display: block !important; /* Always visible on desktop/landscape */
    border: 0;
    box-shadow: none;
    justify-self: end; /* Push nav to right side */
  }
  #primary-nav > ul {
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
  }
  #primary-nav li { display: inline-flex; }
  /* Auth launcher (Login + Get started) — desktop */
  #primary-nav .auth-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* subtle gap between buttons */
  }
  #primary-nav .auth-launcher .button {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-weight: 700;
  }
}

/* Main layout & hero */
.site-main { padding: 16px 0 60px; }

.hero {
  background: radial-gradient(80% 80% at 10% 10%, #f4f8ff 0%, #edf5ff 40%, #eaf2ff 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 72px 16px 64px; display: grid; align-items: center; }
.hero-title { margin: 0 0 8px; font-size: 2.25rem; letter-spacing: -0.02em; }
.hero-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 1.125rem; }
.hero-cta { display: inline-flex; gap: 12px; align-items: center; margin-top: 6px; }
.trust-list { display: flex; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.trust-list li { position: relative; padding-left: 14px; }
.trust-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 999px; background: #9bb6ff; }

.section.note { padding: 18px 0 0; }
.muted { color: var(--muted); }

/* Sections */
.section {
  padding: 24px 16px;
  background: #ffffff00; /* transparent */
  border: 1px solid transparent;
  outline: 0;
  border-radius: 16px;
  box-shadow: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.section:hover { box-shadow: none; transform: none; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), var(--shadow-md); border-color: #dbe4f0; }
.card-img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; display: block; background: #f0f3fa; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--primary) 0%, #6ea1ff 100%); color: #fff; font-weight: 700; }
.card-title { margin: 10px 0 6px; font-size: 1.05rem; letter-spacing: -0.01em; }
.card-text { margin: 0 0 10px; color: var(--muted); }
.card-cta { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* Home product cards: orientation-driven columns, square cards, 4:3 images */
#product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
#product-grid .card { aspect-ratio: 1 / 1; grid-template-rows: 80% 1fr; overflow: hidden; align-content: start; padding: 0; border-radius: 9px; box-shadow: 0px 5px 9px 0px #eeeeee; background: linear-gradient(135deg, #5cffff, #8e71e0), var(--surface); cursor: pointer; box-sizing: border-box; }
#product-grid .card .card-img {
  display: block;
  width: 100%;
  margin: 0;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
#product-grid .card .card-body{ display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; min-height:0; min-width:0; height:100%; padding:12px; box-sizing:border-box; }
#product-grid .card .card-title{ display:none !important; }
#product-grid .card .gen-btn {
  display:inline-flex; align-items:center; justify-content:center; text-align:center;
  height:100%; padding:0 10px; width:100%; max-width:100%;
  border-radius:9px; border:0; background: transparent; color:#fff;
  text-decoration:none; font-weight:100; font-size:115% !important; letter-spacing:.2px; box-shadow:none;
  transition:none;
  font-family: 'Nova Square', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: clip; line-height:1.15; box-sizing: border-box;
}
#product-grid .card .gen-btn:hover{ color:#fff; border:0; }
#product-grid .card .gen-btn:active{ transform:translateY(1px); }
#product-grid .card .gen-btn:focus-visible{ outline:3px solid rgba(0,174,255,.28); outline-offset:2px; }
#product-grid .card .card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 0; font-size: clamp(.92rem, 1.4vw, 1.05rem); line-height: 1.25; }
@media (orientation: portrait){
  #product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #product-grid .card .card-title { -webkit-line-clamp: 2; }
  /* Make image occupy 70% of the square card on mobile */
  #product-grid .card { grid-template-rows: 70% 1fr; }
  #product-grid .card .gen-btn{ font-size: clamp(12px, 4.2vw, 16px) !important; }
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: #ffffff;
  border-top: 1px solid rgba(17,24,39,0.06);
  box-shadow: 0 -6px 16px rgba(16,24,40,0.06);
}
.footer-grid {
  padding: 24px 16px 40px;
  display: grid;
  gap: 16px;
}
.footer-brand .brand { margin-bottom: 6px; }
.footer-tagline { color: var(--muted); margin: 4px 0 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--muted); }

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
  }
  .footer-brand { justify-self: start; }
  .footer-links { justify-self: center; }
  .footer-copy { justify-self: end; }
}

/* Utilities */
.icon { display: block; }
.button { cursor: pointer; text-decoration: none; border-radius: 10px; border: 1px solid transparent; }
.button.secondary { background: #ffffff; color: var(--text); border: 1px solid var(--border); padding: 8px 12px; }
.button.secondary:hover { background: #f6f8fb; }
/* Generic primary button (non-modal) */
.button.primary { background: linear-gradient(180deg,#2f6bff,#2a5de0); color:#fff; border:0; padding: 8px 12px; }
.button.primary:hover { filter: brightness(1.05); }

/* Elevated buttons */
.button.primary-lg {
  background: linear-gradient(180deg,#2f6bff,#2a5de0);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 0;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 2px 8px rgba(16,24,40,.12);
}
.button.primary-lg:hover { filter: brightness(1.05); }
.button.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
}
.button.ghost:hover { background: #f6f8fb; }

/* Header Get started CTA */
.button.get-started {
  background: linear-gradient(180deg,#2f6bff,#2a5de0);
  color: #fff;
  border: 0;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 2px 8px rgba(16,24,40,.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.button.get-started:hover { filter: brightness(1.06); }

/* Primary CTA button style */
.site-nav .cta .button {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 2px 6px rgba(16,24,40,.08);
}
.site-nav .cta .button:hover { filter: brightness(1.05); }

/* Ensure header is the containing block for absolute nav */
.header-bar { position: relative; }

/* Dropdown styles */
.has-dropdown { position: relative; }
.has-dropdown .nav-link { display: inline-flex; align-items: center; gap: 8px; }
.has-dropdown .has-caret::after {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .75;
}
.has-dropdown .dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  padding: 8px;
  display: none;
  z-index: 1001;
}
.has-dropdown.open .dropdown { display: block; }
.has-dropdown .dropdown a { border-radius: 8px; padding: 10px 12px; display: block; color: var(--text); }
.has-dropdown .dropdown a:hover { background: var(--primary-10); }

/* Show dropdown on hover/focus (desktop/landscape) */
@media (min-width: 768px), (orientation: landscape) {
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { display: block; }
}

/* Material Symbols for nav icons */
.site-nav a.nav-link::before,
.site-nav button.nav-link::before,
.site-nav .cta .button::before,
#open-login-modal::before,
#open-auth-modal::before {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 500;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  margin-right: 6px;
}

/* Home */
.site-nav a.nav-link[href*="home"]::before { content: 'home'; }
/* History */
.site-nav a.nav-link[href*="history"]::before { content: 'history'; }

/* Services */
/* Services dropdown icon removed (menu removed) */

/* Buy Credits CTA - instant/speed */
.site-nav .cta .button::before { content: 'bolt'; }

/* Login button */
#open-login-modal::before { content: 'login'; }

/* Get started button */
#open-auth-modal::before { content: 'rocket_launch'; }

/* Account item */
.account .account-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.account .account-link:hover { background: var(--primary-10); }
.credit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2f3a8c;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e0e7ff;
}
.mob-credit { display: none; margin-right: 6px; }
@media (max-width: 768px){
  .mob-credit { display: inline-flex; }
}
.account-icon { color: var(--text); }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  padding: 6px;
  z-index: 1002;
}
.menu-item { width: 100%; text-align: left; background: transparent; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; }
.account-menu .menu-item { display: block; }
.menu-item:hover { background: var(--primary-10); }

/* Focus visibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Smooth appear/fade animations (site-wide) */
.fade-on-load { opacity: 0.001; transform: translateY(6px); }
.fade-on-load.show { opacity: 1; transform: none; transition: opacity .32s ease, transform .32s ease; transition-delay: var(--fade-delay, 0s); }
img.fade-img { opacity: 0.001; }
img.fade-img.is-loaded { opacity: 1; transition: opacity .35s ease; }
@media (prefers-reduced-motion: reduce){
  .fade-on-load, .fade-on-load.show, img.fade-img, img.fade-img.is-loaded { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Auth banner under header */
.auth-banner {
  background: #f0f7ff;
  border-bottom: 1px solid var(--border);
}
.auth-banner-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #0b1220;
}
.link-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.link-button:hover { text-decoration: underline; }

/* Account panel (auth UI) */
.account { position: relative; }
.tabs { display: grid; grid-auto-flow: column; gap: 8px; margin-bottom: 10px; }
.tab {
  appearance: none; background: #f6f8fb; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit;
}
.tab.active { background: #eaf1ff; border-color: #d6def0; color: #1d2b6b; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 6px; font-size: 0.95rem; font-weight: 600; color: #0b1220; }
.auth-form input {
  height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid #e3e8f0;
  font: inherit; background: #fff; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(17,24,39,.02);
}
.auth-form input::placeholder { color: #9aa3b2; }
.auth-form input:focus { outline: none; border-color: #b8d4ff; box-shadow: 0 0 0 3px rgba(47,107,255,.15); }
.auth-form label.inline { grid-auto-flow: column; grid-template-columns: 20px 1fr; align-items: center; gap: 8px; }
.auth-form .button.primary {
  background: linear-gradient(180deg,#26c8ff,#1aa7ff);
  color: #fff; border: 0; padding: 12px 14px; border-radius: 14px; font-weight: 600;
}
.auth-form .button.primary:hover { filter: brightness(1.05); }
.auth-form .button.primary.loading {
  background-image: linear-gradient(120deg,#2f6bff,#ff9f1c,#2f6bff);
  background-size: 200% 100%;
  animation: om-btnflow 1.1s ease-in-out infinite;
  filter: none;
}
@keyframes om-btnflow { 0%{background-position:0% 50%} 100%{background-position:100% 50%} }

/* Google auth button (outline style, with G icon) */
button[data-google-auth] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #3c4043;
  font-weight: 600;
}
button[data-google-auth]:hover { background: #f8f9fa; }
button[data-google-auth]:active { background: #f1f3f4; }
button[data-google-auth].loading { opacity: .85; cursor: wait; }
button[data-google-auth] .google-icon { width: 18px; height: 18px; display: inline-block; }
.form-msg { min-height: 18px; font-size: 0.85rem; color: #374151; }
.form-hint { display: block; color: #6b7280; font-size: 0.85rem; margin-top: 6px; }
.signed-in { display: grid; gap: 10px; }
.signed-in .button { border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; background: #f6f8fb; }

/* Modal */
.modal[aria-hidden="true"] { display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0; animation: fadeIn .18s ease-out forwards;
}
.modal-card {
  position: relative;
  width: min(92vw, 540px);
  margin: 12vh auto 0;
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16,24,40,.18), 0 4px 8px rgba(16,24,40,.08);
  padding: 18px;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  animation: slideIn .22s cubic-bezier(.2,.8,.2,1) .04s forwards;
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; }
.modal-tabs { background: #f7f9fc; border: 1px solid #e6eaf0; padding: 6px; border-radius: 14px; margin-bottom: 14px; }
.modal-tabs .tab {
  height: 40px;
  background: #fff;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  font-weight: 600;
}
.modal-tabs .tab.active {
  background: #eaf5ff;
  border-color: #cfe3ff;
}

/* Modal buttons */
.modal .button:not(.primary) {
  background: #fff;
  border-color: #e3e8f0;
  padding: 12px 14px;
  border-radius: 14px;
}
.modal .button:not(.primary):hover { background: #f7f9fc; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideIn { to { opacity: 1; transform: translateY(0) scale(1); } }

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Mobile welcome strip (Login/SignUp for signed-out users) */
.mobile-welcome { background: #f0f7ff; border-bottom: 1px solid var(--border); }
.mobile-welcome-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 16px; }
.mobile-welcome .actions { display:inline-flex; gap:8px; }
@media (min-width: 769px){ .mobile-welcome { display:none; } }
/* Mobile welcome actions scaling */
.mobile-welcome .actions .button{ height:42px; border-radius:12px; font-weight:700; font-size: clamp(13px, 3.8vw, 16px); line-height:1; }
@media (max-width: 480px){
  .mobile-welcome-row{ flex-direction: column; align-items: stretch; }
  .mobile-welcome .actions{ display:grid; grid-template-columns: 1fr 1fr; gap:8px; width:100%; }
  .mobile-welcome .actions .button{ width:100%; }
}
@media (max-width: 340px){ .mobile-welcome .actions{ grid-template-columns: 1fr; } }
