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

:root {
  --color-bg: #FFFDF7;
  --color-surface: #FFFFFF;
  --color-primary: #D97706;
  --color-primary-hover: #B45309;
  --color-primary-light: #FEF3C7;
  --color-text: #1E293B;
  --color-text-soft: #475569;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-accent: #F59E0B;
  --color-success: #059669;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --max-width: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ===== Header ===== */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo svg {
  color: var(--color-primary);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--color-text-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  padding: 4rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-primary-light);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-soft);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: #F8FAFC;
}

.btn-text {
  background: none;
  color: var(--color-text-soft);
  padding: 0.4rem 0.8rem;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-text:hover {
  color: var(--color-primary);
}

.btn-spin {
  font-size: 1.1rem;
  padding: 0.85rem 2rem;
  margin-top: 1rem;
}

.btn-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* ===== Tool Section ===== */
.tool-section {
  padding: 3.5rem 0;
}

.tool-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--color-text-soft);
  margin-bottom: 2rem;
  max-width: 680px;
}

.spinner-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.category-selector label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.category-selector select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background-color: #FAFAFA;
  color: var(--color-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23475569'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.spinner-display {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.spinner-icon {
  opacity: 0.7;
}

.spinner-circle {
  transform-origin: 32px 32px;
  animation: spin-slow 12s linear infinite;
}

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

.question-box {
  background: var(--color-primary-light);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background-color 0.3s;
}

.question-box.flash {
  background-color: #FDE68A;
}

#question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
}

.placeholder-text {
  color: var(--color-text-muted);
  font-style: italic;
}

.notes-area label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.notes-area textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  background: #FAFAFA;
  color: var(--color-text);
  line-height: 1.6;
}

.notes-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notes-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ===== How It Works ===== */
.how-section {
  padding: 3.5rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.how-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

/* ===== Tips ===== */
.tips-section {
  padding: 3.5rem 0;
}

.tips-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.tip-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.tip-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.tip-card p {
  color: var(--color-text-soft);
  font-size: 0.92rem;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text-soft);
}

.footer-nav a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ===== About Page ===== */
.about-page {
  padding: 3rem 0;
}

.about-page h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.about-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* ===== Legal Pages ===== */
.legal-page {
  padding: 3rem 0;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.legal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  line-height: 1.7;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.5rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .spinner-card {
    padding: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .steps-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
