:root {
    --bg-color: #fcf9f2;
    --text-color: #2d3748;
    --text-light: #718096;
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --secondary: #e2e8f0;
    --border: #cbd5e1;
    --white: #ffffff;
    --warning-bg: #fffbeb;
    --warning-border: #fcd34d;
    --highlight-bg: #f0fdf4;
    --highlight-border: #86efac;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header & Footer */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}
header nav a, footer nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
}
header nav a:hover {
    color: var(--primary);
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    background-color: var(--white);
    border-top: 1px solid var(--border);
    color: var(--text-light);
}
footer nav {
    margin-top: 1rem;
}

/* Typography & Spacing */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}
h1 {
    font-size: 2.25rem;
}
h2 {
    font-size: 1.5rem;
}
.intro-section, .tips-section {
    margin: 3rem 0;
    max-width: 800px;
}
.intro-section p, .tips-section p {
    margin-bottom: 1rem;
    color: #4a5568;
}

/* App Layout */
.app-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media(min-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Styles */
.form-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.help-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
fieldset {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
}
legend {
    font-weight: 600;
    padding: 0 0.5rem;
    color: var(--primary);
}
.form-group {
    margin-bottom: 1rem;
}
.form-group:last-child {
    margin-bottom: 0;
}
label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
input[type="text"], textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

/* Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* Preview Section */
.preview-section {
    position: sticky;
    top: 2rem;
}
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.print-sheet {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}
.sheet-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.sheet-header h1 {
    margin-bottom: 0.25rem;
    color: var(--primary);
}
.sheet-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}
.sheet-grid {
    display: grid;
    gap: 1.5rem;
}
.sheet-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
}
.sheet-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--secondary);
    padding-bottom: 0.5rem;
}
.sheet-card.warning {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
}
.sheet-card.highlight {
    background-color: var(--highlight-bg);
    border-color: var(--highlight-border);
}
.sheet-field {
    margin-bottom: 1rem;
}
.sheet-field:last-child {
    margin-bottom: 0;
}
.sheet-field strong {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}
.sheet-field p {
    white-space: pre-wrap;
}
.sheet-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px dashed var(--border);
    padding-top: 1rem;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    body {
        background: none;
        color: #000;
    }
    .container, .app-layout {
        max-width: none;
        margin: 0;
        padding: 0;
        display: block;
    }
    .preview-section {
        position: static;
    }
    .print-sheet {
        box-shadow: none;
        border: none;
        padding: 0;
        width: 100%;
    }
    .sheet-card {
        page-break-inside: avoid;
        border: 2px solid #ccc;
    }
    .sheet-card.warning, .sheet-card.highlight {
        background: none !important;
    }
}


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