/* Reset and base */
*, *::before, *::after {
box-sizing: border-box;
}

html {
font-size: 16px;
scroll-behavior: smooth;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
color: #1a1a2e;
background: #f8f9fc;
}

/* Header */
.site-header {
background: #ffffff;
border-bottom: 1px solid #e2e6ef;
padding: 0.75rem 1rem;
position: sticky;
top: 0;
z-index: 10;
}

.header-inner {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;
}

.logo {
display: flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
color: #1a1a2e;
font-weight: 700;
font-size: 1.1rem;
}

.logo svg {
color: #4a6cf7;
}

.main-nav a {
color: #4a6cf7;
text-decoration: none;
font-weight: 500;
padding: 0.25rem 0.5rem;
border-radius: 4px;
}

.main-nav a:hover {
background: #eef1ff;
}

/* Main layout */
.page-main {
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
}

.worksheet {
margin-bottom: 2.5rem;
}

.worksheet-layout {
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;
}

@media (min-width: 768px) {
.worksheet-layout {
grid-template-columns: 360px 1fr;
}
}

/* Panels */
.entry-panel, .results-panel {
background: #ffffff;
border: 1px solid #e2e6ef;
border-radius: 12px;
padding: 1.25rem;
}

.panel-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.75rem;
margin-bottom: 1rem;
}

.panel-header h2 {
margin: 0;
font-size: 1.25rem;
font-weight: 700;
}

.preset-actions, .export-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}

/* Form */
.topic-form {
display: flex;
flex-direction: column;
gap: 1rem;
}

.form-row {
display: flex;
flex-direction: column;
gap: 0.25rem;
}

.form-row label {
font-size: 0.85rem;
font-weight: 600;
color: #4a5568;
}

.form-row input[type="text"],
.form-row input[type="number"] {
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 8px;
font-size: 0.95rem;
transition: border-color 0.2s;
}

.form-row input:focus {
outline: none;
border-color: #4a6cf7;
box-shadow: 0 0 0 3px rgba(74,108,247,0.15);
}

.slider-group {
display: flex;
align-items: center;
gap: 0.75rem;
}

.slider-group input[type="range"] {
flex: 1;
}

.slider-value {
font-weight: 700;
font-size: 1rem;
min-width: 2rem;
text-align: center;
color: #4a6cf7;
}

/* Buttons */
.btn-primary {
background: #4a6cf7;
color: #ffffff;
border: none;
padding: 0.6rem 1.25rem;
border-radius: 8px;
font-weight: 600;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.2s;
}

.btn-primary:hover {
background: #3b5de7;
}

.btn-secondary {
background: #f1f5f9;
color: #334155;
border: 1px solid #e2e6ef;
padding: 0.5rem 1rem;
border-radius: 8px;
font-weight: 500;
font-size: 0.85rem;
cursor: pointer;
transition: background 0.2s;
}

.btn-secondary:hover {
background: #e2e6ef;
}

/* Empty state */
.empty-state {
text-align: center;
padding: 2rem 1rem;
color: #6b7280;
}

/* Table */
.table-wrapper {
overflow-x: auto;
}

.hidden {
display: none;
}

.results-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}

.results-table th {
text-align: left;
padding: 0.6rem 0.75rem;
border-bottom: 2px solid #e2e6ef;
font-weight: 700;
color: #4a5568;
white-space: nowrap;
}

.results-table td {
padding: 0.5rem 0.75rem;
border-bottom: 1px solid #f1f5f9;
}

.results-table tbody tr:hover {
background: #f8fafc;
}

.priority-badge {
display: inline-block;
padding: 0.15rem 0.5rem;
border-radius: 12px;
font-weight: 700;
font-size: 0.8rem;
}

.priority-high {
background: #fee2e2;
color: #991b1b;
}

.priority-medium {
background: #fef3c7;
color: #92400e;
}

.priority-low {
background: #d1fae5;
color: #065f46;
}

/* Ad slot */
.ad-slot {
margin-top: 1.25rem;
min-height: 120px;
display: flex;
align-items: center;
justify-content: center;
background: #f8fafc;
border: 1px dashed #e2e6ef;
border-radius: 8px;
color: #9ca3af;
font-size: 0.8rem;
}

/* Supporting content */
.supporting-content {
background: #ffffff;
border: 1px solid #e2e6ef;
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 2rem;
}

.content-inner {
max-width: 800px;
margin: 0 auto;
}

.content-inner h2 {
font-size: 1.4rem;
margin-top: 0;
}

.content-inner h3 {
font-size: 1.1rem;
margin-top: 1.5rem;
color: #4a5568;
}

.scenario-block, .assumptions-block, .troubleshooting-block {
margin-bottom: 1.5rem;
}

.assumptions-block ul {
padding-left: 1.25rem;
}

.assumptions-block li {
margin-bottom: 0.5rem;
}

/* Ecosystem footer */
.ecosystem-footer {
margin-bottom: 2rem;
}

.ecosystem-footer .content-inner {
background: #eef1ff;
border-radius: 8px;
padding: 1rem 1.25rem;
font-size: 0.9rem;
color: #334155;
}

.ecosystem-footer a {
color: #4a6cf7;
font-weight: 500;
}

.version-note {
margin-top: 0.5rem;
font-size: 0.8rem;
color: #6b7280;
}

/* Footer */
.site-footer {
background: #1a1a2e;
color: #cbd5e1;
padding: 1rem;
font-size: 0.85rem;
}

.footer-inner {
max-width: 1200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;
}

.footer-inner a {
color: #93c5fd;
text-decoration: none;
margin-left: 1rem;
}

.footer-inner a:hover {
text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
.panel-header {
flex-direction: column;
align-items: flex-start;
}

.btn-primary, .btn-secondary {
padding: 0.5rem 0.75rem;
font-size: 0.85rem;
}

.header-inner {
flex-direction: column;
align-items: flex-start;
}
}



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