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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1a1a2e;
    background: #f8f9fc;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2b6cb0;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #2b6cb0;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
}

/* Workspace layout */
.workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

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

.editor-panel {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
    background: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
}

.btn-primary:hover {
    background: #2c5282;
}

.btn-outline {
    background: transparent;
    border-color: #cbd5e0;
    color: #4a5568;
}

.btn-outline:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43,108,176,0.15);
}

.action-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.export-group {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Results panel */
.results-panel {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.25rem;
    overflow-y: auto;
    max-height: 600px;
}

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

.results-header h2 {
    font-size: 1.25rem;
    color: #1a202c;
}

.badge {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-state {
    color: #a0aec0;
    text-align: center;
    padding: 2rem 0;
}

.issue-card {
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.issue-card:hover {
    background: #fed7d7;
}

.issue-card.warning {
    background: #fffff0;
    border-left-color: #ecc94b;
}

.issue-card.warning:hover {
    background: #fefcbf;
}

.issue-type {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.issue-text {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.issue-suggestion {
    font-size: 0.85rem;
    color: #2b6cb0;
    font-style: italic;
}

.improved-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.improved-preview h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.improved-preview pre {
    white-space: pre-wrap;
    background: #f7fafc;
    padding: 1rem;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2d3748;
}

.hidden {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Supporting content */
.supporting-content {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.supporting-content h2 {
    font-size: 1.5rem;
    color: #1a202c;
    margin-bottom: 1rem;
}

.supporting-content h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin: 1.5rem 0 0.75rem;
}

.supporting-content p {
    margin-bottom: 1rem;
    color: #4a5568;
}

.supporting-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.supporting-content li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.last-updated {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-top: 2rem;
    font-style: italic;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-top: auto;
}

.site-footer a {
    color: #2b6cb0;
    text-decoration: none;
}

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

/* Responsive adjustments */
@media (max-width: 767px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .export-group {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
    .action-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .results-panel {
        max-height: none;
    }
}



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