/* Vision simulator, comparison matrix, Learn cards, icon chips. Dean's teal brand. */
.demo-banner {
  background: #003C4C;
  color: #d7ebe7;
  text-align: center;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-bottom: 3px solid #c9a227;
}
.demo-banner strong { color: #fff; }
.lc-ico { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: 0 0 auto; }

/* Header extra tools */
.tools .tool-extra { border-color: #45B5A0; color: #e4f4ef; }
body.slim .tools .tool-extra { color: var(--teal); }

/* Activity chips with icons */
.chip { display: flex; align-items: center; gap: 10px; text-align: left; }
.chip .lc-ico { width: 22px; height: 22px; color: var(--teal); }

/* Simulator */
.vsim { margin: 10px 0 16px; }
.vsim:focus { outline: 3px solid var(--dc); outline-offset: 3px; }
.vsim-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 10px; }
.vsim-toggle { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.vsim-tog { appearance: none; background: transparent; border: 0; padding: 8px 16px; min-height: 44px; font: inherit; font-weight: 700; color: var(--dc); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.vsim-tog.on { background: var(--teal); color: #fff; }
.vsim-halo { flex: 1 1 240px; min-width: 200px; }
.vsim-halo.is-hidden { display: none; }
.vsim-halo-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.vsim-halo-steps { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.vsim-halo-btn {
  appearance: none; background: transparent; border: 0; padding: 8px 16px;
  min-height: 44px; font: inherit; font-weight: 700; color: var(--dc); cursor: pointer;
}
.vsim-halo-btn.on { background: var(--teal); color: #fff; }
.vsim-halo-btn:focus-visible { outline: 3px solid var(--dc); outline-offset: -3px; }
.vsim-astig { flex: 0 1 auto; }
.vsim-stage {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(min(54vh, 560px) * 16 / 9));
  aspect-ratio: 16 / 9;
  height: auto;
  margin-inline: auto;
  background: #0b1c20;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px #003C4C22;
  --split: 50%;
  touch-action: none;
  user-select: none;
}
.vsim-pane { position: absolute; inset: 0; overflow: hidden; }
.vsim-left { clip-path: inset(0 calc(100% - var(--split)) 0 0); z-index: 2; }
.vsim-right { z-index: 1; }
.vsim-ph, .vsim-img, .vsim-halo-cv, .vsim-astig-cv {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill;
}
.vsim-ph { background-size: contain; background-repeat: no-repeat; background-position: center; filter: blur(12px); transform: scale(1.04); }
.vsim-img { opacity: 0; z-index: 1; }
.vsim-img.is-ready { opacity: 1; }
.vsim-astig-cv { pointer-events: none; z-index: 2; }
.vsim-halo-cv { pointer-events: none; z-index: 3; }
.vsim-tag {
  position: absolute; z-index: 4; bottom: 10px; margin: 0;
  background: #003C4Cee; color: #fff; font-size: 0.82rem; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; letter-spacing: 0.01em;
}
.vsim-left .vsim-tag { left: 10px; }
.vsim-right .vsim-tag { right: 10px; }
.vsim-divider {
  position: absolute; top: 0; bottom: 0; left: var(--split);
  width: 28px; margin-left: -14px; z-index: 5; cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
}
.vsim-divider i {
  display: block; width: 4px; height: 100%; background: #fff;
  box-shadow: 0 0 0 1px #003C4C55, 0 0 10px #0006; border-radius: 4px;
  pointer-events: none;
}
.vsim-divider::after {
  content: ""; width: 28px; height: 28px; border-radius: 50%;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003C4C' stroke-width='2.2' stroke-linecap='round'><path d='M8 8l-4 4 4 4M16 8l4 4-4 4'/></svg>") center/16px no-repeat;
  box-shadow: 0 2px 8px #0005; position: absolute;
}
.vsim-pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.vsim-pin {
  position: absolute;
  display: inline-block;
  width: max-content;
  max-width: 11rem;
  right: auto;
  transform: translate(-50%, calc(-100% - 8px));
  background: #fff; color: var(--dc); border-radius: 10px;
  padding: 4px 8px; font-size: 0.75rem; line-height: 1.2;
  box-shadow: 0 2px 10px #0003; white-space: nowrap;
  box-sizing: border-box;
  z-index: 6;
  pointer-events: none;
}
.vsim-pin b { display: block; font-weight: 700; }
.vsim-pin small { display: block; color: var(--muted); font-weight: 600; }
.vsim-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 2px; height: 8px;
  background: #fff; transform: translateX(-50%);
}
.vsim-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.vsim-picker p { margin: 0 0 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.vsim-fams { display: grid; gap: 6px; }
.vsim-fam {
  appearance: none; text-align: left; background: #fff; border: 2px solid var(--line);
  border-radius: 12px; padding: 8px 10px; font: inherit; cursor: pointer; min-height: 48px;
  color: var(--ink);
}
.vsim-fam strong { display: block; color: var(--dc); font-size: 0.95rem; }
.vsim-fam small { display: block; color: var(--muted); font-size: 0.8rem; }
.vsim-fam.on { border-color: var(--teal); background: var(--mint); }
@media (min-width: 721px) {
  .vsim-fams { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .vsim-fam { min-height: 44px; padding: 8px 6px; text-align: center; }
  .vsim-fam small { display: none; }
}
.vsim-fam:hover { border-color: var(--sea); }

.vsim-toric { margin-top: 8px; display: flex; align-items: flex-start; gap: 10px; }
.vsim-toric.is-hidden { display: none; }
.vsim-toric-btn {
  appearance: none; font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px;
  background: #fff; color: var(--dc); white-space: nowrap; flex: 0 0 auto;
}
.vsim-toric-btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.vsim-toric-btn:focus-visible { outline: 3px solid var(--dc); outline-offset: 2px; }
.vsim-toric small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }

.vsim-note { margin: 10px 0 0; color: var(--muted); font-size: 0.92rem; }
.vsim-disc { margin-top: 8px; }

@media (max-width: 720px) {
  .vsim-pickers { grid-template-columns: 1fr; }
  .vsim-pin small { display: none; }
  .vsim-stage { max-width: min(100%, calc(min(48vh, 420px) * 16 / 9)); }
  .vsim-fams { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .vsim-img, .vsim-ph, .vsim-divider i { transition: none; }
  .vsim-img { opacity: 1; }
}
.vsim-img { transition: opacity 0.35s ease; }

/* Overlay */
.vsim-overlay {
  position: fixed; inset: 0; z-index: 80; background: #003C4Ccc;
  overflow: auto; padding: 16px 12px 40px;
  display: flex; align-items: flex-start; justify-content: center;
}
.vsim-overlay-card {
  background: var(--bg, #f3f6f6); color: var(--ink);
  width: min(1100px, 100%); border-radius: 18px; padding: 12px 16px 18px;
  box-shadow: 0 16px 40px #0005; margin-top: 16px;
}
.vsim-overlay-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.vsim-overlay-bar h2 { margin: 0; font-family: Cinzel, serif; color: var(--dc); font-size: 1.3rem; }
.vsim-close {
  appearance: none; background: #fff; border: 2px solid var(--teal); color: var(--teal);
  font: inherit; font-weight: 700; border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer;
}
body.vsim-lock { overflow: hidden; }

/* Matrix */
.mx { margin: 16px 0; }
.mx h3 { color: var(--dc); font-family: Cinzel, serif; }
.mx-table { background: #fff; border-radius: 16px; overflow: auto; box-shadow: 0 2px 8px #0001; }
.mx-head, .mx-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) repeat(4, minmax(110px, 1fr)); min-width: 720px; }
.mx-head { background: var(--dc); color: #fff; }
.mx-h, .mx-td, .mx-label { padding: 12px 10px; }
.mx-h strong, .mx-label strong { display: block; }
.mx-h small, .mx-label small { display: block; font-weight: 600; opacity: 0.85; font-size: 0.8rem; }
.mx-row.alt { background: #eef6f5; }
.mx-label { display: flex; gap: 8px; align-items: flex-start; color: var(--dc); }
.mx-label .lc-ico { margin-top: 2px; color: var(--teal); }
.mx-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; font-size: 0.8rem; font-weight: 700; }
.mx-cell .lc-ico { width: 22px; height: 22px; }
.mx-tick { color: #0d5c3d; }
.mx-glasses { color: #6e4a32; }
.mx-maybe { color: #006D6B; }
.mx-low { color: #0d5c3d; }
.mx-mild { color: #6e4a32; }
.mx-high { color: #7a2e2e; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 10px 0; }

/* Learn */
.learn { margin: 12px 0 18px; }
.learn h2, .learn-card h3 { font-family: Cinzel, serif; color: var(--dc); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.learn-card {
  background: #fff; border-radius: 16px; padding: 16px 16px 18px;
  box-shadow: 0 2px 8px #0001;
}
.learn-ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--mint); color: var(--teal);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.learn-ico .lc-ico { width: 22px; height: 22px; }
.learn-card p { margin: 0; color: var(--ink); }

.sim-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.sim-cta-row .btn { flex: 1 1 180px; }

@media print {
  .demo-banner, .vsim-overlay, .tools, .sim-cta-row { display: none !important; }
}
