/* The eMudhra keys: a security advisory kept in a lab notebook.
   Ink background, warm paper text, one amber signal; a rust tone only for
   "forged" and "blocked" states. Archivo (variable width) for structure and
   numbers, Source Serif 4 for reading, the system mono only for key material. */

.xp-emudhra {
  --ink: #0f1115;
  --panel: #15181d;
  --panel-2: #1b1f26;
  --paper: #ebe5d5;
  --dim: #aaa597;
  --faint: #6f6b62;
  --rule: rgba(235, 229, 213, 0.14);
  --rule-strong: rgba(235, 229, 213, 0.28);
  --amber: #f2bf4b;
  --amber-soft: rgba(242, 191, 75, 0.14);
  --amber-line: rgba(242, 191, 75, 0.45);
  --rust: #f0845e;
  --rust-soft: rgba(240, 132, 94, 0.14);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  display: block;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

.xp-emudhra *,
.xp-emudhra *::before,
.xp-emudhra *::after {
  box-sizing: border-box;
}

.xp-emudhra a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.xp-emudhra a:hover {
  text-decoration-thickness: 2px;
}

.xp-emudhra :focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.xp-emudhra code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--paper);
  background: var(--panel-2);
  padding: 0.08em 0.35em;
  border-radius: 3px;
}

.xp-emudhra p {
  margin: 0 0 1em;
}

.xp-emudhra .emx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- hero ---------------------------------------------------------------- */

.xp-emudhra .emx-hero {
  padding-top: 1.5rem;
}

.xp-emudhra .emx-advisory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 3.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-family: var(--display);
  font-stretch: 88%;
}

.xp-emudhra .emx-advisory > div {
  padding: 0.7rem 1rem 0.8rem;
  border-left: 1px solid var(--rule);
}

.xp-emudhra .emx-advisory > div:first-child {
  border-left: 0;
}

.xp-emudhra .emx-advisory dt {
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.01em;
}

.xp-emudhra .emx-advisory dd {
  margin: 0.1rem 0 0;
  font-size: 0.98rem;
  font-weight: 560;
  line-height: 1.3;
}

.xp-emudhra .emx-advisory__status {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--amber);
}

.xp-emudhra .emx-advisory__status::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
  transform: translateY(-0.05rem);
}

.xp-emudhra .emx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 3.5rem;
  align-items: start;
}

.xp-emudhra .emx-hero__title {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-stretch: 78%;
  font-weight: 720;
  font-size: clamp(2.6rem, 5.2vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.xp-emudhra .emx-hero__dek {
  max-width: 34rem;
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--paper);
}

/* The specimen: a page from the notebook, graph paper and all. */
.xp-emudhra .emx-specimen {
  margin: 0.4rem 0 0;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  overflow: hidden;
}

.xp-emudhra .emx-specimen__label {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--dim);
}

.xp-emudhra .emx-specimen__proper {
  padding: 1.15rem 1.35rem 1.25rem;
  border-bottom: 1px dashed var(--rule-strong);
  background: rgba(15, 17, 21, 0.72);
}

.xp-emudhra .emx-specimen__digits {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  letter-spacing: 0.09em;
  color: var(--paper);
  opacity: 0.82;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.xp-emudhra .emx-specimen__actual {
  position: relative;
  padding: 1.15rem 1.35rem 1.4rem;
}

.xp-emudhra .emx-specimen__four {
  position: relative;
  margin: 0.2rem 0 0.4rem;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(11rem, 19vw, 17.5rem);
  line-height: 0.78;
  letter-spacing: -0.04em;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.xp-emudhra .emx-specimen__four span {
  display: inline-block;
  padding: 0.04em 0.06em 0;
  transition: color 0.2s ease;
}

.xp-emudhra .emx-specimen__four.is-trying span {
  color: var(--faint);
}

.xp-emudhra .emx-specimen__four.is-found span {
  animation: xp-emudhra-found 0.9s ease-out;
}

@keyframes xp-emudhra-found {
  0% { text-shadow: 0 0 0 rgba(242, 191, 75, 0); transform: scale(0.96); }
  35% { text-shadow: 0 0 48px rgba(242, 191, 75, 0.55); transform: scale(1.02); }
  100% { text-shadow: 0 0 0 rgba(242, 191, 75, 0); transform: scale(1); }
}

.xp-emudhra .emx-specimen__tries {
  margin: 0;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.98rem;
  color: var(--paper);
}

.xp-emudhra .emx-specimen__tally {
  display: inline-flex;
  gap: 0.35rem;
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* The short version: a ruled notebook card. */
.xp-emudhra .emx-short {
  margin: 3.5rem 0 0;
  padding: 1.6rem 1.75rem 1.4rem;
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, var(--amber-soft), transparent 70%);
}

.xp-emudhra .emx-short__h {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--amber);
}

.xp-emudhra .emx-short__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp-emudhra .emx-short__list li {
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  font-size: 1.08rem;
  line-height: 1.5;
}

/* ---- video ----------------------------------------------------------------- */

.xp-emudhra .emx-video {
  margin: 4rem 0 0;
}

.xp-emudhra .emx-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.xp-emudhra .emx-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.xp-emudhra .emx-video__cap {
  margin: 0.7rem 0 0;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.9rem;
  color: var(--dim);
}

/* ---- sections ---------------------------------------------------------------- */

.xp-emudhra .emx-section {
  margin: 6rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule-strong);
}

.xp-emudhra .emx-h2 {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.xp-emudhra .emx-prose {
  max-width: 40rem;
}

.xp-emudhra .emx-prose strong,
.xp-emudhra .emx-notebook strong {
  font-weight: 620;
  color: var(--paper);
}

/* Notebook rows: prose on the left, definitions in the margin. */
.xp-emudhra .emx-notebook {
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 17rem);
  column-gap: 3.5rem;
  align-items: start;
}

.xp-emudhra .emx-notebook__p {
  grid-column: 1;
}

.xp-emudhra .emx-note {
  grid-column: 2;
  margin: 0.3rem 0 1.2rem;
  padding: 0.1rem 0 0.1rem 0.95rem;
  border-left: 1px solid var(--amber-line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--dim);
}

.xp-emudhra .emx-note__term {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--display);
  font-style: normal;
  font-stretch: 88%;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--amber);
}

/* ---- chain of trust ----------------------------------------------------------- */

.xp-emudhra .emx-chain {
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  gap: 2.5rem;
  margin: 1.5rem 0 3rem;
  padding: 2rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--panel);
}

.xp-emudhra .emx-chain__track {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.xp-emudhra .emx-node {
  position: relative;
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.95rem 1.1rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.xp-emudhra .emx-node:hover {
  border-color: var(--amber-line);
}

.xp-emudhra .emx-node__kind {
  font-family: var(--display);
  font-stretch: 88%;
  font-size: 0.8rem;
  color: var(--dim);
}

.xp-emudhra .emx-node__name {
  font-family: var(--display);
  font-stretch: 82%;
  font-weight: 650;
  font-size: 1.22rem;
  line-height: 1.2;
}

.xp-emudhra .emx-node__meta {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--dim);
}

.xp-emudhra .emx-node__meta b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--paper);
}

.xp-emudhra .emx-node__badge {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.xp-emudhra .emx-node__badge:not(:empty) {
  opacity: 1;
  transform: none;
}

.xp-emudhra .emx-node[data-state="active"] {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.xp-emudhra .emx-node[data-state="ok"] .emx-node__badge {
  background: var(--amber-soft);
  color: var(--amber);
}

.xp-emudhra .emx-node[data-state="ok"] {
  border-color: var(--amber-line);
}

.xp-emudhra .emx-node[data-state="forged"],
.xp-emudhra .emx-node[data-state="blocked"] {
  border-color: var(--rust);
  background: linear-gradient(0deg, var(--rust-soft), var(--rust-soft)), var(--ink);
}

.xp-emudhra .emx-node[data-state="forged"] .emx-node__badge,
.xp-emudhra .emx-node[data-state="blocked"] .emx-node__badge {
  background: var(--rust-soft);
  color: var(--rust);
}

.xp-emudhra .emx-node[data-state="blocked"] .emx-node__name {
  text-decoration: line-through;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
}

.xp-emudhra .emx-node[data-state="rejected"] {
  opacity: 0.55;
}

.xp-emudhra .emx-node[data-state="rejected"] .emx-node__badge {
  background: var(--rust-soft);
  color: var(--rust);
}

.xp-emudhra .emx-node__meta b.is-weak {
  color: var(--rust);
  font-size: 1.05em;
}

.xp-emudhra .emx-link {
  position: relative;
  align-self: flex-start;
  display: flex;
  align-items: center;
  height: 2.6rem;
  margin-left: 1.6rem;
  padding-left: 1.1rem;
  border-left: 2px dashed var(--rule-strong);
  font-family: var(--display);
  font-stretch: 88%;
  font-size: 0.8rem;
  color: var(--faint);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.xp-emudhra .emx-link[data-state="ok"] {
  border-left: 2px solid var(--amber);
  color: var(--amber);
}

.xp-emudhra .emx-link[data-state="broken"] {
  border-left: 2px dashed var(--rust);
  color: var(--rust);
}

.xp-emudhra .emx-chain__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.xp-emudhra .emx-chain__steps {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.xp-emudhra .emx-chain__steps button {
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  font-family: var(--display);
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.xp-emudhra .emx-chain__steps button:hover {
  border-color: var(--amber-line);
  color: var(--paper);
}

.xp-emudhra .emx-chain__steps button[aria-current="step"] {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--ink);
}

.xp-emudhra .emx-chain__steps button.is-done {
  border-color: var(--amber-line);
  color: var(--amber);
}

.xp-emudhra .emx-chain__copy {
  flex: 1;
  min-height: 11rem;
}

.xp-emudhra .emx-chain__copy h3 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-stretch: 82%;
  font-weight: 680;
  font-size: 1.55rem;
  line-height: 1.15;
}

.xp-emudhra .emx-chain__copy p {
  max-width: 34rem;
  margin: 0;
  font-size: 1.08rem;
}

.xp-emudhra .emx-chain__nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---- buttons ---------------------------------------------------------------- */

.xp-emudhra .emx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--amber);
  border-radius: 5px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 88%;
  font-weight: 650;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.xp-emudhra .emx-btn:hover {
  background: #f7cf72;
}

.xp-emudhra .emx-btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--rule-strong);
}

.xp-emudhra .emx-btn--ghost:hover {
  background: var(--panel-2);
}

.xp-emudhra .emx-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---- the key search ------------------------------------------------------------ */

.xp-emudhra .emx-lab .emx-prose {
  margin-bottom: 1rem;
}

.xp-emudhra .emx-guess {
  margin-top: 1.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.xp-emudhra .emx-guess__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 1.4rem 1.75rem;
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
}

.xp-emudhra .emx-guess__counter {
  display: grid;
  min-width: 8.5rem;
}

.xp-emudhra .emx-guess__counter-label,
.xp-emudhra .emx-guess__k {
  font-family: var(--display);
  font-stretch: 88%;
  font-size: 0.82rem;
  color: var(--dim);
}

.xp-emudhra .emx-guess__d {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 4.6rem;
  line-height: 0.9;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.xp-emudhra .emx-guess__readout p {
  margin: 0;
}

.xp-emudhra .emx-guess__readout code {
  display: block;
  margin-top: 0.2rem;
  padding: 0;
  background: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-emudhra .emx-guess__status {
  margin-top: 0.55rem !important;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 1rem;
  color: var(--paper);
}

.xp-emudhra .emx-guess__controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.xp-emudhra .emx-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
}

.xp-emudhra .emx-toggle button {
  flex: 1;
  padding: 0.38rem 0.75rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--dim);
  font-family: var(--display);
  font-stretch: 88%;
  font-size: 0.88rem;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
}

.xp-emudhra .emx-toggle button[aria-pressed="true"] {
  background: var(--panel-2);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

.xp-emudhra .emx-guess__body {
  display: grid;
  grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
  gap: 2rem;
  padding: 1.75rem;
}

.xp-emudhra .emx-grid {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  gap: 3px;
  align-content: start;
}

.xp-emudhra .emx-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(235, 229, 213, 0.06);
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 700;
  font-size: 0.62rem;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-emudhra .emx-cell.is-tried {
  background: rgba(235, 229, 213, 0.2);
}

.xp-emudhra .emx-cell.is-now {
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--amber);
  z-index: 1;
}

.xp-emudhra .emx-cell.is-hit {
  background: var(--amber);
  box-shadow: 0 0 14px rgba(242, 191, 75, 0.45);
}

.xp-emudhra .emx-grid-legend {
  grid-column: 1 / -1;
  margin: 0.6rem 0 0;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.82rem;
  color: var(--dim);
}

.xp-emudhra .emx-keys {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: start;
}

.xp-emudhra .emx-key {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--ink);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.xp-emudhra .emx-key__name {
  display: block;
  font-family: var(--display);
  font-stretch: 82%;
  font-weight: 640;
  font-size: 0.98rem;
  line-height: 1.2;
}

.xp-emudhra .emx-key__meta {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.76rem;
  color: var(--dim);
}

.xp-emudhra .emx-key__pub {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-emudhra .emx-key__val {
  min-width: 3.4rem;
  text-align: right;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.xp-emudhra .emx-key.is-found {
  border-color: var(--amber-line);
  background: linear-gradient(90deg, transparent, var(--amber-soft));
}

.xp-emudhra .emx-key.is-found .emx-key__val {
  color: var(--amber);
}

.xp-emudhra .emx-key.is-fresh {
  animation: xp-emudhra-keyhit 0.7s ease-out;
}

@keyframes xp-emudhra-keyhit {
  0% { box-shadow: 0 0 0 0 rgba(242, 191, 75, 0.6); }
  100% { box-shadow: 0 0 0 10px rgba(242, 191, 75, 0); }
}

.xp-emudhra .emx-guess__foot {
  margin: 0;
  padding: 0.9rem 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-stretch: 90%;
  font-size: 0.9rem;
  color: var(--dim);
}

/* ---- reactions ------------------------------------------------------------------- */

.xp-emudhra .emx-reacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.xp-emudhra .emx-react {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0;
  padding: 1.4rem 1.4rem 1.25rem;
  border-top: 2px solid var(--amber);
  background: var(--panel);
}

.xp-emudhra .emx-react blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.32rem;
  line-height: 1.4;
}

.xp-emudhra .emx-react figcaption {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--dim);
}

.xp-emudhra .emx-react figcaption b {
  color: var(--paper);
  font-weight: 620;
}

.xp-emudhra .emx-react__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
}

.xp-emudhra .emx-aside-line {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  font-size: 1rem;
  color: var(--dim);
}

/* ---- timeline --------------------------------------------------------------------- */

.xp-emudhra .emx-timeline {
  position: relative;
  max-width: 50rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp-emudhra .emx-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0 0 1.4rem;
}

.xp-emudhra .emx-timeline li::before {
  content: "";
  position: absolute;
  left: 13.25rem;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  background: var(--ink);
  z-index: 1;
}

.xp-emudhra .emx-timeline li::after {
  content: "";
  position: absolute;
  left: calc(13.25rem + 4px);
  top: 0.9rem;
  bottom: -0.55rem;
  width: 1px;
  background: var(--rule-strong);
}

.xp-emudhra .emx-timeline li:last-child::after {
  display: none;
}

.xp-emudhra .emx-timeline time {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 620;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--amber);
  text-align: right;
}

.xp-emudhra .emx-timeline p {
  margin: 0;
  padding-left: 1.4rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ---- what to do ---------------------------------------------------------------------- */

.xp-emudhra .emx-todo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.xp-emudhra .emx-todo__col {
  padding: 1.4rem 1.5rem 0.6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
}

.xp-emudhra .emx-todo__col:first-child {
  border-color: var(--amber-line);
  background: var(--amber-soft);
}

.xp-emudhra .emx-todo h3 {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 680;
  font-size: 1.25rem;
}

.xp-emudhra .emx-todo ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp-emudhra .emx-todo li {
  position: relative;
  margin: 0 0 0.85rem;
  padding-left: 1.4rem;
  font-size: 1.04rem;
  line-height: 1.5;
}

.xp-emudhra .emx-todo li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 1.5px solid var(--amber);
  border-radius: 2px;
}

/* ---- questions ----------------------------------------------------------------------- */

.xp-emudhra .emx-faq {
  max-width: 46rem;
  border-top: 1px solid var(--rule);
}

.xp-emudhra .emx-faq details {
  border-bottom: 1px solid var(--rule);
}

.xp-emudhra .emx-faq summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 620;
  font-size: 1.18rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

.xp-emudhra .emx-faq summary::-webkit-details-marker {
  display: none;
}

.xp-emudhra .emx-faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.85rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--amber);
  transition: transform 0.2s ease;
}

.xp-emudhra .emx-faq details[open] summary::after {
  transform: rotate(45deg);
}

.xp-emudhra .emx-faq summary:hover {
  color: var(--amber);
}

.xp-emudhra .emx-faq details p {
  max-width: 40rem;
  margin: 0 0 1.2rem;
  color: var(--paper);
  opacity: 0.92;
}

/* ---- updates and sources --------------------------------------------------------------- */

.xp-emudhra .emx-updates {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 44rem;
}

.xp-emudhra .emx-updates li {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 1.5rem;
}

.xp-emudhra .emx-updates time {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 620;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--amber);
}

.xp-emudhra .emx-updates p {
  margin: 0;
}

.xp-emudhra .emx-sources {
  max-width: 48rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--dim);
}

.xp-emudhra .emx-sources li {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--rule-strong);
}

/* ---- responsive -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .xp-emudhra .emx-notebook {
    grid-template-columns: minmax(0, 40rem);
  }

  .xp-emudhra .emx-note {
    grid-column: 1;
    margin: -0.2rem 0 1.4rem;
  }

  .xp-emudhra .emx-guess__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .xp-emudhra .emx-guess__controls {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
  }

  .xp-emudhra .emx-guess__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-emudhra .emx-grid {
    max-width: 34rem;
  }
}

@media (max-width: 960px) {
  .xp-emudhra .emx-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .xp-emudhra .emx-chain {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .xp-emudhra .emx-reacts {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-emudhra .emx-advisory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .xp-emudhra .emx-advisory > div:nth-child(3) {
    border-left: 0;
  }

  .xp-emudhra .emx-advisory > div:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 640px) {
  .xp-emudhra {
    padding: 0 1rem;
    font-size: 1.06rem;
  }

  .xp-emudhra .emx-hero {
    padding-top: 0.5rem;
  }

  .xp-emudhra .emx-advisory {
    margin-bottom: 2.25rem;
  }

  .xp-emudhra .emx-advisory > div {
    padding: 0.6rem 0.75rem 0.65rem;
  }

  .xp-emudhra .emx-advisory dd {
    font-size: 0.9rem;
  }

  .xp-emudhra .emx-hero__title {
    font-size: 2.65rem;
  }

  .xp-emudhra .emx-hero__dek {
    font-size: 1.14rem;
  }

  .xp-emudhra .emx-specimen__proper,
  .xp-emudhra .emx-specimen__actual {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .xp-emudhra .emx-specimen__digits {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .xp-emudhra .emx-specimen__four {
    font-size: 10.5rem;
  }

  .xp-emudhra .emx-short {
    margin-top: 2.5rem;
    padding: 1.25rem 1.1rem 1rem;
  }

  .xp-emudhra .emx-short__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .xp-emudhra .emx-section {
    margin-top: 4.25rem;
  }

  .xp-emudhra .emx-chain {
    padding: 1.1rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .xp-emudhra .emx-node__name {
    font-size: 1.1rem;
    padding-right: 5.5rem;
  }

  .xp-emudhra .emx-chain__copy {
    min-height: 13.5rem;
  }

  .xp-emudhra .emx-chain__copy h3 {
    font-size: 1.32rem;
  }

  .xp-emudhra .emx-chain__nav .emx-btn {
    flex: 1;
  }

  .xp-emudhra .emx-guess__head {
    gap: 1rem 1.25rem;
    padding: 1.1rem;
  }

  .xp-emudhra .emx-guess__counter {
    min-width: 5.5rem;
  }

  .xp-emudhra .emx-guess__d {
    font-size: 3.6rem;
  }

  .xp-emudhra .emx-guess__controls {
    flex-direction: column;
  }

  .xp-emudhra .emx-guess__body {
    padding: 1.1rem;
    gap: 1.5rem;
  }

  .xp-emudhra .emx-grid {
    grid-template-columns: repeat(15, minmax(0, 1fr));
    gap: 2px;
  }

  .xp-emudhra .emx-cell {
    font-size: 0.5rem;
  }

  .xp-emudhra .emx-keys {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-emudhra .emx-guess__foot {
    padding: 0.85rem 1.1rem;
  }

  .xp-emudhra .emx-react blockquote {
    font-size: 1.2rem;
  }

  .xp-emudhra .emx-timeline li,
  .xp-emudhra .emx-updates li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
    padding-left: 1.6rem;
  }

  .xp-emudhra .emx-timeline li::before {
    left: 0;
    top: 0.45rem;
  }

  .xp-emudhra .emx-timeline li::after {
    left: 4px;
    top: 0.8rem;
    bottom: -0.45rem;
  }

  .xp-emudhra .emx-timeline time {
    text-align: left;
  }

  .xp-emudhra .emx-timeline p {
    padding-left: 0;
  }

  .xp-emudhra .emx-updates li {
    padding-left: 0;
  }

  .xp-emudhra .emx-todo {
    grid-template-columns: minmax(0, 1fr);
  }

  .xp-emudhra .emx-todo__col {
    padding: 1.15rem 1.1rem 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xp-emudhra *,
  .xp-emudhra *::before,
  .xp-emudhra *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- second pass: hero order, specimen log, video, case file, map ---------- */

.xp-emudhra .emx-hero__grid {
  grid-template-areas:
    "title spec"
    "dek spec";
  grid-template-rows: auto 1fr;
  row-gap: 0;
}

.xp-emudhra .emx-hero__title {
  grid-area: title;
}

.xp-emudhra .emx-hero__dek {
  grid-area: dek;
}

.xp-emudhra .emx-specimen {
  grid-area: spec;
}

.xp-emudhra .emx-specimen__row {
  display: flex;
  align-items: flex-end;
  gap: 1.75rem;
}

.xp-emudhra .emx-specimen__log {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--dim);
}

.xp-emudhra .emx-specimen__log li {
  transition: opacity 0.2s ease;
}

.xp-emudhra .emx-specimen__log li.is-match {
  color: var(--amber);
  font-weight: 600;
}

.xp-emudhra .emx-specimen__log li.is-pending {
  opacity: 0;
}

.xp-emudhra .emx-specimen__tries {
  max-width: 30rem;
  line-height: 1.45;
}

.xp-emudhra .emx-video__layout {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}

.xp-emudhra .emx-video__cap {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--dim);
}

.xp-emudhra .emx-video__cap p:last-child {
  margin-bottom: 0;
}

.xp-emudhra .emx-video__lead {
  font-family: var(--display);
  font-stretch: 82%;
  font-weight: 680;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--paper);
}

.xp-emudhra .emx-split {
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 20rem);
  gap: 3.5rem;
  align-items: start;
}

.xp-emudhra .emx-casefile {
  position: sticky;
  top: 1.5rem;
  padding: 1.25rem 1.35rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background-color: var(--panel);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 2.1rem;
  background-position: 0 3.35rem;
}

.xp-emudhra .emx-casefile__h {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 680;
  font-size: 1.1rem;
  color: var(--amber);
}

.xp-emudhra .emx-casefile dl {
  margin: 0;
}

.xp-emudhra .emx-casefile dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  height: 2.1rem;
  font-family: var(--display);
  font-stretch: 90%;
}

.xp-emudhra .emx-casefile dt {
  font-size: 0.92rem;
  color: var(--dim);
  line-height: 2.1rem;
}

.xp-emudhra .emx-casefile dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 620;
  line-height: 2.1rem;
  font-variant-numeric: tabular-nums;
}

.xp-emudhra .emx-casefile__note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--dim);
}

.xp-emudhra .emx-guess__map {
  min-width: 0;
}

.xp-emudhra .emx-todo {
  align-items: start;
}

.xp-emudhra .emx-updates li {
  grid-template-columns: 10rem minmax(0, 1fr);
}

@media (max-width: 1100px) {
  .xp-emudhra .emx-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .xp-emudhra .emx-casefile {
    position: static;
    max-width: 30rem;
  }
}

@media (max-width: 960px) {
  .xp-emudhra .emx-hero__grid {
    grid-template-areas:
      "title"
      "spec"
      "dek";
    grid-template-rows: auto;
    row-gap: 2rem;
  }

  .xp-emudhra .emx-hero__title {
    margin-bottom: 0;
  }

  .xp-emudhra .emx-video__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .xp-emudhra .emx-hero__grid {
    row-gap: 1.5rem;
  }

  .xp-emudhra .emx-specimen__row {
    gap: 1.1rem;
  }

  .xp-emudhra .emx-specimen__four {
    font-size: 8.5rem;
  }

  .xp-emudhra .emx-specimen__log {
    font-size: 0.76rem;
    margin-bottom: 0.6rem;
  }

  .xp-emudhra .emx-video__lead {
    font-size: 1.2rem;
  }

  .xp-emudhra .emx-keys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .xp-emudhra .emx-key {
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
  }

  .xp-emudhra .emx-key__name {
    font-size: 0.86rem;
  }

  .xp-emudhra .emx-key__meta {
    font-size: 0.7rem;
  }

  .xp-emudhra .emx-key__pub {
    display: none;
  }

  .xp-emudhra .emx-key__val {
    min-width: 2.2rem;
    font-size: 1.55rem;
  }

  .xp-emudhra .emx-guess__k {
    display: block;
    line-height: 1.3;
  }
}

/* ---- third pass: case file rules, run printout, phone key names ------------- */

.xp-emudhra .emx-casefile {
  background-image: none;
}

.xp-emudhra .emx-casefile dl > div {
  border-bottom: 1px solid var(--rule);
}

.xp-emudhra .emx-casefile dl > div:first-child {
  border-top: 1px solid var(--rule);
}

.xp-emudhra .emx-printout {
  margin: 0.3rem 0 0;
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 22px 22px;
}

.xp-emudhra .emx-printout figcaption {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 680;
  font-size: 1.02rem;
  color: var(--amber);
}

.xp-emudhra .emx-printout table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.4;
}

.xp-emudhra .emx-printout th {
  padding: 0 0 0.35rem;
  font-family: var(--display);
  font-stretch: 90%;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--dim);
  text-align: left;
  border-bottom: 1px solid var(--rule-strong);
}

.xp-emudhra .emx-printout td {
  padding: 0.36rem 0;
  background: rgba(21, 24, 29, 0.85);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

.xp-emudhra .emx-printout th:nth-child(n + 2),
.xp-emudhra .emx-printout td:nth-child(n + 2) {
  text-align: right;
  padding-left: 0.75rem;
}

.xp-emudhra .emx-printout td:nth-child(2) {
  color: var(--amber);
  font-weight: 600;
}

.xp-emudhra .emx-printout td:nth-child(3) {
  color: var(--dim);
}

.xp-emudhra .emx-printout tfoot td {
  border-bottom: 0;
  padding-top: 0.5rem;
  color: var(--paper) !important;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .xp-emudhra .emx-printout {
    max-width: 30rem;
  }
}

@media (max-width: 640px) {
  .xp-emudhra .emx-keys {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .xp-emudhra .emx-key {
    padding: 0.45rem 0.75rem;
  }

  .xp-emudhra .emx-key > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.6rem;
  }

  .xp-emudhra .emx-key__name {
    font-size: 0.92rem;
  }

  .xp-emudhra .emx-key__meta {
    margin-top: 0;
  }

  .xp-emudhra .emx-printout {
    padding: 0.95rem 0.9rem 0.85rem;
  }

  .xp-emudhra .emx-printout table {
    font-size: 0.74rem;
  }
}
