/* mEMA base: the page frame on every page (header, menus, footer, the dialogs mEMA keeps hidden on each page,
   the page shell around the content). Old pages add classic.css; module pages add css/mema-ui.css.
   Rule: no page-wide element rules here. Where the frame relies on one (div, a, img, iframe, form fields), it gets a copy
   scoped to the frame's blocks, wrapped in :where() so it has the original's specificity. #page and #page_wrap
   hold the module box, so only rules that target them, never their insides, belong here.
   Built from memaSelectable.css on 11 Nov 2026 (wiki/UI-Kit.md, "What a page loads"); the toasts keep toastify.css and notify.css. */

/* 1. Page shell */
html, body { height: 100%; width: 100%; text-align: center; margin: 0 auto; padding: 0; font-family:Arial sans-serif; font-stretch: condensed; }
/* The scrollbar's space is always kept. The header is drawn before the page below it arrives, so without this the
   scrollbar appeared a moment after the header and everything aligned right (Log in, tabs, the Menu button) jumped
   15px to the left on every page load where scrollbars take space (Kyle, 16 Nov). */
html { overflow-y: scroll; }
body { font-size: 1.0em; font-stretch: condensed; color: #333333; background: #ffffff; text-align: center; font-family: Tahoma, Arial, Helvetica, sans-serif; }

/* 2. mEMA's page-wide rules, copied for the frame only */
:where(body, #page_wrap) > div, :where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) div { text-align: left; border-color: #444444; border-width: 0; }
:where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) img { border: none; -webkit-user-drag: none; }
:where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) a { text-decoration: none; color: #355394; }
:where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) a:hover { text-decoration: none; }
:where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) :is(input, textarea) { font: 1.0em 'Trebuchet MS', Arial, Helvetica, sans-serif; }
:where(#header_wide, #mobile_menu, #footer_wrapper, #mxModalDiv, #article_help_text, .dialog_box) select { height: 1.8em; }
:where(body > iframe, body > :not(#page_wrap) iframe) { position: relative; z-index: 1; }

/* 3. The page frame, in reading order: header, menu bar, page, footer (docs/page-frame-design.md). The body is a flex
   column so the footer sits at the bottom of short pages. Every frame box is in normal flow; only what floats over the
   page (the dropdowns, dialogs and toasts) is positioned. At 1400px and wider it matches the old frame: the header row
   runs 0-80px, the menu bar 80-104px, and content starts at 125px, which the full-screen charts' height sums rely on.
   Below 1024px the menu folds behind the Menu button and the sign-in line behind the user button. */
:root { --mx-frame-w: 1400px; --mx-frame-pad: 25px; --mx-hdr-h: 80px; --mx-tab-w: 200px; --mx-tab-min: 120px; }
body { display: flex; flex-direction: column; }
#header_wide, #mobile_menu, #footer_wrapper { flex: none; }
#page_wrap, #page_wrap_wide { flex: 1 0 auto; }
.skip_link { position: absolute; left: 8px; top: -60px; z-index: 2100; padding: 8px 14px; background: #ffffff; color: #355394; border: 2px solid #355394; border-radius: 4px; text-decoration: none; }
.skip_link:focus { top: 8px; }

/* 3a. Header: the logo, then the sign-in line (#login) at the top right, where it sat when it was positioned (10px from
   the edge, 20px down). The user, Log in and Menu buttons only show below 1024px, apart from the Log in button on
   signed-out pages other than the splash page. */
#header_wide { display: block; position: relative; width: 100%; margin: 0; padding: 0; background: #ffffff; text-align: center; }
#site_page_top { position: absolute; }	/* the top-of-page anchor stays out of the flex row */
#header_inner { position: relative; display: flex; align-items: flex-start; gap: 12px; max-width: var(--mx-frame-w); min-height: var(--mx-hdr-h); margin: 0 auto; padding: 0 var(--mx-frame-pad); text-align: left; }
.frame_wide #header_inner, .frame_wide #mobile_menu > div { max-width: none; }
.header_logo { flex: none; }
.header_logo img { display: block; width: auto; height: var(--mx-hdr-h); }
#login { display: block; margin: 0 calc(10px - var(--mx-frame-pad)) 0 auto; padding-top: 20px; font-size: 1.0em; }
#login input { font-size: 1.0em; margin-bottom: 0.2em; }
#login input[type=text], #login input[type=password] { width: 100px; }
#login a { text-decoration: none; color: #006699; font-size: 1.0em; }
#login .login_dim { color: #888888; }
#site_msg_box { display: none; font-style: italic; }
.frame_button { display: none; flex: none; align-self: center; margin: 0; padding: 4px; border: 0; border-radius: 6px; background: none; cursor: pointer; line-height: 0; }
.frame_button img { width: 36px; height: 36px; }
/* The Menu button is drawn in CSS, in the person icon's grey: three lines with "Menu" under them (Kyle, 16 Nov). It was
   Mark's 441px menu.png, which could paint a moment after the rest of the header. */
#menu_button { color: #4d4d4d; }
#menu_button .mt_box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 36px; height: 36px; }
#menu_button .mt_bars { display: flex; flex-direction: column; justify-content: space-between; width: 22px; height: 15px; }
#menu_button .mt_bars i { display: block; height: 3px; border-radius: 2px; background: currentColor; }
#menu_button .mt_label { font: bold 9px/1 'Trebuchet MS', Arial, sans-serif; letter-spacing: .02em; }
.frame_button[aria-expanded=true] { background: #e6ebf6; box-shadow: 0 0 0 2px #355394, 0 0 10px rgba(53, 83, 148, .5); }	/* its panel or dropdown is open */
#login_button { flex: none; margin: 20px 0 0 auto; padding: 3px 12px; border: 1px solid #355394; border-radius: 4px; background: #ffffff; color: #355394; font-size: 0.9em; text-decoration: none; }
.frame_button:focus-visible, #login_button:focus-visible { outline: 2px solid #355394; outline-offset: 2px; }
@media (min-width: 1024px) { #header_wide.lgn_form #login_button { display: none; } }

/* 3b. Menu bar: a flex row aligned right, groups in reading order. Tabs are 200px and shrink to 120px before anything
   else gives; each dropdown hangs from its tab's right edge, so a narrowed tab can't push it past the window. The bar
   has no z-index, so the dialog backdrop (.mxModal, z-index 1) still covers it; only the dropdowns have one. */
#mobile_menu { display: block; position: relative; width: 100%; text-align: left; }
#mobile_menu > div { display: flex; justify-content: flex-end; max-width: var(--mx-frame-w); margin: 0 auto; padding: 0 var(--mx-frame-pad); }
.dropdown_selected { position: relative; flex: 0 1 var(--mx-tab-w); min-width: var(--mx-tab-min); font-family: Trebuchet MS, sans-serif; font-size: .8em; margin: 0; padding: 0; }
.dropdown_selected dt { text-transform: none; text-align: center; height: 24px; line-height: 24px; background: #355394; ; border-right: 1px solid #ffffff ; color: #ffffff; font-weight: normal; cursor: pointer; padding: 0; margin: 0 auto; display: block; }
.dropdown_selected dt a { color: #ffffff; display: block; }
.dropdown_selected dt a:hover { background: #95a9d8 ; color: #0a4a60; font-weight: normal }
.dropdown_selected dd { position: absolute; top: 100%; right: 0; min-width: 100%; overflow: hidden; width: var(--mx-tab-w); background: #ffffff; margin: 0 auto; padding: 0; box-shadow: 5px 5px 10px #cccccc; }
.dropdown_selected di { padding: 0; margin: 0; }
.dropdown_selected dd a, .dropdown_selected dd a:active, .dropdown_selected dd a:visited { display: block; padding: 5px; text-decoration: none; background: #ffffff; color: #333333; box-shadow: 5px 5px 10px #cccccc; }
.dropdown_selected dd a:hover { background: #95a9d8; color: #0a4a60; }
.dropdown_selected .underline { border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; }
.dropdown { position: relative; flex: 0 1 var(--mx-tab-w); min-width: var(--mx-tab-min); font-family: Trebuchet MS, sans-serif; font-size: .8em; margin: 0; padding: 0; }
.dropdown dt { text-transform: none; text-align: center; height: 24px; line-height: 24px; background: #a21111 ; border-right: 1px solid #ffffff ; color: #ffffff; font-weight: normal; cursor: pointer; padding: 0; margin: 0 auto; display: block; }
.dropdown dt a { color: #ffffff; display: block; }
.dropdown dt a:hover { background: #b06c6e ; color: #0a4a60; font-weight: normal }
.dropdown dd { position: absolute; top: 100%; right: 0; min-width: 100%; overflow: hidden; width: var(--mx-tab-w); background: #ffffff; margin: 0 auto; padding: 0; box-shadow: 5px 5px 10px #cccccc; }
.dropdown di { padding: 0; margin: 0; }
.dropdown dd a, .dropdown dd a:active, .dropdown dd a:visited { display: block; padding: 5px; text-decoration: none; background: #ffffff; color: #333333; box-shadow: 5px 5px 10px #cccccc; }
.dropdown dd a:hover { background: #d08c8e; color: #0a4a60; }
.dropdown .underline { border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; }
/* Opening (docs/page-frame-design.md, section 10): hover at desktop width with a mouse, or the open class, which
   js/dropdown.js switches on a click, a tap or Enter. A short fade and drop to 90% opacity; the close waits a moment
   so the pointer can cross from the tab to the dropdown. Touch screens get no hover rule, so a tap opens and closes. */
.dropdown dd, .dropdown_selected dd { visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s; }
.dropdown.open dd, .dropdown_selected.open dd { visibility: visible; opacity: .9; transform: none; transition-delay: 0s; }
@media (hover: hover) and (min-width: 1024px) {
	.dropdown:hover dd, .dropdown_selected:hover dd { visibility: visible; opacity: .9; transform: none; transition-delay: 0s; }
}
@media (prefers-reduced-motion: reduce) { .dropdown dd, .dropdown_selected dd { transition: none; transform: none; } }
.dropdown dt button, .dropdown_selected dt button { display: block; width: 100%; height: 24px; margin: 0; padding: 0; border: 0; background: none; color: #ffffff; font: inherit; line-height: 24px; text-align: center; cursor: pointer; }
.dropdown dt button:hover { background: #b06c6e; color: #0a4a60; }
.dropdown_selected dt button:hover { background: #95a9d8; color: #0a4a60; }
#mobile_menu dt button:focus-visible, #mobile_menu a:focus-visible { outline: 2px solid #355394; outline-offset: -2px; }
#mobile_menu dl:last-child dt { border-right: none; }
.dd_new { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #f2b230; color: #1c2230; font-size: .74em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 14px; vertical-align: 1px; }
.dd_count { display: inline-block; min-width: 1.6em; margin-left: .3em; padding: 0 .45em; border-radius: 999px; background: #355394; color: #ffffff; font-size: .78em; font-weight: 700; line-height: 1.6em; text-align: center; }
/* The page you're on (a.dd_current, aria-current="page"): a blue bar at the left, a light blue tint and bold blue text, in
   the dropdown and in the folded panel. Not a box (it would look like the keyboard's focus ring), and not the hover
   colour (a tapped row keeps that on a phone). */
#mobile_menu dd a.dd_current, #mobile_menu dd a.dd_current:visited, #mobile_menu dd a.dd_current:active { background: #e6ebf6; color: #355394; font-weight: bold; box-shadow: inset 4px 0 0 #355394, 5px 5px 10px #cccccc; }
@media (min-width: 1024px) { #mobile_menu dd a.dd_current, #mobile_menu dd a.dd_current:active { padding-left: 13px; } }	/* room after the bar; the folded rows have their own */

/* 3c. Page and footer. The content follows the window at every width, up to 1400px (1450 with padding), centred, on old
   and module pages alike (Kyle, 16 Nov: Q1 changed from "fixed 1400px at 1024px and wider"). Wide pages span the window
   with #page at 90% and no maximum. The page's bottom padding is gone: the footer used to sit in it, and the 40px spacer
   at the end of every page still makes the gap, with the staff icons in it. */
#page_wrap { display: block; position: relative; margin: 0; padding: 0; background: #ffffff; }
#page_wrap_wide { display: block; position: relative; margin: 0; padding: 0; background: #ffffff; }
#page { display: block; position: relative; text-align: left; max-width: var(--mx-frame-w); padding: 21px var(--mx-frame-pad) 0; margin: 0 auto; background: #ffffff; }
#page_wrap_wide > #page { width: 90%; max-width: none; }
#header_wide + :is(#page_wrap, #page_wrap_wide) > #page { padding-top: 45px; }	/* no menu bar drawn: content still starts at 125px */
#footer_wrapper { position: relative; display: block; width: 100%; background: none; text-align: center; padding: 0; margin: 0; }
#footer_wrapper.frame_hidden { display: none; }
#footer a { border-bottom: 1px dotted #939393; text-decoration: none; color: #ffffff }
#footer { position: relative; display: block; width: 100%; box-sizing: border-box; min-height: 100px; border: none; line-height: 1.6em; text-align: center; padding: 12px 16px; margin: 0; font-size: .8em; color: #ffffff; background: #355394; }
/* The footer's links (Kyle, 17 Nov): a list shown on one line with bullets between, and 12px of room above them on every
   device (the text sat against the top of the band). Phones get one link per line (3d). */
.footer_links { list-style: none; margin: 0; padding: 0; text-align: center; }	/* classic.css aligns every ul left */
.footer_links li { display: inline; margin: 0; }
.footer_links li + li::before { content: "\00a0\00a0\2022\00a0\00a0"; }
.footer_copy { text-align: center; }	/* the frame's div rule (section 2) would align it left */

/* 3d. Below 1024px: the header row is the logo, the user button (signed in) or the Log in button (signed out), and the
   Menu button at the far right. The sign-in line becomes the user button's dropdown; the menu becomes a panel under
   the header that pushes the page down. */
@media (max-width: 1023px) {
	#header_inner { align-items: center; }
	.frame_button { display: block; }
	#login_button { margin-top: 0; align-self: center; }
	#user_button { margin-left: auto; }
	/* The Menu button's slot is kept at the right from the first paint (has_menu is on the header's opening tag), and the
	   button sits in it. The header can arrive in pieces, and the user or Log in button used to take that spot until
	   the Menu button arrived, then jump left (Kyle, 16 Nov). */
	#header_wide.has_menu #header_inner { padding-right: calc(var(--mx-frame-pad) + 56px); }
	#menu_button { position: absolute; top: 50%; right: var(--mx-frame-pad); margin: -22px 0 0; }
	#header_wide.lgn_in #login { display: none; position: absolute; top: 100%; right: var(--mx-frame-pad); z-index: 420; min-width: 220px; max-width: calc(100vw - 2 * var(--mx-frame-pad)); margin: 0; padding: 0; background: #ffffff; border: 1px solid #cccccc; box-shadow: 5px 5px 10px #cccccc; }
	#header_wide.lgn_in #login.open { display: block; }
	#login .login_sep { display: none; }
	#login .login_item { display: block; padding: 12px 16px; border-bottom: 1px solid #e3e6eb; overflow-wrap: anywhere; }
	#login .login_item:last-child { border-bottom: none; }
	#header_wide.lgn_form #login { display: none; }
	#mobile_menu:not(.open) { display: none; }
	#mobile_menu > div { flex-direction: column; max-width: none; padding: 0; }
	.dropdown, .dropdown_selected { flex: none; min-width: 0; font-size: 1em; }
	.dropdown dt, .dropdown_selected dt { height: auto; text-align: left; border-right: none; border-bottom: 1px solid #ffffff; }
	.dropdown dt a, .dropdown_selected dt a { padding: 10px var(--mx-frame-pad); }
	.dropdown dd, .dropdown_selected dd { display: none; position: static; width: auto; box-shadow: none; visibility: visible; opacity: 1; transform: none; transition: none; }
	.dropdown.open dd, .dropdown_selected.open dd { display: block; }
	.dropdown dt button, .dropdown_selected dt button { height: auto; padding: 10px var(--mx-frame-pad); text-align: left; }
	.dropdown dt button::after, .dropdown_selected dt button::after { content: "\25B8"; float: right; }
	.dropdown.open dt button::after, .dropdown_selected.open dt button::after { content: "\25BE"; }
	/* :active and :visited too: the desktop rule names them, and while a finger is down it would win (5px padding, a shadow) */
	.dropdown dd a, .dropdown dd a:active, .dropdown dd a:visited, .dropdown_selected dd a, .dropdown_selected dd a:active, .dropdown_selected dd a:visited { padding: 12px var(--mx-frame-pad) 12px calc(var(--mx-frame-pad) + 16px); box-shadow: none; }
	#mobile_menu dd a.dd_current, #mobile_menu dd a.dd_current:active { box-shadow: inset 4px 0 0 #355394; }
}
@media (max-width: 767px) {
	:root { --mx-frame-pad: 16px; --mx-hdr-h: 48px; }
	/* The footer as a list, one link per line with room to tap, the copyright in two smaller lines (Kyle, 17 Nov). */
	#footer { padding: 14px 16px 16px; }
	.footer_links { margin-bottom: 10px; }
	.footer_links li { display: block; padding: 7px 0; }
	.footer_links li + li::before { content: none; }
	.footer_copy { font-size: .9em; line-height: 1.5; opacity: .9; }
	.footer_copy .footer_sep { display: none; }
	.footer_copy > span { display: block; }
	/* Freshworks' Help button, smaller (70%) and closer to the corner (Kyle, 17 Nov). Their button is drawn inside a frame
	   they add to our page; only that frame element is styled, never what's inside it. Their script writes right and
	   bottom (22px) on it, hence !important; it sets no transform. If they rename the frame, the button just stays full size. */
	#launcher-frame { right: 8px !important; bottom: 8px !important; transform: scale(.7); transform-origin: bottom right; }
}

/* 3e. The hidden dialog containers */
*.no_select { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; }
.dialog_box { display: none; position: absolute; top: 5%; left: 5%; z-index: 1000; border: 1px solid #ccc; border-radius: 8px; padding: 8px; }
.dialog_content { display: none; position: relative; text-align: left; }
#frm_modal_mask { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_0 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_0 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_1 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_1 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_2 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_2 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_3 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_3 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_4 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_4 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_5 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_5 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }
#frm_modal_mask_6 { background:rgba(128,128,128,0.25); }
#frm_modal_mask_gray_6 { background:rgba(128,128,128,0.25); margin: 0; padding: 0; width: 100%; height: 100%; top: 0; left: 0; }

/* 4. The mEMA dialog, as memax.css draws it */
.mxModal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4); }
.mxModalBackdrop { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4); }
.mxModalContent { background-color: #ffffff; position: absolute; top: 20%; left: 25%; width: 50%; margin: auto; padding: 20px; border: 1px solid #888; border-radius: 25px; }
.mxModalContent button { font-size: 20px; }
.mxModalWrapper { font-size: 1.2em; background-color: #ffffff; position: absolute; top: 20%; left: 1%; width: 87%; margin: auto; padding: 20px; border: 1px solid #888; border-radius: 25px; }
.mxModalWrapper button { font-size: 20px; }
.mxModalTitle { width: 100%; text-align: center; font-size: 28px; font-weight: bold; margin-bottom: 10px; }
.mxModalBody { margin: 10pt 0pt 20pt 0pt; font-size: 1.2em; }
.mxModalClose { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; }
.mxModalClose:hover, .mxModalClose:focus { color: #000; text-decoration: none; cursor: pointer; }
.mxModalButtons { width: 100%; text-align: center; padding-top: 16px; font-size: 1.2em; }
:where(#header_wide) img.grayscale { filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */ filter: gray; /* IE6-9 */ -webkit-filter: grayscale(0%); /* Chrome 19+ & Safari 6+ */ }
:where(#header_wide) img.grayscale:hover { filter: none; -webkit-filter: grayscale(100%); }

/* 5. Module pages (has-module) follow the window like every page (3c), so the UI kit's container queries see the real
   width. #page_wrap must have no auto side margins: they would stop it stretching in the body's column. */

/* 6. Print: the rules are in print.css, which loads with media="print". This file loads for the screen only, so a
   print rule here never applies. */
