/* design/style.html's own layout (sp-): not part of the shared components. */
* { box-sizing: border-box; }
body { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.92em; padding: 1px 5px; border-radius: var(--radius-xs); background: var(--hover); }
.sp-dim { color: var(--text-dim); }
.sp-small { font-size: var(--text-sm); }
.sp-top { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between;
          flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-6);
          background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px);
          border-bottom: 1px solid var(--line); }
.sp-brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); text-decoration: none;
            font-weight: var(--weight-strong); letter-spacing: var(--tracking-tight); }
.sp-pickers { display: flex; flex-wrap: wrap; gap: var(--space-2); }
main { max-width: 68rem; margin: 0 auto; padding: var(--space-8) var(--space-6) var(--space-24); }
section { padding: var(--space-10) 0 var(--space-4); border-top: 1px solid var(--line); }
section.sp-hero { display: flex; gap: var(--space-8); align-items: center; border-top: 0; padding-top: var(--space-6); }
.sp-mark { border-radius: 24px; box-shadow: var(--shadow-2); flex: none; }
h1 { margin: 0 0 var(--space-3); font-size: var(--text-2xl); font-weight: var(--weight-strong); letter-spacing: var(--tracking-tight);
     line-height: var(--leading-tight); }
h2 { margin: 0 0 var(--space-4); font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: var(--tracking-tight); }
.sp-lead { margin: 0 0 var(--space-3); max-width: 46rem; font-size: var(--text-md); color: var(--text-dim); line-height: var(--leading); }
.sp-note { margin: -6px 0 var(--space-5); max-width: var(--measure); color: var(--text-dim); font-size: var(--text-sm); }
.sp-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.sp-start { align-items: flex-start; gap: var(--space-6); }
.sp-stack { display: grid; gap: var(--space-2); align-content: start; }
.sp-grow { flex: 1; min-width: 16rem; }
.sp-tok { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-dim); }

.sp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-3); }
.sp-swatch { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.sp-swatch div { height: 44px; border-bottom: 1px solid var(--line); }
.sp-swatch p { margin: 0; padding: var(--space-2) var(--space-3); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-dim);
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-swatch p b { display: block; color: var(--text); font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-medium); }

.sp-type > div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-4); align-items: baseline; padding: var(--space-2) 0; }
.sp-type p { margin: 0; }

.sp-spaces .sp-space-bar { display: grid; justify-items: start; gap: 4px; }
.sp-spaces .sp-space-bar i { display: block; height: 12px; border-radius: 3px; background: var(--accent-soft-strong); }
.sp-box { display: grid; place-items: center; min-width: 6.5rem; min-height: 4.2rem; padding: var(--space-3); text-align: center;
          border: 1px solid var(--line-strong); background: var(--surface-2); font-size: var(--text-xs); color: var(--text); }
.sp-raised { border-color: transparent; border-radius: var(--radius-lg); min-width: 10rem; min-height: 5.5rem; }

.sp-motion { display: grid; gap: var(--space-2); max-width: 36rem; }
.sp-track { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 36px; padding: 0 var(--space-3);
            border-radius: var(--radius-md); background: var(--surface-1); border: 1px solid var(--line); }
.sp-dot { position: absolute; left: 8px; top: 8px; width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--accent);
          transition: transform var(--d) var(--e); }
.sp-track:hover .sp-dot, .sp-track:focus-visible .sp-dot { transform: translateX(min(24rem, 60vw)); }

.sp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-5); max-width: 52rem; }
.sp-fields .sp-row { grid-column: 1 / -1; }

.sp-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--space-2); }
.sp-icons figure { margin: 0; display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-2);
                   border-radius: var(--radius-md); color: var(--text); }
.sp-icons figure:hover { background: var(--hover); }
.sp-icons .dt-icon { width: 24px; height: 24px; }
.sp-icons figcaption { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-dim); }

.sp-app { display: grid; grid-template-columns: 64px 13rem 1fr; height: 22rem; border: 1px solid var(--line); border-radius: var(--radius-lg);
          overflow: hidden; box-shadow: var(--shadow-2); background: var(--bg); }
.sp-rail { display: grid; align-content: start; justify-items: center; gap: var(--space-2); padding: var(--space-3) 0; background: var(--surface-1);
           border-right: 1px solid var(--line); }
.sp-rail .dt-avatar[aria-current] { box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--accent-text); }
.sp-rooms { display: grid; align-content: start; gap: 2px; padding: var(--space-3) var(--space-2); background: var(--surface-1);
            border-right: 1px solid var(--line); font-size: var(--text-sm); }
.sp-space { margin: 0 var(--space-2) var(--space-2); font-weight: var(--weight-strong); }
.sp-room { display: flex; align-items: center; gap: var(--space-2); height: 30px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
           color: var(--text-dim); text-decoration: none; }
.sp-room .dt-icon { width: 16px; height: 16px; }
.sp-room .dt-badge { margin-left: auto; }
.sp-room:hover { background: var(--hover); color: var(--text); }
.sp-room.sp-sel { background: var(--accent-soft); color: var(--text); font-weight: var(--weight-medium); }
.sp-chat { display: flex; flex-direction: column; min-width: 0; }
.sp-chat-head { display: flex; align-items: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line);
                font-size: var(--text-sm); white-space: nowrap; overflow: hidden; }
.sp-chat-head b { font-weight: var(--weight-strong); }
.sp-chat-head .sp-dim { overflow: hidden; text-overflow: ellipsis; }
.sp-msgs { flex: 1; display: grid; align-content: end; gap: var(--space-3); padding: var(--space-4); overflow: hidden; }
.sp-msg { display: flex; gap: var(--space-3); }
.sp-msg p { margin: 0; }
.sp-msg b { font-weight: var(--weight-strong); }
.sp-msg time { margin-left: 4px; color: var(--text-dim); font-size: var(--text-xs); }
.sp-composer { display: flex; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); }

.sp-table { width: 100%; max-width: 44rem; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.sp-table th, .sp-table td { padding: 6px var(--space-3); border-bottom: 1px solid var(--line); text-align: left; }
.sp-table th { color: var(--text-dim); font-weight: var(--weight-medium); }
.sp-table td:nth-child(1), .sp-table td:nth-child(2) { font-family: var(--font-mono); font-size: var(--text-xs); }
.sp-table .sp-sample { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 3px;
                       box-shadow: inset 0 0 0 1px var(--line-strong); }
.sp-pass { color: var(--ok-text); font-weight: var(--weight-medium); }
.sp-fail { color: var(--danger-text); font-weight: var(--weight-strong); }

@media (max-width: 760px) {
  .sp-top { padding: var(--space-2) var(--space-4); }
  main { padding: var(--space-4) var(--space-4) var(--space-16); }
  section.sp-hero { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .sp-mark { width: 64px; height: 64px; border-radius: 18px; }
  .sp-type > div { grid-template-columns: 1fr; gap: 2px; }
  .sp-type p[style*="text-3xl"] { font-size: var(--text-2xl) !important; }
  .sp-app { grid-template-columns: 56px 1fr; }
  .sp-rooms { display: none; }
}
