:root {
    --bg-primary: #FBF9F5;
    --bg-secondary: #F4EFEA;
    --bg-surface: #FFFFFF;
    --bg-accent-tint: #EFE8DF;
    --bg-highlight: #FAF4EC;
    --text-primary: #1A1715;
    --text-secondary: #57524C;
    --text-muted: #8A847C;
    --text-quote: #2C2622;
    --brand-primary: #1A1715;
    --brand-secondary: #B84A39;
    --brand-accent: #C97A2B;
    --border-color: #E4DDD3;
    --border-dark: #1A1715;
    --divider-color: #EBE5DC;
    --status-under-extrusion: #C85A32;
    --status-stringing: #A86B32;
    --status-warping: #B83A3A;
    --status-success: #2D6A4F;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: var(--font-display);
}

.font-mono {
    font-family: var(--font-mono);
}

.text-muted {
    color: #8A847C !important;
}

a,
button {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* ===== header ===== */
.pf-site-header {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pf-site-header .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

/* ===== hero ===== */
.hero-section {
    box-sizing: border-box;
}

.hero-section * {
    box-sizing: border-box;
}

.hero-section .js-tab-btn.active {
    border-color: #1A1715;
    background-color: #F4EFEA;
}

.hero-section .js-tab-panel.hidden {
    display: none;
}

.hero-section .js-tab-panel.active {
    display: block;
}

/* ===== tools ===== */
.tools-section .js-tool-tab-btn.active {
    background-color: #1A1715;
    color: #FBF9F5;
    border-color: #1A1715
}

.tools-section .js-tool-card {
    min-height: 100%
}

/* ===== cost-of-inaction ===== */
.cost-of-inaction-section input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #E4DDD3;
    outline: none;
    border-radius: 0px;
    margin: 8px 0;
}

.cost-of-inaction-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #1A1715;
    cursor: pointer;
    border: 2px solid #FBF9F5;
    transition: background 0.15s ease;
}

.cost-of-inaction-section input[type="range"]::-webkit-slider-thumb:hover {
    background: #B84A39;
}

.cost-of-inaction-section input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #1A1715;
    cursor: pointer;
    border: 2px solid #FBF9F5;
    transition: background 0.15s ease;
}

.cost-of-inaction-section input[type="range"]::-moz-range-thumb:hover {
    background: #B84A39;
}

/* ===== stages ===== */
#diagnostic-stages .stages-tab.active {
    background-color: #FFFFFF;
    border-color: #1A1715;
    box-shadow: 0 4px 12px rgba(26, 23, 21, 0.08);
}

#diagnostic-stages .stages-tab:not(.active) {
    opacity: 0.85;
}

#diagnostic-stages .stages-tab:not(.active):hover {
    opacity: 1;
    border-color: #B84A39;
}

#diagnostic-stages .js-checkpoint {
    cursor: pointer;
    user-select: none;
}

#diagnostic-stages .js-checkpoint:hover {
    border-color: #1A1715;
}

#diagnostic-stages .js-checkpoint.checked {
    background-color: #FAF4EC;
    border-color: #B84A39;
}

#diagnostic-stages .js-checkpoint.checked .ph-check {
    color: #B84A39;
}

/* ===== atlas-grid ===== */
.atlas-grid-section {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.atlas-grid-section .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.atlas-grid-section .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.atlas-grid-section .js-atlas-card {
    will-change: transform, border-color;
}

.atlas-grid-section .js-filter-btn.active {
    background-color: #1A1715;
    color: #FBF9F5;
    border-color: #1A1715;
}

/* ===== troubleshooting-grid ===== */
.troubleshooting-grid-section {
    box-sizing: border-box;
}

.troubleshooting-grid-section .guide-card {
    box-shadow: 0 1px 3px rgba(26, 23, 21, 0.04);
}

.troubleshooting-grid-section .guide-card:hover {
    box-shadow: 0 4px 12px rgba(26, 23, 21, 0.08);
}

/* ===== footer ===== */
.site-footer-atlas {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.site-footer-atlas a {
    text-decoration: none;
}

/* ===== PAGE: atlas ===== */
.atlas-categories-section .js-filter-btn.active{background-color:#1A1715;color:#FBF9F5;border-color:#1A1715;}.atlas-categories-section .js-atlas-card{height:100%;}.atlas-categories-section .js-search-input:focus{border-color:#1A1715;}

/* ===== PAGE: troubleshooting ===== */
.troubleshooting-page .js-filter-btn.is-active{background-color:#1A1715;color:#FBF9F5;border-color:#1A1715}.troubleshooting-page input::placeholder{color:#8A847C;opacity:1}.troubleshooting-page .js-guide-card{transition:border-color 150ms ease,box-shadow 150ms ease}.troubleshooting-page .js-guide-card:hover{box-shadow:0 6px 20px rgba(26,23,21,0.06)}

/* ===== PAGE: materials ===== */
.materials-protocol-section table td,
.materials-protocol-section table th {
  white-space: normal;
  vertical-align: top;
}

.materials-protocol-section .js-tab-btn:focus {
  outline: 2px solid #1A1715;
  outline-offset: 2px;
}

.materials-protocol-section .js-protocol-card.is-hidden {
  display: none !important;
}

/* ===== PAGE: brand-support ===== */
.brand-support-root input::placeholder,
.brand-support-root textarea::placeholder {
  color: #8A847C;
  opacity: 1;
}
.brand-support-root input:focus,
.brand-support-root textarea:focus,
.brand-support-root select:focus {
  outline: none;
  border-color: #1A1715;
}
.brand-support-root .js-brand-tab.active {
  background-color: #1A1715;
  color: #FBF9F5;
  border-color: #1A1715;
}

/* ===== PAGE: prusaslicer ===== */
.prusaslicer-review-block .active-btn {
  background-color: #1A1715 !important;
  color: #FBF9F5 !important;
}
.prusaslicer-review-block .js-tab-trigger.active {
  background-color: #1A1715 !important;
  color: #FBF9F5 !important;
  border-color: #1A1715 !important;
}

/* ===== PAGE: contact ===== */
.contact-section .contact-input::placeholder { color: #8A847C; opacity: 1; } .contact-section .contact-input:focus { border-color: #1A1715; outline: none; }

/* ===== PAGE: privacy ===== */
.privacy-policy-section { word-break: break-word; }
.privacy-policy-section a { transition: color 0.15s ease, border-color 0.15s ease; }
.privacy-policy-section .js-toc-link.active-link { background-color: #F4EFEA; color: #B84A39; font-weight: 600; }

/* ===== PAGE: terms ===== */
.terms-page { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
.terms-page .font-serif { font-family: 'Fraunces', Georgia, serif; }
.terms-page .font-mono { font-family: 'JetBrains Mono', monospace; }
.terms-page .js-clause-filter.active { background-color: #1A1715; color: #FBF9F5; }
.terms-page .js-nav-link.active-nav { background-color: #FAF4EC; color: #B84A39; font-weight: 600; border-left: 2px solid #B84A39; }

/* ===== PAGE: disclaimer ===== */
.pfa-disclaimer-page{font-family:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,sans-serif}.pfa-disclaimer-page .font-serif{font-family:'Fraunces',Georgia,serif}.pfa-disclaimer-page .font-mono{font-family:'JetBrains Mono',monospace}.pfa-disclaimer-page a{transition:color .15s ease-in-out}.pfa-disclaimer-page article{transition:border-color .15s ease-in-out}.pfa-disclaimer-page article:hover{border-color:#D6CFC7}

.atlas-comment {
    box-shadow: 0 1px 3px rgba(26, 23, 21, 0.04);
}

.atlas-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    object-fit: cover;
    display: block;
}

.comment-body {
    color: #2C2622;
}

.atlas-action-btn:focus-visible {
    outline: 2px solid #B84A39;
    outline-offset: 2px;
}

.atlas-reply-comment {
    box-shadow: 0 1px 2px rgba(26, 23, 21, 0.03);
}

.atlas-reply-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: cover;
    display: block;
}

.reply-body {
    color: #2C2622;
}

.atlas-action-btn:focus-visible {
    outline: 2px solid #B84A39;
    outline-offset: 2px;
}


/* ===== PAGE TEMPLATE: atlas ===== */
.pf-site-header {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pf-site-header .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.site-footer-atlas {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.site-footer-atlas a {
    text-decoration: none;
}

.atlas-detail-page {
    box-sizing: border-box;
}

.atlas-detail-page * {
    box-sizing: border-box;
}

.atlas-detail-page .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.atlas-detail-page .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.atlas-detail-page .js-view-panel.hidden {
    display: none;
}

.atlas-detail-page .js-view-panel.active {
    display: block;
}

.atlas-detail-page .js-auth-notice.hidden {
    display: none;
}

.atlas-detail-page .js-auth-notice.block {
    display: block;
}

.atlas-detail-page .atlas-action-btn.active {
    color: #B84A39;
}

/* ===== PAGE TEMPLATE: troubleshooting ===== */
.pf-site-header {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pf-site-header .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.troubleshoot-detail-page {
    box-sizing: border-box;
}

.troubleshoot-detail-page * {
    box-sizing: border-box;
}

.troubleshoot-detail-page .font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.troubleshoot-detail-page .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.troubleshoot-detail-page .prose-editorial p {
    line-height: 1.7;
}

.troubleshoot-detail-page .atlas-avatar,
.troubleshoot-detail-page .atlas-reply-avatar {
    object-fit: cover;
}

.site-footer-atlas {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.site-footer-atlas a {
    text-decoration: none;
}