/* ==========================================================================
   DARK MODE
   --------------------------------------------------------------------------
   An OVERLAY, not a rewrite. Light mode is the stylesheet as it already is;
   everything here applies only under html[data-theme="dark"], so nothing in
   this file can change the admin as it looks today. Flip the attribute off
   and every rule here stops matching.

   The palette is a set of custom properties so a colour is changed in one
   place rather than hunted through the file. They are defined on :root in
   both modes -- the light values are only there to make the dark ones easy to
   compare, and nothing reads them unless dark mode is on.

   WHAT IS DELIBERATELY NOT DARKENED
     * Product artwork and screenshots. Inverting images is the usual shortcut
       and it always looks wrong -- covers come back with the wrong skin tones.
     * The store and affiliate-hub PREVIEWS inside the Customize pages. Those
       are a picture of a public page that is light for the visitor, so
       darkening them would be lying about what the visitor sees.
   ========================================================================== */

:root {
	--ssm-bg: #eff8ff;
	--ssm-surface: #ffffff;
	--ssm-raised: #f7f8fa;
	--ssm-field: #FFFFF2;
	--ssm-border: #e4e4e4;
	--ssm-line: #eeeeee;
	--ssm-text: #1a1a1a;
	--ssm-muted: #666666;
	--ssm-heading: #444444;
	--ssm-link: #0099ff;
	--ssm-accent: #3498db;
}

html[data-theme="dark"] {
	/* Four steps of near-black rather than one flat colour, so panels sit on
	   the page instead of merging into it. Blue-grey rather than neutral grey
	   -- it reads as deliberate next to the system blue, and pure #000 under
	   a white logo is harsher than anything a screen needs to be. */
	--ssm-bg: #14181d;
	--ssm-surface: #1b2129;
	--ssm-raised: #222933;
	--ssm-field: #1e242c;
	--ssm-border: #38414d;
	--ssm-line: #2c343e;
	--ssm-text: #e3e7ec;
	--ssm-muted: #9aa5b1;
	--ssm-heading: #f0f3f6;
	/* Lifted from #0099ff: a saturated blue on near-black fails contrast and
	   vibrates against the background. */
	--ssm-link: #5ab8f5;
	--ssm-accent: #3498db;

	color-scheme: dark;   /* scrollbars, form controls and the caret follow */
}

/* ---- the page itself --------------------------------------------------- */
/* THE PAGE BEHIND EVERYTHING
   style.css paints the light body with
       linear-gradient(152deg, #eff8ff 0%, #f1f1f1 100%)
   and this rule used to answer with a flat colour. That is four and a half
   million pixels -- far the largest thing on the screen -- and it changed in a
   single frame while everything on top of it cross-faded. However smooth the
   rest of the switch was, the page behind it snapped, and that is what the eye
   reports.

   Giving dark mode a matching gradient does not fix it: Blink will not
   interpolate one linear-gradient into another, whatever the two look like.
   Measured, not assumed -- with both themes carrying the same two-stop 152deg
   gradient, `document.getAnimations()` during a switch listed 1806 running
   transitions and not one of them was background-image.

   So the gradient moves to a layer of its own and its OPACITY is what changes,
   which does animate. The layer is fixed and covers the viewport, sits behind
   the content and in front of the body's own background, and fades out as the
   dark colour underneath fades in. In light mode it is the same gradient the
   body already had, in the same place, so nothing about the page changes. */
body::before {
	content: "";
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: -1;
	pointer-events: none;
	background-image: linear-gradient(152deg, rgba(239,248,255,1) 0%, rgba(241,241,241,1) 100%);
	transition: opacity .32s ease;
}
html[data-theme="dark"] body::before { opacity: 0; }

/* And a real colour underneath that layer, in BOTH themes.
   style.css sets the light body with a `background:` shorthand carrying the
   gradient, which resets background-color to transparent -- so going back to
   light meant interpolating #14181d to `transparent`, and a transparent body
   hands its background to the canvas instead of painting it. The canvas took
   the fallback in one step: the page snapped to white and only then did the
   gradient fade in over it, which is why dark-to-light felt abrupt while
   light-to-dark looked right.
   Two opaque colours interpolate into each other properly, in either
   direction. #f1f1f1 is the far end of the light gradient, so in light mode
   the layer above covers it exactly and nothing looks different at rest. */
body { background-color: #f1f1f1; }
html[data-theme="dark"] body {
	background-color: var(--ssm-bg);
	background-image: none;
	color: var(--ssm-text);
}
html[data-theme="dark"] #content,
html[data-theme="dark"] #content[class] {
	background-color: var(--ssm-surface);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5 { color: var(--ssm-heading); }
html[data-theme="dark"] a { color: var(--ssm-link); }
html[data-theme="dark"] hr { border-color: var(--ssm-line); opacity: .6; }

/* ---- the blue bar and its menus ---------------------------------------- */
/* The bar keeps the brand blue -- it is the one thing on the page that is
   meant to be loud -- but the panels that drop out of it become dark cards. */
html[data-theme="dark"] #cssmenu ul li ul li { background: var(--ssm-raised); }
html[data-theme="dark"] #cssmenu ul li ul li a { color: var(--ssm-text); }
html[data-theme="dark"] #cssmenu ul li ul li:hover > a,
html[data-theme="dark"] #cssmenu ul li ul li.active > a {
	background: #2b333e;
	color: #7cc6f7;
}
html[data-theme="dark"] #cssmenu > ul > li:after { background: var(--ssm-raised); }
html[data-theme="dark"] #cssmenu > ul > li:hover > a,
html[data-theme="dark"] #cssmenu > ul > li.active > a { color: #fff; }
/* The little arrow keeps its light disc in both states.
   It is built from two pieces -- an off-white circle (:after) with a blue
   triangle sitting on it (:before) -- and light mode flips the circle to black
   and the triangle to white on hover. Against a dark button that flip leaves a
   black disc on near-black, so the arrow disappears exactly when the pointer
   is on it. Pinning both pieces to one appearance keeps it legible whether the
   button is resting or lit. */
html[data-theme="dark"] #cssmenu > ul > li.has-sub > a:after,
html[data-theme="dark"] #cssmenu > ul > li:hover > a:after,
html[data-theme="dark"] #cssmenu > ul > li.active > a:after { background: #eef2f6; }
html[data-theme="dark"] #cssmenu > ul > li.has-sub > a:before,
html[data-theme="dark"] #cssmenu > ul > li:hover > a:before,
html[data-theme="dark"] #cssmenu > ul > li.active > a:before { border-top-color: #3498db; }

/* ---- type-in fields ---------------------------------------------------- */
/* The cream fill is the admin's signal for "you can type here". Dark mode
   keeps the signal and changes the colour: a panel a step lighter than the
   card, with a border that is visible without being a box. */
html[data-theme="dark"] .textform,
html[data-theme="dark"] .broadcast,
html[data-theme="dark"] .broadcastOFF,
html[data-theme="dark"] .pn-text,
html[data-theme="dark"] .ss-input,
html[data-theme="dark"] .ss-area,
html[data-theme="dark"] .gd-value,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
	background-color: var(--ssm-field);
	/* solid, not just a colour: a field with no class of its own keeps the
	   browser's default 2px INSET border, and an inset edge is drawn as a lit
	   bevel whatever colour it is told to be. On the login page, whose fields
	   carry no class, that read as a bright outline round every box. Flat is
	   what every classed field in the admin already uses. */
	border-style: solid;
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .broadcastOFF { background-color: #191f26; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled {
	background-color: #191f26;
	color: #6d7884;
}
html[data-theme="dark"] ::placeholder { color: #727d89; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus { border-color: #4a7fa5; outline-color: #4a7fa5; }

/* ---- buttons ----------------------------------------------------------- */
/* The grey gradient goes flat: a highlight-to-shadow gradient reads as a lit
   edge, and on a dark page there is no light to come from.
   Flat to look at, but still written as a gradient with the same four stops
   style.css gives the light button, for the reason the body above is: a
   gradient cannot fade into `none`, and a page of buttons snapping while the
   text around them fades is what a half-done transition looks like. Every
   stop is the same colour, so there is no gradient to see. */
html[data-theme="dark"] .go-button,
html[data-theme="dark"] .go-button-demo,
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] button:not(.tile-quick):not(.swipe-page-arrow):not(.ss-tool),
html[data-theme="dark"] .restore-button {
	background-color: #2c343e;
	border-style: solid;   /* as above: an unclassed submit keeps an inset bevel */
	background-image: linear-gradient(0deg, rgba(44,52,62,1) 0%, rgba(44,52,62,1) 44%,
	                                        rgba(44,52,62,1) 45%, rgba(44,52,62,1) 100%);
	border-color: #49525e;
	color: var(--ssm-text);
	box-shadow: none;
}
html[data-theme="dark"] .go-button:hover,
html[data-theme="dark"] .go-button-demo:hover,
html[data-theme="dark"] input[type="button"]:hover,
html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] button:not(.tile-quick):hover,
html[data-theme="dark"] .restore-button:hover {
	background: #39434f;
	border-color: #5d6875;
}
/* The big blue call-to-action keeps its colour; only its glow is toned. */
html[data-theme="dark"] .btn a { color: #fff; }

/* ---- boxes, notes and tooltips ----------------------------------------- */
html[data-theme="dark"] .box,
html[data-theme="dark"] .ss-box {
	background: var(--ssm-raised);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .info-box {
	background-color: #2a323c;
	color: var(--ssm-text);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .fa-question-circle { color: #5c6671; }
html[data-theme="dark"] .info-container:hover .fa-question-circle { color: #5ab8f5; }

/* ---- tables ------------------------------------------------------------ */
/* A LIGHT text colour on the cells, declared, even though it is the same
   #1a1a1a they already inherit from the body.

   This is the second half of the cross-fade and it is not decoration. A
   transition runs between two declared values; a property that goes from
   inherited to declared changes category, and Chrome treats that as a step,
   not an interpolation. Every table cell on the page takes its colour by
   inheritance in light and gets `color: var(--ssm-text)` in dark, so all of
   them snapped -- and so did everything inside them, because a parent that
   steps takes its whole subtree with it. Measured on one product page: 163 of
   695 visible elements stepping, 48 of them cells, the rest their rows,
   bodies, panel rows and labels.
   Declaring it here changes nothing about how the page looks at rest: it is
   the colour those cells already compute to. */
   The rows and bodies are in the list for the same reason, though they draw
   no text themselves: a container that steps is a container whose subtree
   steps with it, and leaving them out left 26 of those 163 still stepping. */
table tbody,
table tr,
table td,
table th,
.price-editor-table td { color: #1a1a1a; }
html[data-theme="dark"] table tbody,
html[data-theme="dark"] table tr { color: var(--ssm-text); }
html[data-theme="dark"] table td,
html[data-theme="dark"] table th { border-color: var(--ssm-line); color: var(--ssm-text); }
html[data-theme="dark"] .price-editor-table td { color: var(--ssm-text); }
html[data-theme="dark"] .ss-table th { background: #262e38; color: var(--ssm-text); }
html[data-theme="dark"] .ss-table td { border-color: var(--ssm-line); }

/* ---- the product tiles -------------------------------------------------- */
/* The per-grid <style> blocks in index.php put a #eee border on every td, which
   is a light-mode hairline; it becomes a dark one. */
html[data-theme="dark"] .product-tile-grid td { border-color: var(--ssm-line) !important; }
html[data-theme="dark"] .product-tile-grid td.is-promoted {
	background-color: #1d2a36;
	box-shadow: inset 0 0 0 1px #2f4a60;
}
html[data-theme="dark"] .tile-buttons .tile-open,
html[data-theme="dark"] .tile-buttons .tile-quick {
	background: #2c343e;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] .tile-buttons .tile-open:hover,
html[data-theme="dark"] .tile-buttons .tile-quick:hover {
	background: var(--ssm-accent);
	border-color: var(--ssm-accent);
	color: #fff;
}
html[data-theme="dark"] .tile-promote-tick {
	background: rgba(27, 33, 41, .92);
	border-color: #5a646f;
}

/* ---- the resource panels ------------------------------------------------ */
html[data-theme="dark"] .product-swipes .swipe-panel { background: #1f262f; }
html[data-theme="dark"] .product-swipes .swipe-tabs button {
	background: #262e38;
	border-color: #3d4650;
	color: var(--ssm-text);
}
html[data-theme="dark"] .product-swipes .swipe-tabs button[aria-selected="true"] {
	background: #1f262f;
	border-bottom-color: #1f262f;
	color: #fff;
}
html[data-theme="dark"] .product-swipes .swipe-tab-strip.two-rows {
	background: linear-gradient(to bottom, transparent var(--swipe-first-row-height, 30px), #1f262f var(--swipe-first-row-height, 30px));
}
html[data-theme="dark"] .product-swipes .swipe-page-arrow {
	background: #1f262f;
	border-color: #3d4650;
	color: var(--ssm-text);
}
html[data-theme="dark"] .swipe-label-counts { color: var(--ssm-muted); }
html[data-theme="dark"] .swipe-label-heading { color: var(--ssm-text); }

/* ---- small print -------------------------------------------------------- */
html[data-theme="dark"] .product-group,
html[data-theme="dark"] .pn-stamp,
html[data-theme="dark"] .ss-lead,
html[data-theme="dark"] .gd-note { color: var(--ssm-muted); }

/* ---- what stays light --------------------------------------------------- */
/* A preview of the public store or hub is a picture of what a VISITOR sees,
   and the visitor's page is light. Darkening it would misrepresent it. */
html[data-theme="dark"] .ss-sample,
html[data-theme="dark"] .ss-preview,
html[data-theme="dark"] .ss-pv-wrap {
	background: #ffffff;
	color: #1a1a1a;
	border-radius: 4px;
}
/* The heading and subheading boxes are previews too -- they are the words as
   the visitor will see them, in the colour and face the client picked. Their
   text colour is written in by script from those settings, so darkening the
   box behind it put the client's own dark heading colour on a dark field and
   made the words unreadable. They stay white, like the page they stand for. */
html[data-theme="dark"] .ss-html,
html[data-theme="dark"] .ss-panel-body,
html[data-theme="dark"] .ss-panel,
html[data-theme="dark"] .ss-panels {
	background: #ffffff;
	color: #1a1a1a;
}
html[data-theme="dark"] .ss-html:focus,
html[data-theme="dark"] .ss-panel-body:focus { background: #fcfdff; }
html[data-theme="dark"] .ss-editor { border-color: var(--ssm-border); }

/* ==========================================================================
   THE CORNER CONTROL
   One capsule in the bottom right holding the theme switch above the two jump
   buttons: one outline, one shadow, one object. Built by two scripts --
   js/theme.js puts the switch in, js/scroll_nav.js the arrows -- and whichever
   runs first creates #ssm-corner for the other to join, so neither depends on
   the order they load in.
   ========================================================================== */
#ssm-corner {
	position: fixed;
	right: 20px;
	/* Clear of the notification, which slides in along the bottom. */
	bottom: 74px;
	z-index: 1000001;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 40px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 999px;
	background: rgba(255, 255, 255, .86);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	backdrop-filter: saturate(140%) blur(8px);
	box-shadow: 0 2px 12px rgba(16, 24, 40, .14);
	/* Quiet until it is wanted. */
	opacity: .55;
	transition: opacity .2s ease, box-shadow .2s ease, background-color .2s ease;
	font-family: 'Open Sans', Arial, Helvetica, sans-serif;
	font-size: 12px;
	line-height: 1;
	color: #5b6672;
	user-select: none;
	-webkit-user-select: none;
}
#ssm-corner:hover,
#ssm-corner:focus-within { opacity: 1; box-shadow: 0 4px 18px rgba(16, 24, 40, .2); }
html[data-theme="dark"] #ssm-corner {
	background: rgba(34, 41, 51, .9);
	border-color: rgba(255, 255, 255, .12);
	color: #aab4c0;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}
/* The hairline between the switch and the arrows, inset so the capsule's own
   edge stays unbroken. */
#ssm-corner .ssm-corner-rule {
	display: block;
	width: 26px;
	height: 1px;
	background: rgba(0, 0, 0, .12);
}
html[data-theme="dark"] #ssm-corner .ssm-corner-rule { background: rgba(255, 255, 255, .14); }

/* ---- the switch -------------------------------------------------------- */
/* Upright: sun at the top, moon at the bottom, the knob travelling between
   them. No chrome of its own -- the capsule above is the chrome now. */
#ssm-theme {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 7px 0 6px;
	cursor: pointer;
}
#ssm-theme input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
/* The track and its knob, stood on end. */
#ssm-theme .ssm-theme-track {
	position: relative;
	display: block;
	width: 20px;
	height: 36px;
	border-radius: 999px;
	background: #cbd3dc;
	transition: background-color .25s ease;
	flex: 0 0 auto;
}
#ssm-theme .ssm-theme-track:after {
	content: "";
	position: absolute;
	top: 3px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .25s ease, background-color .25s ease;
}
/* Checked is dark, and dark is the bottom of the track. */
#ssm-theme input:checked + .ssm-theme-track { background: #3498db; }
#ssm-theme input:checked + .ssm-theme-track:after { transform: translateY(14px); }
#ssm-theme input:focus-visible + .ssm-theme-track {
	box-shadow: 0 0 0 3px rgba(52, 152, 219, .4);
}
/* The sun above and the moon below fade with the state, so which way is which
   is obvious without reading a label. */
#ssm-theme .ssm-theme-icon {
	display: flex;
	align-items: center;
	transition: opacity .25s ease;
}
#ssm-theme .ssm-theme-icon svg { display: block; }
#ssm-theme .ssm-theme-sun { opacity: 1; }
#ssm-theme .ssm-theme-moon { opacity: .35; }
html[data-theme="dark"] #ssm-theme .ssm-theme-sun { opacity: .35; }
html[data-theme="dark"] #ssm-theme .ssm-theme-moon { opacity: 1; }

/* ---- the jump buttons -------------------------------------------------- */
#ssm-scroll {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}
/* A page with nowhere to scroll keeps the hairline to itself as well. */
#ssm-scroll.is-idle,
#ssm-scroll.is-idle + .ssm-corner-rule,
.ssm-corner-rule.is-idle { display: none; }

/* These are the admin's only buttons that are not meant to look like buttons,
   so every inherited button style is unset rather than overridden -- style.css
   gives every <button> a grey gradient, a border and a shadow. */
#ssm-corner .ssm-scroll-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 27px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, opacity .2s ease;
}
#ssm-corner .ssm-scroll-btn:hover:not(:disabled) { background: rgba(52, 152, 219, .14); color: #2c80b4; }
#ssm-corner .ssm-scroll-btn:focus-visible { outline: 2px solid #3498db; outline-offset: -2px; }
#ssm-corner .ssm-scroll-btn:disabled { opacity: .3; cursor: default; }
#ssm-corner .ssm-scroll-btn svg { display: block; }
html[data-theme="dark"] #ssm-corner .ssm-scroll-btn:hover:not(:disabled) {
	background: rgba(52, 152, 219, .22);
	color: #8fd0f7;
}
/* The corner's own reduced-motion block is gone too: it froze the switch knob
   and the arrows' hover fade on the same machines, which made the one control
   the crossfade starts from the one control that never moved. */

/* --------------------------------------------------------------------------
   THE CROSSFADE
   Switching themes repaints every colour on the page in one frame, which reads
   as a jolt. js/theme.js puts this class on <html> for the flip only.

   HOW IT USED TO WORK, AND WHY IT DOES NOT ANY MORE
     This rule used to be `html.is-theme-switching *` with twelve colour
     properties on it, so the browser interpolated every colour on the page,
     element by element, for a whole second. It looked right on paper and it
     could not hold a frame rate: a product page has about 1,600 elements, and
     with each one animating twelve properties -- plus its ::before and
     ::after -- that is tens of thousands of interpolations and a full-page
     repaint, sixty times a second. Measured in a browser it managed 9fps,
     with single frames taking 217ms. The fade was smooth in intent and
     visibly choppy in fact, and trimming the property list only brought it to
     20fps: the cost is repainting the page, not the length of the list.

     So nothing on the page transitions at all now. A single layer fades over
     the top instead, the swap happens behind it while it is opaque, and it
     fades away again. Opacity on one fixed element is composited on the GPU,
     so it costs no repaints and holds 60fps however large the page is. One
     element doing one cheap thing, rather than sixteen hundred doing twelve
     expensive ones.

   WHAT THE CLIENT SEES
     The page settles into the colour it is heading for, then the new theme
     appears out of it. Because the layer is the DESTINATION background, going
     to dark sinks into the dark background and comes back up in dark -- it
     reads as the page turning over rather than as a flash of something else.
     The switch itself sits above the layer and keeps its own fade, so the
     control the client is looking at stays lit while the page behind it
     changes.
   -------------------------------------------------------------------------- */

/* The two resting backgrounds, as tokens rather than numbers in a script.
   Declared outside the dark block so BOTH are readable in either theme, which
   is the point: the layer has to know the colour it is going to before the
   page gets there. #f1f1f1 is the light body, #14181d the dark one. */
:root {
	--ssm-fade-light: #f1f1f1;
	--ssm-fade-dark: #14181d;
}

#ssm-theme-fade {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	/* Below #ssm-corner (1000001) and above everything else. The switch stays
	   visible and its knob keeps sliding while the page behind it turns. */
	z-index: 1000000;
	pointer-events: none;
	opacity: 0;
	/* Its own layer, told so in advance: without this the browser promotes it
	   on the first frame of the fade, and that first frame is the one that
	   stutters. */
	will-change: opacity;
	transform: translateZ(0);
}
/* Half the second going in, half coming out. The swap happens at the join,
   when this is fully opaque and the page underneath cannot be seen. */
#ssm-theme-fade.is-in  { transition: opacity .5s ease-in;  opacity: 1; }
#ssm-theme-fade.is-out { transition: opacity .5s ease-out; opacity: 0; }

/* The corner is the one thing above the layer, so it is the one thing that
   still fades its own colours -- six elements, which costs nothing. Its knob
   keeps the quick .25s slide it has at rest: the knob is the direct answer to
   the click and should land straight away, while the page takes its second. */
html.is-theme-switching #ssm-corner,
html.is-theme-switching #ssm-corner * {
	transition: background-color 1s ease, border-color 1s ease,
	            color 1s ease, fill 1s ease, stroke 1s ease, opacity 1s ease;
}
html.is-theme-switching #ssm-theme .ssm-theme-track:after {
	transition: transform .25s ease, background-color 1s ease;
}

/* The page's gradient layer must be in its final state the moment the cover
   starts lifting, or it would still be fading in behind it and the reveal
   would show it mid-way. It is hidden while it changes, so it changes at
   once. */
html.is-theme-switching body::before { transition: none !important; }
/* The reduced-motion block that used to sit here killed every transition the
   crossfade depends on, so with "reduce motion" on in the operating system the
   themes swapped in one frame however long SWITCH_MS was set to. It is gone,
   together with the matching bail in js/theme.js -- see the note there. */

/* ==========================================================================
   THE PAGES WITH STYLESHEETS OF THEIR OWN
   Customize Store, Add Store Products and Customize JV Hub each carry their
   own 600-line stylesheet, and the controls on them are built from white and
   cream panels. The same four tokens cover nearly all of it.
   ========================================================================== */
html[data-theme="dark"] .ss-fontlist,
html[data-theme="dark"] .ss-swatch,
html[data-theme="dark"] .ss-tool,
html[data-theme="dark"] .ss-panel-del,
html[data-theme="dark"] .ss-panel-ghost,
html[data-theme="dark"] .ss-linkcombo-list,
html[data-theme="dark"] .ss-suggest,
html[data-theme="dark"] .ss-browse,
html[data-theme="dark"] #ss-linkthumb,
html[data-theme="dark"] .ss-headers .ss-thumb {
	background: var(--ssm-raised);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .ss-hex,
html[data-theme="dark"] .ss-textarea,
html[data-theme="dark"] .ss-copy {
	background: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .ss-toolbar,
html[data-theme="dark"] .ss-table thead th,
html[data-theme="dark"] .ss-badge,
html[data-theme="dark"] .ss-empty,
html[data-theme="dark"] .ss-banner-field,
html[data-theme="dark"] .ss-drop {
	background: #232a33;
	border-color: var(--ssm-border);
	color: var(--ssm-muted);
}
html[data-theme="dark"] .ss-thumb-box,
html[data-theme="dark"] .ss-cell-image img { background: #262e38; border-color: var(--ssm-border); }
/* Selected, hovered and highlighted rows: the pale blue tints go to a dark
   one of the same hue, so "this is the one" still reads at a glance. */
html[data-theme="dark"] .ss-fontopt.is-on,
html[data-theme="dark"] .ss-tool.is-on,
html[data-theme="dark"] .ss-suggest li.is-active,
html[data-theme="dark"] .ss-suggest li:hover,
html[data-theme="dark"] .ss-browse:hover,
html[data-theme="dark"] .ss-drop.is-over,
html[data-theme="dark"] .ss-table tr.is-editing td,
html[data-theme="dark"] .ss-panel-slot {
	background: #22323f;
	color: #8ecbf2;
}
html[data-theme="dark"] .ss-fontopt:hover { background: #2a323c; }
html[data-theme="dark"] .ss-linkcombo-list .ss-lc-grp { background: #262e38; color: var(--ssm-muted); }
html[data-theme="dark"] .ss-table tr.is-hidden-product td { background: #1c222a; color: #76818d; }
html[data-theme="dark"] .ss-subrow.is-off .ss-select,
html[data-theme="dark"] .ss-row.is-disabled .ss-input,
html[data-theme="dark"] .ss-row.is-disabled .ss-hex,
html[data-theme="dark"] .ss-row.is-disabled .ss-textarea {
	background: #1a2028;
	color: #6d7884;
	border-color: #2f3842;
}
html[data-theme="dark"] .ss-label,
html[data-theme="dark"] .ss-note,
html[data-theme="dark"] .ss-hint { color: var(--ssm-text); }

/* The four greys the three Customize pages set on themselves. They are listed
   again here, at the selector each page actually uses, because those pages
   carry their own stylesheet in a <style> block AFTER this file's link: a
   plain `html[data-theme="dark"] .ss-lead` ties with `.ss-box > p.ss-lead` on
   specificity and loses on order. Matching the page's own selector and adding
   the attribute to it settles it without !important.
   #555 and #666 were chosen to sit a step back from black on white. A step
   back from white on near-black is a LIGHTER grey, not the same one, so these
   go to the muted token rather than being left to fade into the panel. */
html[data-theme="dark"] .ss-box > p.ss-lead { color: var(--ssm-muted); }
html[data-theme="dark"] .ss-units { color: var(--ssm-muted); }
html[data-theme="dark"] .ss-headers .ss-thumb .ss-name { color: var(--ssm-muted); }
html[data-theme="dark"] .ss-cell-desc { color: var(--ssm-muted); }

/* ---- the controls above a product grid ---------------------------------- */
html[data-theme="dark"] #tile-controls {
	background: var(--ssm-raised);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] #tc-search { background: var(--ssm-field); }
html[data-theme="dark"] #tc-suggest {
	background: var(--ssm-raised);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] #tc-suggest li:hover,
html[data-theme="dark"] #tc-suggest li.is-active { background: #22323f; }
html[data-theme="dark"] #tc-count { color: var(--ssm-muted); }

/* ---- the opt-in form panel ---------------------------------------------- */
/* product_optin.php carries the panel colour inline to match the resource
   tabs, so both are set here together. */
html[data-theme="dark"] .product-optin-panel,
html[data-theme="dark"] [style*="#edf2f7"] { background-color: #1f262f !important; }

/* ---- products that are not installed ------------------------------------ */
/* .fade and .fade2 lay a white sheet under 30% opacity, which on a dark page
   is a pale grey rectangle rather than a faded tile. Transparent gives the
   same "switched off" look against whatever is behind it. */
html[data-theme="dark"] .fade,
html[data-theme="dark"] .fade2 { background-color: transparent; }

/* ---- the Global Discounts rows ------------------------------------------ */
/* These carry their own greyed-out fill, which is two classes deep and so
   outranks the general disabled-input rule above. */
html[data-theme="dark"] .global-discount-table .gd-value {
	background-color: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .global-discount-table .gd-value:disabled {
	background-color: #1a2028;
	color: #6d7884;
	border-color: #2f3842;
}
/* No tick-state colour on the group name here either -- see the note beside
   the light rule this used to override in style.css. */

/* ---- the notification --------------------------------------------------- */
html[data-theme="dark"] .ssm-notification { box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }

/* ==========================================================================
   SECOND PASS
   ========================================================================== */

/* ---- the bar ------------------------------------------------------------ */
/* #3498db is a daylight blue: on a near-black page it is the brightest thing
   on screen and pulls the eye away from the work. Same hue, taken right down,
   so the bar still reads as the brand rather than as a grey strip. */
html[data-theme="dark"] #cssmenu { background: #14344b; }
/* The panel behind a submenu. Its items each carry a background but the list
   itself did not, so wherever the items did not reach -- the gap to the right
   of a short last row, and the scroll gutter on the long Products menu -- the
   page showed through as a block of another shade. */
html[data-theme="dark"] #cssmenu ul li ul,
html[data-theme="dark"] #cssmenu ul.nav-products {
	background: var(--ssm-raised);
}

/* ---- rules between sections --------------------------------------------- */
/* A hairline that fades out at both ends rather than a line stopping dead.
   The border goes and the rule is drawn as a gradient instead, so it reads as
   a separation rather than a graphic element. */
html[data-theme="dark"] hr {
	height: 1px;
	border: 0;
	background: linear-gradient(to right,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, .09) 18%,
		rgba(255, 255, 255, .09) 82%,
		rgba(255, 255, 255, 0) 100%);
	opacity: 1;
}

/* ---- the tiles ---------------------------------------------------------- */
html[data-theme="dark"] .product-tile-grid td { background: #232a33; }
html[data-theme="dark"] .product-tile-grid td.tilepad { background: none !important; }

/* ---- the completion bar -------------------------------------------------- */
/* Darker green, same stripes: .meter > span:after carries the animation and is
   left exactly as it is. */
html[data-theme="dark"] .meter { background: #10151a; box-shadow: inset 0 -1px 1px rgba(255, 255, 255, .06); }
html[data-theme="dark"] .meter > span {
	background-color: rgb(26, 112, 52);
	background-image: -webkit-gradient(linear, left bottom, left top,
		color-stop(0, rgb(22, 96, 45)), color-stop(1, rgb(44, 150, 68)));
	background-image: -moz-linear-gradient(center bottom, rgb(22, 96, 45) 37%, rgb(44, 150, 68) 69%);
	background-image: linear-gradient(to top, rgb(22, 96, 45) 37%, rgb(44, 150, 68) 69%);
	box-shadow: inset 0 2px 9px rgba(255, 255, 255, .12), inset 0 -2px 6px rgba(0, 0, 0, .5);
}

/* ---- the popups ---------------------------------------------------------- */
/* Quick Launch and the free-report reader share one panel. */
html[data-theme="dark"] .popup-content {
	background-color: var(--ssm-surface);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] #ql-title,
html[data-theme="dark"] #report-title { color: var(--ssm-heading); }
html[data-theme="dark"] #ql-note { color: #e08b8b; }
html[data-theme="dark"] #ql-desc,
html[data-theme="dark"] #ql-body { color: var(--ssm-text); }
html[data-theme="dark"] #close-popup {
	background: #2c343e;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] #close-popup:hover { background: #39434f; border-color: #5d6875; }

/* ---- the opt-in form ------------------------------------------------------ */
/* !important because product_optin.php writes this box's colours INLINE --
   background-color:#FFFFF2, color:#333, border:1px solid #ccc -- and it does
   so deliberately: the block is injected into pages that load neither of the
   admin's stylesheets in a predictable order. An inline style beats any
   selector, so the textarea stayed cream on a dark page while the box behind
   it went dark. Same reason the [style*="#edf2f7"] rule above exists. */
html[data-theme="dark"] .product-optin textarea,
html[data-theme="dark"] textarea.optin-code,
html[data-theme="dark"] .product-optin .broadcast {
	background-color: var(--ssm-field) !important;
	border-color: var(--ssm-border) !important;
	color: var(--ssm-text) !important;
}

/* ---- the banner thumbnails on Customize Store ----------------------------- */
html[data-theme="dark"] .ss-headers { background-color: #232a33; border-color: var(--ssm-border); }

/* ---- the campaign builder -------------------------------------------------- */
/* Every selector below is the one email_campaign.php uses, with the theme
   attribute added in front of it. That page carries its own stylesheet in a
   <style> block, which the browser reads AFTER this file's link: anything
   written at the same specificity here loses on source order. The attribute
   is worth (0,1,0), which settles it without !important.
   (An earlier pass aimed at #ecb-wrap, .ecb-field and .ecb-input. None of
   those exist on the page, which is why the builder stayed light.) */

/* The fields. One rule in the page sets all three; one rule here answers it. */
html[data-theme="dark"] #ecb-form .textform,
html[data-theme="dark"] #ecb-form select.ecb-select,
html[data-theme="dark"] #ecb-form .ecb-combo {
	background-color: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] #ecb-form select.ecb-select[disabled] {
	background-color: #1a2028;
	color: #6d7884;
}
html[data-theme="dark"] .ecb-combo-arrow { border-top-color: #9aa5b1; }

/* The product list that drops out of an offer box. A white panel floating
   over a dark page is the one thing on this screen that would still glare. */
html[data-theme="dark"] .ecb-combo-list {
	background: var(--ssm-raised);
	border-color: #4a545f;
	color: var(--ssm-text);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .ecb-combo-list .ecb-grp {
	background: #2c343e;
	border-top-color: #3a434e;
	color: var(--ssm-muted);
}
html[data-theme="dark"] .ecb-combo-list .ecb-opt:hover { background: #313a45; }
html[data-theme="dark"] .ecb-combo-list .ecb-opt:before {
	border-color: #6d7884;
	background: #1a2028;
}
/* The tick keeps its blue -- it is the one deliberate colour in the list, and
   it carries as well on dark as it does on white. Its inner ring was #fff to
   punch a hole in the fill; on dark that hole is the panel, not white. */
html[data-theme="dark"] .ecb-combo-list .ecb-opt.sel:before {
	box-shadow: inset 0 0 0 2px var(--ssm-raised);
}
html[data-theme="dark"] .ecb-combo-list .ecb-opt.taken:before {
	border-color: #3a434e;
	background: #232a33;
}
html[data-theme="dark"] .ecb-combo-list .ecb-foot {
	background: #2c343e;
	border-top-color: #3a434e;
}
html[data-theme="dark"] .ecb-combo-list .ecb-opt.taken { color: #6d7884; }
html[data-theme="dark"] .ecb-combo-list .ecb-opt.taken.on { background: #2a323c; color: #6d7884; }
html[data-theme="dark"] .ecb-combo-list .ecb-none,
html[data-theme="dark"] .ecb-combo-list .ecb-count { color: var(--ssm-muted); }

/* The hover thumbnail. The artwork itself is left alone; only the card it
   sits on and the button under it change. */
html[data-theme="dark"] #ecb-thumb {
	background: var(--ssm-raised);
	border-color: #4a545f;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] #ecb-thumb-view {
	background: #2c343e;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] #ecb-thumb-view:hover,
html[data-theme="dark"] #ecb-thumb-view:focus { background: #39434f; }

/* The email tabs. The two shades script alternates between are tokens on the
   grid, so redefining them here keeps the grouping visible instead of
   flattening every tab to one colour -- which is what overriding the tab
   background directly would have done. */
html[data-theme="dark"] #ecb-tab-grid { --ecb-tab-a: #262e38; --ecb-tab-b: #323c49; }
html[data-theme="dark"] #ecb-tab-grid button {
	border-color: #3d4650;
	color: var(--ssm-text);
}
html[data-theme="dark"] #ecb-tab-grid button[aria-selected="true"] {
	border-color: #4aa3d4;
	box-shadow: inset 0 -3px #4aa3d4;
	color: #fff;
}

/* Small print and the two message states. #a33 and #3a7d3a were picked
   against white; on near-black they are too dark to carry, so both are
   lifted rather than left to disappear. */
html[data-theme="dark"] #ecb-tab-summary,
html[data-theme="dark"] .ecb-hint,
html[data-theme="dark"] .ecb-note { color: var(--ssm-muted); }
html[data-theme="dark"] .ecb-msg.err { color: #e9736b; }
html[data-theme="dark"] .ecb-msg.ok { color: #6cc070; }
html[data-theme="dark"] #ecb-offers .ecb-drop { color: #e9736b; }

/* ---- the exit popup page ----------------------------------------------------
   Same arrangement as the Customize pages: the controls go dark, the PREVIEW
   stays white. The design view is a picture of what the visitor sees, and the
   visitor's popup is a white card -- darkening it would be lying about it. */
html[data-theme="dark"] .ep-box {
	background: var(--ssm-surface);
	border-color: var(--ssm-border);
}
/* The copy embedded at the foot of a product's details page. Its #edf2f7 is
   written inline by exit_popup_panel(), so it has to be answered with the
   attribute AND !important -- an inline style wins on everything else. */
html[data-theme="dark"] .ep-embedded .ep-box {
	background: var(--ssm-surface) !important;
	border-color: var(--ssm-border) !important;
}
html[data-theme="dark"] .ep-embedded-head { color: var(--ssm-heading); }
html[data-theme="dark"] .ep-dependent { border-top-color: #2f3842; }
/* The scope picker above the panel: a shade off the panel, the way it is a
   shade off it in light mode. */
html[data-theme="dark"] .ep-switch {
	background: #222933;
	border-color: var(--ssm-border);
}
html[data-theme="dark"] .ep-switch .ep-label { color: var(--ssm-text); }
/* A group's row in the picker: shaded a step up from the list so it still
   reads as a heading, and still clickable. */
html[data-theme="dark"] .ep-combo-list .ep-opt.is-group {
	background: #2c343e;
	border-top-color: #3a434e;
	color: #cfe0ec;
}
html[data-theme="dark"] .ep-combo-list .ep-opt.is-group:hover { background: #31617f; color: #fff; }
html[data-theme="dark"] .ep-combo-list .ep-opt.is-current { box-shadow: inset 3px 0 #4aa3d4; }
html[data-theme="dark"] .ep-label,
html[data-theme="dark"] .ep-check { color: var(--ssm-text); }
html[data-theme="dark"] .ep-note,
html[data-theme="dark"] .ep-found { color: var(--ssm-muted); }
html[data-theme="dark"] .ep-input:disabled,
html[data-theme="dark"] .ep-select:disabled {
	background-color: #1a2028;
	color: #6d7884;
}
html[data-theme="dark"] .ep-combo-arrow { border-top-color: #9aa5b1; }
html[data-theme="dark"] .ep-clear { background: #49525e; color: #e3e7ec; }
html[data-theme="dark"] .ep-clear:hover { background: #5d6875; }
html[data-theme="dark"] .ep-shots-label { color: var(--ssm-muted); }
html[data-theme="dark"] .ep-combo-list {
	background: var(--ssm-raised);
	border-color: #4a545f;
	color: var(--ssm-text);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .ep-combo-list .ep-grp {
	background: #2c343e;
	border-top-color: #3a434e;
	color: var(--ssm-muted);
}
html[data-theme="dark"] #ep-thumb {
	background: var(--ssm-raised);
	border-color: #4a545f;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .ep-editor { border-color: var(--ssm-border); background: var(--ssm-surface); }
html[data-theme="dark"] .ep-toolbar {
	background: #2c343e;
	border-bottom-color: #3a434e;
}
html[data-theme="dark"] .ep-tool.is-on {
	background: #1f4257;
	border-color: #4aa3d4;
	color: #cfe8f7;
}
/* The formatting controls. The colour swatch keeps its own frame rather than
   the field colour -- what is inside it is the point, and a dark surround
   reads as part of the toolbar instead of competing with the sample. */
html[data-theme="dark"] .ep-pick {
	background: #2c343e;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] .ep-swatch {
	background: #2c343e;
	border-color: #49525e;
}
html[data-theme="dark"] .ep-html {
	background: var(--ssm-field);
	color: var(--ssm-text);
}
/* The preview, and the text inside it. Both are needed: the white background
   alone would leave the admin's light grey copy colour on a white card.
   The stage behind it goes dark -- it stands in for the dimmed page the
   lightbox floats over, which is dark whatever theme the admin is in. */
html[data-theme="dark"] .ep-stage { background: #10151b; }
html[data-theme="dark"] .ep-design {
	background: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] .ep-design:focus { background: #fcfdff; }
html[data-theme="dark"] .ep-by { color: var(--ssm-muted); }

/* ---- the three tool pages -------------------------------------------------- */
/* The light button is a pale gradient with a 1px edge. Flat here rather than
   a darkened gradient: a gradient that shallow is invisible against a dark
   panel and only costs a repaint. Chunky either way -- the size is the point
   of them and it is set in style.css, not switched per theme. */
html[data-theme="dark"] .ssm-tool-page .go-button {
	background: #2c343e;
	background-image: none;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] .ssm-tool-page .go-button:hover { background: #39434f; border-color: #5d6875; }
html[data-theme="dark"] .ssm-tool-page input[type="range"] { accent-color: #4aa3d4; }
html[data-theme="dark"] .ssm-tool-page .broadcast,
html[data-theme="dark"] .ssm-tool-page input[type="text"]#user_max_line_length {
	background-color: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .ssm-tool-page .broadcast::placeholder { color: #6d7884; }
/* The tick beside the confirmation is a green PNG on white. It reads fine on
   the dark panel, so it is left alone -- the text beside it is what needs
   lifting, the shipped #2e7d32 being too dark to carry against #14181d. */
html[data-theme="dark"] .ssm-tool-page #successMessage { color: #6cc070; }

/* ---- the training buttons ---------------------------------------------------- */
html[data-theme="dark"] .btn2 a {
	background: #2c343e;
	color: var(--ssm-text);
	border-color: #49525e;
}
html[data-theme="dark"] .btn2 a:hover { background: #39434f; color: #fff; }

/* ---- the price editor ---------------------------------------------------------- */
html[data-theme="dark"] .price-editor-table input[type="text"] {
	background-color: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .price-editor-table input[type="text"]:disabled {
	background-color: #1a2028;
	color: #6d7884;
}
/* A rejected global-discount figure. The light version is a red edge on a
   faint pink fill; pink on near-black is a smear, so the fill stays dark and
   the edge does the work, with the text lifted to a red that carries. */
html[data-theme="dark"] .global-discount-table .gd-value.is-bad {
	border-color: #e9736b;
	background-color: #2a1d1c;
	color: #f0968f;
}
html[data-theme="dark"] .global-discount-table .gd-value.is-bad:focus {
	outline-color: rgba(233, 115, 107, .45);
}

/* ---- Sales Page Signup Pages -------------------------------------------
   Same arrangement as the exit popup page: the controls go dark, the STAGE
   does not. The stage is a picture of a signup page, and a signup page's
   headline band is dark in both themes -- lightening it here would be lying
   about what the visitor sees. So it keeps its own colours and only the
   chrome around it changes. */
html[data-theme="dark"] .sp-box {
	background: var(--ssm-surface);
	border-color: var(--ssm-border);
}
/* The panel embedded at the foot of a product's details page. Its #edf2f7 is
   written inline by signup_copy_panel(), so it has to be answered with the
   attribute AND !important -- an inline style wins on everything else. */
html[data-theme="dark"] .sp-embedded .sp-box {
	background: var(--ssm-surface) !important;
	border-color: var(--ssm-border) !important;
}
html[data-theme="dark"] .sp-embedded-head { color: var(--ssm-heading); }
html[data-theme="dark"] .sp-check { color: var(--ssm-text); }
html[data-theme="dark"] .sp-note { color: var(--ssm-muted); }
html[data-theme="dark"] .sp-dependent { border-top-color: #2f3842; }
html[data-theme="dark"] .sp-editor { border-color: var(--ssm-border); background: var(--ssm-surface); }
html[data-theme="dark"] .sp-toolbar {
	background: #2c343e;
	border-bottom-color: #3a434e;
}
html[data-theme="dark"] .sp-tool.is-on {
	background: #1f4257;
	border-color: #4aa3d4;
	color: #cfe8f7;
}
/* The formatting controls. The colour swatch keeps its own frame rather than
   the field colour -- what is inside it is the point. */
html[data-theme="dark"] .sp-pick {
	background: #2c343e;
	border-color: #49525e;
	color: var(--ssm-text);
}
html[data-theme="dark"] .sp-swatch {
	background: #2c343e;
	border-color: #49525e;
}
html[data-theme="dark"] .sp-html {
	background: var(--ssm-field);
	color: var(--ssm-text);
}
/* The picker above the panel: a shade off the panel, the way it is a shade
   off it in light mode. */
html[data-theme="dark"] .sp-switch {
	background: #222933;
	border-color: var(--ssm-border);
}
html[data-theme="dark"] .sp-switch .sp-label { color: var(--ssm-text); }
html[data-theme="dark"] .sp-found { color: var(--ssm-muted); }
html[data-theme="dark"] .sp-combo-arrow { border-top-color: #9aa5b1; }
html[data-theme="dark"] .sp-clear { background: #49525e; color: #e3e7ec; }
html[data-theme="dark"] .sp-clear:hover { background: #5d6875; }
html[data-theme="dark"] .sp-combo-list {
	background: var(--ssm-raised);
	border-color: #4a545f;
	color: var(--ssm-text);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
/* A group's row in the picker: shaded a step up from the list so it still
   reads as a heading, and still clickable. */
html[data-theme="dark"] .sp-combo-list .sp-opt.is-group {
	background: #2c343e;
	border-top-color: #3a434e;
	color: #cfe0ec;
}
html[data-theme="dark"] .sp-combo-list .sp-opt.is-group:hover { background: #31617f; color: #fff; }
html[data-theme="dark"] .sp-combo-list .sp-opt.is-current { box-shadow: inset 3px 0 #4aa3d4; }
html[data-theme="dark"] #sp-thumb {
	background: var(--ssm-raised);
	border-color: #4a545f;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
/* The stage stays white in both themes -- it is a picture of a signup page,
   and signup pages are white now. Only its frame follows the theme. */
html[data-theme="dark"] .sp-stage { background: #ffffff; }

/* ---- the editors' value dropdowns --------------------------------------
   Size, line height and letter spacing on both the exit popup page and the
   signup pages page. Lists of our own rather than native selects, so they
   need the theme stating. */
html[data-theme="dark"] .ep-pick-list,
html[data-theme="dark"] .sp-pick-list {
	background: var(--ssm-raised);
	border-color: #4a545f;
	color: var(--ssm-text);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .ep-pick-opt:hover,
html[data-theme="dark"] .sp-pick-opt:hover { background: #31617f; color: #fff; }
html[data-theme="dark"] .ep-pick-opt.is-current,
html[data-theme="dark"] .sp-pick-opt.is-current { box-shadow: inset 3px 0 #4aa3d4; }

/* ==========================================================================
   TRACKING CODE
   The third panel in a product's right-hand column, after the signup page and
   the exit popup, and dressed the same way they are. Written here with them
   rather than in tracking_panel.php: the embedded box's #edf2f7 is an inline
   style, answering an inline style takes !important, and the two rules that
   already do that for the other panels live here.
   ========================================================================== */
html[data-theme="dark"] .tk-box {
	background: var(--ssm-surface);
	border-color: var(--ssm-border);
}
html[data-theme="dark"] .tk-embedded .tk-box {
	background: var(--ssm-surface) !important;
	border-color: var(--ssm-border) !important;
}
html[data-theme="dark"] .tk-head { color: var(--ssm-heading); }
html[data-theme="dark"] .tk-intro { color: var(--ssm-muted); }
/* The page each box feeds, in monospace beside its name. A shade darker than
   the prose so it still reads as an aside rather than part of the label. */
html[data-theme="dark"] .tk-where { color: #8792a0; }
html[data-theme="dark"] .tk-label { color: var(--ssm-text); }
html[data-theme="dark"] .tk-slot { border-top-color: #2f3842; }
html[data-theme="dark"] .tk-place { color: var(--ssm-muted); }
html[data-theme="dark"] .tk-place .tk-place-label { color: var(--ssm-text); }
/* The code boxes and their placement menus. dark.css already answers bare
   <textarea> and <select>, but both carry a class of their own with a cream
   background on it, and a class beats an element. */
html[data-theme="dark"] .tk-area,
html[data-theme="dark"] .tk-select {
	background-color: var(--ssm-field);
	border-color: var(--ssm-border);
	color: var(--ssm-text);
}
html[data-theme="dark"] .tk-area:disabled,
html[data-theme="dark"] .tk-select:disabled {
	background-color: #191f26;
	color: #6d7884;
}
html[data-theme="dark"] .tk-area.is-bad {
	border-color: #c9524e;
	background-color: #2a1e1e;
}
/* The intro's two inline code words. They are set by the admin's own <code>
   rule, which is a light chip on a light page. */
html[data-theme="dark"] .tk-intro code {
	background: #262e38;
	color: #cdd6e0;
	border-color: #3a434e;
}
