/* OutrightCRM Playground – store front.
 * Colours come from the store theme (Astra global colours) with the same values as fallbacks; type is the theme's own.
 * One bold element (the intro band with the build sequence); everything else stays quiet: hairlines, two radii, no shadows
 * except the dialog. Colour carries meaning only for demo state (ready / building / low time / failed). */

.opg, .opg-dlg, .opg-try {
  --opg-brand: var(--ast-global-color-0, #046bd2);
  --opg-brand-2: var(--ast-global-color-1, #045cb4);
  --opg-ink: var(--ast-global-color-2, #1e293b);
  --opg-text: var(--ast-global-color-3, #334155);
  --opg-paper: var(--ast-global-color-4, #ffffff);
  --opg-wash: var(--ast-global-color-5, #f0f5fa);
  --opg-line: #d7e0ea;
  --opg-muted: #5b6b80;
  --opg-ok: #12703a;
  --opg-warn: #9a5306;
  --opg-err: #b42318;
  --opg-deep: #0b3f78;
  --opg-r: 12px;
  --opg-r-s: 8px;
  color: var(--opg-text);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .opg, .opg-dlg, .opg-try { --opg-deep: color-mix(in srgb, var(--opg-brand) 58%, #04162e); }
}
.opg { margin: 0 0 3em; line-height: 1.55; }
.opg [hidden], .opg-dlg [hidden] { display: none !important; }
.opg *, .opg-dlg * { box-sizing: border-box; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------------------------------------------------------------- shared controls */
.opg .opg-btn, .opg-dlg .opg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  margin: 0; padding: .66em 1.15em; min-height: 42px;
  font: inherit; font-size: .95em; font-weight: 600; line-height: 1.2; letter-spacing: 0;
  color: #fff; background: var(--opg-brand); border: 1px solid var(--opg-brand); border-radius: var(--opg-r-s);
  text-decoration: none; cursor: pointer; box-shadow: none; text-transform: none; white-space: nowrap;
}
.opg a.opg-btn, .opg a.opg-btn:visited, .opg-dlg a.opg-btn, .opg-dlg a.opg-btn:visited { color: #fff; text-decoration: none; }
.opg .opg-btn:hover, .opg-dlg .opg-btn:hover { background: var(--opg-brand-2); border-color: var(--opg-brand-2); color: #fff; }
.opg .opg-btn[disabled], .opg-dlg .opg-btn[disabled] { opacity: .6; cursor: progress; }
.opg-dlg .opg-btn-wide { width: 100%; }

.opg .opg-link, .opg-dlg .opg-link {
  display: inline; margin: 0; padding: 0; min-height: 0; background: none; border: 0; box-shadow: none;
  font: inherit; font-size: inherit; line-height: inherit; color: var(--opg-brand); cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-transform: none;
}
.opg .opg-link:hover, .opg-dlg .opg-link:hover { color: var(--opg-brand-2); background: none; }
.opg .opg-link[disabled], .opg-dlg .opg-link[disabled] { color: var(--opg-muted); text-decoration: none; cursor: default; }
.opg .opg-danger { color: var(--opg-err); }
.opg .opg-danger:hover { color: var(--opg-err); }

.opg :focus-visible, .opg-dlg :focus-visible { outline: 2px solid var(--opg-brand); outline-offset: 2px; }
.opg .opg-note, .opg-note { margin: 1em 0 0; font-size: .9em; color: var(--opg-muted); }
.opg .opg-note-err, .opg .opg-err { color: var(--opg-err); }

/* ---------------------------------------------------------------- intro band: the one bold element */
.opg-intro {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px 48px; align-items: center;
  margin: 0 0 28px; padding: 34px 38px; border-radius: var(--opg-r);
  background: var(--opg-deep); color: #e6eef9;
}
.opg .opg-intro-h { margin: 0 0 .45em; font-size: 1.9em; line-height: 1.15; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.opg .opg-intro-text p { margin: 0; max-width: 46ch; font-size: 1.02em; color: #d3e1f5; }
.opg .opg-steps { list-style: none; margin: 0; padding: 0; counter-reset: opg-step; display: grid; gap: 0; }
.opg .opg-steps li {
  counter-increment: opg-step; position: relative; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px;
  margin: 0; padding: 0 0 18px;
}
.opg .opg-steps li:last-child { padding-bottom: 0; }
.opg-steps li::before {
  content: counter(opg-step); grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .92em; font-variant-numeric: tabular-nums;
  color: var(--opg-deep); background: #fff;
}
.opg-steps li:not(:last-child)::after {      /* the line that joins the steps: this is a sequence */
  content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: rgba(255, 255, 255, .28);
}
.opg-steps strong { color: #fff; font-size: 1.02em; line-height: 1.3; padding-top: .3em; }
.opg-steps span { font-size: .92em; color: #bcd0ec; }

/* ---------------------------------------------------------------- your demos */
.opg-mine { margin: 0 0 30px; padding: 22px 24px; border: 1px solid var(--opg-line); border-radius: var(--opg-r); background: var(--opg-wash); }
.opg-account .opg-mine { padding: 0; border: 0; background: none; }
.opg-mine-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 14px; }
.opg .opg-mine-h { margin: 0; font-size: 1.3em; line-height: 1.25; color: var(--opg-ink); }
.opg .opg-who { margin: 0; font-size: .9em; color: var(--opg-muted); }
.opg-list { display: grid; gap: 12px; }

.opg-demo { padding: 18px 20px; background: var(--opg-paper); border: 1px solid var(--opg-line); border-radius: var(--opg-r-s); }
.opg-demo.is-fresh { border-color: var(--opg-brand); }
.opg-demo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.opg .opg-demo-name { margin: 0; font-size: 1.08em; line-height: 1.3; color: var(--opg-ink); }
.opg-demo-crm { font-size: .88em; color: var(--opg-muted); }
.opg-badge { margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: .8em; font-weight: 600; line-height: 1.6; background: var(--opg-wash); color: var(--opg-text); }
.opg-demo.is-ready .opg-badge { color: var(--opg-ok); background: #e5f4ea; }
.opg-demo.is-building .opg-badge { color: var(--opg-brand); background: #e4effb; }
.opg-demo.is-failed .opg-badge { color: var(--opg-err); background: #fbe9e7; }
.opg-demo.is-removed { opacity: .7; }

.opg .opg-build { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.opg .opg-build li { margin: 0; padding: 9px 0 0; border-top: 4px solid var(--opg-line); font-size: .82em; line-height: 1.3; color: var(--opg-muted); }
.opg-build li.is-done { border-top-color: var(--opg-brand); color: var(--opg-text); }
.opg-build li.is-now { border-top-color: var(--opg-brand); color: var(--opg-ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .opg-build li.is-now { animation: opg-pulse 1.6s ease-in-out infinite; }
  @keyframes opg-pulse { 50% { border-top-color: color-mix(in srgb, var(--opg-brand) 35%, var(--opg-line)); } }
}
.opg .opg-hint { margin: 6px 0 0; font-size: .88em; color: var(--opg-muted); }

.opg-cred { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 16px 0 0; }
.opg .opg-login { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.opg-login > div { display: flex; align-items: center; gap: 10px; }
.opg .opg-login dt { margin: 0; font-size: .85em; font-weight: 400; color: var(--opg-muted); }
.opg .opg-login dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.opg .opg-login code {
  padding: 3px 9px; border-radius: 6px; background: var(--opg-wash); border: 1px solid var(--opg-line);
  color: var(--opg-ink); font-size: .92em; font-weight: 600; word-break: break-all;
}
.opg .opg-copy {
  margin: 0; padding: 3px 9px; min-height: 0; font: inherit; font-size: .8em; line-height: 1.5; cursor: pointer;
  color: var(--opg-brand); background: none; border: 1px solid var(--opg-line); border-radius: 6px; box-shadow: none;
}
.opg .opg-copy:hover { border-color: var(--opg-brand); background: none; color: var(--opg-brand); }
.opg .opg-copy.is-done { color: var(--opg-ok); border-color: currentColor; }

.opg-demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--opg-line); }
.opg-time { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.opg-time-bar { --opg-f: 1; position: relative; flex: 0 0 120px; height: 6px; border-radius: 999px; background: var(--opg-line); overflow: hidden; }
.opg-time-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--opg-f) * 100%); background: var(--opg-ok); border-radius: inherit; }
.opg .opg-time-txt { margin: 0; display: flex; flex-wrap: wrap; gap: 0 10px; font-size: .9em; color: var(--opg-muted); }
.opg-time-txt strong { color: var(--opg-ink); font-variant-numeric: tabular-nums; }
.opg-time-txt strong.is-low { color: var(--opg-warn); }
.opg-demo-acts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9em; }

/* ---------------------------------------------------------------- toolbar */
.opg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 18px; }
.opg-search { position: relative; flex: 1 1 280px; margin: 0; }
.opg-search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--opg-muted); pointer-events: none; }
.opg .opg-search input {
  width: 100%; margin: 0; padding: .62em .9em .62em 2.5em; min-height: 42px;
  font: inherit; font-size: .95em; color: var(--opg-ink); background: var(--opg-paper);
  border: 1px solid var(--opg-line); border-radius: var(--opg-r-s); box-shadow: none;
}
.opg .opg-search input:focus { border-color: var(--opg-brand); outline: none; box-shadow: 0 0 0 3px rgba(4, 107, 210, .16); }
.opg-filter { margin: 0; }
.opg .opg-filter select { margin: 0; min-height: 42px; font: inherit; font-size: .95em; border: 1px solid var(--opg-line); border-radius: var(--opg-r-s); padding: .5em 2em .5em .8em; }
.opg .opg-count { margin: 0 0 0 auto; font-size: .88em; color: var(--opg-muted); white-space: nowrap; }

/* segmented control: SuiteCRM version filter */
.opg-seg { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--opg-line); border-radius: var(--opg-r-s); background: var(--opg-paper); min-width: 0; }
.opg-seg label { margin: 0; position: relative; }
.opg-seg input, .opg-vers input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opg-seg span { display: block; padding: .38em .85em; border-radius: 6px; font-size: .88em; line-height: 1.4; color: var(--opg-text); cursor: pointer; white-space: nowrap; }
.opg-seg input:checked + span { background: var(--opg-ink); color: #fff; }
.opg-seg input:focus-visible + span, .opg-vers input:focus-visible + span { outline: 2px solid var(--opg-brand); outline-offset: 2px; }

/* ---------------------------------------------------------------- catalogue cards */
.opg-grid { container: opg-grid / inline-size; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); gap: 16px; }
.opg-card {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  padding: 14px; background: var(--opg-paper); border: 1px solid var(--opg-line); border-radius: var(--opg-r);
  scroll-margin-top: 120px;
}
.opg-card:hover { border-color: #b9c8da; }
.opg-card.is-focus { border-color: var(--opg-brand); box-shadow: 0 0 0 3px rgba(4, 107, 210, .14); }
.opg-card-img { aspect-ratio: 16 / 9; border-radius: var(--opg-r-s); overflow: hidden; background: var(--opg-wash); display: grid; place-items: center; }
.opg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.opg-card-img span { font-size: 2.4em; font-weight: 700; color: var(--opg-brand); opacity: .5; }
.opg-card-body { display: flex; flex-direction: column; min-width: 0; }
.opg .opg-card-title { margin: 0 0 .3em; font-size: 1.12em; line-height: 1.3; color: var(--opg-ink); }
.opg .opg-card-sum {
  margin: 0 0 12px; font-size: .9em; line-height: 1.5; color: var(--opg-text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.opg .opg-vers { margin: auto 0 12px; padding: 0; border: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.opg-vers-label { font-size: .82em; color: var(--opg-muted); }
.opg-vers-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.opg-vers label { position: relative; margin: 0; }
.opg-vers-pills span {
  display: block; padding: .18em .7em; border: 1px solid var(--opg-line); border-radius: 999px; cursor: pointer;
  font-size: .82em; line-height: 1.6; font-variant-numeric: tabular-nums; color: var(--opg-text); background: var(--opg-paper);
}
.opg-vers-pills span:hover { border-color: var(--opg-brand); }
.opg-vers input:checked + span { border-color: var(--opg-brand); background: var(--opg-brand); color: #fff; }
.opg-card-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: .9em; }
.opg-card-act .opg-btn { font-size: 1em; }
.opg .opg-card-msg { margin: 10px 0 0; font-size: .86em; }
.opg .opg-card-msg:empty { display: none; }
.opg .opg-card-msg.is-ok { color: var(--opg-ok); }
.opg .opg-card-msg.is-err { color: var(--opg-err); }

/* image beside the text whenever the grid is wide enough (an element cannot query its own size, so the grid is the container) */
@container opg-grid (min-width: 480px) {
  .opg-card { grid-template-columns: minmax(150px, 40%) 1fr; gap: 18px; }
  .opg-card-img { align-self: start; }
}

/* ---------------------------------------------------------------- footer */
.opg .opg-foot { margin: 22px 0 0; padding: 16px 0 0; border-top: 1px solid var(--opg-line); font-size: .88em; color: var(--opg-muted); }
.opg .opg-foot p { margin: 0 0 .4em; max-width: 80ch; }

/* ---------------------------------------------------------------- start dialog */
.opg-dlg {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0;
  border: 0; border-radius: 14px; background: var(--opg-paper); color: var(--opg-text);
  box-shadow: 0 24px 60px rgba(9, 30, 66, .28);
}
.opg-dlg::backdrop { background: rgba(9, 24, 48, .55); }
@media (prefers-reduced-motion: no-preference) {
  .opg-dlg[open] { animation: opg-in .18s ease-out; }
  @keyframes opg-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
}
.opg-dlg-in { position: relative; padding: 30px 30px 26px; }
.opg-dlg .opg-dlg-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 8px; margin: 0; min-height: 0;
  border: 0; border-radius: 50%; background: none; color: var(--opg-muted); cursor: pointer; box-shadow: none;
}
.opg-dlg .opg-dlg-x:hover { background: var(--opg-wash); color: var(--opg-ink); }
.opg-dlg .opg-dlg-x svg { width: 20px; height: 20px; display: block; }
.opg-dlg .opg-dlg-h { margin: 0 32px .35em 0; font-size: 1.35em; line-height: 1.25; color: var(--opg-ink); text-wrap: balance; }
.opg-dlg .opg-dlg-sub { margin: 0 0 20px; font-size: .92em; color: var(--opg-muted); }
.opg-dlg .opg-dlg-sub:empty { display: none; }
.opg-dlg .opg-step { display: grid; gap: 14px; margin: 0; }
.opg-dlg .opg-step p { margin: 0; }
.opg-field { display: grid; gap: 5px; margin: 0; }
.opg-field > span { font-size: .88em; font-weight: 600; color: var(--opg-ink); }
.opg-dlg .opg-field input {
  width: 100%; margin: 0; padding: .65em .8em; min-height: 44px; font: inherit; font-size: 1em; color: var(--opg-ink);
  background: var(--opg-paper); border: 1px solid #c3cfdd; border-radius: var(--opg-r-s); box-shadow: none;
}
.opg-dlg .opg-field input:focus { border-color: var(--opg-brand); outline: none; box-shadow: 0 0 0 3px rgba(4, 107, 210, .16); }
.opg-dlg .opg-field input[aria-invalid="true"] { border-color: var(--opg-err); }
.opg-dlg .opg-code { font-size: 1.5em; font-weight: 700; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 1.2em; }
.opg-check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin: 0; font-size: .88em; line-height: 1.5; cursor: pointer; }
.opg-check input { margin: .2em 0 0; width: 16px; height: 16px; accent-color: var(--opg-brand); }
.opg-check a { color: var(--opg-brand); }
.opg-check.is-invalid span { color: var(--opg-err); }
.opg-dlg .opg-dlg-sent { font-size: .92em; }
.opg-dlg .opg-dlg-alt { font-size: .88em; color: var(--opg-muted); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.opg-dlg .opg-dlg-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.opg-dlg .opg-dlg-msg { margin: 14px 0 0; font-size: .88em; }
.opg-dlg .opg-dlg-msg:empty { display: none; }
.opg-dlg .opg-dlg-msg.is-err { color: var(--opg-err); }
.opg-dlg .opg-dlg-msg.is-ok { color: var(--opg-ok); }

/* ---------------------------------------------------------------- product page button */
.opg-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 1.4em; }
.opg-try a.opg-try-btn {
  display: inline-flex; align-items: center; padding: .62em 1.2em; border: 1px solid var(--opg-brand); border-radius: var(--opg-r-s);
  color: var(--opg-brand); background: transparent; font-weight: 600; line-height: 1.3; text-decoration: none;
}
.opg-try a.opg-try-btn:hover, .opg-try a.opg-try-btn:focus { background: var(--opg-brand); color: #fff; }
.opg-try .opg-try-note { font-size: .88em; color: var(--opg-muted); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  .opg-intro { grid-template-columns: 1fr; padding: 26px 22px; }
  .opg .opg-intro-h { font-size: 1.55em; }
  .opg-mine { padding: 18px 16px; }
  .opg-demo { padding: 16px; }
  .opg .opg-build { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opg .opg-count { margin-left: 0; }
  .opg-seg { display: flex; width: 100%; overflow-x: auto; }
  .opg-dlg-in { padding: 26px 20px 22px; }
  .opg-time { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- dialog: where you are + live build */
.opg-dlg-bar { display: flex; gap: 6px; margin: 0 44px 18px 0; }
.opg-dlg-bar:empty { display: none; }
.opg-dlg-bar span { flex: 1; height: 4px; border-radius: 999px; background: var(--opg-line); transition: background .3s; }
.opg-dlg-bar span.is-on { background: var(--opg-brand); }

.opg-dlg .opg-think { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.opg-dlg .opg-think:empty { display: none; }
.opg-dlg .opg-think li {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center;
  margin: 0; padding: 10px 12px; border-radius: var(--opg-r-s); font-size: .95em; line-height: 1.35; color: var(--opg-muted);
}
.opg-dlg .opg-think li.is-done { color: var(--opg-text); }
.opg-dlg .opg-think li.is-now { background: var(--opg-wash); color: var(--opg-ink); font-weight: 600; }
.opg-think-ico { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--opg-line); }
.opg-think li.is-now .opg-think-ico { border-color: #c5d9f1; border-top-color: var(--opg-brand); }
.opg-think li.is-done .opg-think-ico { border-color: var(--opg-ok); background: var(--opg-ok); }
.opg-think li.is-done .opg-think-ico::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.opg-think-secs { font-size: .85em; font-weight: 400; color: var(--opg-muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .opg-think li.is-now .opg-think-ico { animation: opg-spin .8s linear infinite; }
  .opg-think li.is-now .opg-think-txt {
    background: linear-gradient(90deg, var(--opg-ink) 0%, var(--opg-ink) 38%, #7fb0ea 50%, var(--opg-ink) 62%, var(--opg-ink) 100%);
    background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: opg-shimmer 1.9s linear infinite;
  }
  .opg-think li, .opg-done { animation: opg-rise .25s ease-out both; }
  @keyframes opg-spin { to { transform: rotate(360deg); } }
  @keyframes opg-shimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
  @keyframes opg-rise { from { opacity: 0; transform: translateY(4px); } }
}
.opg-dlg .opg-done { display: grid; gap: 16px; }
.opg-dlg .opg-login-col { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--opg-line); border-radius: var(--opg-r-s); background: var(--opg-wash); }
.opg-dlg .opg-login-col > div { display: grid; grid-template-columns: 84px 1fr; }
.opg-dlg .opg-login-col dd { justify-content: space-between; }
.opg-dlg .opg-login-col code { background: var(--opg-paper); }
.opg-dlg .opg-fail { margin: 0; color: var(--opg-err); }

/* cards answer the pointer */
@media (prefers-reduced-motion: no-preference) {
  .opg-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
  .opg-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(9, 30, 66, .08); }
  .opg .opg-btn:active, .opg-dlg .opg-btn:active { transform: scale(.98); }
}

/* ---------------------------------------------------------------- v1.3: wider page, simpler cards, version tiles */
/* the demo page uses the width of the screen, not the theme's narrow text column */
.opg.opg-wide { width: min(1320px, calc(100vw - 40px)); max-width: none; margin-left: calc(50% - min(660px, 50vw - 20px)); }

.opg .opg-tools {
  position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 5;
  margin: 0 0 12px; padding: 10px 0; background: var(--opg-paper);
}
.opg .opg-works { margin: auto 0 12px; font-size: .86em; color: var(--opg-muted); }
.opg .opg-card-live { margin: 0 0 12px; padding: 7px 11px; border-radius: var(--opg-r-s); font-size: .86em; font-weight: 600; }
.opg .opg-card-live.is-ready { color: var(--opg-ok); background: #e5f4ea; }
.opg .opg-card-live.is-building { color: var(--opg-brand); background: #e4effb; }
.opg .opg-card-live .opg-link { font-weight: 600; }
.opg-card.has-demo { border-color: #9fcdb0; }

.opg-card-img { position: relative; cursor: pointer; }
.opg-card-img .opg-card-play {
  position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 999px; opacity: 0;
  font-size: .8rem; font-weight: 600; line-height: 1.3; color: #fff; background: var(--opg-brand);
}
.opg-card-img:hover .opg-card-play { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .opg-card-img img { transition: transform .35s ease; }
  .opg-card-img:hover img { transform: scale(1.05); }
  .opg-card-img .opg-card-play { transition: opacity .15s, transform .15s; transform: translateY(4px); }
  .opg-card-img:hover .opg-card-play { transform: none; }
  .opg-card { animation: opg-rise .3s ease-out both; }
  .opg-card:nth-child(2) { animation-delay: .04s; } .opg-card:nth-child(3) { animation-delay: .08s; }
  .opg-card:nth-child(4) { animation-delay: .12s; } .opg-card:nth-child(n+5) { animation-delay: .16s; }
}

.opg-dlg .opg-vlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opg-vtile { position: relative; margin: 0; cursor: pointer; }
.opg-vtile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opg-vtile-box {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 12px 14px;
  border: 1.5px solid var(--opg-line); border-radius: var(--opg-r-s); background: var(--opg-paper); color: var(--opg-ink);
}
.opg-vtile:hover .opg-vtile-box { border-color: #9dbfe8; }
.opg-vtile input:checked + .opg-vtile-box { border-color: var(--opg-brand); background: #eef5fd; box-shadow: inset 0 0 0 1px var(--opg-brand); }
.opg-vtile input:focus-visible + .opg-vtile-box { outline: 2px solid var(--opg-brand); outline-offset: 2px; }
.opg-vtile-name { font-weight: 600; font-variant-numeric: tabular-nums; }
.opg-vtile-tag { font-size: .75em; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: var(--opg-ok); background: #e5f4ea; }
.opg-dlg .opg-vhint { margin: 0; font-size: .86em; color: var(--opg-muted); }
@media (max-width: 420px) { .opg-dlg .opg-vlist { grid-template-columns: 1fr; } }
.opg-vtile-name { white-space: nowrap; }
.opg-vtile-box { padding: 12px; }

/* ================================================================ v1.4: wider page, demo rows, picture-on-top cards */
.opg.opg-wide { width: min(1480px, calc(100vw - 24px)); margin-left: calc(50% - min(740px, 50vw - 12px)); }

/* ---- Your demos: one compact row per demo, no outer box ---- */
.opg .opg-mine { margin: 0 0 26px; padding: 0; border: 0; background: none; }
.opg .opg-mine-head { margin: 0 0 10px; }
.opg .opg-mine-h { font-size: 1.15em; }
.opg-list { container: opg-list / inline-size; gap: 10px; }
.opg .opg-demo {
  display: grid; grid-template-columns: 76px minmax(150px, 1.1fr) auto minmax(190px, 1fr) auto auto; align-items: center; gap: 12px 24px;
  padding: 12px 18px 12px 12px; background: var(--opg-paper); border: 1px solid var(--opg-line); border-radius: var(--opg-r);
  box-shadow: 0 1px 2px rgba(9, 30, 66, .05);
}
.opg .opg-demo.is-ready { border-left: 4px solid var(--opg-ok); }
.opg .opg-demo.is-building { border-left: 4px solid var(--opg-brand); }
.opg .opg-demo.is-failed { border-left: 4px solid var(--opg-err); }
.opg .opg-demo.is-fresh { border-color: var(--opg-line); border-left-color: var(--opg-ok); }
.opg-demo-thumb { width: 76px; aspect-ratio: 4 / 3; border-radius: var(--opg-r-s); overflow: hidden; background: var(--opg-wash); display: grid; place-items: center; }
.opg-demo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.opg-demo-thumb span { font-size: 1.5em; font-weight: 700; color: var(--opg-brand); opacity: .55; }
.opg-demo-id { min-width: 0; }
.opg .opg-demo-name { margin: 0 0 4px; font-size: 1.05em; line-height: 1.25; }
.opg .opg-demo-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.opg .opg-demo-meta .opg-badge { margin: 0; }
.opg .opg-demo .opg-login { flex-direction: column; gap: 6px; }
.opg .opg-demo .opg-login > div { display: grid; grid-template-columns: 74px auto auto; justify-content: start; gap: 8px; }
.opg .opg-demo .opg-login dt { font-size: .8em; }
.opg .opg-demo .opg-time { display: grid; gap: 7px; flex: none; }
.opg .opg-demo .opg-time-bar { flex: none; width: 100%; max-width: 240px; height: 5px; }
.opg .opg-demo .opg-time-txt { display: grid; gap: 0; font-size: .86em; line-height: 1.4; }
.opg .opg-demo .opg-time-txt strong { font-size: 1.1em; }
.opg .opg-demo .opg-demo-acts { display: grid; gap: 4px; justify-items: start; font-size: .86em; }
.opg .opg-demo .opg-demo-open { justify-self: end; }
.opg-demo-wide { grid-column: 3 / -1; min-width: 0; }
.opg .opg-demo .opg-build { margin: 0; }
@container opg-list (max-width: 1020px) {
  .opg .opg-demo { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px 16px; padding: 12px; }
  .opg-demo-thumb { width: 64px; }
  .opg .opg-demo .opg-demo-open { grid-column: 3; grid-row: 1; }
  .opg .opg-demo .opg-login, .opg .opg-demo .opg-time, .opg-demo-wide { grid-column: 1 / -1; }
  .opg .opg-demo .opg-demo-acts { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; gap: 18px; }
}
@container opg-list (max-width: 520px) {
  .opg .opg-demo { grid-template-columns: 56px minmax(0, 1fr); }
  .opg-demo-thumb { width: 56px; }
  .opg .opg-demo .opg-demo-open { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; }
}

/* ---- product cards: picture on top, chips, footer ---- */
.opg-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
@container opg-grid (min-width: 480px) {
  .opg-card { grid-template-columns: 1fr; gap: 0; }
  .opg-card-img { align-self: stretch; }
}
.opg-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-radius: 14px; box-shadow: 0 1px 2px rgba(9, 30, 66, .05); }
.opg-card-img { border-radius: 0; aspect-ratio: 16 / 9; }
.opg-card-body { flex: 1; padding: 16px 18px 16px; }
.opg .opg-card-title { margin: 0 0 8px; font-size: 1.14em; line-height: 1.3; }
.opg .opg-chips { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.opg-chips span { padding: 2px 9px; border-radius: 999px; font-size: .76em; font-weight: 600; line-height: 1.6; color: var(--opg-brand-2); background: #e4effb; }
.opg .opg-card-sum { margin: 0 0 14px; -webkit-line-clamp: 2; color: var(--opg-muted); }
.opg .opg-card-live { margin: 0 0 12px; }
.opg .opg-card-act { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--opg-line); gap: 8px 14px; }
.opg .opg-card-act .opg-btn { margin-right: auto; }
.opg .opg-card-act .opg-link { font-size: .92em; color: var(--opg-text); text-decoration-color: #b9c8da; }
.opg .opg-card-act .opg-link:hover { color: var(--opg-brand); }
.opg-card-img .opg-card-play { left: 14px; bottom: 14px; }

/* ================================================================ v1.5: header with icons */
.opg-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 28px 40px; align-items: center;
  margin: 0 0 26px; padding: 30px 34px; border-radius: 16px; color: #dbe7f7;
  background: radial-gradient(120% 140% at 0% 0%, #0d57a6 0%, var(--opg-deep) 55%, #072a52 100%);
}
.opg .opg-hero-h { margin: 0 0 .4em; font-size: 1.85em; line-height: 1.15; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.opg .opg-hero-sub { margin: 0 0 16px; font-size: 1.02em; line-height: 1.5; color: #cfdff5; max-width: 44ch; }
.opg .opg-hero-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.opg .opg-hero-facts li { margin: 0; padding: 0; display: inline-flex; align-items: center; gap: 7px; font-size: .92em; font-weight: 600; color: #fff; }
.opg-hero-facts .opg-ico { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: #2fbf71; color: #06331c; stroke-width: 3; }

.opg .opg-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.opg .opg-flow li {
  position: relative; margin: 0; padding: 18px 18px 16px; display: grid; gap: 2px; align-content: start;
  border-radius: 12px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
}
.opg-flow-ico { width: 42px; height: 42px; margin-bottom: 10px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--opg-brand); }
.opg-flow-ico .opg-ico { width: 22px; height: 22px; }
.opg-flow-n { font-size: .76em; font-weight: 600; color: #9fc0ea; }
.opg .opg-flow strong { font-size: 1.04em; line-height: 1.3; color: #fff; }
.opg-flow-sub { font-size: .88em; line-height: 1.4; color: #c3d6f0; }
.opg-flow-next { position: absolute; right: -15px; top: 50%; z-index: 1; width: 16px; height: 16px; margin-top: -8px; color: #9fc0ea; }
.opg-flow-next .opg-ico { width: 16px; height: 16px; stroke-width: 2.4; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .opg .opg-flow li { transition: background .2s, transform .2s; animation: opg-rise .35s ease-out both; }
  .opg .opg-flow li:nth-child(2) { animation-delay: .08s; } .opg .opg-flow li:nth-child(3) { animation-delay: .16s; }
  .opg .opg-flow li:hover { background: rgba(255, 255, 255, .15); transform: translateY(-2px); }
}
@media (max-width: 1000px) {
  .opg-hero { grid-template-columns: 1fr; padding: 26px 22px; }
}
@media (max-width: 620px) {
  .opg .opg-hero-h { font-size: 1.5em; }
  .opg .opg-flow { grid-template-columns: 1fr; gap: 10px; }
  .opg .opg-flow li { grid-template-columns: 42px 1fr; column-gap: 14px; padding: 14px; }
  .opg-flow-ico { grid-row: 1 / span 3; margin: 0; }
  .opg-flow-next { display: none; }
}

/* ================================================================ v1.6: icon copy buttons, in-row confirm, calmer motion */
.opg .opg-copy, .opg-dlg .opg-copy {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; min-height: 0;
  border: 0; border-radius: 8px; background: none; color: var(--opg-muted); cursor: pointer; box-shadow: none; line-height: 0;
}
.opg .opg-copy:hover, .opg-dlg .opg-copy:hover { background: var(--opg-wash); color: var(--opg-brand); border: 0; }
.opg .opg-copy.is-done, .opg-dlg .opg-copy.is-done { color: var(--opg-ok); background: #e5f4ea; }
.opg .opg-copy svg, .opg-dlg .opg-copy svg { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .opg-copy.is-done svg { animation: opg-pop .28s ease-out; }
  @keyframes opg-pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.18); } }
}
.opg .opg-demo .opg-login > div { grid-template-columns: 74px auto 32px; gap: 6px; align-items: center; }
.opg .opg-demo .opg-login dd { gap: 4px; }
.opg-dlg .opg-login-col dd { gap: 6px; }

.opg .opg-quiet { color: var(--opg-muted); text-decoration-color: transparent; }
.opg .opg-quiet:hover { color: var(--opg-err); text-decoration-color: currentColor; }
.opg .opg-demo .opg-demo-acts.is-asking { grid-template-columns: auto auto; gap: 6px 14px; max-width: 260px; padding: 10px 12px; border-radius: var(--opg-r-s); background: #fdf1ef; }
.opg .opg-demo-ask { grid-column: 1 / -1; margin: 0; font-size: .95em; line-height: 1.4; color: var(--opg-ink); }
.opg .opg-demo-msg { grid-column: 1 / -1; margin: 0; color: var(--opg-err); }
.opg .opg-demo-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* motion only where it answers the pointer or the first load */
.opg-card:hover { transform: none; }
.opg.opg-loaded .opg-card, .opg.opg-loaded .opg-flow li { animation: none; }
.opg .opg-tools { box-shadow: 0 8px 10px -10px rgba(9, 30, 66, .18); }

/* ================================================================ v1.7: six-box code entry */
.opg-dlg .opg-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.opg-dlg .opg-otp .opg-otp-box {
  width: 100%; min-height: 0; height: 56px; margin: 0; padding: 0; text-align: center;
  font: inherit; font-size: 1.5em; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; color: var(--opg-ink);
  background: var(--opg-paper); border: 1.5px solid #c3cfdd; border-radius: 10px; box-shadow: none; caret-color: var(--opg-brand);
}
.opg-dlg .opg-otp .opg-otp-box:nth-child(3) { margin-right: 8px; }
.opg-dlg .opg-otp .opg-otp-box:nth-child(4) { margin-left: 8px; }
.opg-dlg .opg-otp .opg-otp-box.is-filled { border-color: var(--opg-ink); background: var(--opg-wash); }
.opg-dlg .opg-otp .opg-otp-box:focus { border-color: var(--opg-brand); background: var(--opg-paper); outline: none; box-shadow: 0 0 0 3px rgba(4, 107, 210, .18); }
.opg-dlg .opg-otp.is-invalid .opg-otp-box { border-color: var(--opg-err); }
.opg-dlg .opg-dlg-sent strong { color: var(--opg-ink); word-break: break-all; }
@media (prefers-reduced-motion: no-preference) {
  .opg-dlg .opg-otp.is-invalid { animation: opg-shake .32s ease-in-out; }
  @keyframes opg-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
}
@media (max-width: 400px) { .opg-dlg .opg-otp { gap: 5px; } .opg-dlg .opg-otp .opg-otp-box { height: 48px; font-size: 1.3em; } }

/* ================================================================ v1.8: password hidden until the eye is clicked */
.opg .opg-login code.is-masked, .opg-dlg .opg-login code.is-masked { letter-spacing: .18em; color: var(--opg-muted); user-select: none; }
.opg .opg-demo .opg-login > div { grid-template-columns: 74px auto; }
.opg .opg-demo .opg-login dd { gap: 2px; }
.opg .opg-demo .opg-login dd code { margin-right: 4px; }

/* ================================================================ v1.9: live build inside a demo row */
.opg .opg-think-row { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.opg .opg-think-row li {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px 6px 8px; border-radius: 999px;
  font-size: .86em; line-height: 1.3; color: var(--opg-muted); border: 1px solid transparent; animation: none;
}
.opg .opg-think-row li.is-done { color: var(--opg-text); }
.opg .opg-think-row li.is-now { background: var(--opg-wash); border-color: #cfe0f4; color: var(--opg-ink); font-weight: 600; }
.opg .opg-think-row .opg-think-ico { width: 16px; height: 16px; flex: none; }
.opg .opg-think-row li.is-done .opg-think-ico::after { left: 3px; top: 0; width: 5px; height: 8px; }
.opg-run-bar { position: relative; height: 6px; border-radius: 999px; background: var(--opg-line); overflow: hidden; }
.opg-run-bar span { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--opg-brand); overflow: hidden; transition: width .8s ease; }
@media (prefers-reduced-motion: no-preference) {
  .opg-run-bar span::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: opg-sheen 1.4s ease-in-out infinite;
  }
  @keyframes opg-sheen { to { transform: translateX(100%); } }
}
.opg .opg-demo.is-building, .opg .opg-demo.is-failed { grid-template-columns: 76px minmax(170px, auto) minmax(0, 1fr); }
.opg .opg-demo.is-building .opg-demo-wide, .opg .opg-demo.is-failed .opg-demo-wide { grid-column: 3; }
@container opg-list (max-width: 1020px) {
  .opg .opg-demo.is-building, .opg .opg-demo.is-failed { grid-template-columns: 64px minmax(0, 1fr); }
  .opg .opg-demo.is-building .opg-demo-wide, .opg .opg-demo.is-failed .opg-demo-wide { grid-column: 1 / -1; }
}

/* v1.10 */
.opg-dlg .opg-dlg-spam { margin: 0; padding: 9px 12px; border-radius: var(--opg-r-s); background: var(--opg-wash); font-size: .86em; color: var(--opg-muted); text-align: center; }
