/* Anthracite preview: presentation overrides for tools, pricing and payments.
   Load after the shared dark palette. Existing layout and state hooks stay intact. */
body.premium-site:not(.premium-demo).premium-tools {
  --ground: var(--premium-paper);
  --ink: var(--premium-ink);
  --ink-soft: var(--premium-ink);
  --muted: var(--premium-muted);
  --faint: var(--premium-muted);
  --lime: var(--premium-lime);
  --lime-logo: var(--premium-lime);
  --violet: var(--premium-ink);
  --glass: var(--dark-surface);
  --glass-strong: var(--dark-raised);
  --paper: var(--dark-surface);
  --paper-soft: var(--premium-paper);
  --tool-line: var(--premium-line);
  --tool-soft: var(--dark-raised);
  --tool-control: #7c8593;
  --tool-selected: #29331f;
  background: var(--premium-paper);
  color: var(--premium-ink);
  color-scheme: dark;
}

body.premium-site:not(.premium-demo).premium-tools :is(.panel, .summary) {
  background: var(--dark-surface);
  border-color: var(--premium-line);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-tools .button,
body.premium-site:not(.premium-demo).premium-check .urlform button {
  background: var(--premium-lime);
  border-color: var(--premium-lime);
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-tools .button:hover,
body.premium-site:not(.premium-demo).premium-check .urlform button:hover {
  background: #d3fa82;
  border-color: #d3fa82;
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-tools .button.quiet {
  background: var(--dark-surface);
  border-color: var(--tool-control);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-tools .button.quiet:hover {
  background: var(--dark-raised);
  border-color: var(--premium-lime);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-tools :is(.notice, .tabs, .strategy, .seg) {
  background: var(--dark-raised);
  border-color: var(--premium-line);
}

body.premium-site:not(.premium-demo).premium-tools :is(.note, .notice, .summary) a:not(.button) {
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-tools :is(button, a, input, select, textarea):focus-visible {
  outline-color: var(--premium-lime);
  box-shadow: 0 0 0 2px var(--premium-paper);
}

/* Package and payment selection: retain the existing checked/pressed semantics. */
body.premium-site:not(.premium-demo).premium-estimate :is(.card, .opt, .tot, .payment-mode button) {
  background: var(--premium-paper);
  border-color: var(--premium-line);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-estimate :is(.card:hover, .opt:hover, .payment-mode button:hover) {
  background: var(--dark-raised);
  border-color: var(--tool-control);
}

body.premium-site:not(.premium-demo).premium-estimate .card[aria-checked="true"],
body.premium-site:not(.premium-demo).premium-estimate .opt:has(input:checked),
body.premium-site:not(.premium-demo).premium-estimate .payment-mode button[aria-pressed="true"] {
  background: var(--tool-selected);
  border-color: var(--premium-lime);
  box-shadow: inset 0 0 0 1px var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-estimate .tab:hover,
body.premium-site:not(.premium-demo).premium-estimate .seg button:hover {
  background: var(--dark-surface);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-estimate .tab[aria-selected="true"],
body.premium-site:not(.premium-demo).premium-estimate .seg button[aria-pressed="true"],
body.premium-site:not(.premium-demo).premium-check .strategy button[aria-pressed="true"] {
  background: var(--premium-lime);
  border-color: var(--premium-lime);
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-estimate :is(.check, .cart-count, .checkout-steps b),
body.premium-site:not(.premium-demo).premium-check .ok::before {
  background: var(--premium-lime);
  border-color: var(--premium-lime);
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-estimate .check svg {
  stroke: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-estimate .tot.hi {
  background: var(--dark-raised);
  border-color: #718c42;
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-estimate .tot.hi .val {
  color: var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-estimate .tot.hi :is(.lbl, .val em) {
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo).premium-estimate .opt input {
  accent-color: var(--premium-lime);
  color-scheme: dark;
}

body.premium-site:not(.premium-demo).premium-estimate > .bar {
  background: var(--dark-surface);
  border-color: var(--premium-line);
  box-shadow: 0 -4px 20px #00000040;
}

/* Also cover unavailable catalog and checkout awaiting written confirmation. */
body.premium-site:not(.premium-demo).premium-tools .button[aria-disabled="true"],
body.premium-site:not(.premium-demo).premium-tools button:disabled,
body.premium-site:not(.premium-demo).premium-check .urlform button:disabled {
  background: var(--dark-raised);
  border-color: var(--tool-control);
  color: var(--premium-muted);
  box-shadow: none;
}

body.premium-site:not(.premium-demo).premium-estimate #selection-note:not([hidden]) {
  color: #f3d495;
}

/* Site analysis: inputs, waiting, failure and generated report rows. */
body.premium-site:not(.premium-demo).premium-check .urlform {
  background: var(--dark-surface);
  border-color: var(--tool-control);
}

body.premium-site:not(.premium-demo).premium-check .urlform:focus-within {
  border-color: var(--premium-lime);
  box-shadow: 0 0 0 1px var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-check .urlform input {
  color: var(--premium-ink);
  caret-color: var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-check .urlform input::placeholder {
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo).premium-check .urlform input:focus-visible {
  outline-color: var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-check .urlform input:autofill {
  -webkit-text-fill-color: var(--premium-ink);
  box-shadow: 0 0 0 1000px var(--dark-surface) inset;
}

body.premium-site:not(.premium-demo).premium-check .strategy button:hover {
  background: var(--dark-surface);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo).premium-check .strategy button[aria-pressed="true"]:hover {
  background: #d3fa82;
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo).premium-check .err {
  background: #382329;
  border-color: #a66d75;
  color: #ffb9b9;
}

body.premium-site:not(.premium-demo).premium-check .orbit .core {
  background: var(--premium-lime);
  border-color: var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-check .orbit .ring {
  border-color: var(--tool-control);
}

body.premium-site:not(.premium-demo).premium-check .orbit .ring::before,
body.premium-site:not(.premium-demo).premium-check .wait .bar i {
  background: var(--premium-lime);
}

body.premium-site:not(.premium-demo).premium-check .score .ring .bg {
  stroke: var(--premium-line);
}

body.premium-site:not(.premium-demo).premium-check :is(.vital, .issue .t small) {
  background: var(--dark-raised);
}

/* Price cards and quote disclosures, including their existing important rules. */
body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-price-card, .ks-quote-example) {
  background: var(--dark-surface) !important;
  border-color: var(--premium-line) !important;
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-price-card:hover {
  border-color: #7c8593 !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-price-value, .ks-quote-example dd) {
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-price-card > span:first-child, .ks-price-value small, .ks-price-value span, .ks-first-month, .ks-price-extra, .ks-package-scope, .ks-quote-subtotal) {
  color: var(--premium-muted);
  border-color: var(--premium-line);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-price-notice, .ks-rate-note, .ks-budget-note, .ks-small-note, .ks-price-estimate) {
  background: var(--dark-raised) !important;
  border-color: var(--premium-line) !important;
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-pay-path > div, .ks-request-content) {
  background: var(--dark-raised) !important;
  border-color: var(--premium-line);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-request-content > * {
  color: var(--premium-ink) !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(.ks-restyling-head, .ks-quote-example dl > div) {
  border-color: var(--premium-line);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-price-nav > a,
body.premium-site:not(.premium-demo) #prezzi-contenuto details.ks-package-request > summary {
  background: transparent !important;
  border-color: #7c8593;
  color: var(--premium-ink) !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-price-nav > a:hover,
body.premium-site:not(.premium-demo) #prezzi-contenuto details.ks-package-request > summary:hover,
body.premium-site:not(.premium-demo) #prezzi-contenuto details.ks-package-request[open] > summary {
  background: var(--dark-raised) !important;
  border-color: var(--premium-lime);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-price-card > .ks-package-checkout {
  background: var(--premium-lime) !important;
  border-color: var(--premium-lime);
  color: var(--dark-on-accent) !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-price-card > .ks-package-checkout:hover {
  background: #d3fa82 !important;
  border-color: #d3fa82;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto :is(a, summary):focus-visible {
  outline-color: var(--premium-lime);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview {
  background: var(--dark-surface);
  border-color: var(--premium-line);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview .ks-restyling-before {
  background: var(--dark-raised) !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview .ks-restyling-after {
  background: #29331f !important;
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview .ks-restyling-after > strong {
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview-copy {
  background: var(--dark-surface);
  border-color: var(--premium-line);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview :is(small, .ks-restyling-before strong, div > span:first-child),
body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview-copy > span:last-child {
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo) #prezzi-contenuto .ks-restyling-preview i {
  background: #76806b;
}

/* Payment information on the contact page shares the same surface hierarchy. */
body.premium-site:not(.premium-demo) .contact-payment-guide,
body.premium-site:not(.premium-demo) .cart-choice-confirmation {
  background: var(--dark-raised);
  border-color: var(--premium-line);
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) .contact-payment-guide :is(.payment-guide-head, .payment-guide-note) {
  border-color: var(--premium-line);
}

body.premium-site:not(.premium-demo) .contact-payment-guide :is(.payment-method-card, .payment-roadmap > article, .payment-roadmap > li, .payment-facts > span) {
  background: var(--dark-surface);
  border-color: var(--premium-line);
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo) .contact-payment-guide :is(.payment-selected-pill, .payment-roadmap > article > span, .payment-roadmap > li > span) {
  background: var(--premium-lime);
  border-color: var(--premium-lime);
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo) .contact-payment-guide .payment-selected-pill :is(span, strong) {
  color: var(--dark-on-accent);
}

body.premium-site:not(.premium-demo) .contact-payment-guide .payment-method-badge {
  background: var(--dark-raised);
  border-color: #7c8593;
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo) .contact-payment-guide :is(.payment-facts, .payment-guide-note),
body.premium-site:not(.premium-demo) .cart-choice-confirmation :is(span, small) {
  color: var(--premium-muted);
}

body.premium-site:not(.premium-demo) .contact-payment-guide :is(.payment-facts b, .payment-guide-note strong),
body.premium-site:not(.premium-demo) .cart-choice-confirmation strong {
  color: var(--premium-ink);
}

body.premium-site:not(.premium-demo) .contact-payment-guide .button.quiet {
  background: var(--dark-raised) !important;
  border-color: #7c8593;
  color: var(--premium-ink) !important;
}

body.premium-site:not(.premium-demo) .contact-payment-guide .button.quiet:hover {
  background: var(--dark-surface) !important;
  border-color: var(--premium-lime);
}
