/* Rack Lens (rack.pocketplay.win): AI picker and plans. Kit v2 tokens only; no inline styles (CSP). */
.rk-tool [hidden], .rk-plans [hidden], .rk-panel [hidden], .rk-table tr[hidden], .rk-result [hidden] { display: none !important; }

/* ── Page head ── */
.rk-head { position: relative; display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 44px; padding-bottom: 4px; }
.rk-head::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -34px; width: min(1000px, 120vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(42% 55% at 30% 42%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%), radial-gradient(38% 50% at 72% 36%, rgba(62, 99, 221, .09), transparent 70%); filter: blur(10px); pointer-events: none; }
.rk-head .pp-display { font-size: clamp(38px, 5.2vw, 68px); max-width: 16ch; }
:lang(zh) .rk-head .pp-display { font-size: clamp(32px, 4.4vw, 54px); max-width: 18em; }
.rk-head .pp-lede { max-width: 50ch; }
.rk-head--page { justify-items: start; text-align: left; padding-top: 48px; }
.rk-head--page::before { left: 26%; top: -20px; height: 300px; background: radial-gradient(42% 55% at 30% 42%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%); }
.rk-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; width: 100%; flex-wrap: wrap; }
.rk-head__row > div { display: grid; gap: 12px; justify-items: start; }

/* ── Picker panel ── */
.rk-tool { margin-top: 28px; }
.rk-panel { padding: 0; overflow: hidden; }
.rk-panel__cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.rk-col { display: grid; gap: 24px; align-content: start; padding: 24px 32px 28px; min-width: 0; }
.rk-col + .rk-col { border-left: 1px solid var(--line); }
.rk-col__title { font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.rk-field { display: grid; gap: 12px; min-width: 0; align-content: start; }
.rk-field > .pp-label { justify-content: flex-start; gap: 8px; }
.rk-big { display: flex; align-items: baseline; gap: 8px; margin-top: -2px; }
.rk-big .pp-rangeval { font-size: 54px; letter-spacing: -.045em; }
.rk-big small { font-size: 14px; color: var(--ink-3); }
.rk-budget { gap: 8px; }
.rk-budget .pp-rangescale { margin-top: -4px; }
.rk-quick { gap: 6px; margin-top: 4px; }
.rk-quick .pp-chip { height: 32px; padding: 0 13px; }
.rk-seg { position: relative; width: 100%; overflow: visible; }
.rk-seg label { flex: 1 1 0; min-width: 0; padding: 0 6px; font-variant-numeric: tabular-nums; }
.rk-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rk-choices .pp-choice__card { padding: 13px 14px 14px; gap: 9px; }
.rk-choices .pp-choice__card small { min-height: 0; }
.rk-details { min-height: 68px; }
.rk-panel__foot { display: flex; align-items: center; gap: 20px; padding: 16px 32px; border-top: 1px solid var(--line); background: var(--surface-2); }
.rk-privacy { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); }
.rk-privacy .pp-i { flex: none; }
.rk-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rk-submit { min-width: 190px; }
.rk-status { margin: 16px 32px 20px; }
.rk-noscript { margin: 16px 32px 20px; }

/* ── Result ── */
.rk-result { margin-top: 48px; display: grid; gap: 22px; scroll-margin-top: calc(var(--header-h) + 12px); animation: pp-fade .4s var(--ease) both; }
.rk-result__head h2 { font-size: 24px; }
.rk-result__head p { margin-top: 4px; color: var(--ink-3); font-size: 14.5px; }
.rk-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.rk-pick { display: flex; flex-direction: column; gap: 14px; padding: 22px; min-width: 0; }
.rk-pick--free { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow-2); background: linear-gradient(180deg, var(--accent-soft) 0, var(--surface) 170px); }
.rk-pick__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-pick__rank { font: 500 11.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.rk-pick__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rk-pick__who > span:last-child { min-width: 0; }
.rk-pick__who small { display: block; font-size: 12.5px; color: var(--ink-3); }
.rk-pick h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.25; }
.rk-price { display: flex; align-items: baseline; gap: 4px; }
.rk-price b { font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.rk-price small { font-size: 14px; color: var(--ink-3); }
.rk-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.rk-spec { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--bg-2); font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk-pick--free .rk-spec { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rk-spec .pp-i { width: 14px; height: 14px; color: var(--ink-3); }
.rk-pick__meta { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-3); }
.rk-pick__meta span { display: flex; align-items: center; gap: 6px; }
.rk-pick__meta .pp-i { color: var(--ink-4); }
.rk-pick__why { font-size: 14px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; padding-top: 12px; border-top: 1px solid var(--line); }
.rk-pick__cta { margin-top: auto; }
.rk-pick__empty { color: var(--ink-3); font-size: 14px; }

/* Locked placeholders: skeleton content only, never real plan data. */
.rk-pick--locked { padding: 0; min-height: 380px; }
.rk-pick--locked .pp-locked__content { display: flex; flex-direction: column; gap: 14px; padding: 22px; height: 100%; }
.rk-bar { display: block; height: 12px; border-radius: 6px; background: var(--ink-3); opacity: .5; }
.rk-bar--l { height: 22px; }
.rk-bar--w30 { width: 30%; } .rk-bar--w45 { width: 45%; } .rk-bar--w60 { width: 60%; } .rk-bar--w75 { width: 75%; } .rk-bar--w90 { width: 90%; }
.rk-ghost-who { display: flex; align-items: center; gap: 10px; }
.rk-ghost-who .rk-bar { flex: 1; }
.rk-ghost-tile { width: 32px; height: 32px; border-radius: 9px; background: var(--ink-3); opacity: .45; flex: none; }
.rk-ghost-price { font-size: 40px; font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.rk-ghost-price small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.rk-ghost-specs { display: flex; gap: 6px; }
.rk-ghost-specs .rk-bar { height: 28px; width: 76px; border-radius: 14px; }
.rk-ghost-why { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.rk-ghost-cta { margin-top: auto; height: 42px; border-radius: var(--r-pill); background: var(--ink-3); opacity: .4; }
.rk-pick--locked .pp-locked__overlay { gap: 8px; }
.rk-pick--locked .pp-locked__overlay b { font-size: 16px; }

/* Explanation + actions */
.rk-explain { padding: 0; }
.rk-explain > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 16px 22px; cursor: pointer; font-weight: 650; font-size: 15.5px; }
.rk-explain > summary::-webkit-details-marker { display: none; }
.rk-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.rk-sum small { font-weight: 450; color: var(--ink-3); font-size: 13px; }
.rk-explain > summary .pp-i:first-child { color: var(--accent-text); }
.rk-chev { margin-left: auto; color: var(--ink-3); transition: transform .18s var(--ease); }
details[open] > summary .rk-chev { transform: rotate(180deg); }
.rk-explain__body { display: grid; gap: 12px; padding: 2px 24px 24px; max-width: 80ch; font-size: 15.5px; line-height: 1.75; }
:lang(zh) .rk-explain__body { line-height: 1.9; font-size: 15.5px; }
.rk-explain__body ul { padding-left: 1.25em; list-style: disc; display: grid; gap: 6px; }
.rk-explain__body li::marker { color: var(--ink-3); }
.rk-after { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rk-after .pp-spacer { flex: 1; }

/* ── Plan card (catalog snapshot) ── */
.rk-letter { font-weight: 700; font-size: calc(var(--gs) * .46); letter-spacing: 0; }
.rk-plan { display: grid; gap: 14px; padding: 18px 20px 16px; align-content: start; }
.rk-plan__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.rk-plan__top > span:nth-child(2) { min-width: 0; }
.rk-plan__top small { display: block; font-size: 12.5px; color: var(--ink-3); }
.rk-plan__top b { display: block; font-size: 15.5px; font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-plan__top > .pp-i { color: var(--ink-4); }
.rk-plan:hover .rk-plan__top > .pp-i { color: var(--ink-2); }
.rk-plan .rk-price b { font-size: 32px; }
.rk-plan__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; color: var(--ink-3); }
.rk-plan__foot .pp-i { color: var(--ink-4); }
.rk-dotsep { color: var(--ink-4); }
.rk-snap { margin-top: 16px; }
.rk-snap__note { margin-top: 12px; }
.rk-notes { margin-top: 16px; padding: 0; }
.rk-notes > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.rk-notes > summary::-webkit-details-marker { display: none; }
.rk-notes > summary > .pp-i:first-child { color: var(--ink-3); }
.rk-notes ul { padding: 0 22px 18px 46px; list-style: disc; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.rk-notes li::marker { color: var(--ink-4); }
.rk-ad { margin-top: 56px; }
.rk-dialog .pp-glyph { margin-bottom: 4px; }

/* ── Plans page ── */
.rk-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; }
.rk-plans__facts { display: grid; }
.rk-filters { padding: 22px 24px 18px; display: grid; gap: 18px; }
.rk-filters__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rk-filters__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.rk-providers { flex: 1 1 auto; }
.rk-chip { position: relative; cursor: pointer; }
.rk-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rk-chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rk-chip:has(input:checked) .pp-count { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.rk-chip:has(input:focus-visible) { box-shadow: var(--ring); }
.rk-count { margin-left: auto; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.rk-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rk-filters.is-live .rk-apply { display: none; }

.rk-tablewrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); overflow: clip; }
.rk-table th { top: var(--header-h); z-index: 2; padding: 12px 14px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.rk-table td { padding: 12px 14px; }
.rk-table tbody tr:last-child td { border-bottom: 0; }
.rk-sort { color: inherit; white-space: nowrap; }
.rk-sort:hover { color: var(--ink); }
.rk-table th[aria-sort] .rk-sort { color: var(--ink); }
.rk-table th[aria-sort] .rk-sort::after { content: " ↑"; color: var(--accent-text); }
.rk-t-plan { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.rk-t-name { min-width: 0; display: grid; gap: 1px; }
.rk-t-name b { font-weight: 600; line-height: 1.3; }
.rk-t-name small, .rk-t-region small { color: var(--ink-3); font-size: 12.5px; }
.rk-t-price b { font-size: 15px; font-weight: 700; }
.rk-t-price small { color: var(--ink-3); font-size: 12.5px; margin-left: 1px; }
.rk-t-region { white-space: nowrap; }
.rk-t-region small { display: block; }
.rk-t-go { text-align: right; white-space: nowrap; }
.rk-table[data-sort="cpu"] td:nth-child(6), .rk-table[data-sort="ram"] td:nth-child(7) { color: var(--accent-text); font-weight: 650; }
.rk-empty { padding: 56px 24px; }
.rk-note { padding: 0 4px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .rk-panel__cols { grid-template-columns: 1fr; }
  .rk-col + .rk-col { border-left: 0; border-top: 1px solid var(--line); }
  .rk-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rk-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-pick--free { grid-column: 1 / -1; }
  .rk-filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-filters__grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .rk-table th, .rk-table td { padding-left: 10px; padding-right: 10px; }
  .rk-t-plan { min-width: 180px; }
  .rk-t-ssd, .rk-table th:nth-child(5) { display: none; }
  .rk-t-go .pp-btn { width: 34px; padding: 0; }
  .rk-t-go .pp-btn span { display: none; }
}
@media (max-width: 800px) {
  .rk-tablewrap { overflow-x: auto; }
  .rk-table th { top: 0; }
  .rk-t-unit:nth-of-type(6), .rk-table th:nth-child(6) { display: none; }
  .rk-t-plan { min-width: 150px; }
  .rk-t-region { white-space: normal; }
}
@media (max-width: 640px) {
  .rk-head { padding-top: 40px; }
  .rk-head--page { padding-top: 32px; }
  .rk-head__row .pp-btn { height: 38px; }
  .rk-plans .pp-facts > div { padding: 12px 16px; }
  .rk-plans .pp-facts b { font-size: 19px; }
  .rk-plans { margin-top: 16px; gap: 14px; }
  .rk-col { padding: 22px 20px 24px; gap: 24px; }
  .rk-big .pp-rangeval { font-size: 46px; }
  .rk-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rk-choices .pp-choice__card small { min-height: 0; }
  .rk-panel__foot { flex-direction: column; align-items: stretch; padding: 16px 20px 20px; gap: 14px; }
  .rk-actions { margin-left: 0; flex-direction: column-reverse; align-items: stretch; }
  .rk-actions .pp-btn { width: 100%; }
  .rk-status, .rk-noscript { margin: 14px 20px 18px; }
  .rk-result { margin-top: 36px; }
  .rk-picks { grid-template-columns: 1fr; }
  .rk-pick--locked { min-height: 240px; }
  .rk-pick--locked .rk-ghost-why, .rk-pick--locked .rk-ghost-meta, .rk-pick--locked .rk-ghost-cta { display: none; }
  .rk-explain__body { padding: 2px 18px 20px; }
  .rk-explain > summary { padding: 14px 18px; align-items: flex-start; }
  .rk-explain > summary > .pp-i { margin-top: 3px; }
  .rk-filters { padding: 18px 16px 16px; }
  .rk-filters__grid { grid-template-columns: 1fr; gap: 18px; }
  .rk-filters__foot { align-items: center; }
  .rk-count { margin-left: 0; }
  .rk-providers { flex-basis: 100%; }
  .rk-after .pp-btn { flex: 1 1 auto; }
  .rk-ad { margin-top: 44px; }

  /* Plans table becomes cards. */
  .rk-tablewrap { background: transparent; border: 0; box-shadow: none; overflow: visible; display: grid; gap: 12px; }
  .rk-table, .rk-table tbody { display: block; }
  .rk-table thead { display: none; }
  .rk-table tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 8px; align-items: center; margin-bottom: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
  .rk-table tbody tr:hover { background: var(--surface); }
  .rk-table td, .rk-table td.num { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  .rk-c-plan { grid-column: span 4; }
  .rk-t-plan { min-width: 0; }
  .rk-t-go .pp-btn { width: auto; padding: 0 13px; }
  .rk-t-go .pp-btn span { display: inline; }
  .rk-t-price { grid-column: span 2; text-align: right !important; }
  .rk-t-price b { font-size: 19px; letter-spacing: -.03em; }
  .rk-t-cpu, .rk-t-ram, .rk-t-ssd { grid-column: span 2; display: flex !important; align-items: center; justify-content: center; height: 30px; padding: 0 6px !important; border-radius: var(--r-s); background: var(--bg-2); font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
  .rk-t-cpu::after, .rk-t-ram::after, .rk-t-ssd::after { content: attr(data-u); white-space: pre; }
  .rk-t-unit { grid-column: span 3; font-size: 12.5px; color: var(--ink); font-weight: 550; white-space: nowrap; }
  .rk-t-unit::before { content: attr(data-l); color: var(--ink-3); font-weight: 450; }
  .rk-t-unit:nth-of-type(6) { display: block !important; }
  .rk-t-region { grid-column: span 3; white-space: normal; font-size: 13.5px; }
  .rk-t-go { grid-column: span 3; justify-self: end; }
  .rk-table[data-sort="cpu"] td:nth-child(6), .rk-table[data-sort="ram"] td:nth-child(7) { color: var(--accent-text); }
  .rk-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
}
