/* Internal pages share the approved landing palette. Screen-only rules keep document printing intact. */
@media screen {
  body:not(.front-page) {
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f3faef;
    --color-bg-tertiary: #e4f2e8;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #f6fff0;
    --color-text-primary: #073b40;
    --color-text-secondary: #466469;
    --color-text-muted: #58777a;
    --color-accent-primary: #00575b;
    --color-accent-secondary: #00474d;
    --color-accent-gradient: linear-gradient(110deg, #00474d, #006b70);
    --color-border: #c4ded9;
    --color-border-hover: #85b2a9;
    --shadow-glow: 0 0 0 3px #00575b18;
    --font-family: var(--conversion-font-text, 'Golos Text', sans-serif);
    background: #fff;
    color: var(--color-text-primary);
    font-family: var(--font-family);
  }
  body:not(.front-page) :is(h1, h2, h3, h4) {
    font-family: var(--conversion-font-heading, 'Manrope', sans-serif);
    letter-spacing: -.03em;
  }
  body:not(.front-page) :is(button, input, select, textarea) { font-family: var(--font-family); }
  body:not(.front-page) .site-header {
    background: #ffffff !important;
    border-bottom: 1px solid #c4ded9;
    box-shadow: none;
    font-family: var(--font-family);
  }
  body:not(.front-page) .site-name { color: #00474d; }
  body:not(.front-page) .site-header .nav-menu a,
  body:not(.front-page) .site-header .header-actions > a:first-child { color: #00474d !important; }
  body:not(.front-page) .site-header .nav-menu a:hover { color: #00575b !important; }
  body:not(.front-page) .btn-primary {
    background: #00575b;
    color: #fff;
    border: 1px solid #00575b;
    box-shadow: none;
    border-radius: 6px;
  }
  body:not(.front-page) .btn-primary:hover { background: #003e44; border-color: #003e44; transform: none; }
  body:not(.front-page) .btn-secondary { background: #fff; color: #00575b; border-color: #85b2a9; border-radius: 6px; }
  body:not(.front-page) .btn-secondary:hover { background: #effce6; border-color: #00575b; }
  body:not(.front-page) :is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #00575b; outline-offset: 3px; }
  body:not(.front-page) :is(.doc-tools-hero, .doc-generator-hero, .tax-hero, .calendar-hero, .blog-hero, .blog-header) {
    background-color: #effce6;
    background-image: linear-gradient(#00474d08 1px, transparent 1px), linear-gradient(90deg, #00474d08 1px, transparent 1px);
    background-size: 56px 56px;
  }
  body:not(.front-page) :is(.doc-tools-hero h1, .doc-generator-hero h1, .tax-hero h1, .calendar-hero h1, .blog-hero h1, .archive-header-content h1, .post-header h1) {
    color: #00474d;
    font-size: clamp(34px, 3.8vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.04em;
    overflow-wrap: break-word;
  }
  body:not(.front-page) :is(.blog-hero-orb, .blog-hero-bg) { display: none; }
  body:not(.front-page) :is(.section-badge, .feature-badge, .blog-filter-tag.active, .post-card-category-badge) {
    background: #d9f5c2;
    color: #00474d;
    border-color: #b6dca7;
  }
  body:not(.front-page) :is(.doc-tools-catalog, .doc-generator-workspace, .tax-calculator-section, .calendar-tool-section, .blog-listing) { background: #f7faf6; }
  body:not(.front-page) :is(.doc-tool-card, .doc-info-panel, .doc-related-panel, .doc-generator-note, .generator-panel, .tax-hero-card, .tax-calculator-card, .tax-results-card, .tax-content-card, .tax-faq-card, .calendar-hero-card, .calendar-settings-card, .calendar-summary-card, .calendar-output-card, .post-card, .blog-card) {
    background: #fff;
    border-color: #c4ded9;
    border-radius: 10px;
    box-shadow: 0 4px 14px #00474d06;
  }
  body:not(.front-page) :is(.doc-tool-card, .post-card, .blog-card):hover { border-color: #85b2a9; box-shadow: 0 6px 20px #00474d0c; transform: none; }
  body:not(.front-page) :is(.document-card-icon, .blog-hero-icon, .archive-icon, .post-card-placeholder, .blog-empty-icon) { background: #e4facf; color: #00575b; }
  body:not(.front-page) :is(.tax-result-total, .calendar-summary-card) { background: #00474d; color: #fff; }
  body:not(.front-page) .calendar-summary-card :is(p, strong, span) { color: #e2f5f1; }
  body:not(.front-page) .calendar-summary-card .btn-primary { background: #79df19; border-color: #79df19; color: #00474d; }
  body:not(.front-page) .calendar-summary-card .btn-primary:hover { background: #9af23e; }
  body:not(.front-page) .calendar-summary-card :is(a, button):focus-visible { outline-color: #fff; }
  body:not(.front-page) :is(.tax-hero-card li, .calendar-hero-card li) { background: #f3faef; }
  body:not(.front-page) :is(.tax-result-net, .calendar-note, .calendar-event-date, .calendar-filter-tabs button.active) { background: #e4facf; color: #00474d; border-color: #a9d48d; }
  body:not(.front-page) :is(.generator-panel input, .generator-panel select, .generator-panel textarea, .tax-form-grid input, .tax-form-grid select, .calendar-selector-grid select):focus {
    border-color: #00575b;
    box-shadow: 0 0 0 3px #00575b14;
  }
  body:not(.front-page) :is(input[type=checkbox], input[type=radio]) { accent-color: #00575b; }
  body:not(.front-page) :is(.single-post, .error-404) { background: #fff; }
  body:not(.front-page) .post-header { max-width: 900px; }
  body:not(.front-page) .post-content { color: #304f54; }
  body:not(.front-page) .post-content :is(h2, h3, h4) { color: #00474d; line-height: 1.3; }
  body:not(.front-page) .post-content blockquote { background: #f3faef; border-color: #79df19; padding: 20px 24px; }
  body:not(.front-page) :is(.article-demo-cta, .context-cta) {
    background: #effce6;
    border: 1px solid #b6dca7;
    border-radius: 10px;
    box-shadow: none;
  }
  body:not(.front-page) :is(.article-demo-cta, .context-cta) :is(h3, p, span) { color: #00474d; }
  body:not(.front-page) :is(.blog-pagination .page-numbers.current, .pagination .page-numbers.current, .pagination .current) { background: #00474d; color: #fff; border-color: #00474d; box-shadow: none; }
  body:not(.front-page) :is(.generated-document, .generated-document h1, .generated-document h2, .generated-document h3, .generated-document h4) { font-family: Arial, sans-serif; letter-spacing: normal; }
  body:not(.front-page) .error-404 h1 { background: none; color: #00474d; -webkit-text-fill-color: #00474d; }
  body:not(.front-page) .conversion-site-footer { border-top: 1px solid #c4ded9; }
}
@media screen and (max-width: 767px) {
  body:not(.front-page) :is(.doc-tools-hero h1, .doc-generator-hero h1, .tax-hero h1, .calendar-hero h1, .blog-hero h1, .archive-header-content h1, .post-header h1) { font-size: clamp(30px, 8vw, 38px); }
  body:not(.front-page) :is(.doc-tools-hero, .doc-generator-hero, .tax-hero, .calendar-hero, .blog-hero, .blog-header) { background-size: 40px 40px; }
  body:not(.front-page) .post-content { font-size: 16px; line-height: 1.75; }
  body:not(.front-page) .post-content blockquote { padding: 16px 18px; }
}

@media screen {
  body.single-post:not(.front-page) { padding-top:0; }
  body:not(.front-page) article.single-post { padding-top:124px; padding-bottom:60px; }
  body:not(.front-page) .calendar-tool-layout > * { min-width:0; }
  body:not(.front-page) .calendar-summary-card .btn { white-space:normal; max-width:100%; text-align:center; }
}
@media screen and (max-width:767px) {
  body:not(.front-page) article.single-post { padding-top:110px; padding-bottom:40px; }
}

@media screen { body:not(.front-page) .post-content table { display:block; max-width:100%; overflow-x:auto; } }

@media screen {
  body:not(.front-page) .tax-calculator-layout > *, body:not(.front-page) .tax-form-grid > * { min-width:0; }
  body:not(.front-page) .tax-form-grid :is(input,select) { min-width:0; max-width:100%; }
}

@media screen {
  body:not(.front-page) .doc-tool-card { min-width:0; }
  body:not(.front-page) .doc-tool-card .btn {
    width:100%; max-width:100%; height:68px; min-height:68px; flex-shrink:0;
    padding:12px 14px; gap:8px;
    white-space:normal; overflow-wrap:anywhere;
    font-size:14px; line-height:1.4; text-align:center;
  }
  body:not(.front-page) .doc-tool-card .btn svg { flex-shrink:0; }
}

@media screen and (min-width:768px) and (max-width:1199px) { body:not(.front-page) .doc-tools-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Longer Kazakh labels must fit narrow screens; printed forms retain sizing. */
@media screen {
  body:not(.front-page) .doc-detail-layout > * { min-width:0; }
  body:not(.front-page) .doc-related-list a { min-width:0; overflow-wrap:anywhere; }
  body:not(.front-page) :is(.doc-soft-cta, .doc-detail-main, .generator-actions, .tax-results-card) .btn {
    max-width:100%; white-space:normal; text-align:center; overflow-wrap:anywhere;
  }
}
