/* The design sandbox (BAB-0047). Builds on ../../builder/style.css (same cards, buttons, toolbar, header); only what this page adds is here. */
:root { --ok: #17703C; --ok-bg: #E4F4EA; --bad-bg: #FBE6E6; --bad-line: #E7B3B3; --side: 340px; }
.ico { color: var(--accent); }
.btn .ico, .tb .ico { flex: none; }
.btn.main .ico { color: #fff; }
a.btn { text-decoration: none; }
input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.step a { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 -14px; padding: 0 14px; color: inherit; text-decoration: none; border-radius: var(--r-btn); }
.step a:hover { background: var(--raised); }
.chip.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); font-weight: 600; }
.chip.good { background: var(--ok-bg); border-color: #A9D9B8; color: var(--ok); font-weight: 600; }
.status p.bad { color: var(--bad); font-weight: 600; }
.help b { color: var(--ink); }
kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; text-align: center; font: 600 14px/22px system-ui, sans-serif; background: var(--raised); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; color: var(--ink); }

.layout.sbx { grid-template-columns: minmax(0, 1fr) var(--side); }
.side { padding-right: 2px; }
.side > .card { flex: none; }
.acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.acts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

/* over the view */
.view .btn.reset { position: absolute; left: 12px; top: 12px; min-height: 44px; box-shadow: 0 1px 4px rgba(20,23,23,.18); z-index: 3; }
.readout { position: absolute; left: 12px; top: 66px; margin: 0; padding: 4px 10px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; z-index: 3; pointer-events: none; }
.tipped { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; padding: 8px 14px; max-width: min(520px, calc(100% - 200px)); background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad); border-radius: 10px; font-size: 14px; font-weight: 600; text-align: center; z-index: 3; }
.pad { position: absolute; left: 12px; bottom: 12px; display: grid; grid-template-columns: repeat(3, 68px); grid-template-rows: repeat(2, 64px); gap: 6px; z-index: 3; touch-action: none; }
.padb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 2px; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.94); border: 2px solid var(--line); border-radius: var(--r-btn); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; box-shadow: 0 1px 4px rgba(20,23,23,.18); }
.padb .ico { width: 22px; height: 22px; }
.padb[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.padb[aria-pressed="true"] .ico { color: #fff; }
.padb.f { grid-column: 2; grid-row: 1; } .padb.l { grid-column: 1; grid-row: 2; } .padb.b { grid-column: 2; grid-row: 2; } .padb.r { grid-column: 3; grid-row: 2; }
.empty.start { pointer-events: auto; max-width: min(460px, 86%); display: grid; gap: 8px; padding: 18px 20px; top: 46%; z-index: 4; }
.empty.start .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.empty.start .btn { flex: 1 1 140px; }
.loading { z-index: 5; }

/* the side cards */
.jt { border-top: 1px solid var(--line); padding-top: 4px; margin-top: 8px; }
.jt:first-of-type { border-top: 0; }
.jrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.jrow input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); margin: 0; }
.jv { min-width: 4ch; text-align: right; font-weight: 700; font-size: 16px; }
.tests { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.tst { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #FAFBFC; }
.tst b { display: block; font-size: 14px; }
.tst span { display: block; font-size: 14px; color: var(--ink2); overflow-wrap: anywhere; }
.tst .ico { width: 22px; height: 22px; margin-top: 1px; }
.tst.ok { border-color: #A9D9B8; background: var(--ok-bg); } .tst.ok .ico { color: var(--ok); }
.tst.bad { border-color: var(--bad-line); background: var(--bad-bg); } .tst.bad .ico, .tst.bad b { color: var(--bad); }
.tst.run .ico { color: var(--ink2); }

@media (min-width: 901px) {
  .side { overflow: auto; }
}
@media (min-width: 901px) and (max-width: 1250px) { :root { --side: 292px; } .step em { display: none; } }
@media (min-width: 901px) and (max-width: 1100px) { :root { --side: 268px; } .brand span { font-size: 16px; } .tb { padding: 4px 2px; } }
@media (max-width: 900px) {
  .layout.sbx { display: grid; grid-template-columns: 1fr; }
  .side { overflow: visible; order: 3; }
  .view { height: clamp(320px, 56vh, 560px); }
  .top .chip { flex: 1 1 100%; justify-content: center; text-align: center; min-height: 44px; }
  .step a { margin: 0; padding: 0; justify-content: center; flex-wrap: wrap; align-content: center; gap: 0 6px; }
}
@media (max-width: 520px) {
  .tb { flex: 1 1 56px; font-size: 14px; }
  .brand span { font-size: 17px; }
  .pad { grid-template-columns: repeat(3, 62px); grid-template-rows: repeat(2, 56px); gap: 5px; }
  .tipped { max-width: calc(100% - 24px); top: 66px; left: 12px; right: 12px; transform: none; max-width: none; }
  .readout { top: 12px; left: auto; right: 12px; }
  .view .btn.reset { left: 12px; }
}
