/* DFKPS — Dynamic Focus Knowledge Page System
   EngEthics branded toolbox element
   Brand: logo compass/gear blue + site blues (engethics.org)
   Focus stage still follows David JP Phillips: one idea, low visual noise */

:root {
  /* —— EngEthics brand tokens (logo + www.engethics.org) —— */
  --ee-blue: #385888;           /* logo gear / compass fill */
  --ee-blue-mid: #2f4f7a;       /* deeper logo blue */
  --ee-navy: #242666;           /* site navy accent */
  --ee-ink: #0d141a;            /* site body ink */
  --ee-azure: #357df9;          /* site azure CTA blue */
  --ee-azure-dark: #265ab2;     /* site azure dark */
  --ee-indigo: #686df3;         /* site indigo highlight */
  --ee-silver: #b8b8b8;         /* logo ring silver */
  --ee-silver-soft: #c8cdd6;    /* soft silver/blue-grey */
  --ee-mist: #e8eef6;           /* light panel mist */
  --ee-sky: #e3ebf9;            /* azure-light from site tokens */
  --ee-muted-text: #56585e;     /* site grey body */

  /* —— App surfaces (toolbox shell) —— */
  --bg: #070b12;
  --bg-app: #0a1018;
  --fg: #f4f7fb;
  --muted: #8b95a8;
  --muted-soft: #5c6678;
  --accent: var(--ee-indigo);       /* last-message emphasis (was purple) */
  --accent-soft: #8b90f7;
  --panel: #111a28;
  --panel-border: #243247;
  --btn: #1a2740;
  --btn-hover: #243556;
  --danger: #b53d5c;
  --ok: #008361;                    /* site success green */
  --focus-size: clamp(1.75rem, 4.5vw, 3rem);
  --title-size: clamp(1rem, 2.2vw, 1.5rem);
  --archive-size: 0.65rem;
  --font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --radius: 0.75rem;
  --brand-glow: rgba(56, 88, 136, 0.35);
  /* Presenter nav: raise Previous/Next by 2× button height (iOS Safari chrome) */
  --presenter-nav-btn-h: 2.5rem;
  --presenter-nav-raise: calc(var(--presenter-nav-btn-h) * 2);
  --presenter-nav-bottom: calc(
    1.25rem + var(--presenter-nav-raise) + env(safe-area-inset-bottom, 0px)
  );
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
}

a {
  color: var(--ee-azure);
}

/* —— Shared brand chrome —— */
.ee-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.ee-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.ee-lockup img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex-shrink: 0;
}

.ee-lockup .ee-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.ee-lockup .ee-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.ee-lockup .ee-tagline {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.ee-lockup.compact img {
  width: 2.25rem;
  height: 2.25rem;
}

.ee-link-site {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--panel-border);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ee-link-site:hover {
  color: var(--fg);
  border-color: var(--ee-blue);
  background: rgba(56, 88, 136, 0.2);
}

.ee-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--panel-border);
  color: var(--muted-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.ee-footer .tool-revision,
.tool-revision {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ee-silver-soft);
  letter-spacing: 0.02em;
}

.ee-footer a {
  color: var(--ee-silver-soft);
  text-decoration: none;
}

.ee-footer a:hover {
  color: var(--ee-azure);
}

/* —— Presenter —— */
body.presenter {
  overflow: hidden;
  user-select: none;
  background: #000;
}

.presenter-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* subtle EngEthics blue vignette — still mostly black for focus */
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(56, 88, 136, 0.12) 0%, transparent 60%),
    #000;
}

/* Logo top-right → active return to main EngEthics site */
.presenter-logo-link {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(125, 211, 252, 0.15);
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  opacity: 0.72;
  cursor: pointer;
  pointer-events: auto;
}
.presenter-logo-link:hover,
.presenter-logo-link:focus-visible {
  opacity: 1;
  background: rgba(125, 211, 252, 0.14);
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.35);
  transform: scale(1.05);
  outline: none;
}
.presenter-logo {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

body.presenter.clean-ui:not(:hover):not(:focus-within) .presenter-logo-link {
  opacity: 0.38;
}
body.presenter.clean-ui:not(:hover):not(:focus-within) .presenter-logo-link:focus-visible {
  opacity: 1;
}

.presenter-brand-strip {
  position: absolute;
  bottom: 0.55rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ee-silver);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  z-index: 3;
  pointer-events: none;
}

.presenter-brand-strip img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  opacity: 0.85;
}

/* Tool revision always visible at bottom centre (presenter) */
.presenter-tool-revision {
  position: absolute;
  bottom: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--ee-silver);
  opacity: 0.7;
  pointer-events: none;
  white-space: nowrap;
}

.presenter-deck-revision {
  position: absolute;
  bottom: 0.45rem;
  right: 1.25rem;
  z-index: 4;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.65rem;
  color: var(--ee-blue);
  opacity: 0.75;
  pointer-events: none;
  max-width: min(40vw, 18rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep tool revision visible even in clean-ui; deck ref can fade with chrome */
body.presenter.clean-ui .presenter-tool-revision {
  opacity: 0.55;
}

body.presenter.clean-ui #nav,
body.presenter.clean-ui #progress,
body.presenter.clean-ui .presenter-brand-strip,
body.presenter.clean-ui .presenter-deck-revision {
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.presenter.clean-ui:hover #nav,
body.presenter.clean-ui:hover #progress,
body.presenter.clean-ui:hover .presenter-brand-strip,
body.presenter.clean-ui:hover .presenter-deck-revision,
body.presenter.clean-ui:focus-within #nav,
body.presenter.clean-ui:focus-within #progress,
body.presenter.clean-ui:focus-within .presenter-brand-strip,
body.presenter.clean-ui:focus-within .presenter-deck-revision {
  opacity: 1;
}

/* Touch / no-hover: keep nav always usable (hover never sticks on iPhone) */
@media (hover: none), (pointer: coarse) {
  body.presenter.clean-ui #nav,
  body.presenter.clean-ui #progress {
    opacity: 1;
  }
  body.presenter.clean-ui .presenter-brand-strip,
  body.presenter.clean-ui .presenter-deck-revision {
    opacity: 0.55;
  }
  body.presenter.clean-ui .dfkps-chrome-host--float {
    opacity: 0.85;
  }
}

#title-bar {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ee-silver);
  font-size: var(--title-size);
  text-align: center;
  max-width: min(78%, 40rem);
  letter-spacing: 0.02em;
  z-index: 2;
}

#archive {
  position: absolute;
  top: 3.25rem;
  left: 0.75rem;
  right: auto;
  max-width: min(42vw, 22rem);
  max-height: 55vh;
  overflow: hidden;
  color: var(--ee-silver);
  font-size: var(--archive-size);
  line-height: 1.35;
  text-align: left;
  opacity: 0.85;
  z-index: 1;
}

#archive p {
  margin: 0.2rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#focus {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(92vw, 56rem);
  padding: 4.5rem 1.5rem 5.5rem;
  text-align: center;
  font-size: var(--focus-size);
  font-weight: 600;
  line-height: 1.25;
  z-index: 2;
  color: #fff;
}

#focus .focus-sentence {
  max-width: min(90vw, 48rem);
  margin: 0;
  font-size: var(--focus-size);
  font-weight: 600;
  line-height: 1.28;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* >4 words: shrink type (≤80%) so wraps stay readable, less congestion */
#focus .focus-sentence.focus-text-compact,
#focus .closing-message.focus-text-compact,
.presentation-sentence.focus-text-compact {
  font-size: calc(var(--focus-size) * 0.8);
  line-height: 1.32;
  max-width: min(88vw, 42rem);
  letter-spacing: -0.01em;
}
#focus .focus-sentence.focus-text-dense,
#focus .closing-message.focus-text-dense,
.presentation-sentence.focus-text-dense {
  font-size: calc(var(--focus-size) * 0.68);
  line-height: 1.34;
  max-width: min(86vw, 38rem);
  font-weight: 550;
}
#focus .focus-sentence.focus-text-xdense,
#focus .closing-message.focus-text-xdense,
.presentation-sentence.focus-text-xdense {
  font-size: calc(var(--focus-size) * 0.58);
  line-height: 1.36;
  max-width: min(84vw, 34rem);
  font-weight: 500;
}

#focus.is-closing {
  gap: 1.5rem;
}

#focus.is-final-message,
#focus .focus-sentence.is-final-message {
  color: var(--ee-indigo);
}

/* Key words (phrases > 4 words): sky-blue emphasis on the focus stage */
#focus .key-word,
.presentation-sentence .key-word {
  color: #7dd3fc; /* sky blue — readable on near-black presenter */
  font-weight: 700;
  text-shadow: 0 0 18px rgba(125, 211, 252, 0.35);
}
#focus.is-final-message .key-word,
#focus .focus-sentence.is-final-message .key-word {
  color: #a5e4ff;
}

#focus .closing-message {
  color: var(--accent-soft);
  font-size: var(--focus-size);
  font-weight: 600;
  max-width: min(90vw, 48rem);
  text-wrap: balance;
  overflow-wrap: break-word;
}

#focus .qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

#focus .qr-wrap .qr-frame {
  position: relative;
  width: min(42vw, 14rem);
  height: min(42vw, 14rem);
  background: #fff;
  padding: 0.45rem;
  border-radius: 0.45rem;
  box-sizing: border-box;
}

#focus .qr-wrap .qr-img,
#focus .qr-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 0.2rem;
}

#focus .qr-wrap .qr-center-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24%;
  height: 24%;
  object-fit: cover;
  border-radius: 12px;
  background: #0b1220;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(125, 211, 252, 0.35), 0 4px 14px rgba(0, 0, 0, 0.28);
  padding: 2px;
  z-index: 2;
}

#focus .qr-wrap img,
#focus .qr-wrap canvas {
  /* legacy direct img (no frame) */
  max-width: min(42vw, 14rem);
  max-height: min(42vw, 14rem);
  background: #fff;
  border-radius: 0.35rem;
  box-shadow: 0 0 0 3px rgba(56, 88, 136, 0.45);
}

#focus .qr-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ee-silver);
}

#focus .qr-url,
#focus a.qr-url-link {
  font-size: 0.9rem;
  color: #7dd3fc;
  word-break: break-all;
  max-width: min(90vw, 36rem);
  text-align: center;
  line-height: 1.35;
  margin-top: 0.15rem;
}
#focus a.qr-url-link {
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
#focus a.qr-url-link:hover,
#focus a.qr-url-link:focus-visible {
  color: #a5e4ff;
  text-shadow: 0 0 12px rgba(125, 211, 252, 0.35);
  outline: none;
}
#focus .qr-frame.qr-frame-clickable {
  cursor: pointer;
}
#focus .qr-frame.qr-frame-clickable:hover {
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.45);
}
#focus .qr-frame.qr-frame-clickable:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 3px;
}

#end-label {
  position: absolute;
  /* Sit above raised Previous/Next (nav bottom + ~1× btn height clearance) */
  bottom: calc(
    var(--presenter-nav-bottom, 6.25rem) + var(--presenter-nav-btn-h, 2.5rem) + 0.35rem
  );
  color: var(--ee-silver);
  font-size: var(--title-size);
  z-index: 2;
}

/* Previous / Next — bottom uses --presenter-nav-bottom (raised 2× btn height) */

#nav {
  position: absolute;
  bottom: var(--presenter-nav-bottom);
  display: flex;
  gap: 1rem;
  align-items: center;
  z-index: 3;
  /* Keep clear of home indicator / browser UI */
  padding-bottom: 0;
}

#nav .btn {
  min-height: var(--presenter-nav-btn-h);
  min-width: 5.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#progress {
  position: absolute;
  bottom: calc(var(--presenter-nav-bottom) + 0.2rem);
  right: 1.25rem;
  color: var(--ee-blue);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  z-index: 3;
}

/* Swipe-enabled stage: allow horizontal pan without fighting vertical scroll */
body.presenter.swipe-on .presenter-stage {
  touch-action: pan-y;
}

/* File pickers: not display:none — some browsers block .click() on fully hidden inputs */
.file-input-hidden {
  position: fixed;
  left: 0;
  top: 0;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  background: var(--btn);
  color: var(--fg);
  border: 1px solid transparent;
  border-radius: 0.4rem;
  transition: background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.btn:hover:not(:disabled) {
  background: var(--btn-hover);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(180deg, var(--ee-blue) 0%, var(--ee-blue-mid) 100%);
  border-color: #4a6fa0;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #456ea0 0%, var(--ee-blue) 100%);
}

.btn.ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--muted);
}

.btn.ghost:hover:not(:disabled) {
  color: var(--fg);
  border-color: var(--ee-blue);
  background: rgba(56, 88, 136, 0.15);
}

.btn.danger {
  background: var(--danger);
}

.btn.ok {
  background: var(--ok);
  color: #fff;
}

.btn.azure {
  background: var(--ee-azure);
  color: #fff;
}

.btn.azure:hover:not(:disabled) {
  background: var(--ee-azure-dark);
}

/* —— Hub & Editor shells —— */
body.app {
  min-height: 100%;
  background:
    radial-gradient(ellipse 90% 50% at 10% -10%, rgba(56, 88, 136, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(104, 109, 243, 0.12) 0%, transparent 50%),
    var(--bg-app);
  color: var(--fg);
}

.app-shell {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.app-shell.wide {
  max-width: 64rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff 0%, var(--ee-silver-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.55;
}

.brand .tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ee-silver-soft);
  border: 1px solid #3a4f6e;
  background: rgba(56, 88, 136, 0.18);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.card h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  flex: 1;
}

.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hint {
  background: linear-gradient(90deg, rgba(56, 88, 136, 0.22) 0%, rgba(17, 26, 40, 0.9) 40%);
  border-left: 3px solid var(--ee-blue);
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 0 0.4rem 0.4rem 0;
}

.hint code {
  color: var(--ee-silver-soft);
  font-size: 0.85em;
}

/* —— Editor —— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.toolbar .spacer {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field textarea {
  width: 100%;
  background: #0a121c;
  border: 1px solid var(--panel-border);
  color: var(--fg);
  border-radius: 0.4rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ee-blue);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.field .help {
  font-size: 0.8rem;
  color: var(--muted-soft);
}

.field .help.error-help {
  color: #e07070;
}

.field .help.ok-help {
  color: #7dcea0;
}

.field input.invalid {
  border-color: #e07070;
  box-shadow: 0 0 0 3px rgba(224, 112, 112, 0.2);
}

.filename-preview {
  display: block;
  background: #0a121c;
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--ee-blue);
  border-radius: 0.4rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  color: var(--ee-silver-soft);
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.current-ref {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--ee-indigo);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.revision-group {
  margin-bottom: 1rem;
}

.revision-group h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ee-silver-soft);
}

.revision-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.revision-pick {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.85rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.revision-pick.selected {
  border-color: var(--ee-blue);
  color: #fff;
  background: rgba(56, 88, 136, 0.35);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: #fff;
}

.sentence-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sentence-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.5rem;
  align-items: start;
  background: #0a121c;
  border: 1px solid var(--panel-border);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.sentence-row .idx {
  color: var(--ee-blue);
  font-size: 0.85rem;
  padding-top: 0.65rem;
  text-align: center;
  font-weight: 600;
}

.sentence-row textarea {
  width: 100%;
  min-height: 2.75rem;
  background: transparent;
  border: none;
  color: var(--fg);
  font: inherit;
  resize: vertical;
  padding: 0.45rem 0.25rem;
}

.sentence-row textarea:focus {
  outline: none;
}

.sentence-row .row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sentence-row .row-actions button {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  background: #1a2740;
  color: var(--muted);
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
}

.sentence-row .row-actions button:hover {
  background: var(--ee-blue-mid);
  color: var(--fg);
}

.sentence-row.is-last {
  border-color: rgba(104, 109, 243, 0.45);
}

.sentence-row.is-last textarea {
  color: var(--accent-soft);
}

.closing-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.closing-preview img {
  width: 8rem;
  height: 8rem;
  background: #fff;
  padding: 0.35rem;
  border-radius: 0.3rem;
  box-shadow: 0 0 0 2px var(--ee-blue);
}

/* —— Home: decluttered landing + About subsection —— */
body.home-page .home-shell {
  max-width: min(72rem, 96vw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

body.home-page .home-brand {
  margin-bottom: 1.5rem;
}

body.home-page .home-brand h1 {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  margin: 0 0 0.75rem;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #fff;
}

.home-purpose {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: none;
}

.home-purpose strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.home-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.home-nav-btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
}

.home-foot-hint {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted-soft);
}

.home-view[hidden] {
  display: none !important;
}

.about-panel {
  margin-bottom: 1.25rem;
}

.about-panel h2 {
  margin: 0 0 0.85rem;
}

.about-body {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.about-sub {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ee-silver-soft);
}

.about-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.about-list li {
  margin: 0.3rem 0;
}

.about-flow {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-flow li {
  margin: 0.25rem 0;
}

.about-flow strong {
  color: #dce3ef;
}

.about-keys {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted-soft);
  line-height: 1.45;
}

.about-keys kbd {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid var(--panel-border);
  background: #0a121c;
  color: var(--ee-silver-soft);
}

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

body.home-page .ee-footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 2rem;
}

/* —— Editor: vertical step stream (no side-by-side split) —— */
body.editor-page .editor-shell {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3.5rem;
}

body.editor-page .brand h1 {
  font-size: 1.55rem;
}

body.editor-page .brand p {
  max-width: none;
}

body.editor-page .editor-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

body.editor-page .editor-toolbar .btn,
body.editor-page .editor-toolbar a.btn {
  width: 100%;
  justify-content: center;
}

body.editor-page .editor-toolbar .spacer {
  display: none;
}

.editor-step {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.editor-step > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--ee-blue) 0%, var(--ee-blue-mid) 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-optional {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.step-intro {
  margin: -0.35rem 0 1rem;
}

.step-actions {
  margin: 0.75rem 0 0;
}

.label-hint {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ee-indigo);
  font-weight: 500;
}

.visual-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.visual-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.visual-actions .btn {
  width: 100%;
  justify-content: center;
}

.visual-preview-wrap {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.visual-preview {
  max-width: 100%;
  max-height: 12rem;
  width: auto;
  object-fit: contain;
  border-radius: 0.35rem;
  border: 1px solid var(--panel-border);
  background: #000;
  align-self: flex-start;
}

/* Editor: live closing URL (mirrors presenter active link) */
.qr-editor-open-link {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  color: var(--ee-azure, #357df9);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.qr-editor-open-link:hover {
  color: var(--ee-indigo, #686df3);
}
.qr-editor-open-link[hidden] {
  display: none !important;
}

.visual-preview.qr-preview {
  width: 8rem;
  height: 8rem;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 0 0 2px var(--ee-blue);
}

.visual-meta {
  margin: 0;
}

.finish-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.finish-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

/* Sentence rows stay one column of fields; actions under text on small widths */
body.editor-page .sentence-row {
  grid-template-columns: 2rem 1fr;
  gap: 0.4rem;
}

body.editor-page .sentence-row .row-actions {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-end;
}

body.editor-page .ee-footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

/* Presenter presentation image
   mode-center = first page, large middle (clear of top/bottom chrome)
   mode-side   = with a key message, image right ~2/3, sentence left ~1/3 */

#focus.has-presentation-image {
  width: 100%;
  max-width: none;
  /* Safe band: top title/logo · bottom nav / brand / tool revision */
  padding: 4.75rem 1.5rem 5.75rem;
  align-items: stretch;
  justify-content: center;
  text-align: left;
  box-sizing: border-box;
}

.presentation-stage {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 0;
}

/* —— 1) First page: centred large —— */
.presentation-stage.mode-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  /* fill the safe band only */
  height: min(calc(100vh - 10.5rem), 78vh);
  max-height: calc(100vh - 10.5rem);
  padding: 0 2vw;
}

.presentation-stage.mode-center .presentation-image {
  width: auto;
  max-width: min(88vw, 56rem);
  height: auto;
  max-height: min(calc(100vh - 13rem), 72vh);
  object-fit: contain;
  object-position: center;
  border-radius: 0.5rem;
  box-shadow:
    0 0 0 1px rgba(184, 184, 184, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.45);
  margin: 0;
}

.presentation-stage.mode-center .presentation-caption {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--ee-silver);
  max-width: min(88vw, 40rem);
  line-height: 1.4;
  text-align: center;
}

/* —— 2) With message: sentence left, image right 2/3 —— */
.presentation-stage.mode-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem 2rem;
  align-items: center;
  min-height: min(68vh, 36rem);
  max-height: calc(100vh - 10.5rem);
  padding: 0 1vw 0 2vw;
}

.presentation-stage.mode-side .presentation-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding-right: 0.5rem;
}

.presentation-stage.mode-side .presentation-sentence {
  --side-focus-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-size: var(--side-focus-size);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-align: left;
  width: 100%;
  overflow-wrap: break-word;
  text-wrap: balance;
}
/* Side layout: same long-line scale (≥20% smaller when >4 words) */
.presentation-stage.mode-side .presentation-sentence.focus-text-compact {
  font-size: calc(var(--side-focus-size) * 0.8);
  line-height: 1.34;
}
.presentation-stage.mode-side .presentation-sentence.focus-text-dense {
  font-size: calc(var(--side-focus-size) * 0.68);
  line-height: 1.36;
}
.presentation-stage.mode-side .presentation-sentence.focus-text-xdense {
  font-size: calc(var(--side-focus-size) * 0.58);
  line-height: 1.38;
  font-weight: 500;
}

.presentation-stage.mode-side .presentation-sentence.is-final-message {
  color: var(--ee-indigo);
}

.presentation-stage.mode-side .presentation-right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 11rem);
}

.presentation-stage.mode-side .presentation-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, calc(100vh - 11.5rem));
  object-fit: contain;
  object-position: center right;
  border-radius: 0.5rem;
  box-shadow:
    0 0 0 1px rgba(184, 184, 184, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.45);
  margin: 0;
}

.presentation-stage.mode-side .presentation-caption {
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  font-weight: 500;
  color: var(--ee-silver);
  max-width: 100%;
  line-height: 1.4;
  text-align: left;
}

@media (max-width: 900px) {
  .presentation-stage.mode-side {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 1rem;
    padding: 0;
  }

  .presentation-stage.mode-side .presentation-left {
    order: 2;
    align-items: center;
    text-align: center;
  }

  .presentation-stage.mode-side .presentation-sentence,
  .presentation-stage.mode-side .presentation-caption {
    text-align: center;
  }

  .presentation-stage.mode-side .presentation-right {
    order: 1;
  }

  .presentation-stage.mode-side .presentation-image {
    max-height: min(48vh, 22rem);
    object-position: center;
  }

  .presentation-stage.mode-center {
    height: auto;
    max-height: calc(100vh - 11rem);
  }

  .presentation-stage.mode-center .presentation-image {
    max-height: min(52vh, 24rem);
  }
}

/* Editor place options */
.place-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.place-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
  cursor: pointer;
  background: #0a121c;
  border: 1px solid var(--panel-border);
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
}

.place-option:has(input:checked) {
  border-color: var(--ee-blue);
  background: rgba(56, 88, 136, 0.2);
  color: var(--fg);
}

.place-option input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.place-option strong {
  color: var(--ee-silver-soft);
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.status.error {
  color: #e07070;
}

.status.ok {
  color: #7dcea0;
}

.footer-note {
  margin-top: 1rem;
  color: var(--muted-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

a.inline {
  color: var(--ee-azure);
}

/* Error state on presenter */
#error-banner {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 18, 0.96);
  z-index: 20;
  padding: 2rem;
  text-align: center;
}

#error-banner.visible {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#error-banner h2 {
  margin: 0;
  color: #e07070;
}

#error-banner p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  #archive {
    max-width: 90vw;
    max-height: 18vh;
  }

  #focus {
    padding-top: 5.5rem;
    font-size: clamp(1.35rem, 6vw, 2rem);
    /* Leave room for raised nav buttons + end label */
    padding-bottom: calc(var(--presenter-nav-bottom) + 3.5rem);
  }

  #nav {
    gap: 0.75rem;
  }

  #nav .btn {
    min-height: 2.75rem;
    padding: 0.75rem 1.15rem;
    font-size: 0.9rem;
  }

  .sentence-row {
    grid-template-columns: 1.5rem 1fr;
  }

  .sentence-row .row-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .ee-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .presenter-logo {
    width: 2rem;
    height: 2rem;
  }

  /* Brand strip + tool revision sit under raised nav, keep them subtle */
  .presenter-brand-strip,
  .presenter-tool-revision,
  .presenter-deck-revision {
    bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== DFKPS chrome (icon menus: lang / colour / layout) ===== */
.dfkps-chrome-host {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 0.5rem;
}
.dfkps-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dfkps-icon-menu {
  position: relative;
}
.dfkps-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.35rem;
  min-width: 2.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--btn);
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.dfkps-icon-btn:hover {
  background: var(--btn-hover);
  border-color: var(--ee-blue);
}
.dfkps-icon-menu.open .dfkps-icon-btn {
  background: var(--ee-blue);
  border-color: var(--ee-azure);
}
.dfkps-icon-badge {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.dfkps-icon-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 80;
  min-width: 11rem;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0.45rem;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dfkps-icon-panel--wide {
  min-width: 15rem;
}
.dfkps-menu-head {
  margin: 0.15rem 0.35rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.dfkps-menu-foot {
  margin: 0.35rem 0.35rem 0.15rem;
  font-size: 0.65rem;
  color: var(--muted-soft);
  line-height: 1.35;
}
.dfkps-icon-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
.dfkps-icon-panel button:hover {
  background: rgba(56, 88, 136, 0.35);
}
.dfkps-icon-panel button[aria-pressed="true"] {
  background: rgba(104, 109, 243, 0.28);
  outline: 1px solid var(--ee-indigo);
}
.dfkps-icon-panel .dim {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
}
.swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.swatch-auto { background: linear-gradient(135deg, #3b82f6, #94a3b8); }
.swatch-ee { background: #2563eb; }
.swatch-contrast { background: #fff; border-color: #000; }
.swatch-dichromatic { background: #0c4a6e; }
.swatch-mono { background: #888; }

/* floating chrome on presenter */
.dfkps-chrome-host--float {
  position: fixed;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 90;
  margin: 0;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(10, 16, 24, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border);
}
body.presenter.clean-ui .dfkps-chrome-host--float {
  opacity: 0.35;
}
body.presenter.clean-ui .dfkps-chrome-host--float:hover,
body.presenter.clean-ui .dfkps-chrome-host--float:focus-within {
  opacity: 1;
}

/* layout preview shell (from main site suite) */
.layout-preview-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #0b1220;
}
.layout-preview-shell[hidden] { display: none !important; }
.layout-preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: #111a28;
  border-bottom: 1px solid var(--panel-border);
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 700;
}
.layout-preview-exit {
  margin-left: auto;
  border: 0;
  background: var(--btn);
  color: var(--fg);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}
.layout-preview-frame {
  flex: 1;
  margin: 0.75rem auto;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* display modes */
html[data-display="contrast"] {
  --bg: #000;
  --bg-app: #000;
  --fg: #fff;
  --muted: #fff;
  --panel: #000;
  --panel-border: #fff;
  --btn: #000;
  --btn-hover: #111;
  --accent: #ff0;
  --ee-azure: #ff0;
  --ee-indigo: #ff0;
}
html[data-display="contrast"] body {
  background: #000;
  color: #fff;
}
html[data-display="contrast"] .btn.primary {
  background: #ff0 !important;
  color: #000 !important;
}
html[data-display="dichromatic"] {
  --accent: #0c4a6e;
  --ee-indigo: #0369a1;
  --ee-azure: #38bdf8;
  --ee-blue: #0c4a6e;
  --brand-glow: rgba(12, 74, 110, 0.4);
}
html[data-display="mono"] body,
html[data-display="mono"] .app-shell,
html[data-display="mono"] .presenter-stage {
  filter: grayscale(1);
}
html[data-display="mono"] {
  --accent: #ccc;
  --ee-indigo: #ddd;
  --ee-azure: #bbb;
}

/* examples + pricing */
.examples-panel {
  margin-top: 1.75rem;
}
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.example-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0.85rem 0.9rem;
  background: rgba(17, 26, 40, 0.65);
}
.example-card h3 {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.3;
}
.example-topic {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ee-indigo);
  background: rgba(104, 109, 243, 0.15);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.example-actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pricing-panel {
  border-color: rgba(234, 88, 12, 0.55);
  background: linear-gradient(145deg, rgba(234, 88, 12, 0.12), rgba(17, 26, 40, 0.9));
}
.pricing-panel h2 {
  color: #fdba74;
}

@media (max-width: 720px) {
  .ee-topbar {
    flex-wrap: wrap;
  }
  .dfkps-chrome-host {
    order: 3;
    width: 100%;
    margin: 0.25rem 0 0;
    justify-content: flex-end;
  }
}


/* exclusive menus + topbar clear */
.dfkps-icon-menu:not(.open) .dfkps-icon-panel {
  display: none !important;
}
.dfkps-icon-menu.open .dfkps-icon-panel {
  display: flex !important;
}
.ee-topbar {
  position: relative;
  z-index: 50;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.dfkps-icon-panel {
  z-index: 200;
  right: 0;
  left: auto;
  max-width: min(20rem, 92vw);
}
body.home-page .examples-grid {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}


/* dfkps exclusive v2 — no dual floating panels */
.dfkps-chrome-host {
  position: relative;
  z-index: 60;
  flex-shrink: 0;
}
.dfkps-icon-menu {
  position: relative;
  z-index: 1;
}
.dfkps-icon-menu.open {
  z-index: 70;
}
.dfkps-icon-menu:not(.open) .dfkps-icon-panel[hidden],
.dfkps-icon-menu:not(.open) .dfkps-icon-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.dfkps-icon-menu.open .dfkps-icon-panel:not([hidden]) {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.ee-topbar {
  align-items: flex-start;
  row-gap: 0.5rem;
}
body.home-page .home-nav {
  max-width: 28rem;
}
body.home-page .examples-panel {
  max-width: none;
}

.ee-ref-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted-soft, #5c6678);
  opacity: 0.6;
}
.ee-footer .ee-ref-code { margin-left: 0.5rem; }


/* Example deck map codes — clearly visible */
.example-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.example-card .example-ref,
.example-card .ee-ref-code.example-ref {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ee-indigo, #686df3);
  background: rgba(104, 109, 243, 0.18);
  border: 1px solid rgba(104, 109, 243, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  opacity: 1;
}
.example-card .example-ref:hover {
  background: rgba(104, 109, 243, 0.35);
  color: #fff;
}
