/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Skip Link */
.skip-link {
    position: absolute; top: -100px; left: 16px; background: #1a1a2e; color: #fff; padding: 8px 16px; z-index: 1000; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #1a1a2e; font-weight: 700; font-size: 1.2rem; }
.logo-text { letter-spacing: -0.3px; }
.main-nav ul { list-style: none; display: flex; gap: 24px; }
.main-nav a { text-decoration: none; color: #555; font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: #e94560; }

/* Main */
main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px; width: 100%; }

/* Workspace */
.workspace { margin-bottom: 48px; }
.workspace-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.workspace-subtitle { color: #666; font-size: 1.05rem; margin-bottom: 28px; }
.workspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

/* Input Panel */
.input-panel {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}
.input-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #eee; }
.tab {
    background: none; border: none; padding: 10px 20px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600; color: #888;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.tab.active { color: #e94560; border-bottom-color: #e94560; }
.tab:hover { color: #333; }
.tab-panel[hidden] { display: none; }
.input-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
.article-input {
    width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.95rem; line-height: 1.5; resize: vertical;
    font-family: inherit; background: #fafafa;
}
.article-input:focus { outline: 2px solid #e94560; outline-offset: 2px; border-color: #e94560; background: #fff; }
.preset-select {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.95rem; font-family: inherit; background: #fafafa;
}
.preset-note { margin-top: 8px; font-size: 0.85rem; color: #888; min-height: 20px; }
.btn-primary {
    display: block; width: 100%; margin-top: 16px; padding: 14px;
    background: #e94560; color: #fff; border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: #c73a52; }
.btn-primary:focus { outline: 3px solid #e94560; outline-offset: 2px; }
.input-hint { margin-top: 10px; font-size: 0.8rem; color: #999; text-align: center; }

/* Results Panel */
.results-panel {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee; min-height: 400px;
}
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.empty-title { font-weight: 700; font-size: 1.1rem; margin-top: 16px; color: #555; }
.empty-desc { color: #888; font-size: 0.9rem; margin-top: 4px; }
.results-content[hidden] { display: none; }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.result-title { font-size: 1.3rem; font-weight: 700; flex: 1; }
.result-actions { display: flex; gap: 8px; }
.btn-icon {
    background: #f0f0f0; border: 1px solid #ddd; border-radius: 6px;
    padding: 8px; cursor: pointer; color: #555; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.btn-icon:hover { background: #e0e0e0; }
.btn-icon:focus { outline: 2px solid #e94560; outline-offset: 2px; }
.result-section { margin-bottom: 20px; }
.section-heading { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: #333; border-left: 4px solid #e94560; padding-left: 10px; }
.fact-list { list-style: none; padding: 0; }
.fact-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.95rem; }
.fact-list li::before { content: "•"; color: #e94560; font-weight: bold; margin-right: 8px; }

/* Credibility Meter */
.credibility-meter { }
.meter-bar { height: 12px; background: #eee; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.meter-fill { height: 100%; background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77); border-radius: 6px; transition: width 0.5s; width: 0%; }
.meter-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #888; margin-bottom: 4px; }
.meter-note { font-size: 0.85rem; color: #555; }

/* Timeline */
.timeline-list { padding-left: 24px; }
.timeline-list li { padding: 6px 0; font-size: 0.9rem; color: #444; }

/* Perspective Slider */
.perspective-slider-container { margin-bottom: 12px; }
.perspective-slider { width: 100%; -webkit-appearance: none; height: 8px; background: linear-gradient(90deg, #4a90d9, #9b59b6, #e74c3c); border-radius: 4px; outline: none; }
.perspective-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: #fff; border: 3px solid #333; border-radius: 50%; cursor: pointer; }
.slider-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: #888; margin-top: 4px; }
.slider-label { text-align: center; width: 33%; }
.perspective-text { background: #f9f9f9; padding: 14px; border-radius: 8px; font-size: 0.9rem; line-height: 1.5; }

/* Saved Section */
.saved-section { margin-bottom: 40px; }
.saved-section h2 { font-size: 1.4rem; margin-bottom: 16px; }
.saved-list { display: flex; flex-direction: column; gap: 10px; }
.saved-empty { color: #888; font-size: 0.9rem; }
.saved-item {
    background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 14px 18px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: box-shadow 0.2s;
}
.saved-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.saved-item-title { font-weight: 600; }
.saved-item-date { font-size: 0.8rem; color: #888; }
.btn-text { background: none; border: none; color: #e94560; cursor: pointer; font-weight: 600; margin-top: 12px; font-size: 0.9rem; text-decoration: underline; }
.btn-text:hover { color: #c73a52; }

/* Supporting Content */
.supporting-content { margin-bottom: 40px; }
.supporting-content h2 { font-size: 1.5rem; margin-bottom: 20px; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.support-card { background: #fff; border-radius: 10px; padding: 20px; border: 1px solid #eee; }
.support-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: #1a1a2e; }
.support-card p { font-size: 0.9rem; color: #555; line-height: 1.6; }
.mistakes-list { list-style: none; padding: 0; }
.mistakes-list li { padding: 6px 0; font-size: 0.9rem; color: #555; border-bottom: 1px solid #f5f5f5; }
.mistakes-list li:last-child { border-bottom: none; }

/* FAQ */
.faq-section { margin-bottom: 40px; }
.faq-section h2 { font-size: 1.5rem; margin-bottom: 16px; }
.faq-item { border-bottom: 1px solid #e0e0e0; padding: 14px 0; }
.faq-item summary { font-weight: 600; cursor: pointer; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: #e94560; margin-left: 12px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-top: 10px; font-size: 0.9rem; color: #555; line-height: 1.6; }

/* Footer */
.site-footer { background: #1a1a2e; color: #ccc; padding: 32px 0; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #ccc; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #e94560; }
.footer-note { font-size: 0.8rem; color: #999; }
.footer-version { font-size: 0.75rem; color: #777; }

/* Responsive */
@media (max-width: 768px) {
    .workspace-grid { grid-template-columns: 1fr; }
    .workspace-title { font-size: 1.6rem; }
    .support-grid { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; gap: 8px; }
    .main-nav ul { gap: 16px; }
}
@media (max-width: 480px) {
    main { padding: 20px 12px 40px; }
    .input-panel, .results-panel { padding: 16px; }
    .result-header { flex-direction: column; }
}



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