/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fd;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Utilities ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; top: -100px; left: 0; background: #1a1a2e; color: #fff; padding: 0.5rem 1rem; z-index: 1000; transition: top 0.2s; }
.skip-link:focus { top: 0; }
a { color: #2d5be3; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; background: #eef1f8; padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }

/* ===== Header ===== */
.site-header {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.logo:hover { text-decoration: none; opacity: 0.9; }
.logo svg { color: #4fc3f7; }
.logo-text { letter-spacing: -0.02em; }
.main-nav ul { display: flex; list-style: none; gap: 1.5rem; }
.main-nav a { color: #c4c4d4; font-weight: 500; transition: color 0.2s; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: #fff; text-decoration: none; border-bottom-color: #4fc3f7; }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger, .hamburger::before, .hamburger::after { display: block; width: 24px; height: 2px; background: #fff; transition: 0.3s; }
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.hero-subtitle { font-size: 1.15rem; color: #b0b8d1; max-width: 600px; margin: 0 auto 2rem; }
.search-bar { position: relative; max-width: 500px; margin: 0 auto 1.5rem; }
.search-bar input { width: 100%; padding: 0.9rem 1rem 0.9rem 2.75rem; border: 2px solid #2a2a4a; border-radius: 12px; font-size: 1rem; background: #fff; color: #1a1a2e; transition: border-color 0.2s, box-shadow 0.2s; }
.search-bar input:focus { outline: none; border-color: #4fc3f7; box-shadow: 0 0 0 3px rgba(79,195,247,0.2); }
.search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; }
.category-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.filter-btn { padding: 0.5rem 1rem; border: 1px solid #3a3a5a; border-radius: 20px; background: transparent; color: #c4c4d4; font-size: 0.875rem; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: #4fc3f7; color: #fff; }
.filter-btn.active { background: #4fc3f7; color: #1a1a2e; border-color: #4fc3f7; font-weight: 600; }

/* ===== Reference Section ===== */
.reference { padding: 3rem 0 4rem; }
.reference h2 { font-size: 1.75rem; text-align: center; margin-bottom: 0.5rem; }
.section-intro { text-align: center; color: #555; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.status-card { background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border-left: 4px solid #ccc; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.status-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.status-card:focus-visible { outline: 2px solid #2d5be3; outline-offset: 2px; }
.status-card.cat-1xx { border-left-color: #90a4ae; }
.status-card.cat-2xx { border-left-color: #66bb6a; }
.status-card.cat-3xx { border-left-color: #ffa726; }
.status-card.cat-4xx { border-left-color: #ef5350; }
.status-card.cat-5xx { border-left-color: #ab47bc; }
.status-code { font-size: 1.5rem; font-weight: 800; font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; color: #1a1a2e; }
.status-title { font-weight: 600; margin: 0.25rem 0; }
.status-summary { font-size: 0.9rem; color: #555; margin-bottom: 0.5rem; }
.status-detail { display: none; font-size: 0.85rem; color: #444; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #eee; line-height: 1.5; }
.status-card.expanded .status-detail { display: block; }
.status-card .expand-hint { font-size: 0.75rem; color: #2d5be3; font-weight: 500; }
.no-results { text-align: center; padding: 2rem; color: #777; }

/* ===== Tips Section ===== */
.tips { background: #eef1f8; padding: 3rem 0; }
.tips h2 { font-size: 1.75rem; text-align: center; margin-bottom: 2rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.tip-card { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.tip-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: #1a1a2e; }
.tip-card p { font-size: 0.9rem; color: #555; }

/* ===== Dev Notes ===== */
.dev-notes { padding: 3rem 0 4rem; }
.dev-notes h2 { font-size: 1.75rem; text-align: center; margin-bottom: 1.5rem; }
.dev-notes p { max-width: 700px; margin: 0 auto 1rem; text-align: center; color: #444; }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: #c4c4d4; padding: 1.5rem 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-inner nav ul { display: flex; list-style: none; gap: 1.5rem; }
.footer-inner a { color: #c4c4d4; font-size: 0.9rem; }
.footer-inner a:hover { color: #fff; }

/* ===== About Page Specific ===== */
.about-page { padding: 3rem 0 4rem; }
.about-page h1 { font-size: 2rem; text-align: center; margin-bottom: 2rem; }
.about-content { max-width: 700px; margin: 0 auto; background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

/* ===== Legal Pages ===== */
.legal-page { padding: 3rem 0 4rem; }
.legal-page h1 { font-size: 2rem; text-align: center; margin-bottom: 2rem; }
.legal-content { max-width: 700px; margin: 0 auto; background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #1a1a2e; padding: 1rem; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0.75rem; }
    .mobile-menu-toggle { display: block; }
    .hero { padding: 2.5rem 0 2rem; }
    .status-grid { grid-template-columns: 1fr; }
    .tips-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-inner nav ul { justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero h1 { font-size: 1.75rem; }
    .category-filters { gap: 0.35rem; }
    .filter-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}



/* 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;
}
