:root {
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-subtle: #E2E8F0;
    --primary: #0F172A;
    --primary-hover: #1E293B;
    --secondary: #334155;
    --secondary-hover: #475569;
    --accent: #EA580C;
    --accent-hover: #C2410C;
    --accent-subtle: #FFF7ED;
    --accent-secondary: #2563EB;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --border-primary: #CBD5E1;
    --border-secondary: #E2E8F0;
    --border-focus: #0F172A;
    --border-accent: #EA580C;
    --status-pass: #15803D;
    --status-warning: #B45309;
    --status-fail: #B91C1C;
    --status-metric: #0369A1;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
}

.font-mono {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
}

.text-muted {
    color: #64748B !important;
}

.fieldbook-focus-ring:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.fieldbook-tabular {
    font-variant-numeric: tabular-nums;
}

/* ===== header ===== */
.header-component .header-top-bar {
    line-height: 1.4;
}

.header-component nav a {
    outline-offset: 2px;
}

.header-component .js-mobile-menu {
    border-top: 1px solid #e2e8f0;
}

/* ===== hero ===== */
.batch-hero-section {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.batch-hero-section .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.batch-hero-section .js-specimen-btn {
    transition: none;
}

.batch-hero-section .batch-console {
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
}

/* ===== expected-outcome ===== */
.expected-outcome-section .js-outcome-tab.active {
    border-color: #0F172A;
    background-color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.expected-outcome-section .js-outcome-tab.active .w-9 {
    background-color: #0F172A;
    color: #FFFFFF;
}

.expected-outcome-section .js-outcome-tab:not(.active) {
    border-color: #CBD5E1;
    background-color: #FFFFFF;
}

.expected-outcome-section .js-outcome-tab:not(.active):hover {
    border-color: #94A3B8;
    background-color: #F8FAFC;
}

.expected-outcome-section .js-outcome-tab:not(.active) .w-9 {
    background-color: #F1F5F9;
    color: #334155;
}

/* ===== key-benefits ===== */
.batch-key-benefits {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.batch-key-benefits .font-mono {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
}

.batch-key-benefits .benefit-card {
    min-height: 100%;
    box-sizing: border-box;
}

.batch-key-benefits h2,
.batch-key-benefits h3 {
    hyphens: auto;
}

/* ===== cost-calculator ===== */
.batch-cost-calc-section input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #EA580C;
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2)
}

.batch-cost-calc-section input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #EA580C;
    cursor: pointer;
    border: 2px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2)
}

.batch-cost-calc-section select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none
}

/* ===== client-logos ===== */
.client-logos-section .client-partner-item {
    min-height: 80px;
    box-sizing: border-box;
}

.client-logos-section .client-partner-item:hover {
    border-color: #0F172A;
}

/* ===== metrology-guide-grid ===== */
.metrology-guide-grid-section {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.metrology-guide-grid-section .active-filter {
    background-color: #0F172A !important;
    color: #FFFFFF !important;
    border-color: #0F172A !important;
}

.metrology-guide-grid-section .js-guide-card {
    display: flex;
}

.metrology-guide-grid-section .js-guide-card.is-hidden {
    display: none;
}

/* ===== quality-control-grid ===== */
.qc-methods-section {
    position: relative;
    width: 100%;
    box-sizing: border-box
}

.qc-methods-section .js-qc-item {
    transition: border-color 0.15s ease, box-shadow 0.15s ease
}

.qc-methods-section .js-qc-item.is-hidden {
    display: none
}

/* ===== practical-cases-grid ===== */
.batch-cases-section .js-case-item {
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.batch-cases-section .js-filter-btn.active {
    background-color: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
}

/* ===== evaluation-tools-grid ===== */
.evaluation-tools-section .tool-card {
    will-change: border-color;
}

.evaluation-tools-section .tool-card a:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

.evaluation-tools-section .tool-media-wrapper img {
    transition: transform 0.2s ease-in-out;
}

.evaluation-tools-section .tool-card:hover .tool-media-wrapper img {
    transform: scale(1.02);
}

/* ===== footer ===== */
.site-footer-workbench a {
    text-decoration: none;
}

.site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}

.header-component .header-top-bar {
    line-height: 1.4;
}

.header-component nav a {
    outline-offset: 2px;
}

.header-component .js-mobile-menu {
    border-top: 1px solid #e2e8f0;
}

.tools-page-hero {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tools-list-section .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tools-list-section .js-tool-card {
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}

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

.site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}


/* ===== PAGE: bambu-studio-workflow ===== */
.bambu-workflow-module input[type=number]::-webkit-inner-spin-button,
.bambu-workflow-module input[type=number]::-webkit-outer-spin-button {
  opacity: 1;
}

.bambu-workflow-module .js-zone-tab {
  outline: none;
}

.bambu-workflow-module code {
  font-family: 'JetBrains Mono', monospace;
}

/* ===== PAGE: contact ===== */
.contact-section .contact-input::placeholder, .contact-section .contact-textarea::placeholder { color: #64748B; opacity: 1; }
.contact-section .contact-input::-ms-input-placeholder, .contact-section .contact-textarea::-ms-input-placeholder { color: #64748B; }
.contact-section select:invalid { color: #64748B; }

/* ===== PAGE: privacy ===== */
.privacy-policy-section { word-break: break-word; }
.privacy-policy-section a { transition: color 0.15s ease; }

/* ===== PAGE: terms ===== */
.terms-content-section { word-break: break-word; hyphens: auto; }
.terms-content-section .terms-block { position: relative; }
.terms-content-section a { transition: color 0.15s ease-in-out; }

/* ===== PAGE: disclaimer ===== */
.disclaimer-content { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .disclaimer-content a { transition: color 0.15s ease-in-out; }

.qa-comment-card {
    transition: border-color 0s ease;
}

.qa-comment-avatar-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.qa-comment-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.qa-comment-card:hover {
    border-color: #94A3B8;
}

.qa-comment-body {
    color: #334155;
}

.qa-inspection-snippet {
    word-break: break-word;
}

.qa-action-btn {
    transition: none;
}

.qa-action-btn.is-voted,
.qa-reply-action-btn.is-voted,
.qa-action-btn[data-voted="true"],
.qa-reply-action-btn[data-voted="true"] {
    color: #C2410C !important;
    background-color: #FFF7ED !important;
    border-color: #FDBA74 !important;
    font-weight: 700 !important;
}

.qa-nick-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    line-height: 1;
}

.qa-reply-avatar-wrapper {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.qa-reply-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.qa-reply-card {
    transition: border-color 0s ease;
}

.qa-reply-card:hover {
    border-color: #CBD5E1;
    border-l-color: #EA580C;
}

.qa-reply-body {
    color: #334155;
}

.qa-reply-action-btn {
    transition: none;
}

@media (max-width: 640px) {
    .comments-workbench-container {
        padding: 1rem !important;
    }

    .qa-comment-card {
        padding: 1rem !important;
    }

    .qa-comment-card > header,
    .qa-reply-card > header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .qa-comment-card > header > div:first-child,
    .qa-reply-card > header > div:first-child,
    .qa-comment-headline {
        width: 100%;
        min-width: 0;
        align-items: flex-start !important;
    }

    .qa-comment-meta,
    .qa-comment-card h4,
    .qa-comment-card p,
    .qa-reply-card h5,
    .qa-reply-card p {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .qa-metric-tag,
    .qa-reply-target {
        align-self: flex-start;
        max-width: 100%;
        white-space: normal;
    }

    .qa-comment-card footer,
    .qa-reply-card footer {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .qa-comment-card footer > div,
    .qa-reply-card footer > div {
        flex-wrap: wrap;
    }

    .qa-inspection-snippet {
        flex-direction: column !important;
    }

    .qa-comment-avatar-wrapper {
        width: 42px;
        height: 42px;
    }

    .qa-comment-avatar {
        width: 42px;
        height: 42px;
    }
}


/* ===== PAGE TEMPLATE: metrology-guide ===== */
.detail-template-page .header-top-bar {
    line-height: 1.4;
}

.detail-template-page .header-component nav a {
    outline-offset: 2px;
}

.detail-template-page .site-footer-workbench a {
    text-decoration: none;
}

.detail-template-page .site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}

.detail-template-page .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.detail-template-page input::placeholder,
.detail-template-page textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.detail-template-page .qa-comment-card,
.detail-template-page .qa-reply-card {
    hyphens: auto;
}

/* ===== PAGE TEMPLATE: quality-control ===== */
.detail-template-page .header-top-bar {
    line-height: 1.4;
}

.detail-template-page .header-component nav a {
    outline-offset: 2px;
}

.detail-template-page .site-footer-workbench a {
    text-decoration: none;
}

.detail-template-page .site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}

.detail-template-page .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.detail-template-page input::placeholder,
.detail-template-page textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.detail-template-page .qa-comment-card,
.detail-template-page .qa-reply-card {
    hyphens: auto;
}

/* ===== PAGE TEMPLATE: practical-cases ===== */
.detail-template-page .header-top-bar {
    line-height: 1.4;
}

.detail-template-page .header-component nav a {
    outline-offset: 2px;
}

.detail-template-page .site-footer-workbench a {
    text-decoration: none;
}

.detail-template-page .site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}

.detail-template-page .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.detail-template-page input::placeholder,
.detail-template-page textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.detail-template-page .qa-comment-card,
.detail-template-page .qa-reply-card {
    hyphens: auto;
}

/* ===== PAGE TEMPLATE: evaluation-tools ===== */
.detail-template-page .header-top-bar {
    line-height: 1.4;
}

.detail-template-page .header-component nav a {
    outline-offset: 2px;
}

.detail-template-page .site-footer-workbench a {
    text-decoration: none;
}

.detail-template-page .site-footer-workbench img {
    max-width: 48px;
    max-height: 48px;
}

.detail-template-page .font-mono {
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.detail-template-page input::placeholder,
.detail-template-page textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.detail-template-page .qa-comment-card,
.detail-template-page .qa-reply-card {
    hyphens: auto;
}
