/* Reset page chrome to remove gaps */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: #f9fafb;
  color: #374151;
}

/* Font utilities */
.font-brand {
  font-family: 'Bitcount Grid Double', sans-serif;
  font-weight: 400;
}

.font-tagline {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 400;
}

.font-ubuntu {
  font-family: 'Ubuntu Sans', sans-serif;
  font-weight: 200;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

h1, h2, h3 {
  font-weight: 700;
  margin-top: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

textarea,
input {
  width: 100%;
  max-width: 100%;
}

/* Make checkboxes display at their natural size */
input[type="checkbox"] {
  width: auto;
  max-width: none;
}

pre,
code {
  overflow-x: auto;
  font-size: 0.9rem;
}

button {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 1rem auto;
  background: #F97316;
  color: #ffffff;
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

button:hover {
  background: #ea580c;
}

.signup-btn {
  background: #F97316;
  color: #fff;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.card {
  background: #E5E7EB;
  border-radius: 0.75rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin: 1rem 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #fde2b3, #fff7ed);
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

footer {
  text-align: center;
  margin-bottom: 2rem;
}

a {
  color: #F97316;
  text-decoration: none;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 4px solid #ddd;
  border-top-color: #F97316;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
}

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

#copy-msg {
  margin-left: 0.5rem;
  color: #F97316;
}

.highlight {
  outline: 2px solid #F97316;
  transition: outline 0.3s ease-in-out;
}


/* Styled output container for AI assistant */
#output {
  display: block;
  padding: 1rem;
  font-family: Menlo, Monaco, "Courier New", monospace;
  white-space: pre-wrap;
}

/* Responsive tweaks for mobile */
@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .container {
    padding: 1rem;
  }
}

/* Pricing page styles */
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tier-panel {
  background: #E5E7EB;
  border-radius: 0.75rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tier-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  background: #000000;
  color: #ffffff;
}

.tier-panel .price {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.5rem 0 1rem 0;
}

/* Sidebar layout helpers */
#app-sidebar { display: flex; flex-direction: column; }

/* Ensure the page layout uses a two-column grid on large screens */
@media (min-width: 1024px) {
  .with-sidebar {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 1.25rem;
    align-items: start;
  }
}

/* Prevent header overlap if header is fixed ~64px */
.lg\:top-16 { top: 4rem; }

/* details/summary pointer + reset default marker */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

:root {
  --brand-start: #16a34a; /* emerald-600 */
  --brand-end:   #0ea5a4; /* teal-600 */
  --banner-text: #ffffff;
  --cta-bg:      #ef4444; /* red-500 */
  --cta-bg-hov:  #dc2626; /* red-600 */
  --header-min-h: 56px;   /* slim height */
}

/* Slim gradient banner */
.gradient-banner {
  background: linear-gradient(90deg, var(--brand-start) 0%, var(--brand-end) 100%);
  color: var(--banner-text);
  min-height: var(--header-min-h);
}

/* Compact vertical rhythm */
.gradient-banner .banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: .5rem;
}

@media (min-width: 768px) {
  .gradient-banner .banner-inner {
    padding-block: .625rem;
  }
}

/* CTA button (kept red for contrast and urgency) */
.banner-cta {
  background: var(--cta-bg);
  color: #fff;
  border-radius: .5rem;
  padding: .5rem .9rem;
  font-weight: 600;
  line-height: 1.1;
}
.banner-cta:hover,
.banner-cta:focus-visible {
  background: var(--cta-bg-hov);
}

/* Links in banner */
.gradient-banner a {
  color: #ffffff;
}
.gradient-banner a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Ensure content doesn't hide under a fixed header (if using fixed) */
/* Uncomment if your header is position: fixed */
/*
body.with-fixed-header {
  padding-top: var(--header-min-h);
}
*/
/* Give headings a comfortable scroll offset so they're not hidden under the sticky header */
:target {
  scroll-margin-top: 72px; /* ≈ header height; tweak if needed */
}

/* --- Prompt History layout helpers (no Tailwind @apply) --- */
.history-item {
  background: #ffffff;
  border-radius: 0.5rem;       /* rounded-lg */
  border: 1px solid #e5e7eb;   /* border-gray-200 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* small shadow */
  padding: 1rem;               /* p-4 */
}

.history-grid {
  display: grid;
  align-items: center;         /* items-center */
  gap: 0.75rem;                /* gap-3 */
  grid-template-columns: 40px 1fr auto; /* star | prompt | meta */
}

/* fixed-size star cell */
.star-btn {
  width: 24px;                 /* w-6 */
  height: 24px;                /* h-6 */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;              /* shrink-0 */
  border-radius: 0.25rem;
  line-height: 1;
  font-size: 1.25rem;          /* ~20px glyph size */
  cursor: pointer;
}

/* prompt text: clamp when collapsed; full wrap when expanded */
.prompt-text {
  color: #1f2937;              /* text-gray-800 */
  word-break: break-word;
}

/* clamp ONLY when the row has .is-collapsed */
.history-item.is-collapsed .prompt-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;                /* gap-3 */
  justify-content: flex-end;   /* right align */
  font-size: 0.875rem;         /* text-sm */
  color: #4b5563;              /* text-gray-600 */
}

.mode-badge {
  display: inline-block;
  font-size: 0.75rem;          /* text-xs */
  padding: 0.25rem 0.5rem;     /* px-2 py-1 */
  border-radius: 0.375rem;
  background: #f3f4f6;         /* bg-gray-100 */
}

.history-body {
  margin-top: 0.5rem;          /* mt-2 */
  white-space: pre-wrap;       /* whitespace-pre-wrap */
  font-size: 0.875rem;
  background: #f9fafb;         /* bg-gray-50 */
  padding: 0.75rem;            /* p-3 */
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
}

/* robust hidden helper (works even without Tailwind) */
.u-hidden { display: none !important; }

/* Responsive: stack meta under prompt on small screens */
@media (max-width: 640px) {
  .history-grid {
    grid-template-columns: 40px 1fr;
  }
  .meta-wrap {
    grid-column: 1 / -1;       /* span across */
    justify-content: flex-start;
    margin-top: 0.5rem;
  }
}

/* Full-bleed, auto-height, sticky header */
.site-header {
  position: sticky;   /* keeps it visible while scrolling */
  top: 0;
  z-index: 1000;      /* above page content */
  width: 100%;
  background: #F4F4F2;
  border-bottom: 1px solid #0D0E0C;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Flexible inner layout (no fixed max-width) */
.site-header__inner {
  width: 100%;
  max-width: none;       /* remove 1200px cap */
  margin: 0;
  padding: 12px 20px;    /* controls visual height */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo {
  height: 36px;
  width: auto;
  display: block;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  text-decoration: none;
  color: #0D0E0C;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.site-nav__link:hover {
  background: rgba(13,14,12,0.06);
}

.site-nav__link.is-active {
  outline: 1px solid #0D0E0C;
  background: rgba(13,14,12,0.06);
}

.site-cta {
  text-decoration: none;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #0D0E0C;
  background: white;
  color: #0D0E0C;
  font-weight: 600;
  transition: transform 0.06s ease, background 0.15s ease;
}

.site-cta:hover {
  background: #F4F4F2;
}

.site-cta:active {
  transform: translateY(1px);
}

/* Layout helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.breadcrumb a { color: inherit; }

/* File processor buttons alignment */
#file-processor button {
  line-height: 1.25;
}
#file-processor textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Responsive hero images (works with or without Tailwind) */
.hero-img {
  width: 100%;
  height: auto;
  max-width: 520px;     /* cap image width on large screens */
  display: block;
 
  object-fit: contain;  /* preserve full illustration */
}

/* Optional: ensure sections breathe on small screens */
@media (max-width: 767px) {
  section { padding-top: 2rem; padding-bottom: 2rem; }
}

/* Primary button (if not already defined) */
.btn-primary {
  background: linear-gradient(90deg, #1f7ae0, #7aa7ff);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(31, 122, 224, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Subtle improvement for the floating card and transitions */
header .ring-gray-200 { transition: box-shadow 150ms ease, transform 150ms ease; }
header .rounded-2xl { will-change: transform; }
@media (hover:hover) {
  header .rounded-2xl:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-1px);
  }
}

/* ====== Login Page Background & Panel ====== */

/* Large radial gradient "blob" behind the panel */
.login-gradient-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Layered radial gradients for warm, friendly glow */
  background:
    radial-gradient(40rem 40rem at 30% 30%, rgba(255, 183, 77, 0.45), transparent 60%),
    radial-gradient(35rem 35rem at 70% 40%, rgba(66, 165, 245, 0.35), transparent 65%),
    radial-gradient(30rem 30rem at 50% 70%, rgba(76, 175, 80, 0.30), transparent 65%);
  filter: blur(20px);
  transform: translateZ(0);
}

/* Hovering card look */
.login-card {
  /* sizing tuned for responsiveness; adjust as needed */
  width: min(100%, 480px);
  padding: 2rem;
  /* subtle lift */
  transform: translateZ(0);
}

/* Tiny "Home" button that sits just above-left corner of the panel */
.login-home-btn {
  position: absolute;
  top: -1.75rem;   /* space above panel */
  left: 0.25rem;   /* just off the panel's left edge */
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  color: #111827; /* gray-900 */
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.login-home-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.95);
}
.login-home-btn:focus-visible {
  outline: 2px solid #60a5fa; /* blue-400 */
  outline-offset: 2px;
}

/* Motion-reduced preference */
@media (prefers-reduced-motion: reduce) {
  .login-home-btn {
    transition: none;
  }
}
