/* Sameness check and Variety plans (sameness.js, docs/SAMENESS.md) */
.sm { display: flex; flex-direction: column; gap: 18px; }
.sm-figs { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-fig { flex: 1 1 170px; background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; }
.sm-fig span { display: block; font-size: 13px; color: var(--slate); }
.sm-fig b { display: block; font-size: 26px; letter-spacing: -.02em; margin: 2px 0; }
.sm-fig b.bad { color: #8F1D1D; }
.sm-fig small { font-size: 12.5px; color: var(--slate); }
.sm-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.sm-tabs { display: flex; gap: 4px; }
.sm-tab { min-height: 42px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: none; font: 500 14.5px var(--body); color: var(--slate); cursor: pointer; }
.sm-tab[aria-selected="true"] { border-bottom-color: #54348F; color: var(--ink); font-weight: 600; }
.sm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sm-filters label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--slate); }
.sm-filters select { min-height: 38px; width: auto; padding: 0 30px 0 10px; }
.sm-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font: 500 13.5px var(--body); color: var(--ink-2); cursor: pointer; }
.sm-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sm-alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; background: #FEF0C7; color: #6B3D08; }
.sm-alert.info { background: #F3F1FB; color: var(--ink-2); }
.sm .pill.bad { background: #FBE7E6; color: #8F1D1D; }
.sm-meta { font-size: 12.5px; color: var(--slate); }
/* a pair */
.sm-pair { background: #fff; border: 1px solid var(--rule); border-radius: 20px; overflow: hidden; }
.sm-ph { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
.sm-ph b { font-size: 15px; }
.sm-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0 20px; }
.sm-cell { border-radius: 12px; padding: 9px 12px; min-height: 58px; box-sizing: border-box; overflow-wrap: anywhere; }
.sm-cell .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.sm-cell .t { font-size: 13px; margin-top: 3px; line-height: 1.35; }
.sm-cell.same { background: #1D2939; color: #fff; }
.sm-cell.same .k { color: #D5CAF2; }
.sm-cell.diff { background: #fff; border: 1px dashed var(--field); color: var(--slate); }
.sm-cell.diff .k { color: #6B6680; }
.sm-core { margin: 10px 22px 14px; font-size: 13.5px; color: var(--ink-2); }
.sm-sides { display: flex; flex-wrap: wrap; border-top: 1px solid var(--rule); }
.sm-side { flex: 1 1 380px; min-width: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.sm-side + .sm-side { border-left: 1px solid var(--rule); }
.sm-side .qhtml { font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.sm-side .qhtml img, .sm-side .qhtml svg { max-width: 100%; height: auto; }
.sm-stim { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: #F9FAFB; max-height: 260px; overflow: auto; font-size: 14px; }
.sm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.sm-opt { border: 1px solid var(--rule); border-radius: 10px; padding: 6px 9px; font-size: 13.5px; display: flex; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.sm-opt > b { color: var(--slate); flex: none; }
.sm-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.sm-pf { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; background: #F9FAFB; border-top: 1px solid var(--rule); align-items: center; flex-wrap: wrap; }
.btn.sm-danger { border-color: #E9B7B4; color: #8F1D1D; background: #fff; }
.btn.sm-danger:hover { background: #FBE7E6; }
@media (max-width: 760px) { .sm-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sm-side + .sm-side { border-left: 0; border-top: 1px solid var(--rule); } }
/* tables */
.sm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.sm-tbl th { text-align: left; font-size: 12.5px; color: var(--slate); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: #fff; }
.sm-tbl td { padding: 11px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: top; background: #fff; }
.sm-wrap { background: #fff; border: 1px solid var(--rule); border-radius: 16px; overflow-x: auto; }
.sm-var { font-size: 13px; margin-bottom: 6px; }
.sm-var i { display: block; height: 6px; border-radius: 99px; background: #EFEDF4; margin-top: 4px; width: 140px; overflow: hidden; }
.sm-var i span { display: block; height: 100%; background: #54348F; }
.sm-var i span.hot { background: #C2610C; }
/* variety plans */
.sm-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.sm-orders { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.sm-plan { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sm-wo { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; }
.sm-wo[aria-current="true"] { border: 2px solid #54348F; padding: 13px 15px; }
.sm-card { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.sm-card h2 { font-size: 20px; }
.sm-lv { display: inline-block; min-width: 62px; text-align: center; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 8px; }
.sm-lv.easy { background: #E4F5EC; color: #14613A; } .sm-lv.medium { background: #ECE6F8; color: #54348F; } .sm-lv.hard { background: #FBE7E6; color: #8F1D1D; }
.sm-atab { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font: 500 13.5px var(--body); color: var(--ink-2); cursor: pointer; }
.sm-atab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sm-avoid { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px dashed #C2610C; color: #7A3A06; font-size: 13px; text-decoration: line-through; text-decoration-color: #C2610C; }
/* dialog */
.sm-pop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.sm-dim { position: absolute; inset: 0; background: rgba(22, 15, 34, .55); }
.sm-dialog { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.sm-dh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.sm-dh h2 { font-size: 19px; }
.sm-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: #fff; font-size: 16px; cursor: pointer; flex: none; }
.sm-db { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.sm-db label { margin: 0 0 6px; }
.sm-df { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.sm-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
