/* Selectable themes share all templates and layout rules. */
.theme-selection-form{margin-bottom:50px}.theme-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:30px 0}.theme-option{display:grid;gap:10px;padding:18px;border:2px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}.theme-option.selected,.theme-option:has(input:checked){border-color:var(--accent)}.theme-option input{width:auto;justify-self:start}.theme-option>strong{font-size:22px}.theme-option>span:last-child{color:var(--muted)}.theme-preview{display:grid;grid-template-rows:22% 45% 33%;height:190px;overflow:hidden;border:1px solid #d7d2c9;border-radius:8px}.theme-preview i,.theme-preview b,.theme-preview em{display:block}.theme-preview-editorial{background:#f7f3eb}.theme-preview-editorial i{background:#faf7f0}.theme-preview-editorial b{background:linear-gradient(90deg,#eee7db 42%,#c9bba6)}.theme-preview-editorial em{background:repeating-linear-gradient(90deg,#f0eade 0 23%,transparent 23% 26%)}.theme-preview-heritage{background:#fbfaf7}.theme-preview-heritage i{background:#fff}.theme-preview-heritage b{background:linear-gradient(90deg,#151713 0 52%,#39261d)}.theme-preview-heritage em{background:repeating-linear-gradient(90deg,#fff 0 23%,transparent 23% 26%)}.theme-save-panel{display:grid;grid-template-columns:minmax(220px,1fr) minmax(250px,420px) auto;gap:16px;align-items:end}.theme-save-panel label{margin:0!important}.theme-save-panel .button{white-space:nowrap}
.theme-heritage{--paper:#fbfaf7;--ink:#111712;--muted:#786f65;--line:#e2ddd4;--accent:#07583f;background:var(--paper);font-family:system-ui,sans-serif}.theme-heritage .site-header{background:#fff;border-bottom-color:#eeeae3}.theme-heritage .brand,.theme-heritage h1,.theme-heritage h2,.theme-heritage h3,.theme-heritage .listing-card h2{font-family:Georgia,"Times New Roman",serif;font-weight:700}.theme-heritage .brand{letter-spacing:-.035em}.theme-heritage .site-header nav{text-transform:none;letter-spacing:0;font-family:Georgia,"Times New Roman",serif;font-size:16px}.theme-heritage .button,.theme-heritage button{background:#07583f;border-radius:8px}.theme-heritage .card,.theme-heritage .panel,.theme-heritage .stat{background:#fff;border-color:#e7e1d7;box-shadow:0 2px 9px #22180d0a}.theme-heritage .badge{background:#e8f1ed;color:#07583f}.theme-heritage .price{color:#111712}.theme-heritage footer{background:#fff}.theme-heritage .header-account.signed-in .header-status{background:#07583f}
.theme-heritage.homepage{--paper:#fbfaf7;--ink:#111712;--accent:#07583f;--line:#e2ddd4;background:#fbfaf7}.theme-heritage.homepage .site-header{background:#fff}.theme-heritage.homepage .brand{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(30px,3vw,46px)}.theme-heritage.homepage .brand-tagline{color:#797168}.theme-heritage.homepage .nav nav{text-transform:none;letter-spacing:0;font-family:Georgia,"Times New Roman",serif;font-size:16px}.theme-heritage.homepage .home-hero-slide{background:#171713}.theme-heritage.homepage .home-hero-slide>img{filter:brightness(.43) saturate(.72) contrast(1.15)}.theme-heritage.homepage .home-hero-slide:has(>img)::after{display:block;content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(9,13,11,.86),rgba(9,13,11,.62) 38%,rgba(9,13,11,.12) 75%);pointer-events:none}.theme-heritage.homepage .home-hero-overlay,.theme-heritage.homepage .home-hero-slide:has(>img) .home-hero-overlay{position:relative;z-index:1;color:#fff}.theme-heritage.homepage .home-hero-overlay .eyebrow{color:#2d9a78}.theme-heritage.homepage .home-hero-overlay h1{font-family:Georgia,"Times New Roman",serif;font-weight:700;text-transform:none;letter-spacing:-.025em}.theme-heritage.homepage .home-hero-overlay h1::after{border-color:#2d9a78}.theme-heritage.homepage .home-hero-overlay p{font-family:system-ui,sans-serif;color:#f5f1e9}.theme-heritage.homepage .home-hero-overlay .button{background:#07583f;border-radius:8px}.theme-heritage.homepage .home-slider-dots button{background:#ffffff80}.theme-heritage.homepage .home-slider-dots button.active{background:#fff}.theme-heritage.homepage .editorial-feature-card,.theme-heritage.homepage .home-listing-card{background:#fff;border-color:#e7e1d7;border-radius:12px;overflow:hidden;box-shadow:0 2px 9px #22180d0a}.theme-heritage.homepage .editorial-feature-copy strong,.theme-heritage.homepage .home-section-head h2,.theme-heritage.homepage .listing-card h2{font-family:Georgia,"Times New Roman",serif;font-weight:700;text-transform:none}.theme-heritage.homepage .home-section-head>a,.theme-heritage.homepage .listing-card-view{color:#07583f;font-weight:700}.theme-heritage.homepage .editorial-feature-art{border-color:#e7e1d7}.theme-heritage.homepage .home-browse-cta{background:#fff;border-radius:12px}.theme-heritage.homepage>footer{background:#fff}
/* Listing image controls stay neutral; only primary actions use heritage green. */
.theme-heritage .listing-media-action,.theme-heritage.homepage .listing-media-action{background:rgba(255,255,255,.94);color:#20231f;border:1px solid rgba(17,23,18,.16);box-shadow:0 3px 12px rgba(0,0,0,.14)}
.theme-heritage .listing-media-action:hover,.theme-heritage .listing-media-action:focus-visible,.theme-heritage.homepage .listing-media-action:hover,.theme-heritage.homepage .listing-media-action:focus-visible{background:#fff;color:#111712;border-color:rgba(17,23,18,.34)}
.theme-heritage .listing-media-action.favourite.active,.theme-heritage.homepage .listing-media-action.favourite.active{background:#fff;color:#b51f38;border-color:rgba(181,31,56,.24)}
@media(max-width:760px){.theme-option-grid,.theme-save-panel{grid-template-columns:1fr}.theme-preview{height:150px}}

/* rc.19: keep header metrics identical across themes; only typeface and colour differ. */
.theme-heritage .site-header .brand{font-family:Georgia,"Times New Roman",serif;font-size:clamp(34px,3.6vw,58px);font-weight:500;line-height:1.1;letter-spacing:-.035em}
.theme-heritage .site-header nav{font-family:Georgia,"Times New Roman",serif;font-size:12px;font-weight:500;line-height:inherit;letter-spacing:.08em;text-transform:uppercase}
.theme-heritage.homepage .site-header .brand{font-size:clamp(34px,3.6vw,58px);font-weight:400}
.theme-heritage.homepage .site-header nav{font-size:12px;font-weight:500;letter-spacing:.08em;text-transform:uppercase}
@media(max-width:640px){.theme-heritage .site-header nav,.theme-heritage.homepage .site-header nav{font-size:10px}}

/* rc.24: secondary actions must remain legible against the Heritage surface. */
.theme-heritage .button.secondary,.theme-heritage a.button.secondary,.theme-heritage button.secondary{background:#fff;color:#07583f;border:1px solid #07583f;box-shadow:none}
.theme-heritage .button.secondary:hover,.theme-heritage .button.secondary:focus-visible,.theme-heritage a.button.secondary:hover,.theme-heritage a.button.secondary:focus-visible,.theme-heritage button.secondary:hover,.theme-heritage button.secondary:focus-visible{background:#07583f;color:#fff;border-color:#07583f}

/* rc.54: notification dismissal remains a visible icon, never a themed solid button. */
.toast button.toast-close,.theme-heritage .toast button.toast-close{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;border:0;border-radius:50%;background:transparent!important;color:currentColor!important;box-shadow:none;font:700 20px/1 sans-serif}
.toast button.toast-close:hover,.toast button.toast-close:focus-visible,.theme-heritage .toast button.toast-close:hover,.theme-heritage .toast button.toast-close:focus-visible{background:rgba(0,0,0,.08)!important;color:currentColor!important}
.theme-heritage .rich-toolbar button{color:#fff}
/* Keep detected editor formatting readable after theme button rules are applied. */
:is(.theme-editorial,.theme-heritage) .rich-toolbar button.rich-tool-active,
:is(.theme-editorial,.theme-heritage) .rich-toolbar button[aria-pressed="true"]{border-color:#063f31;background:#dff2eb;color:#063f31;box-shadow:inset 0 0 0 1px #063f31}
:is(.theme-editorial,.theme-heritage) .rich-toolbar button.rich-tool-mixed,
:is(.theme-editorial,.theme-heritage) .rich-toolbar button[aria-pressed="mixed"]{border-color:#9d8d74;background:repeating-linear-gradient(135deg,#fff,#fff 5px,#eee8df 5px,#eee8df 10px);color:#5f5345}
/* rc.27: preserve Heritage colour treatment while using the saved per-slide brightness. */
.theme-heritage.homepage .home-hero-slide>img{filter:brightness(var(--hero-brightness,.55)) saturate(.72) contrast(1.15)}
/* rc.47: admin darkness is authoritative; 0% preserves the original image. */
.theme-heritage.homepage .home-hero-slide>img{filter:brightness(var(--hero-brightness,1))}
.theme-heritage.homepage .home-hero-slide:has(>img)::after{display:none}
/* rc192: saved theme library and allowlisted appearance controls. */
.theme-option-card{min-width:0;display:flex;flex-direction:column}
.theme-option-card>.theme-option{flex:1;margin:0}
.theme-card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.theme-card-actions .button{margin:0;padding:8px 12px}
.theme-option-card .theme-option input[type=radio]{width:16px;height:16px;min-width:16px;min-height:16px;margin:0}
.theme-preview-saved{background:var(--theme-paper)}
.theme-preview-saved em{background:repeating-linear-gradient(90deg,var(--theme-surface) 0 23%,var(--theme-paper) 23% 26%)}
.theme-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.theme-editor-grid label{display:grid;gap:7px;margin:0!important;align-content:start}
.theme-editor-grid select{margin:0}
body.theme-editorial[data-custom-theme],body.theme-heritage[data-custom-theme]{background:var(--theme-paper);color:var(--theme-ink);font-family:var(--theme-font)}
body[data-custom-theme] :is(.panel,.card,.stat),body[data-custom-theme]>footer{background:var(--theme-surface);border-color:var(--theme-line)}
body[data-custom-theme] :is(.panel,.card,.stat){border-radius:var(--theme-radius)}
body[data-custom-theme] .button:not(.secondary):not(.danger){background:var(--theme-accent);border-color:var(--theme-accent);color:#fff;border-radius:var(--theme-radius)}
body[data-custom-theme] .button.secondary{background:var(--theme-surface);border-color:var(--theme-accent);color:var(--theme-ink);border-radius:var(--theme-radius)}
body[data-custom-theme] .button.secondary:hover,body[data-custom-theme] .button.secondary:focus-visible{background:var(--theme-accent);color:#fff}
body[data-custom-theme] :is(.price,.listing-card-view){color:var(--theme-ink)}
@media(max-width:760px){.theme-editor-grid{grid-template-columns:1fr}.theme-option-grid{gap:16px}}

body.theme-editorial[data-custom-theme] :is(.editorial-feature-card,.home-listing-card,.home-browse-cta,.header-settings-section),body.theme-heritage[data-custom-theme] :is(.editorial-feature-card,.home-listing-card,.home-browse-cta,.header-settings-section){background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
body[data-custom-theme] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]){background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line)}
body[data-custom-theme]>footer{color:var(--theme-ink)}

/* rc193: native colour swatches and accurate base-style previews. */
.theme-colour-field{display:flex;align-items:center;gap:10px;min-width:0}.theme-colour-field [data-theme-hex]{flex:1;min-width:0;margin:0}.theme-colour-field [data-theme-picker]{flex:0 0 44px;width:44px;height:42px;min-height:42px;padding:3px;margin:0;cursor:pointer}
.theme-palette{display:flex;gap:9px;flex-wrap:wrap}.theme-palette>span{display:flex;gap:4px;align-items:center;font-size:11px;color:var(--ink)}.theme-palette i{display:block;width:14px;height:14px;border:1px solid #aaa;border-radius:3px}

.theme-colour-group{display:grid;gap:7px;align-content:start;min-width:0}
/* rc195: saved component colours are explicit; typography presets do not hide colour choices. */
body[data-custom-theme].theme-editorial .site-header,body[data-custom-theme].theme-heritage .site-header{background:var(--theme-header_background);color:var(--theme-header_text);border-bottom-color:var(--theme-header_border)}
body[data-custom-theme].theme-editorial .brand-tagline,body[data-custom-theme].theme-heritage .brand-tagline{color:var(--theme-header_tagline)}
body[data-custom-theme] :is(.header-account-dropdown,.header-search form){background:var(--theme-header_popup_background);color:var(--theme-header_text)}
body[data-custom-theme] :is(.header-account-menu[open]>summary,.header-search[open]>summary,.header-account-dropdown>a:hover,.header-account-dropdown>a:focus-visible){background:var(--theme-header_hover_background)}
body[data-custom-theme] .header-status{border-color:var(--theme-header_background);background:var(--theme-header_offline)}
body[data-custom-theme].theme-editorial .header-account.signed-in .header-status,body[data-custom-theme].theme-heritage .header-account.signed-in .header-status{background:var(--theme-header_online)}
body[data-custom-theme].homepage :is(.home-hero-slider,.home-hero-slide){background:var(--theme-hero_background)}
body[data-custom-theme].homepage .home-slider-dots button{background:var(--theme-hero_dots);opacity:.5}
body[data-custom-theme].homepage .home-slider-dots button.active{background:var(--theme-hero_dots);opacity:1}
body[data-custom-theme].theme-editorial :is(.editorial-feature-card,.home-listing-card,.listing-card),body[data-custom-theme].theme-heritage :is(.editorial-feature-card,.home-listing-card,.listing-card){background:var(--theme-feature_background);border-color:var(--theme-feature_border)}
body[data-custom-theme] :is(.editorial-feature-art,.card img,.detail-image){background:var(--theme-art_background);border-color:var(--theme-feature_border)}
body[data-custom-theme] th{background:var(--theme-table_background)}
body[data-custom-theme].theme-editorial .badge,body[data-custom-theme].theme-heritage .badge{background:var(--theme-badge_background);color:var(--theme-badge_text)}
body[data-custom-theme].theme-editorial>footer,body[data-custom-theme].theme-heritage>footer{background:var(--theme-footer_background);color:var(--theme-footer_text)}
body[data-custom-theme]>footer a{color:var(--theme-footer_link)}
body[data-custom-theme] .button:not(.secondary):not(.danger),body[data-custom-theme] .header-account-logout-form .header-account-logout{color:var(--theme-button_text)}
body[data-custom-theme] .button.secondary{color:var(--theme-secondary_text)}
body[data-custom-theme] .button.secondary:hover,body[data-custom-theme] .button.secondary:focus-visible{color:var(--theme-button_text)}
body[data-custom-theme].theme-editorial .listing-media-action,body[data-custom-theme].theme-heritage .listing-media-action{background:var(--theme-media_background);color:var(--theme-media_text);border-color:color-mix(in srgb,var(--theme-media_border) 16%,transparent)}
body[data-custom-theme].theme-editorial .listing-media-action:hover,body[data-custom-theme].theme-heritage .listing-media-action:hover,body[data-custom-theme].theme-editorial .listing-media-action:focus-visible,body[data-custom-theme].theme-heritage .listing-media-action:focus-visible{background:var(--theme-media_background);color:var(--theme-media_text);border-color:color-mix(in srgb,var(--theme-media_border) 16%,transparent)}
body[data-custom-theme].theme-editorial .listing-media-action.favourite.active,body[data-custom-theme].theme-heritage .listing-media-action.favourite.active{background:var(--theme-media_background);color:var(--theme-media_favourite);border-color:color-mix(in srgb,var(--theme-media_favourite) 24%,transparent)}
.theme-preview-colours{grid-template-rows:22% 45% 23% 10%;background:var(--theme-paper)}
.theme-preview-colours i{background:var(--theme-header_background);border-bottom:1px solid var(--theme-header_border)}
.theme-preview-colours b{background:var(--theme-hero_background)}
.theme-preview-colours em{background:repeating-linear-gradient(90deg,var(--theme-feature_background) 0 23%,var(--theme-paper) 23% 26%)}
.theme-preview-colours .theme-preview-footer{background:var(--theme-footer_background)}
body[data-custom-theme] .header-account-dropdown>a{color:var(--theme-header_text)}

/* RC222: shared gallery navigation follows saved Image controls colours. */
body[data-custom-theme]:is(.theme-editorial,.theme-heritage) :is(.listing-stage-nav,.listing-thumb-scroll){background:var(--theme-media_background);color:var(--theme-media_text);border-color:var(--theme-media_border)}
body[data-custom-theme]:is(.theme-editorial,.theme-heritage) :is(.listing-stage-nav,.listing-thumb-scroll):is(:hover,:focus-visible){background:var(--theme-media_background);color:var(--theme-media_text);border-color:var(--theme-media_border)}
body[data-custom-theme]:is(.theme-editorial,.theme-heritage) :is(.listing-stage-nav,.listing-thumb-scroll):focus-visible{outline:3px solid var(--theme-media_text);outline-offset:2px}
body[data-custom-theme]:is(.theme-editorial,.theme-heritage) :is(.listing-stage-nav,.listing-thumb-scroll):disabled{background:var(--theme-media_background);color:var(--theme-media_text);border-color:var(--theme-media_border);opacity:.45;cursor:not-allowed}

/* RC224: task utility controls are not primary action buttons. */
body :is(.task-list-sort,.task-tree-toggle,.task-list-column-resize,.task-column-resize){background:transparent;border-radius:0;color:var(--ink)}
body .task-list-sort{color:inherit}
body :is(.task-list-column-resize,.task-column-resize):is(:hover,:focus-visible){background:color-mix(in srgb,var(--accent) 16%,transparent);border-color:var(--accent)}
body .task-tree-toggle:is(:hover,:focus-visible){background:color-mix(in srgb,var(--accent) 12%,transparent)}
body .task-gantt-splitter{background:var(--line);border-radius:0}
body .task-gantt-splitter::after{background:var(--ink)}
body .task-gantt-splitter:is(:hover,:focus-visible,.is-resizing){background:color-mix(in srgb,var(--accent) 24%,var(--paper))}
body[data-custom-theme] :is(.task-gantt-details,.task-gantt-scroll,.task-gantt-canvas){background:var(--theme-surface);color:var(--theme-ink)}
body[data-custom-theme] :is(.task-gantt-details-head,.task-gantt-time-head){background:var(--theme-table_background);color:var(--theme-ink)}

/* RC225: shared, theme-aware scrollbars; gallery rails retain their arrow UI. */
html,body *{scrollbar-width:thin;scrollbar-color:var(--line,#b6b6b6) transparent}
html::-webkit-scrollbar,body *::-webkit-scrollbar{width:7px;height:7px}
html::-webkit-scrollbar-track,body *::-webkit-scrollbar-track{background:transparent}
html::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{background:var(--line,#b6b6b6);border:1px solid transparent;background-clip:padding-box;border-radius:999px}
html::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background:var(--muted,#777);background-clip:padding-box}
html::-webkit-scrollbar-corner,body *::-webkit-scrollbar-corner{background:transparent}
body .listing-thumb-rail{scrollbar-width:none}
body .listing-thumb-rail::-webkit-scrollbar{display:none;width:0;height:0}
/* A one-pixel divider within the existing ten-pixel pointer target. */
body .task-gantt-splitter{border:0;background:transparent;border-radius:0}
body .task-gantt-splitter::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;transform:translateX(-50%);background:var(--line);pointer-events:none}
body .task-gantt-splitter::after{left:50%;top:50%;width:2px;height:24px;transform:translate(-50%,-50%);border-radius:999px;background:var(--muted);pointer-events:none}
body .task-gantt-splitter:is(:hover,:focus-visible,.is-resizing){background:transparent}
body .task-gantt-splitter:is(:hover,:focus-visible,.is-resizing)::before,body .task-gantt-splitter:is(:hover,:focus-visible,.is-resizing)::after{background:var(--accent)}
body .task-gantt-splitter:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
@media(forced-colors:active){html,body *{scrollbar-color:auto}body .task-gantt-splitter::before,body .task-gantt-splitter::after{background:ButtonText}body .task-gantt-splitter:focus-visible{outline-color:Highlight}}

/* RC226: Gantt headings match List; resize targets remain available. */
body .task-gantt-sort{display:flex;align-items:center;gap:6px;min-width:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-shadow:none}
body .task-gantt-sort .task-gantt-column-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .task-gantt-sort:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body .task-gantt-details-head .task-column-resize{border:0;background:transparent}
body .task-gantt-details-head .task-column-resize:is(:hover,:focus-visible){background:color-mix(in srgb,var(--accent) 16%,transparent)}
body .task-gantt[data-field-sorted="true"] .task-gantt-order-handle{opacity:.4;cursor:default}
