/* Shared interior system. Header and footer keep their existing styles. */
body:not(.home-page) .site-main { color: var(--tn-ink); }
body:not(.home-page) .site-main .container { max-width: 1320px; }
body:not(.home-page) .site-main :is(h1,h2,h3,h4,.site-title) { font-family: Arial, Helvetica, sans-serif; text-transform: none; letter-spacing: -.025em; color: var(--tn-ink); }
body:not(.home-page) .site-main h1 { font-size: clamp(28px,3vw,40px); line-height: 1.12; font-weight: 700; margin-bottom: 16px; }
body:not(.home-page) .site-main h2 { font-size: 23px; line-height: 1.25; font-weight: 700; }
body:not(.home-page) .site-main h3 { font-size: 19px; }
body:not(.home-page) .site-main p { line-height: 1.6; }
body:not(.home-page) .site-main :is(.btn,.form-control,.form-select) { border-radius: var(--tn-radius) !important; font-family: inherit; }
body:not(.home-page) .site-main :is(.form-control,.form-select) { min-height: 44px; border-color: var(--tn-border); background-color: #fff; font-size: 16px; }
body:not(.home-page) .site-main :is(.btn-primary,.btn-dark), .newsletter-panel .btn-primary { background: #101413; border-color: #101413; color: #fff; box-shadow: none; }
body:not(.home-page) .site-main .btn-primary:hover, .newsletter-panel .btn-primary:hover { background: #303833; }
body:not(.home-page) .site-main .btn-outline-secondary { border-color: var(--tn-border); color: var(--tn-ink); background: #fff; }
body:not(.home-page) .site-main .btn-outline-secondary:hover { background: #edf0ed; }
body:not(.home-page) .site-main :is(.btn,.form-control,.form-select):focus-visible, .search-suggestions a:focus-visible { outline: 3px solid #376b54; outline-offset: 3px; }
body:not(.home-page) .site-main :is(.neo-contact-page,.product-neo-page,.products-catalog-page,.product-checkout-page,.auth-page,.color-tool-page,.ral-photo-landing) { background: transparent; }
body:not(.home-page) .site-main :is(.neo-ral-gallery-card,.neo-ral-meta-card,.neo-ral-actions-card,.neo-ral-related,.neo-contact-card,.neo-contact-form-wrap > div,.color-tool-panel,.color-tool-content article,.color-tool-related,.color-tool-faq,.products-empty-state,.product-catalog-card,.product-checkout-form-card,.product-checkout-summary-card,.auth-intro,.auth-card,.card,.neo-contact-grid article,.neo-contact-faq) { border: 1px solid var(--tn-border); border-radius: var(--tn-radius); box-shadow: none; background: #fff; }
body:not(.home-page) .site-main :is(.neo-contact-hero,.products-catalog-hero,.product-checkout-head,.color-tool-hero > div:first-child) { padding: 0; margin-bottom: 28px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body:not(.home-page) .site-main .rounded-3, body:not(.home-page) .site-main .rounded-4 { border-radius: var(--tn-radius) !important; }
body:not(.home-page) .site-main .ral-color { border: 1px solid var(--tn-border); border-radius: var(--tn-radius); overflow: hidden; box-shadow: none; }
body:not(.home-page) .site-main .ral-color-footer { background: #fff; }
body:not(.home-page) .site-main .ral-color-number { font-family: inherit; }
.site-breadcrumbs { margin-bottom: 12px; }
.site-breadcrumbs .breadcrumb { background: none; padding: 0; gap: 4px 0; font-size: 13px; }
.site-breadcrumbs a { color: #53615b; }
.site-breadcrumbs .breadcrumb-item + .breadcrumb-item::before { content: '›'; }
.surface { border: 1px solid var(--tn-border); border-radius: var(--tn-radius); background: #fff; }
.page-heading { margin: 10px 0 28px; max-width: 1050px; }
.page-heading > p:last-child { color: #69716b; margin: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #68736c; margin-bottom: 10px; }
.content-section { margin-top: 30px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.section-heading > a, .section-heading > button { font-size: 13px; color: #40544a; }
.info-panel { display: flex; align-items: center; gap: 14px; padding: 18px; background: #eef2f0; border-radius: var(--tn-radius); color: #4c5b53; }
.info-panel > i { font-size: 24px; }
.info-panel.small { display: block; }
.empty-state { text-align: center; padding: 48px 22px; color: #657069; }
.empty-state > i { font-size: 42px; }
.empty-state p { margin: 14px 0 8px; font-weight: 600; }
.empty-state span { font-size: 14px; }
.mini-swatch { display: inline-block; width: 26px; height: 26px; border-radius: 4px; border: 1px solid #00000012; flex-shrink: 0; vertical-align: middle; }
/* Autocomplete is an independent overlay and does not resize the header. */
.search-suggestions { position: fixed; z-index: 1100; overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid var(--tn-border); border-radius: 7px; background: #fff; box-shadow: 0 12px 28px #13261b20; }
.search-suggestions[hidden] { display: none; }
.suggestion-heading { padding: 8px 10px 5px; color: #6b756e; font: 600 11px Arial,sans-serif; letter-spacing: .1em; }
.suggestion-item { display: flex; gap: 12px; align-items: center; min-height: 62px; padding: 9px 10px; border-radius: 5px; color: #141b16; text-decoration: none; }
.suggestion-item:hover, .suggestion-item[aria-selected="true"] { background: #eef3ef; color: #141b16; }
.suggestion-image { flex: 0 0 42px; width: 42px; height: 42px; object-fit: cover; border-radius: 4px; border: 1px solid #00000010; }
.suggestion-item strong { display: block; font-size: 14px; line-height: 1.3; }
.suggestion-item small { display: block; font-size: 12px; color: #69726c; line-height: 1.4; margin-top: 3px; }
.suggestion-message { margin: 0; padding: 18px 12px; font-size: 14px; }
/* RAL detail */
.ral-detail-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) minmax(0,.85fr); grid-template-areas: "swatch intro image"; gap: 24px; align-items: start; }
.ral-large-swatch { grid-area: swatch; display: flex; align-items: flex-end; justify-content: space-between; width: 100%; min-height: 340px; padding: 24px; border: 1px solid var(--tn-border); border-radius: var(--tn-radius); text-align: left; }
.ral-detail-intro { grid-area: intro; min-width: 0; }
.ral-detail-image { grid-area: image; height: 340px; margin: 0; overflow: hidden; border: 1px solid var(--tn-border); border-radius: var(--tn-radius); }
.ral-detail-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--ral-image-position, center); }
.ral-large-swatch strong { display: block; font-size: 22px; }
.ral-large-swatch small { display: block; font-size: 16px; }
.ral-large-swatch > i { padding: 10px; border-radius: 50%; background: transparent; border: 1px solid currentColor; }
.ral-detail-intro h1 { margin: 10px 0 2px !important; }
.ral-detail-intro .ral-color-name { font-size: 26px; margin-bottom: 14px; }
.ral-detail-intro > p:not(.ral-color-name) { max-width: 720px; }
.ral-detail-tags, .ral-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.ral-detail-tags a { display: flex; align-items: center; gap: 8px; color: #4d5c53; background: #eef0ed; border-radius: 5px; padding: 5px 9px; font-size: 13px; text-decoration: none; }
.ral-detail-tags .mini-swatch { width: 16px; height: 16px; border-radius: 50%; }
.ral-detail-actions .btn { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 10px 16px; }
.color-values { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 12px; }
.color-values > div { padding: 18px; display: flex; flex-direction: column; }
.color-values dt { font-size: 12px; margin-bottom: 10px; }
.color-values dd { font-size: 17px; line-height: 1.5; margin-bottom: 16px; overflow-wrap: anywhere; }
.color-values dd a { color: inherit; text-decoration: none; }
.copy-value { margin-top: auto; display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 0; border: 0; background: none; color: #52665a; font-size: 13px; text-align: left; }
.compact-color-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.ral-similar-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.compact-color { padding: 9px; color: inherit; text-decoration: none; min-width: 0; }
.compact-color a { color: inherit; text-decoration: none; }
.compact-swatch { display: block; height: 70px; border-radius: 4px; border: 1px solid #0000000a; margin-bottom: 10px; }
.compact-color strong { display: block; font-size: 15px; }
.compact-color small { display: block; font-size: 12px; color: #6a736d; margin-top: 3px; }
.ral-product-callout { display: flex; align-items: center; gap: 28px; padding: 22px; }
.ral-product-callout > img { width: 210px; height: 155px; object-fit: contain; }
.ral-product-callout p { margin-bottom: 5px; }
.ral-product-cta { display: grid; gap: 14px; margin-left: auto; flex-shrink: 0; }
.ral-product-cta strong { font-size: 26px; text-align: right; }
.article-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.article-card { overflow: hidden; }
.article-card a { color: inherit; text-decoration: none; }
.article-card img { width: 100%; aspect-ratio: 2/1; object-fit: cover; }
.article-card a > div { padding: 12px; }
.site-main .article-card h3 { font-size: 15px !important; line-height: 1.4; letter-spacing: 0 !important; }
.article-card p { margin: 0; font-size: 12px; color: #69716b; }
.color-fullscreen { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 30px; }
.color-fullscreen > button { position: absolute; right: 20px; top: 20px; }
.color-fullscreen > div { position: absolute; bottom: 24px; left: 24px; }
/* Photo workspace */
.photo-workspace { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.15fr); gap: 20px; align-items: start; }
.photo-source, .photo-results-panel { padding: 20px; }
.photo-upload-buttons { display: flex; gap: 10px; margin-bottom: 16px; }
.photo-upload-buttons .btn { flex: 1; margin: 0; padding: 11px 5px; font-size: 14px; cursor: pointer; }
.photo-dropzone { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; min-height: 230px; padding: 20px; text-align: center; border: 1px dashed #a0b3a5; border-radius: var(--tn-radius); background: #f6f8f5; cursor: pointer; }
.photo-dropzone[hidden], .photo-preview[hidden], .photo-palette-wrap[hidden], .photo-selected[hidden] { display: none; }
.photo-dropzone i { font-size: 34px; color: #597362; }
.photo-dropzone span { font-size: 13px; color: #6e786f; }
.photo-preview canvas { display: block; width: 100%; max-height: 450px; object-fit: contain; border-radius: 5px; cursor: crosshair; }
.photo-preview p { margin: 10px 0 18px; }
.photo-palette { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 6px; }
.photo-palette button { width: 100%; min-height: 48px; border: 1px solid #00000020; border-radius: 5px; }
.photo-palette button:focus-visible { outline: 3px solid #38664c; outline-offset: 2px; }
.photo-status { margin: 14px 0 0; color: #657269; }
.photo-selected { display: flex; align-items: center; gap: 14px; padding: 14px; background: #f3f5f2; border-radius: 5px; margin-bottom: 14px; }
.photo-selected .mini-swatch { width: 46px; height: 46px; }
.photo-result { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--tn-border); }
.photo-result:last-child { border-bottom: 0; }
.photo-result-swatch { width: 76px; min-height: 90px; flex-shrink: 0; border-radius: 5px; border: 1px solid #00000010; }
.photo-result > div { flex: 1; min-width: 0; }
.photo-result strong { font-size: 16px; }
.photo-result small { display: block; font-size: 12px; color: #69766c; margin-top: 3px; }
.match-badge { display: inline-block; background: #e1f0e6; color: #356448; border-radius: 4px; padding: 2px 6px; margin-top: 4px; font-size: 10px; }
.photo-result-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photo-result-actions .btn { font-size: 12px; min-height: 34px; }
.photo-save-status { color: #336448; margin: 14px 0; }
.history-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.history-card { display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none; color: inherit; }
.history-card img { width: 74px; height: 84px; object-fit: cover; border-radius: 4px; }
.history-card small { display: block; font-size: 12px; color: #67736a; }
.history-card strong { display: block; font-size: 14px; margin: 5px 0; }
/* Profile */
.profile-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 24px; }
.profile-nav { padding: 10px; }
.profile-nav > a { display: block; padding: 12px; margin-bottom: 3px; color: #4f5c54; font-size: 14px; text-decoration: none; border-radius: 4px; }
.profile-nav > a[aria-current="page"] { background: #eef2ee; color: #182c20; font-weight: 600; }
.profile-nav form { border-top: 1px solid var(--tn-border); margin-top: 12px; padding-top: 6px; }
.profile-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.overview-card { padding: 24px; color: inherit; text-decoration: none; }
.overview-card > span { font-size: 38px; color: #55745e; }
.overview-card p { color: #6b756e; font-size: 14px; margin: 0; }
.profile-content .history-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
/* Checkout follows the reference's two clear panels. */
.order-confirmation { max-width: 760px; margin: 30px auto; padding: 38px; text-align: center; }
.order-confirmation > i { display: block; font-size: 46px; color: #4d7c5d; margin-bottom: 20px; }
.order-confirmation .info-panel { flex-direction: column; gap: 4px; }
/* Newsletter is separate from the footer. */
.newsletter-section { padding: 0 0 30px; background: var(--tn-page); }
.newsletter-panel { display: flex; gap: 16px; align-items: center; padding: 22px; background: #fff; border: 1px solid var(--tn-border); border-radius: var(--tn-radius); }
.newsletter-icon { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; background: #eef2ed; border-radius: 50%; color: #536c59; font-size: 24px; }
.newsletter-copy { flex: 1; }
.newsletter-copy h2 { font: 700 20px/1.2 Arial,sans-serif; margin: 0 0 6px; color: var(--tn-ink); }
.newsletter-copy p { margin: 0; color: #737c75; font-size: 13px; line-height: 1.5; }
.newsletter-panel form { flex: 0 1 410px; min-width: 0; }
.newsletter-controls { display: flex; gap: 8px; }
.newsletter-controls input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--tn-border); border-radius: 5px; padding: 10px 12px; font-size: 14px; }
.newsletter-controls button { flex-shrink: 0; font-size: 14px; border-radius: 5px; }
.newsletter-status { margin: 8px 0 0; font-size: 13px; }
.newsletter-status:empty { display: none; }
/* About and editorial pages */
.about-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; padding: 24px 0 36px; align-items: center; }
.site-main .about-hero h1 { font-size: clamp(38px,4vw,60px); }
.about-hero .lead { color: #56665a; }
.about-color-composition { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; transform: rotate(-3deg); }
.about-color-composition span { height: 150px; border-radius: 6px; background: #607466; }
.about-color-composition span:nth-child(2) { background: #d2b59d; }.about-color-composition span:nth-child(3) { background: #c2c8b9; }.about-color-composition span:nth-child(4) { background: #dac268; }.about-color-composition span:nth-child(5) { background: #34576a; }.about-color-composition span:nth-child(6) { background: #ae7760; }
.about-text { max-width: 820px; }
.about-tools { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.about-tools > a { display: flex; flex-direction: column; color: inherit; text-decoration: none; padding: 24px; }
.about-tools > a > i { font-size: 30px; margin-bottom: 22px; color: #577761; }
.about-tools p { font-size: 14px; color: #69746c; }
.about-tools span { font-size: 13px; color: #41614c; margin-top: auto; }
.legal-page .container { max-width: 960px !important; }.legal-page h2 { margin-top: 28px; }
@media (max-width: 1023px) {
    .ral-detail-hero { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-areas: "swatch image" "intro intro"; }
    .ral-similar-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .history-grid, .about-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .newsletter-panel { flex-wrap: wrap; }.newsletter-panel form { flex-basis: 100%; margin-left: 62px; }
    .about-hero { gap: 30px; }.about-color-composition span { height: 100px; }
}
@media (max-width: 767px) {
    body:not(.home-page) .site-main .container { padding-left: 16px; padding-right: 16px; }
    .ral-detail-hero, .photo-workspace, .profile-layout, .about-hero { grid-template-columns: minmax(0,1fr); gap: 22px; }
    .ral-detail-hero { grid-template-areas: "swatch" "intro" "image"; }
    .ral-detail-image { height: 260px; }
    .ral-large-swatch { min-height: 260px; }.ral-detail-intro .ral-color-name { font-size: 23px; }
    .color-values { grid-template-columns: repeat(2,minmax(0,1fr)); }.color-values > div { padding: 14px; }
    .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .ral-product-callout { flex-wrap: wrap; gap: 18px; padding: 18px; }.ral-product-callout > img { width: 120px; height: 110px; }.ral-product-callout > div:nth-child(2) { flex: 1; min-width: 130px; }.ral-product-cta { display: flex; align-items: center; justify-content: space-between; margin: 0; width: 100%; }
    .photo-source, .photo-results-panel { padding: 16px; }.photo-result-swatch { width: 65px; }
    .history-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.history-card { flex-direction: column; align-items: flex-start; }.history-card img { width: 100%; height: 100px; }
    .profile-nav { display: flex; flex-wrap: wrap; gap: 4px; }.profile-nav > a { font-size: 12px; padding: 10px; }.profile-nav form { border: 0; margin: 0; padding: 0; }
    .profile-overview { gap: 12px; }.overview-card { padding: 16px; }.site-main .overview-card h2 { font-size: 18px; }
    .compact-color-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .section-heading { align-items: flex-start; }.section-heading > a { text-align: right; }.site-main .section-heading h2 { font-size: 21px; }
    .newsletter-panel { padding: 18px; gap: 12px; }.newsletter-panel form { margin-left: 0; }.newsletter-copy h2 { font-size: 18px; }.newsletter-icon { width: 38px; height: 38px; }.newsletter-controls { flex-direction: column; }.newsletter-controls button { min-height: 44px; }
    .about-tools { grid-template-columns: 1fr; }.about-color-composition { transform: none; }.about-color-composition span { height: 75px; }
    .order-confirmation { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Reset legacy icon-only actions in the new full-text controls. */
.site-main :is(.ral-detail-actions,.photo-result-actions,.profile-content) :is(a.ral-favorite,a.ral-compare) { width: auto; float: none; margin-left: 0; text-transform: none; }
.site-main .ral-detail-actions .ral-favorite { color: #fff; }
.site-main .photo-result-actions .ral-favorite { padding: 6px 10px; }
.site-main .photo-result-actions .ral-compare { padding: 6px 10px; }
.site-main .profile-content a.ral-favorite { display: inline-block; text-align: left; font-size: 13px; padding: 10px 0 0; }
.ral-compare-container:not(.active) { display: none; }
.ral-compare-container.active { background: #f0f3ef !important; border-color: var(--tn-border) !important; box-shadow: 0 -5px 20px #14231b12; }
.ral-compare-container .btn-primary, .ral-compare-container .btn-compare-toggle { background: #17251c; border-color: #17251c; border-radius: 5px; }
.ral-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; font-size: 13px; color: #68756b; }
.ral-rating button { min-width: 32px; min-height: 36px; padding: 0; border: 0; background: transparent; color: #667c6b; font-size: 23px; }
.ral-rating button:hover, .ral-rating button:focus-visible { color: #b17d22; }
.ral-share { margin-top: 8px; }
.ral-share summary { cursor: pointer; font-size: 13px; color: #546c5c; }
.ral-share .d-flex { flex-wrap: wrap; margin-top: 12px; }.ral-share h3 { display: none; }
.site-main .ral-filter-form .ral-search-btn { min-height: 44px; }
.site-main :is(.post-categories,.blog-social-links) { border: 1px solid var(--tn-border); border-radius: var(--tn-radius); background: #fff !important; }
.site-main .blog-list .card { height: 100%; overflow: hidden; }
.site-main .blog-list .card > a > img { width: 100%; aspect-ratio: 1.9; object-fit: cover; }
.site-main .blog-list .card h2 { font-size: 22px; }
.site-main .blog-list .card-text { font-size: 15px; color: #68746b; }
.site-main .blog-list .card-title a { color: var(--tn-ink); text-decoration: none; }
.site-main .pagination { flex-wrap: wrap; }
.site-main .page-item.active .page-link { background: #263f2e; border-color: #263f2e; }
.site-main .ral-detail-actions a.ral-favorite span { margin: 0; font-size: inherit; }
.photo-result-actions :is(.ral-favorite,.ral-compare) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.site-main .photo-result-actions :is(.ral-favorite,.ral-compare) span { margin: 0; font-size: inherit; }
.photo-results:not(.expanded) .photo-result:nth-of-type(n+6) { display: none; }
@media (min-width:768px) { .photo-more.mobile-only-more { display: none; } }
@media (max-width:767px) {
    .photo-results:not(.expanded) .photo-result:nth-of-type(n+4) { display: none; }
    .site-main .photo-result-actions :is(.ral-favorite,.ral-compare) span { display: none; }
    .site-main .photo-result-actions .btn { min-height: 40px; }
    .site-main .photo-result-actions :is(.ral-favorite,.ral-compare) { min-width: 40px; }
}

/* All text painted on a RAL swatch uses its calculated contrast, including
   headings that would otherwise inherit the global interior heading color. */
.ral-contrast-swatch,
.ral-contrast-swatch :is(h1,h2,h3,h4,p,a,strong,small,span,i) {
    color: var(--ral-ink) !important;
}
.site-main { --bs-border-color: var(--tn-border); }
.site-main .ral-color-footer a.ral-btn { border: 1px solid var(--tn-border); }
.site-main .ral-compare-data-card { border: 1px solid var(--tn-border); border-radius: var(--tn-radius); box-shadow: none; }
.site-main .ral-color-header :is(.ral-color-label,.ral-color-number,.ral-color-name) {
    font-family: inherit; height: auto; line-height: 1.35; overflow-wrap: anywhere;
}
