* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #222; background: #fafafa; }
a { color: #0066cc; text-decoration: none; }a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 0 auto; padding: 1rem; }
.site-header { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: white; padding: 1rem 0; }
.site-header h1 { margin: 0; font-size: 1.5rem; }
.site-nav { display: flex; gap: 1rem; margin-top: 0.5rem; }
.site-nav a { color: rgba(255,255,255,0.9); font-weight: 500; }
.site-nav a:hover { color: white; }
main { background: white; min-height: calc(100vh - 120px); padding: 1.5rem 0; }
section { margin-bottom: 2rem; }
h2, h3, h4 { color: #1e3c72; margin-top: 0; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
.bracket-input form { display: flex; flex-direction: column; gap: 1rem; }
.pick-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; align-items: center; padding: 0.75rem; background: #f8f9fa; border-radius: 8px; border: 1px solid #e9ecef; }
.pick-group label { font-weight: 500; margin-bottom: 0.25rem; }
.pick-group select { width: 100%; padding: 0.5rem; border: 1px solid #ced4da; border-radius: 4px; background: white; }
.confidence-selector { text-align: right; }
.confidence-selector label { font-size: 0.875rem; color: #6c757d; margin-bottom: 0.25rem; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.form-actions button { padding: 0.75rem 1.5rem; border: none; border-radius: 6px; cursor: pointer; font-size: 1rem; }
#analyzeBtn { background: #1e3c72; color: white; }
#analyzeBtn:hover { background: #162a4a; }
#saveHistory { background: #6c757d; color: white; }
#saveHistory:hover { background: #5a6268; }
.results { background: #f8f9fa; padding: 1.5rem; border-radius: 8px; margin-top: 1rem; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card { background: white; padding: 1rem; border-radius: 8px; border: 1px solid #e9ecef; }
.card h4 { margin-top: 0; font-size: 1rem; color: #1e3c72; }
.dist-chart { height: 120px; display: flex; align-items: flex-end; gap: 4px; margin: 0.5rem 0; }
.dist-bar { width: 100%; background: linear-gradient(180deg, #0066cc 0%, #2a5298 100%); border-radius: 4px 4px 0 0; }
.upset-opportunity { background: #fff8e1; border-color: #ffc107; }
.upset-opportunity h4 { color: #856404; }
.result-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.result-actions button { padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }
#copyResults { background: #28a745; color: white; }
#copyResults:hover { background: #218838; }
#printResults { background: #17a2b8; color: white; }
#printResults:hover { background: #138496; }
#shareResults { background: #6f42c1; color: white; }
#shareResults:hover { background: #593470; }
.history-panel { background: #f8f9fa; padding: 1rem; border-radius: 8px; }
.history-panel ul { list-style: none; padding: 0; margin: 0.5rem 0; }
.history-panel li { padding: 0.5rem; background: white; margin-bottom: 0.25rem; border-radius: 4px; font-size: 0.875rem; }
.empty-history { color: #6c757d; font-style: italic; }
#clearHistory { background: none; border: none; color: #dc3545; cursor: pointer; padding: 0; font-size: 1rem; }
#clearHistory:hover { text-decoration: underline; }
.deep-dive, .assumptions, .faq-block { padding: 1rem; background: white; border-radius: 8px; border: 1px solid #e9ecef; }
.faq-block details { margin-bottom: 0.5rem; }
faq-block summary { cursor: pointer; font-weight: 500; }
.ad-reserve { min-height: 120px; background: #e9ecef; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #6c757d; margin-top: 1rem; }
.intro { text-align: center; padding: 1rem; background: #e3f2fd; border-radius: 8px; margin-bottom: 1rem; }
.intro h2 { font-size: 1.5rem; color: #0d47a1; }
.preset-example { text-align: center; margin-top: 0.5rem; }
.preset-example button { background: #1e3c72; color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }
.preset-example button:hover { background: #162a4a; }
.site-footer { background: #212529; color: #adb5bd; padding: 1rem 0; text-align: center; }
.site-footer a { color: #94bable; }
@media (max-width: 600px) { 
  .pick-group { grid-template-columns: 1fr; }
  .site-nav { flex-direction: column; gap: 0.5rem; }
  .summary-cards { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
}
@media (max-width: 480px) { 
  .container { padding: 0.5rem; }
  h1 { font-size: 1.25rem; }
  .pick-group { padding: 0.5rem; }
}


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