/* ── AIENLY — MAIN CSS ── */

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

/* Calculator card */
.calc-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
}

/* Input styles */
.calc-input {
    width: 100%;
    height: 42px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 0 0.875rem;
    font-size: 15px;
    font-family: inherit;
    color: #1A1A1A;
    background: #fff;
    transition: border-color 0.15s;
}
.calc-input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Select styles */
.calc-select {
    width: 100%;
    height: 42px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 0 0.875rem;
    font-size: 15px;
    font-family: inherit;
    color: #1A1A1A;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.calc-select:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Calculate button */
.calc-btn {
    width: 100%;
    height: 44px;
    background: #4F46E5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.calc-btn:hover { background: #4338CA; }
.calc-btn:active { background: #3730A3; }

/* Results box */
.result-box {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 10px;
    padding: 1.25rem;
}

/* Result value */
.result-value {
    font-size: 28px;
    font-weight: 700;
    color: #4F46E5;
    line-height: 1;
}

/* Breakdown table rows */
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { color: #6B7280; }
.breakdown-val   { font-weight: 600; color: #1A1A1A; }
.breakdown-deduction { color: #DC2626; }

/* FAQ accordion */
.faq-item {
    border-bottom: 1px solid #E5E7EB;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1rem 0;
    font-size: 15px;
    font-weight: 500;
    color: #1A1A1A;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}
.faq-answer {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.7;
    padding-bottom: 1rem;
    display: none;
}
.faq-answer.open { display: block; }

/* Tool card grid */
.tool-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    display: block;
}
.tool-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 1.5rem;
}
.breadcrumb a { color: #6B7280; text-decoration: none; }
.breadcrumb a:hover { color: #4F46E5; }
.breadcrumb-sep { color: #D1D5DB; }

/* Note/warning box */
.note-box {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 13px;
    color: #78350F;
    line-height: 1.6;
}

/* Ad placeholder (shows outline in dev mode) */
.ad-slot {
    background: #F9FAFB;
    border: 1px dashed #E5E7EB;
    border-radius: 8px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9CA3AF;
    margin: 1.5rem 0;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .result-value { font-size: 22px; }
    .calc-card { padding: 1rem; }
}

/* ============================================================
   Blog post body — self-contained article styling.
   The Tailwind CDN does NOT include the Typography (prose)
   plugin, so the prose-* classes on #post-body are no-ops.
   These rules style the raw HTML the editor stores instead.
   ============================================================ */
#post-body {
    color: #374151;
    font-size: 17px;
    line-height: 1.75;
}
#post-body > *:first-child { margin-top: 0; }

#post-body p {
    margin: 0 0 1.25rem;
}

#post-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 2.25rem 0 1rem;
}
#post-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin: 1.75rem 0 0.75rem;
}
#post-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin: 1.5rem 0 0.5rem;
}

#post-body a {
    color: #4F46E5;
    text-decoration: none;
}
#post-body a:hover { text-decoration: underline; }

#post-body strong { color: #111827; font-weight: 600; }

#post-body ul,
#post-body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}
#post-body li { margin-bottom: 0.5rem; }
#post-body ul { list-style: disc; }
#post-body ol { list-style: decimal; }

#post-body blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid #4F46E5;
    background: #EEF2FF;
    border-radius: 0 8px 8px 0;
    color: #3730A3;
    font-style: italic;
}
#post-body blockquote p:last-child { margin-bottom: 0; }

#post-body hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 2rem 0;
}

#post-body code {
    background: #F3F4F6;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}
#post-body pre {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 1.25rem;
}
#post-body pre code { background: none; padding: 0; color: inherit; }

#post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tables — the main thing that was rendering unstyled */
#post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 15px;
    display: block;
    overflow-x: auto;          /* scrolls instead of breaking on narrow screens */
    white-space: nowrap;
}
#post-body th,
#post-body td {
    border: 1px solid #E5E7EB;
    padding: 0.625rem 0.875rem;
    text-align: left;
    vertical-align: top;
    white-space: normal;
}
#post-body thead th {
    background: #F9FAFB;
    font-weight: 600;
    color: #111827;
}
#post-body tbody tr:nth-child(even) {
    background: #FAFAFA;
}

@media (max-width: 640px) {
    #post-body { font-size: 16px; }
    #post-body h2 { font-size: 1.4rem; }
    #post-body h3 { font-size: 1.15rem; }
}

