/* ==========================================================================
   Scrap Group - reading pages: command reference and purchase terms.
   Shared simple header (brand + language) and the two page bodies.
   ========================================================================== */
.pg-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  background: rgba(10, 11, 14, .86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.pg-brand { display: inline-flex; align-items: center; gap: 12px; font: 700 20px/1 var(--f-display); }
.pg-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.pg-nav-end { display: flex; align-items: center; gap: 12px; }
.pg-home {
  padding: 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--tx-2);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
@media (hover: hover) and (pointer: fine) { /* gated */
  .pg-home:hover { color: var(--tx); border-color: var(--line-3); background: rgba(255, 255, 255, .05); }
}
/* ---------- command reference ---------- */
.cm-wrap { max-width: 1180px; margin-inline: auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 96px; }
.cm-head { margin-bottom: clamp(28px, 4vw, 48px); }
.cm-title { margin-top: 28px; font-size: clamp(40px, 5.6vw, 76px); font-weight: 700; line-height: 1.08; }
.cm-title em { font-style: normal; color: var(--tx-3); }
.cm-sub { max-width: 60ch; margin-top: 20px; color: var(--tx-2); font-size: 17px; line-height: 1.95; }
.cm-sub code, .cm-cmd {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  direction: ltr;
  unicode-bidi: isolate;
}
.cm-sub code { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink-1); color: var(--ice-2); font-size: .9em; }
.cm-tools {
  position: sticky;
  inset-block-start: calc(var(--nav-h) + 8px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  padding: 16px;
  background: rgba(16, 18, 23, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.cm-search {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  background: var(--ink-0);
  border: 1px solid var(--line-2);
  border-radius: var(--r-field);
  color: var(--tx);
  font: 400 16px/1.4 var(--f-body);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cm-search::placeholder { color: var(--tx-3); opacity: 1; }
.cm-search:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 4px var(--ice-dim); }
.cm-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--tx-2);
  font: 500 14.5px/1 var(--f-body);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
@media (hover: hover) and (pointer: fine) { /* gated */
  .cm-tab:hover { color: var(--tx); border-color: var(--line-3); }
}
.cm-tab:active { transform: scale(.97); }
.cm-tab.is-active { background: var(--chrome); border-color: var(--chrome); color: var(--ink-0); }
.cm-count { color: var(--tx-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cm-tab.is-active .cm-count { color: rgba(10, 11, 14, .6); }
.cm-bot-switch .cm-tab { min-height: 46px; padding: 0 24px; font-size: 15.5px; }
.cm-groups { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.cm-group-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; font: 700 clamp(26px, 3vw, 36px)/1.2 var(--f-display); }
.cm-group-title small { color: var(--tx-3); font: 500 15px/1 var(--f-body); font-variant-numeric: tabular-nums; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.cm-card {
  padding: 20px 22px 22px;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color var(--t), background var(--t), transform .45s var(--ease);
}
@media (hover: hover) and (pointer: fine) { /* gated */
  .cm-card:hover { border-color: var(--line-3); background: var(--ink-2); transform: translateY(-2px); }
}
.cm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cm-cmd { color: var(--ice-2); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.cm-badge { flex: 0 0 auto; padding: 3px 12px; border: 1px solid var(--line-3); border-radius: var(--r-pill); color: var(--tx-2); font-size: 12.5px; font-weight: 600; }
.cm-desc { color: var(--tx-2); font-size: 15px; line-height: 1.85; }
.cm-empty { display: none; padding: 64px 0; text-align: center; color: var(--tx-2); }
.cm-empty.is-visible { display: block; }
/* ---------- purchase terms (read mode) ---------- */
.lux-simple-shell { max-width: 880px; margin-inline: auto; padding: clamp(40px, 6vw, 88px) var(--gutter) 96px; }
.lux-simple-head { display: flex; align-items: center; gap: 22px; margin-bottom: clamp(36px, 5vw, 64px); }
.lux-simple-head img { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.lux-simple-head h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 700; line-height: 1.1; }
.lux-simple-head p { max-width: 62ch; margin-top: 14px; color: var(--tx-2); font-size: 17px; line-height: 1.95; }
.lux-simple-grid { display: flex; flex-direction: column; }
.lux-simple-box { padding-block: clamp(26px, 3.4vw, 40px); border-top: 1px solid var(--line); }
.lux-simple-box:last-child { border-bottom: 1px solid var(--line); }
.lux-simple-box h2 { margin-bottom: 14px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; }
.lux-simple-box ul { padding-inline-start: 1.3em; list-style: disc; }
.lux-simple-box li { max-width: 68ch; margin-bottom: 10px; padding-inline-start: .3em; color: var(--tx-2); font-size: 16.5px; line-height: 2; }
.lux-simple-box li::marker { color: var(--ice); }
.lux-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(32px, 5vw, 56px); }
.lux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: var(--tx);
  font: 600 15px/1 var(--f-body);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast);
}
@media (hover: hover) and (pointer: fine) { /* gated */
  .lux-btn:hover { background: rgba(255, 255, 255, .06); border-color: var(--line-3); }
}
.lux-btn:active { transform: scale(.98); }
.lux-btn.primary { background: var(--chrome); border-color: var(--chrome); color: var(--ink-0); }
@media (hover: hover) and (pointer: fine) { /* gated */
  .lux-btn.primary:hover { background: #fff; transform: translateY(-1px); }
}
@media (max-width: 640px) {
  .lux-simple-head { flex-direction: column; align-items: flex-start; }
  .cm-tools { position: static; }
}

/* 100+ command cards: skip layout and paint for the ones off screen */
.cm-card { content-visibility: auto; contain-intrinsic-size: auto 132px; }

/* ---------- 404 ---------- */

.nf { max-width: 640px; margin-inline: auto; padding: clamp(72px, 14vh, 160px) var(--gutter); text-align: center; }
.nf-code { margin-bottom: 12px; color: var(--tx-3); font: 700 clamp(64px, 10vw, 96px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.nf h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; }
.nf-text { max-width: 46ch; margin: 16px auto 0; color: var(--tx-2); font-size: 17px; line-height: 1.9; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
