/* Swiss Art Gallery — a changing gallery light, quiet gold and measured motion. */

.sag-publish-guide .spg-artwork {
  position: relative;
  isolation: isolate;
  border-color: #cfc5ae;
  background: #f0eee5;
  box-shadow: 0 18px 42px -33px rgb(28 37 31 / 40%), inset 0 1px 0 rgb(255 255 255 / 55%);
}

/* The light belongs to the wall. The artwork itself is never filtered or transformed. */
.sag-publish-guide #spg-artwork-wall {
  --spg-light-x: 50%;
  --spg-light-y: 24%;
  position: relative;
  border-color: #d9cfb8;
  background-color: #e9e7dd;
  background-image:
    radial-gradient(ellipse at var(--spg-light-x) var(--spg-light-y), rgb(255 251 228 / 82%) 0, rgb(244 235 204 / 20%) 40%, transparent 72%),
    linear-gradient(155deg, rgb(255 255 255 / 21%), transparent 50%, rgb(97 83 49 / 7%));
  box-shadow: inset 0 1px 14px rgb(255 251 236 / 30%);
}

.sag-publish-guide .spg-light-switch[hidden] { display: none !important; }

.sag-publish-guide .spg-light-switch {
  display: inline-flex;
  order: 3;
  align-items: center;
  align-self: flex-start;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  margin: 0 1px 17px;
  padding: 10px 13px;
  border: 1px solid #b8a57c;
  border-radius: 2px;
  background: #faf8ef;
  color: #46503e;
  font: 500 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-align: start;
  text-wrap: pretty;
  cursor: pointer;
  -webkit-tap-highlight-color: rgb(183 154 97 / 18%);
}

.sag-publish-guide .spg-light-switch svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sag-publish-guide .spg-light-switch span { min-width: 0; overflow-wrap: anywhere; }
.sag-publish-guide .spg-light-switch:focus-visible {
  outline: 3px solid #8c6a2e;
  outline-offset: 5px;
}
.sag-publish-guide .spg-light-switch:active { border-color: #756039; }

.sag-publish-guide .spg-artwork[data-spg-evening="true"] {
  border-color: #8b7850;
  background: #1b2721;
  color: #faf4e7;
  box-shadow: 0 23px 48px -30px rgb(14 25 19 / 65%), inset 0 1px 0 rgb(235 215 169 / 17%);
}
.sag-publish-guide .spg-artwork[data-spg-evening="true"] #spg-artwork-wall {
  border-color: #7d6e4c;
  background-color: #19241e;
  background-image:
    radial-gradient(ellipse at var(--spg-light-x) var(--spg-light-y), rgb(193 163 98 / 37%) 0, rgb(146 129 82 / 13%) 42%, transparent 73%),
    linear-gradient(150deg, rgb(67 78 54 / 40%), transparent 48%, rgb(7 17 11 / 42%));
  box-shadow: inset 0 1px 20px rgb(8 17 10 / 32%);
}
.sag-publish-guide .spg-artwork[data-spg-evening="true"] .spg-art-caption > span { color: #dbc38d; }
.sag-publish-guide .spg-artwork[data-spg-evening="true"] .spg-art-caption > strong { color: #fcf7ec; }
.sag-publish-guide .spg-artwork[data-spg-evening="true"] .spg-art-caption > em { color: #d5dccf; }
.sag-publish-guide .spg-light-switch[aria-pressed="true"] {
  border-color: #ae9764;
  background: #2a372a;
  color: #eedbb0;
  box-shadow: inset 0 1px 0 rgb(235 215 169 / 9%);
}
.sag-publish-guide .spg-artwork[data-spg-evening="true"] .spg-light-switch:focus-visible,
.sag-publish-guide .spg-artwork[data-spg-evening="true"] #spg-artwork-wall:focus-visible { outline-color: #f0dca8; }

.sag-publish-guide .spg-plan { position: relative; }
.sag-publish-guide .spg-plan:focus-within {
  border-color: #a28c59;
  box-shadow: 0 17px 31px -25px rgb(54 45 25 / 28%);
}
.sag-publish-guide .spg-plan--prestige:focus-within {
  border-color: #d1b77b;
  box-shadow: 0 19px 34px -25px rgb(14 25 19 / 50%);
}
.sag-publish-guide .spg-commission {
  border-top-color: #a9915c;
  box-shadow: inset 0 1px 0 rgb(239 222 180 / 7%);
}
.sag-publish-guide .spg-commission:focus-within {
  border-color: #c2aa72;
  box-shadow: 0 15px 31px -27px rgb(28 37 31 / 42%), inset 0 1px 0 rgb(239 222 180 / 15%);
}

/* This reflection travels only along the narrow upper frame of the Prestige card. */
.sag-publish-guide .spg-plan--prestige::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 20%;
  width: 60%;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  background-image: linear-gradient(100deg, transparent 23%, #ead3a0 42%, #fff6d7 50%, #ead3a0 58%, transparent 77%);
  background-size: 300% 100%;
  background-position: 100% 0;
}

.sag-publish-guide .spg-detail > summary,
.sag-publish-guide .spg-history > summary { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.sag-publish-guide .spg-detail[open] {
  border-bottom-color: #b7a372;
  box-shadow: inset 2px 0 0 rgb(183 154 97 / 36%);
}
.sag-publish-guide .spg-detail[open] > summary {
  padding-inline-start: 12px;
  color: #765c2b;
}
.sag-publish-guide .spg-detail > summary:focus-visible {
  outline: 3px solid #8c6a2e;
  outline-offset: 4px;
}

@media (hover: hover) {
  .sag-publish-guide .spg-light-switch:hover { border-color: #8d7543; background: #f3eedf; color: #2a382a; }
  .sag-publish-guide .spg-light-switch[aria-pressed="true"]:hover { border-color: #dec68c; background: #334330; color: #fff0cc; }
  .sag-publish-guide .spg-plan:hover { border-color: #ad965e; box-shadow: 0 18px 31px -24px rgb(54 45 25 / 30%); }
  .sag-publish-guide .spg-plan--prestige:hover { border-color: #d2b87c; box-shadow: 0 20px 35px -24px rgb(14 25 19 / 50%); }
  .sag-publish-guide .spg-commission:hover { border-color: #c0a96f; box-shadow: 0 16px 31px -27px rgb(28 37 31 / 40%), inset 0 1px 0 rgb(239 222 180 / 15%); }
  .sag-publish-guide .spg-detail > summary:hover { color: #765c2b; text-decoration-line: underline; }
}

@media (prefers-reduced-motion: no-preference) {
  .sag-publish-guide .spg-artwork,
  .sag-publish-guide #spg-artwork-wall { transition: background-color 480ms ease, border-color 480ms ease, box-shadow 480ms ease; }
  .sag-publish-guide .spg-art-caption > span,
  .sag-publish-guide .spg-art-caption > strong,
  .sag-publish-guide .spg-art-caption > em { transition: color 320ms ease; }
  .sag-publish-guide .spg-light-switch { transition: background-color 280ms ease, border-color 280ms ease, color 280ms ease, box-shadow 280ms ease; }
  .sag-publish-guide .spg-plan,
  .sag-publish-guide .spg-commission { transition: border-color 260ms ease, box-shadow 320ms ease; }
  .sag-publish-guide .spg-detail,
  .sag-publish-guide .spg-detail > summary { transition: color 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }
  .sag-publish-guide .spg-arrive { animation: spg-arrival 550ms cubic-bezier(.22,.61,.36,1); }
  .sag-publish-guide .spg-plan--prestige.spg-arrive::before { animation: spg-gold-entry 540ms ease-out; }

  @keyframes spg-arrival {
    from { opacity: .9; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes spg-gold-entry {
    0% { opacity: 0; background-position: 100% 0; }
    35% { opacity: .8; }
    100% { opacity: 0; background-position: 0 0; }
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .sag-publish-guide .spg-plan { transition: transform 320ms cubic-bezier(.22,.61,.36,1), border-color 260ms ease, box-shadow 320ms ease; }
  .sag-publish-guide .spg-plan:hover { transform: translateY(-3px); }
  .sag-publish-guide .spg-plan:focus-within { transform: none; }
  .sag-publish-guide .spg-button > span { transition: transform 260ms cubic-bezier(.22,.61,.36,1); }
  .sag-publish-guide .spg-button:hover > span,
  .sag-publish-guide .spg-button:focus-visible > span { transform: translate(2px, -2px); }
  .sag-publish-guide .spg-plan--prestige::before { transition: opacity 320ms ease, background-position 800ms ease; }
  .sag-publish-guide .spg-plan--prestige:hover::before,
  .sag-publish-guide .spg-plan--prestige:focus-within::before { opacity: .85; background-position: 0 0; }
}

@media (max-width: 720px) {
  .sag-publish-guide .spg-art-caption { grid-column: 2; grid-row: 1; }
  .sag-publish-guide #spg-artwork-wall { grid-column: 1; grid-row: 1; }
  .sag-publish-guide .spg-light-switch { grid-column: 1 / -1; grid-row: 2; justify-self: start; align-self: start; margin: 0; }
}

.sag-publish-guide[data-spg-motion="off"],
.sag-publish-guide[data-spg-motion="off"] *,
.sag-publish-guide[data-spg-motion="off"] *::before,
.sag-publish-guide[data-spg-motion="off"] *::after { animation: none !important; transition: none !important; }
.sag-publish-guide[data-spg-motion="off"] .spg-arrive,
.sag-publish-guide[data-spg-motion="off"] .spg-plan,
.sag-publish-guide[data-spg-motion="off"] .spg-button > span { transform: none !important; opacity: 1 !important; }
.sag-publish-guide[data-spg-motion="off"] #spg-artwork-wall { --spg-light-x: 50% !important; --spg-light-y: 24% !important; }
.sag-publish-guide[data-spg-motion="off"] .spg-plan--prestige::before { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .sag-publish-guide .spg-arrive,
  .sag-publish-guide .spg-plan,
  .sag-publish-guide .spg-button > span { transform: none !important; animation: none !important; }
  .sag-publish-guide .spg-plan--prestige::before { animation: none !important; transition: none !important; opacity: 0; }
  .sag-publish-guide #spg-artwork-wall { --spg-light-x: 50% !important; --spg-light-y: 24% !important; }
}

@media (forced-colors: active) {
  .sag-publish-guide .spg-artwork,
  .sag-publish-guide .spg-artwork[data-spg-evening="true"],
  .sag-publish-guide #spg-artwork-wall,
  .sag-publish-guide .spg-artwork[data-spg-evening="true"] #spg-artwork-wall,
  .sag-publish-guide .spg-plan,
  .sag-publish-guide .spg-commission,
  .sag-publish-guide .spg-detail[open] { background: Canvas !important; border-color: CanvasText !important; box-shadow: none !important; transform: none !important; }
  .sag-publish-guide .spg-art-caption > span,
  .sag-publish-guide .spg-art-caption > strong,
  .sag-publish-guide .spg-art-caption > em,
  .sag-publish-guide .spg-detail > summary { color: CanvasText !important; }
  .sag-publish-guide .spg-light-switch { color: ButtonText !important; background: ButtonFace !important; border-color: ButtonText !important; box-shadow: none; }
  .sag-publish-guide .spg-light-switch[aria-pressed="true"] { color: HighlightText !important; background: Highlight !important; }
  .sag-publish-guide .spg-light-switch:focus-visible,
  .sag-publish-guide #spg-artwork-wall:focus-visible,
  .sag-publish-guide .spg-detail > summary:focus-visible { outline-color: Highlight !important; }
  .sag-publish-guide .spg-arrive { animation: none !important; opacity: 1 !important; transform: none !important; }
  .sag-publish-guide .spg-plan--prestige::before { display: none; }
  .sag-publish-guide .spg-button > span { transform: none !important; }
}

@media print {
  .sag-publish-guide .spg-light-switch,
  .sag-publish-guide .spg-plan--prestige::before { display: none !important; }
  .sag-publish-guide .spg-artwork,
  .sag-publish-guide .spg-artwork[data-spg-evening="true"],
  .sag-publish-guide #spg-artwork-wall,
  .sag-publish-guide .spg-artwork[data-spg-evening="true"] #spg-artwork-wall,
  .sag-publish-guide .spg-plan,
  .sag-publish-guide .spg-commission,
  .sag-publish-guide .spg-detail[open] { background: #fff !important; border-color: #999 !important; box-shadow: none !important; }
  .sag-publish-guide .spg-art-caption > span,
  .sag-publish-guide .spg-art-caption > strong,
  .sag-publish-guide .spg-art-caption > em,
  .sag-publish-guide .spg-detail > summary { color: #111 !important; }
  .sag-publish-guide .spg-arrive,
  .sag-publish-guide .spg-plan,
  .sag-publish-guide .spg-button > span { animation: none !important; transform: none !important; opacity: 1 !important; }
}
