/* Read Me First — Options Research Lab Pro
   One button per lab; opens a modal with that lab's guide.
   Injected by /read-first.js. Self-contained. */

/* ---------------------------------------------------------- the button */
.rf-btnbar { max-width: 1210px; margin: 16px auto 4px; padding: 0 4px; }

.rf-btn {
  --rf-accent: #17324d;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px 10px 12px;
  border: 1.5px solid var(--rf-accent);
  border-radius: 999px;
  background: #fff;
  color: var(--rf-accent);
  font-family: Inter, system-ui, Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(23, 50, 77, .10);
  transition: background .15s, box-shadow .15s, transform .1s;
}
.rf-btn:hover { background: var(--rf-accent); color: #fff; box-shadow: 0 4px 14px rgba(23,50,77,.20); }
.rf-btn:hover .rf-btn-icon { background: #fff; color: var(--rf-accent); }
.rf-btn:hover .rf-btn-sub { color: rgba(255,255,255,.85); }
.rf-btn:active { transform: translateY(1px); }
.rf-btn:focus-visible { outline: 3px solid #111827; outline-offset: 3px; }

.rf-btn-icon {
  width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 50%;
  background: var(--rf-accent);
  color: #fff;
  font: 800 14px/24px Georgia, serif;
  text-align: center;
}
.rf-btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.rf-btn-main { font-size: 14px; font-weight: 800; letter-spacing: .01em; }
.rf-btn-sub { font-size: 11.5px; font-weight: 600; color: #7b8794; margin-top: 2px; }

/* ----------------------------------------------------------- the modal */
.rf-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 20, 25, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.rf-overlay[hidden] { display: none; }

.rf-dialog {
  --rf-accent: #17324d;
  --rf-tint: #f2f5f9;
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  border-top: 6px solid var(--rf-accent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
  font-family: Inter, system-ui, Arial, sans-serif;
  color: #1f2937;
}

.rf-dialog-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 22px 14px;
  background: #fff;
  border-bottom: 1px solid #eceff3;
}
.rf-dialog-titles { flex: 1 1 auto; min-width: 0; }

.rf-badge {
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--rf-accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  white-space: nowrap;
}
.rf-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--rf-accent); margin-bottom: 3px;
}
.rf-title { margin: 0; font: 700 21px/1.3 Lora, Georgia, serif; color: #172033; }

.rf-close {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: none; border-radius: 8px;
  background: #f2f4f7; color: #5b6672;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.rf-close:hover { background: #e4e8ed; color: #172033; }

.rf-body { padding: 18px 22px 4px; }
.rf-body p { margin: 0 0 12px; font-size: 15px; line-height: 1.62; color: #3f4a5a; }
.rf-body strong { color: #172033; }
.rf-body em { color: var(--rf-accent); font-style: normal; font-weight: 600; }
.rf-body h4 {
  margin: 20px 0 10px;
  font-size: 12px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--rf-accent);
}
.rf-body ul { margin: 0 0 12px; padding-left: 20px; }
.rf-body li { font-size: 15px; line-height: 1.58; color: #3f4a5a; margin-bottom: 7px; }

/* numbered walkthrough */
.rf-steps { counter-reset: rfstep; list-style: none; margin: 0 0 12px; padding: 0; }
.rf-steps li { counter-increment: rfstep; position: relative; padding-left: 38px; margin-bottom: 11px; }
.rf-steps li::before {
  content: counter(rfstep);
  position: absolute; left: 0; top: 1px;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--rf-accent); color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* control glossary */
.rf-defs { margin: 0 0 12px; }
.rf-def {
  display: grid; grid-template-columns: 200px 1fr; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid #eef1f4;
  font-size: 14.5px; line-height: 1.55;
}
.rf-def:last-child { border-bottom: none; }
.rf-def dt { font-weight: 700; color: #172033; }
.rf-def dd { margin: 0; color: #4a5563; }

/* two-column boundary */
.rf-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 12px; }
.rf-split > div { padding: 13px 15px; border-radius: 10px; font-size: 14.5px; line-height: 1.55; }
.rf-split .rf-can { background: #e7f6ef; border: 1px solid #b9dfcf; }
.rf-split .rf-cant { background: #fdecea; border: 1px solid #f0c8c2; }
.rf-split h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.rf-split .rf-can h5 { color: #0f766e; }
.rf-split .rf-cant h5 { color: #a33d2c; }
.rf-split p { margin: 0; font-size: 14.5px; }

/* callouts */
.rf-note {
  margin-top: 16px; padding: 13px 15px; border-radius: 10px;
  border-left: 4px solid var(--rf-accent); background: var(--rf-tint);
  font-size: 14.5px; line-height: 1.58; color: #414852;
}
.rf-note strong { color: #1d232b; }

.rf-warn {
  margin: 0 0 16px; padding: 13px 15px; border-radius: 10px;
  border: 1px solid #f0c8c2; background: #fdecea;
  font-size: 14.5px; line-height: 1.58; color: #6b2d20;
}
.rf-warn strong { color: #8c2f1c; }

.rf-recipe {
  margin: 0 0 12px; padding: 14px 16px; border-radius: 10px;
  border: 1px dashed var(--rf-accent); background: #fff;
  font-size: 14.5px; line-height: 1.6;
}
.rf-recipe ol { margin: 8px 0 0; padding-left: 20px; }
.rf-recipe li { margin-bottom: 6px; }

.rf-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.rf-links a {
  display: inline-flex; align-items: center; padding: 8px 14px;
  border: 1px solid var(--rf-accent); border-radius: 999px;
  background: #fff; color: var(--rf-accent);
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.rf-links a:hover { background: var(--rf-tint); }

.rf-dialog-foot {
  position: sticky; bottom: 0;
  padding: 14px 22px 18px; background: #fff;
  border-top: 1px solid #eceff3; text-align: right;
}
.rf-done {
  padding: 10px 22px; border: none; border-radius: 999px;
  background: var(--rf-accent); color: #fff;
  font: 800 14px Inter, system-ui, Arial, sans-serif; cursor: pointer;
}
.rf-done:hover { filter: brightness(1.12); }

@media (max-width: 900px) {
  .rf-btnbar { margin: 14px 16px 2px; padding: 0; }
  .rf-btn { width: 100%; }
  .rf-overlay { padding: 12px; align-items: flex-start; }
  .rf-dialog { max-height: 92vh; border-radius: 14px; }
  .rf-dialog-head { padding: 16px 16px 12px; flex-wrap: wrap; }
  .rf-body { padding: 16px 16px 4px; }
  .rf-def { grid-template-columns: 1fr; gap: 3px; }
  .rf-split { grid-template-columns: 1fr; }
  .rf-dialog-foot { padding: 12px 16px 14px; }
}

.rf-btn{text-decoration:none;}

/* v3: persistent lab help control, kept outside the SPA root. */
.rf-btnbar[data-orl-help="lab-readme"] {
  position: fixed;
  top: 78px;
  right: 22px;
  z-index: 10020;
  width: auto;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
  padding: 0;
}
.rf-btnbar[data-orl-help="lab-readme"] .rf-btn {
  background: #fff;
  box-shadow: 0 6px 20px rgba(12, 31, 55, .22);
}
@media (max-width: 900px) {
  .rf-btnbar[data-orl-help="lab-readme"] {
    top: 72px;
    right: 12px;
    left: auto;
    width: auto;
    max-width: calc(100vw - 24px);
    margin: 0;
  }
  .rf-btnbar[data-orl-help="lab-readme"] .rf-btn { width: auto; }
}


/* v4: direct, page-owned Read Me First controls. These do not depend on DOM injection. */
.lab-readme-direct {
  display:inline-flex; align-items:center; gap:9px;
  margin:14px 0 16px; padding:10px 16px;
  border:2px solid #f2b84b; border-radius:999px;
  background:#f2b84b; color:#172033 !important;
  font:800 15px/1.2 Inter,system-ui,Arial,sans-serif;
  text-decoration:none !important;
  box-shadow:0 4px 14px rgba(0,0,0,.16);
}
.lab-readme-direct:hover { filter:brightness(.96); transform:translateY(-1px); }
.lab-readme-direct:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.lab-readme-direct::before { content:"i"; width:22px; height:22px; border-radius:50%; background:#172033; color:#fff; display:inline-flex; align-items:center; justify-content:center; font:800 13px Georgia,serif; }

/* Make the top lab names easier to read. */
.app-nav .nav-link { font-size:16px !important; font-weight:800 !important; line-height:1.15 !important; }
.brand { font-size:19px !important; }
@media (max-width:1100px) { .app-nav .nav-link { font-size:15px !important; } }

/* v4 direct controls supersede the older floating injected control. */
.rf-btnbar[data-orl-help="lab-readme"] { display:none !important; }
