body.portal { line-height: 1.6; }
.lo-shell { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; }
.lo-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lo-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.lo-intro h1 { margin-bottom: 12px; }
.lo-intro .lead { margin-bottom: 16px; font-size: 17px; }
.lo-tool { margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lo-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }

.lo-label { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; color: var(--text); font-size: 14px; font-weight: 750; }
.lo-label:first-of-type { margin-top: 0; }
.lo-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.lo-chips, .lo-edit, .lo-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.lo-chip { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.lo-chip:hover:not(:disabled) { border-color: var(--accent); }
.lo-chip:disabled { opacity: .45; cursor: default; }
.lo-chip[aria-pressed="true"], .lo-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.lo-chip-quiet { background: transparent; color: var(--muted); }
.lo-sublabel { margin: 12px 0 8px; color: var(--text); font-size: 13px; font-weight: 700; }
.lo-sublabel span { color: var(--muted); font-weight: 600; }

.lo-status { min-height: 3.2em; margin: 12px 0 0; color: var(--text); font-size: 14px; }
.lo-solve { width: 100%; font-size: 16px; }

.lo-result { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.lo-result:focus { outline: none; }
.lo-result-title { margin: 0 0 12px; font-size: 22px; }
.lo-caption { min-height: 3.2em; margin: 0 0 10px; color: var(--text); font-size: 15px; font-weight: 650; }
.lo-controls { margin-bottom: 12px; }
.lo-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.lo-copy-status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.lo-copy-status:empty { display: none; }
.lo-problems { margin: 0 0 10px; padding-left: 20px; color: var(--text); font-weight: 650; }
.lo-problems li { margin-bottom: 4px; }
.lo-controls .lo-chip { padding: 8px 12px; }
.lo-note { margin: 8px 0 0; font-size: 13px; }

.lo-article h2 { margin: 30px 0 12px; font-size: 24px; }
.lo-article li { margin-bottom: 8px; color: var(--muted); }
.lo-article li strong { color: var(--text); }
.lo-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lo-faq summary { color: var(--text); font-weight: 750; cursor: pointer; }
.lo-faq details p { margin: 8px 0 0; }
.lo-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.lo-cta h2 { margin-top: 0; }
.lo-cta .text-link { color: var(--accent-strong); }
.lo-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (min-width: 640px) {
  .lo-shell { padding: 36px 24px 64px; }
  .lo-tool { padding: 22px; }
}

.lo-result-cta { margin: 14px 0 0; }

/* Board: --n columns of square lamps. Lit = warm gold, off = dark glass. */
.lo-grid { --n: 5; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; width: min(100%, calc(var(--n) * 64px)); margin: 0 auto 12px; padding: 10px; box-sizing: border-box; border-radius: 14px; background: #2f2a3d; }
.lo-cell { position: relative; display: block; aspect-ratio: 1; min-width: 0; padding: 0; border: 2px solid rgba(244, 239, 226, .18); border-radius: 22%; background: #48415a; cursor: pointer; touch-action: manipulation; transition: background-color .15s ease, box-shadow .15s ease; }
.lo-cell[aria-pressed="true"], .lo-cell[data-on="true"] { border-color: #ffe39a; background: radial-gradient(circle at 40% 35%, #fff6cf, #ffcf4d 55%, #e9a521); box-shadow: 0 0 12px rgba(255, 207, 77, .55); }
.lo-press::after { content: ''; position: absolute; inset: 22%; border: 3px solid #4fd1b5; border-radius: 50%; box-shadow: 0 0 0 2px rgba(20, 24, 30, .35); }
.lo-last { outline: 3px solid #ff9f7a; outline-offset: 1px; }
.lo-grid-replay .lo-cell { cursor: default; }
.lo-presets { margin-bottom: 4px; }
.lo-examples { margin: 4px 0 8px; }
.lo-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.lo-step { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.lo-step[data-done="true"] { color: var(--muted); }
.lo-step[aria-current="step"] { border-color: var(--accent); background: #e2f0e9; }
.lo-step-n { margin-right: 4px; color: var(--muted); font-size: 12px; }
.lo-count { padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .lo-cell { transition: none; } }
/* Play mode board: same lamps as the solver; a tap presses the plus shape. */
.lo-game h2 { margin: 0 0 8px; font-size: 22px; }
.lo-game-lead { margin: 0 0 12px; font-size: 15px; }
.lo-game .lo-chips { margin-bottom: 12px; }
.lo-game .lo-status { min-height: 2.4em; margin: 0 0 10px; }
