/* Email investigation desk, scoped to the Email Forensics foundation page. */
.em-lab {
  --em-ink: #18334e;
  --em-muted: #425c73;
  --em-accent: #126494;
  --em-line: #b8d1e4;
  --em-surface: #edf5fc;
  --em-paper: var(--md-default-bg-color, #fff);
  --em-success: #17603b;
  --em-success-bg: #edf8f0;
  --em-alert: #7a4308;
  --em-alert-bg: #fff5e5;
  margin: 1.2rem 0 1.8rem;
  border: 1px solid var(--em-line);
  border-radius: .8rem;
  overflow: hidden;
  color: var(--em-ink);
  background: var(--em-paper);
  box-shadow: 0 .6rem 1.5rem #143e6510;
  font-size: .76rem;
  line-height: 1.6;
}
.em-lab *, .em-lab *::before, .em-lab *::after { box-sizing: border-box; }
.em-lab [hidden] { display: none !important; }
.em-lab:not([data-em-ready]) :is(.em-steps,.em-coach,.em-work,.em-toolbar) { display: none; }
.em-lab :is(p,strong,small,code,dd,button) { overflow-wrap: anywhere; }
.md-content .md-typeset .em-lab h3 { margin: .45rem 0 .6rem; color: var(--em-ink); font-size: 1.45rem; font-weight: 750; line-height: 1.2; }
.md-content .md-typeset .em-lab h4 { margin: .3rem 0 .55rem; color: var(--em-ink); font-size: .86rem; font-weight: 700; line-height: 1.4; }
.em-lab p { margin: .55rem 0; font-size: .74rem; line-height: 1.65; }
.em-lab .em-caption, .em-lab small { color: var(--em-muted); font-size: .64rem; line-height: 1.65; }
.em-case { padding: 1.2rem; background: linear-gradient(120deg,var(--em-surface),var(--em-paper)); }
.em-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; color: var(--em-accent); font-size: .61rem; font-weight: 700; letter-spacing: .035em; }
.em-case>small { display: block; margin-top: .7rem; }
.em-mission { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; padding: .65rem .8rem; border-left: 3px solid var(--em-accent); background: var(--em-paper); }
.em-mission strong { color: var(--em-accent); }
.em-lab button { min-height: 44px; padding: .4rem .65rem; border: 1px solid var(--em-accent); border-radius: .35rem; background: var(--em-paper); color: var(--em-accent); font: 650 .69rem/1.5 var(--md-text-font-family); cursor: pointer; }
.em-lab button:hover:enabled { box-shadow: inset 0 0 0 1px currentColor; }
.em-lab button:disabled { cursor: default; opacity: .5; }
.em-lab :is(button,summary,select,input,textarea):focus-visible { outline: 3px solid var(--em-accent); outline-offset: 3px; }
.em-lab [tabindex="-1"]:focus { outline: none; }
.em-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .4rem; padding: .7rem 1.2rem; border-block: 1px solid var(--em-line); }
.em-steps button { display: flex; align-items: center; gap: .5rem; border-color: var(--em-line); text-align: left; }
.em-steps b { display: grid; width: 1.6rem; height: 1.6rem; flex: none; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 700 .64rem/1 var(--md-code-font-family); }
.em-steps button[aria-current] { color: var(--em-paper); background: var(--em-accent); border-color: var(--em-accent); }
.em-steps button[data-done="true"]:not([aria-current]) { background: var(--em-success-bg); color: var(--em-success); }
.em-coach { padding: .8rem 1.2rem; background: var(--em-surface); border-bottom: 1px solid var(--em-line); }
.em-eyebrow { display: block; color: var(--em-accent); font-size: .6rem; font-weight: 750; letter-spacing: .04em; }
.em-work { padding: 1rem 1.2rem; }
.em-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.em-source-grid>div { padding: .8rem; border: 1px solid var(--em-line); border-radius: .45rem; background: var(--em-surface); }
.em-source-grid strong { display: block; margin-top: .4rem; font-size: .8rem; }
.em-lab .em-source-grid p { font-size: .68rem; }
.em-lab code { color: var(--em-ink); background: var(--em-surface); white-space: normal; font-size: .66rem; }
.em-lab pre { padding: .75rem; margin: .7rem 0; border: 1px solid var(--em-line); border-radius: .3rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--em-surface); color: var(--em-ink); font: .65rem/1.7 var(--md-code-font-family); }
.em-lab pre.em-body { background: var(--em-paper); font-family: var(--md-text-font-family); font-size: .76rem; }
.md-content .md-typeset .em-lab details { margin: .7rem 0; padding: 0 .7rem; border: 1px solid var(--em-line); border-radius: .35rem; background: var(--em-paper); color: var(--em-ink); box-shadow: none; font-size: .7rem; }
.md-content .md-typeset .em-lab summary { position: relative; min-height: 44px; margin: 0; padding: .55rem 1rem .55rem 0; background: none; color: var(--em-accent); font: 650 .69rem/1.6 var(--md-text-font-family); list-style: none; cursor: pointer; }
.em-lab summary::-webkit-details-marker { display: none; }
.md-content .md-typeset .em-lab summary::before { display: none; }
.md-content .md-typeset .em-lab summary::after { content: ''; position: absolute; right: .1rem; top: 50%; width: .35rem; height: .35rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; background: none; mask: none; transform: translateY(-65%) rotate(135deg); }
.md-content .md-typeset .em-lab details[open]>summary::after { transform: translateY(-30%) rotate(-45deg); }
.em-lab .em-coach details { margin-bottom: 0; background: transparent; }
.em-lab details p { font-size: .68rem; }
.em-lab .em-checkpoints { display: grid; gap: .35rem; margin: .65rem 0; padding: 0; list-style: none; }
.em-lab .em-checkpoints li { display: flex; gap: .5rem; align-items: baseline; margin: 0; font-size: .7rem; }
.em-checkpoints li>span { flex: none; min-width: 2.6rem; padding: .08rem .35rem; border: 1px solid var(--em-line); border-radius: .25rem; color: var(--em-muted); background: var(--em-paper); font-size: .59rem; font-weight: 700; text-align: center; }
.em-checkpoints li[data-done="true"]>span { color: var(--em-success); background: var(--em-success-bg); border-color: var(--em-success); }
.em-lab .em-step-help { color: var(--em-muted); font-size: .67rem; }
.em-lab [data-em-guide] { margin-bottom: .3rem; }
.em-controls { display: grid; grid-template-columns: minmax(8rem,.6fr) minmax(0,1fr); gap: .7rem; margin-bottom: .7rem; }
.em-lab label { display: block; color: var(--em-ink); font-size: .7rem; font-weight: 650; }
.em-lab :is(input,select,textarea) { display: block; width: 100%; min-height: 44px; margin: .3rem 0 .65rem; padding: .45rem .6rem; border: 1px solid var(--em-line); border-radius: .3rem; color: var(--em-ink); background: var(--em-paper); font: .72rem/1.6 var(--md-text-font-family); }
.em-lab textarea { resize: vertical; }
.em-lab input::placeholder, .em-lab textarea::placeholder { color: var(--em-muted); opacity: 1; }
.em-desk { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.5fr); gap: .85rem; align-items: start; }
.em-messages { display: grid; gap: .5rem; }
.em-messages button { width: 100%; text-align: left; padding: .7rem; border-color: var(--em-line); }
.em-messages :is(strong,small,span) { display: block; }
.em-messages span { font-size: .58rem; color: var(--em-muted); }
.em-messages strong { margin: .3rem 0; color: var(--em-ink); font-size: .73rem; }
.em-messages small { font-size: .61rem; font-weight: 400; }
.em-messages button[aria-pressed="true"] { border-color: var(--em-accent); background: var(--em-surface); box-shadow: inset 3px 0 var(--em-accent); }
.em-inspector { min-width: 0; padding: .85rem; border: 1px solid var(--em-line); border-radius: .45rem; }
.em-views { display: flex; flex-wrap: wrap; gap: .3rem; margin: .7rem 0; padding-bottom: .65rem; border-bottom: 1px solid var(--em-line); }
.em-views button { font-size: .64rem; }
.em-views [aria-pressed="true"] { color: var(--em-paper); background: var(--em-accent); }
.em-lab dl { margin: .6rem 0; }
.em-lab dl>div { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: .55rem; padding: .4rem 0; border-bottom: 1px solid var(--em-line); }
.em-lab dt { color: var(--em-muted); font-size: .63rem; font-weight: 600; }
.em-lab dd { margin: 0; min-width: 0; font-size: .66rem; }
.em-lab :is(.em-observation,.em-alignment) { padding: .7rem; background: var(--em-surface); border-left: 3px solid var(--em-accent); font-size: .68rem; }
.em-attachment-label { padding: .5rem; border: 1px dashed var(--em-accent); border-radius: .3rem; font-size: .65rem; }
.em-target { padding: .85rem; border: 1px solid var(--em-line); border-radius: .45rem; background: var(--em-surface); }
.em-file-preview { padding: .8rem 0; }
.em-file-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.em-file-grid>article { display: flex; flex-direction: column; min-width: 0; padding: .7rem; border: 1px solid var(--em-line); border-radius: .4rem; }
.em-file-grid dl>div { grid-template-columns: minmax(0,1fr); gap: .12rem; }
.em-file-grid button { margin-top: auto; }
.em-file-grid dd { font: .63rem/1.65 var(--md-code-font-family); }
.em-board { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--em-line); }
.em-board-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.em-board-heading>span { color: var(--em-accent); font-size: .65rem; font-weight: 650; }
.em-lab .em-board ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; margin: .4rem 0; padding: 0; list-style: none; }
.em-lab .em-board li { position: relative; margin: 0; padding: .7rem; border: 1px solid var(--em-line); border-radius: .4rem; font-size: .65rem; }
.em-board li>span { display: block; color: var(--em-muted); font-size: .6rem; overflow-wrap: anywhere; }
.em-board strong { display: block; margin-top: .2rem; font-size: .71rem; }
.em-board li>p { font-size: .65rem; }
.em-board button { font-size: .61rem; }
.em-status, .em-comparison { padding: .65rem .8rem; border-radius: .35rem; background: var(--em-surface); color: var(--em-ink); }
.em-lab [data-state="success"], .em-finished { color: var(--em-success); background: var(--em-success-bg); }
.em-lab [data-state="attention"] { color: var(--em-alert); background: var(--em-alert-bg); }
.em-recap { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; margin-bottom: 1rem; }
.em-recap>div { padding: .6rem; border: 1px solid var(--em-line); border-radius: .3rem; background: var(--em-surface); }
.em-recap :is(strong,span) { display: block; overflow-wrap: anywhere; }
.em-recap span { color: var(--em-muted); font-size: .58rem; }
.em-recap strong { margin-top: .25rem; font-size: .7rem; }
.em-finished { padding: .8rem; margin-top: .8rem; border: 1px solid var(--em-success); border-radius: .4rem; }
.md-content .md-typeset .em-finished h4 { color: var(--em-success); }
.em-downloads { display: flex; flex-wrap: wrap; gap: .5rem; }
.em-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1.2rem; border-top: 1px solid var(--em-line); background: var(--em-surface); }
.em-toolbar .em-primary { color: var(--em-paper); background: var(--em-accent); }
.em-toolbar>span { color: var(--em-muted); font-size: .62rem; }
.md-content .md-typeset .em-toolbar .em-reset { margin: 0 0 0 auto; }
.em-reset p { max-width: 16rem; }
.em-fallback { padding: 1.2rem; }
.em-real>summary { font-weight: 650; }
[data-md-color-scheme="slate"] .em-lab { --em-ink: #e0edf8; --em-muted: #b9d0e4; --em-accent: #9dcfff; --em-line: #476782; --em-surface: #20364c; --em-paper: #172a3b; --em-success: #a3e8ba; --em-success-bg: #163b2c; --em-alert: #ffd49f; --em-alert-bg: #49321c; }
@media (max-width: 800px) {
  .em-desk { grid-template-columns: minmax(0,1fr); }
  .em-source-grid, .em-file-grid { grid-template-columns: minmax(0,1fr); }
  .em-lab .em-file-grid dl>div { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: .5rem; }
}
@media (max-width: 500px) {
  .em-case, .em-coach, .em-work { padding: .85rem; }
  .em-steps { grid-template-columns: repeat(2,minmax(0,1fr)); padding: .6rem .85rem; }
  .em-controls, .em-recap, .em-lab .em-board ol, .em-lab dl>div, .em-lab .em-file-grid dl>div { grid-template-columns: minmax(0,1fr); }
  .em-toolbar { padding: .7rem .85rem; }
  .em-toolbar>span { flex-basis: 100%; }
  .md-content .md-typeset .em-toolbar .em-reset { margin-left: 0; width: 100%; }
  .em-downloads>button { width: 100%; }
}
