/* ------------------------------------------------------------------
   PC Configurator — styles
   System fonts only. No remote assets of any kind.
   ------------------------------------------------------------------ */

:root {
  --bg:        #f5f7fb;
  --bg-2:      #ffffff;
  --panel:     #ffffff;
  --panel-2:   #f1f4fa;
  --line:      #e4e8f0;
  --line-2:    #c9d1e0;
  --text:      #101623;
  --text-dim:  #48546a;
  --text-mute: #5f6b7e;
  --accent:    #6d28d9;
  --accent-dk: #4c1d95;
  --blocker:   #d32030;
  --blocker-bg:#fef2f3;
  --warning:   #a35a06;
  --warning-bg:#fffaeb;
  --note:      #1d4ed8;
  --note-bg:   #eff5ff;
  --ok:        #15803d;
  --radius:    12px;
  --shadow:    0 6px 22px rgba(16,22,35,.08);
  --part-gpu:  #22d3ee;
  --part-cool: #8b9dc9;
  --part-ram:  #c084fc;
  --rgb: linear-gradient(90deg,#ff3b6b,#ff9d3b,#ffe23b,#3bff8f,#3bd7ff,#7c5cff,#ff3bd7,#ff3b6b);
  /* deeper stops for surfaces that carry white text, so contrast holds */
  --rgb-deep: linear-gradient(90deg,#c81e4e,#b1440a,#8a6508,#15803d,#0e7490,#5b21b6,#a21caf,#c81e4e);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 50; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------ top */

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { color: var(--text); font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand-sub { color: var(--text-mute); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

/* ----------------------------------------------------------- hero */

.hero { padding: 46px 0 28px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 320px at 12% -20%, rgba(109,40,217,.10), transparent 70%),
  radial-gradient(700px 280px at 88% -30%, rgba(219,39,119,.08), transparent 70%), var(--bg-2); }
.hero h1 { font-size: clamp(26px, 4.2vw, 42px); max-width: 20ch; }
.hero-sub { color: var(--text-dim); max-width: 68ch; margin-top: 14px; font-size: 16px; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.preset {
  background: var(--panel); color: var(--text-dim);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 9px 16px; font: inherit; font-size: 14px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.preset:hover { color: var(--text); border-color: var(--accent); }
.preset.is-active {
  background: var(--rgb-deep); background-size: 320% 100%; border-color: transparent; color: #fff;
  font-weight: 650; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  animation: rgb-slide 7s linear infinite;
}
.preset-blurb { margin-top: 12px; color: var(--text-mute); font-size: 14px; }

/* --------------------------------------------------------- layout */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 60px;
  align-items: start;
}
.sticky { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }

.sheet-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-head h2 { font-size: 20px; }
.picker-note { color: var(--text-mute); font-size: 13.5px; margin-top: 6px; max-width: 62ch; }

/* ---------------------------------------------------------- steps */

.step { margin-top: 26px; }
.step-title { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); display: flex; align-items: baseline; gap: 8px; }
.step-optional { color: var(--text-mute); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }
.step-hint { color: var(--text-mute); font-size: 13px; margin-top: 5px; }

.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-top: 10px; }

.opt {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 13px;
  color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .12s, background .12s, transform .06s;
}
.opt:hover { border-color: var(--line-2); background: var(--panel-2); }
.opt:active { transform: translateY(1px); }
.opt.is-selected { border-color: var(--accent); background: linear-gradient(180deg, rgba(109,40,217,.06), rgba(109,40,217,.02)); box-shadow: 0 2px 10px rgba(109,40,217,.10); }
.opt.is-selected::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--rgb); background-size: 100% 320%;
  animation: rgb-slide-y 7s linear infinite;
}
.opt.is-incompatible { opacity: .45; border-style: dashed; }
.opt.is-incompatible:hover, .opt.is-incompatible:focus-visible { opacity: 1; border-color: var(--blocker); }
.opt.is-incompatible .opt-reason { display: none; }
.opt.is-incompatible:hover .opt-reason,
.opt.is-incompatible:focus-visible .opt-reason { display: block; }

.opt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.opt-name { font-weight: 600; font-size: 14.5px; }
.opt-price { color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: 13.5px; flex: none; }
.opt-spec { color: var(--text-mute); font-size: 12.5px; line-height: 1.4; }
.opt-reason {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line-2);
  color: var(--blocker); font-size: 12.5px; line-height: 1.45;
}

.step-monitors .monitor-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.monitor-input {
  width: 88px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 16px;
}
.monitor-label { color: var(--text-dim); font-size: 14px; }

/* ---------------------------------------------------------- cards */

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.summary-list { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; max-height: 34vh; overflow-y: auto; }
.sum-row { display: grid; grid-template-columns: 78px minmax(0,1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; }
.sum-k { color: var(--text-mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.sum-n { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-v { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sum-empty { color: var(--text-mute); font-size: 13px; }

.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.total-row span { color: var(--text-dim); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.total-row strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------------------------------------------------------- power */

.watt { margin-top: 12px; height: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.watt-fill { height: 100%; width: 0; background: var(--rgb); background-size: 320% 100%;
  transition: width .25s ease; animation: rgb-slide 7s linear infinite; }
.watt-fill.is-tight { background: linear-gradient(90deg, #f59e0b, #d97706); animation: none; }
.watt-fill.is-over { background: linear-gradient(90deg, #dc2626, #991b1b); animation: none; }
.watt-label { margin-top: 8px; color: var(--text-dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------- issues */

.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.count { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid; font-variant-numeric: tabular-nums; }
.count-blocker { color: var(--blocker); border-color: var(--blocker); background: var(--blocker-bg); }
.count-warning { color: var(--warning); border-color: var(--warning); background: var(--warning-bg); }
.count-note    { color: var(--note);    border-color: var(--note);    background: var(--note-bg); }
.count.is-zero { color: var(--text-mute); border-color: var(--line-2); background: transparent; }

.issues { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.all-clear { color: var(--ok); font-size: 14px; font-weight: 600; padding: 10px 12px; border: 1px solid rgba(21,128,61,.30); background: #f0fdf4; border-radius: 10px; }
.issues-subhead { margin-top: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-mute); }

.issue { border-radius: 10px; padding: 10px 12px; border: 1px solid; }
.issue-blocker { border-color: rgba(211,32,48,.28); background: var(--blocker-bg); }
.issue-warning { border-color: rgba(163,90,6,.26); background: var(--warning-bg); }
.issue-note    { border-color: rgba(29,78,216,.22); background: var(--note-bg); }
.issue-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.issue-tag { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; }
.issue-blocker .issue-tag { color: var(--blocker); }
.issue-warning .issue-tag { color: var(--warning); }
.issue-note .issue-tag { color: var(--note); }
.issue-parts { font-size: 11.5px; color: var(--text-mute); }
.issue-msg { font-size: 13px; line-height: 1.5; color: var(--text); }

.builder-notes { display: flex; flex-direction: column; gap: 8px; }
.builder-notes:not(:empty) { margin-top: 10px; }
.builder-note { border-left: 3px solid transparent; border-image: var(--rgb) 1;
  background: linear-gradient(90deg, rgba(109,40,217,.06), rgba(219,39,119,.03));
  padding: 9px 12px; }
.builder-note-tag { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); font-weight: 700; margin-bottom: 3px; }
.builder-note p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

#compat-panel { scroll-margin-top: 90px; }
#compat-panel.is-pulse { animation: pulse 1.4s ease; }
@keyframes pulse {
  0%, 100% { box-shadow: var(--shadow); }
  25%      { box-shadow: 0 0 0 3px rgba(255,92,108,.55), var(--shadow); }
  60%      { box-shadow: 0 0 0 3px rgba(255,92,108,.25), var(--shadow); }
}

/* -------------------------------------------------------- buttons */

.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  font: inherit; font-size: 14px; font-weight: 600; border-radius: 10px;
  padding: 10px 16px; cursor: pointer; border: 1px solid transparent;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.btn-sm { padding: 6px 11px; font-size: 13px; font-weight: 500; }
.btn-primary {
  background: var(--rgb-deep); background-size: 320% 100%; color: #fff; flex: 1 1 auto;
  text-shadow: 0 1px 2px rgba(0,0,0,.32); box-shadow: 0 3px 14px rgba(109,40,217,.28);
  animation: rgb-slide 7s linear infinite;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { background: var(--panel-2); color: var(--text-mute); border-color: var(--line-2); cursor: not-allowed; text-shadow: none; box-shadow: none; animation: none; }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-danger { background: #fff; color: var(--blocker); border-color: rgba(211,32,48,.45); }
.btn-danger:hover { background: var(--blocker-bg); }
.btn.is-flash { background: var(--ok); color: #fff; border-color: var(--ok); text-shadow: none; animation: none; }

/* --------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 26px 0 40px; }
.footer p { color: var(--text-dim); font-size: 13px; max-width: 78ch; }
.footer-fine { margin-top: 8px; color: var(--text-mute); font-size: 12px; }

/* ---------------------------------------------------------- focus */

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-bottom: 20px; }
  body { padding-bottom: 82px; }

  .col-summary {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: #fff; border-top: 1px solid var(--line-2);
    box-shadow: 0 -10px 30px rgba(16,22,35,.14);
    display: flex; flex-direction: column;
    max-height: 86vh;
  }
  .sheet-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: transparent; border: 0; border-bottom: 1px solid var(--line);
    color: var(--text); font: inherit; padding: 13px 16px; cursor: pointer;
    text-align: left;
  }
  .sheet-total { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .sheet-counts { display: flex; gap: 5px; flex-wrap: wrap; flex: 1 1 auto; }
  .sheet-chev {
    flex: none; width: 10px; height: 10px; border-right: 2px solid var(--text-dim);
    border-bottom: 2px solid var(--text-dim); transform: rotate(-135deg); margin-right: 3px;
    transition: transform .18s ease;
  }
  body.sheet-open .sheet-chev { transform: rotate(45deg); margin-top: -5px; }

  .sticky { position: static; display: none; gap: 12px; padding: 12px 16px 18px; overflow-y: auto; }
  body.sheet-open .sticky { display: flex; }

  .summary-list { max-height: none; }
  .issues { max-height: none; }
  .card { box-shadow: none; }
}

@media (max-width: 560px) {
  .hero { padding: 30px 0 22px; }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { flex-wrap: wrap; }
  #impossible { width: 100%; }
  .sum-row { grid-template-columns: 66px minmax(0,1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Touch devices have no hover: show the incompatibility reason inline instead. */
@media (hover: none) {
  .opt.is-incompatible { opacity: .62; }
  .opt.is-incompatible .opt-reason { display: block; }
}

/* ================================================== FIT DIAGRAM */

.fit-card { margin-bottom: 26px; overflow: hidden; }
.fit-card .card-head { align-items: baseline; }

.fit-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.fit-legend li { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-mute); }
.key { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.key-gpu  { background: var(--part-gpu); }
.key-cool { background: var(--part-cool); }
.key-ram  { background: var(--part-ram); }
.key-over { background: repeating-linear-gradient(45deg, var(--blocker) 0 2px, rgba(255,92,108,.2) 2px 5px); }

.diagram { margin-top: 14px; overflow-x: auto; border-radius: 12px; }
.diagram-empty { color: var(--text-mute); font-size: 13px; padding: 26px 0; }

.fit-svg { width: 100%; height: auto; min-width: 520px; display: block; }

.d-case  { fill: none; stroke: #46607d; stroke-width: 3.5; }
.d-shroud{ fill: #10161f; stroke: var(--line-2); stroke-width: 2; }
.d-cage  { fill: #161f2b; stroke: var(--line-2); stroke-width: 2; }
.d-fan   { fill: #1a2431; stroke: #34465c; stroke-width: 2; }
.d-blade { stroke: #34465c; stroke-width: 2; }
.d-board { fill: #12321f; stroke: #2f7048; stroke-width: 2; }
.d-io    { fill: #1c2430; stroke: #46607d; stroke-width: 1.5; }
.d-port  { fill: #55708f; }
.d-bracket { fill: #35485e; }
.d-chip  { fill: #1c3a29; stroke: #2f7048; stroke-width: 1.5; }
.d-tray  { fill: #131b26; stroke: var(--line-2); stroke-width: 2; }
.d-panel { fill: var(--line-2); }
.d-cooler, .d-coolbar { fill: var(--part-cool); }
.d-cooler { fill-opacity: .9; }
.d-pump   { fill: #6d80ad; }
.d-fin    { stroke: #5f7099; stroke-width: 2; }
.d-rad    { fill: var(--part-cool); fill-opacity: .75; }
.d-rad.is-over { fill: url(#over-hatch); stroke: var(--blocker); stroke-width: 2; }
.d-rambar { fill: var(--part-ram); }
.d-ram.is-warn, .d-rambar.is-warn { fill: var(--warning); }
.d-gpu    { fill: var(--part-gpu); fill-opacity: .92; }
.d-backplate { fill: #075c69; fill-opacity: .6; }
.d-conn   { fill: #35485e; }
.d-gpu-over { fill: url(#over-hatch); stroke: var(--blocker); stroke-width: 2; }
.d-psu    { fill: #1d2836; stroke: #46607d; stroke-width: 2; }
.d-limit  { stroke: var(--warning); stroke-width: 2; stroke-dasharray: 7 6; opacity: .85; }
.d-dim    { fill: var(--text-dim); font-size: 14px; font-family: inherit; }
.d-tag    { fill: #9fb4ca; font-size: 13px; font-weight: 600; font-family: inherit; }
.d-tag-on { fill: #05161c; font-size: 13px; font-weight: 700; font-family: inherit; }
.d-over-label { fill: var(--blocker); font-size: 15px; font-weight: 700; font-family: inherit; }

/* --- diagram motion ------------------------------------------- */

.fit-svg { animation: fade-up .45s cubic-bezier(.2,.8,.25,1) both; }
.fit-svg .d-gpu, .fit-svg .d-gpu-over, .fit-svg .d-coolbar, .fit-svg .d-rambar {
  transform-box: fill-box; transform-origin: 100% 50%;
  animation: sweep-x .55s cubic-bezier(.2,.8,.25,1) both .08s;
}
.fit-svg .d-coolbar, .fit-svg .d-rambar { transform-origin: 0 50%; }
.fit-svg .d-ram {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: sweep-y .5s cubic-bezier(.2,.8,.25,1) both .18s;
}
.fit-svg .d-over-label { animation: fade-up .4s ease both .5s; }
.fit-svg .d-limit { animation: dash-in .6s ease both .25s; }
.fit-svg .d-cooler, .fit-svg .d-psu, .fit-svg .d-rad, .fit-svg .d-fin,
.fit-svg .d-fangroup, .fit-svg .d-io, .fit-svg .d-bracket, .fit-svg .d-shroud {
  animation: fade-in .5s ease both .15s;
}

@keyframes sweep-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sweep-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dash-in { from { opacity: 0; } to { opacity: .85; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===================================================== MOTION */

.hero h1        { animation: fade-up .5s cubic-bezier(.2,.8,.25,1) both .04s; }
.hero-sub       { animation: fade-up .5s cubic-bezier(.2,.8,.25,1) both .12s; }
.presets        { animation: fade-up .5s cubic-bezier(.2,.8,.25,1) both .2s; }
.preset-blurb   { animation: fade-up .5s cubic-bezier(.2,.8,.25,1) both .26s; }

.opt { will-change: transform; }
.opt:hover { transform: translateY(-1px); }
.opt.is-selected .opt-name::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-left: 7px; vertical-align: middle;
  animation: pop .3s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.issue { animation: issue-in .32s cubic-bezier(.2,.8,.25,1) both; }
.issue:nth-child(2) { animation-delay: .04s; }
.issue:nth-child(3) { animation-delay: .08s; }
.issue:nth-child(4) { animation-delay: .12s; }
.issue:nth-child(5) { animation-delay: .16s; }
.issue:nth-child(n+6) { animation-delay: .2s; }
@keyframes issue-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.all-clear { animation: issue-in .35s cubic-bezier(.2,.8,.25,1) both; }

.count { transition: transform .2s cubic-bezier(.2,1.4,.4,1); }
.count.is-bump { animation: bump .42s cubic-bezier(.2,1.4,.4,1); }
@keyframes bump { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }

.count-blocker:not(.is-zero) { animation: blocker-glow 2.2s ease-in-out infinite; }
@keyframes blocker-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,92,108,0); }
  50%      { box-shadow: 0 0 0 3px rgba(255,92,108,.16); }
}

.watt-fill { position: relative; overflow: hidden; }
.watt-fill.is-over::after, .watt-fill.is-tight::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.24) 0 6px, transparent 6px 14px);
  animation: stripes 700ms linear infinite;
}
@keyframes stripes { to { transform: translateX(14px); } }

.btn-danger { position: relative; }
.btn-danger::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  animation: nudge 3.4s ease-in-out infinite;
}
@keyframes nudge {
  0%, 78%, 100% { box-shadow: 0 0 0 0 rgba(255,92,108,0); }
  88%           { box-shadow: 0 0 0 4px rgba(255,92,108,.18); }
}

.builder-note { animation: fade-up .4s cubic-bezier(.2,.8,.25,1) both .1s; }

@media (max-width: 700px) {
  .fit-card .card-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ======================================================= RGB LIGHTING */

.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--rgb); background-size: 320% 100%;
  animation: rgb-slide 7s linear infinite;
}

@keyframes rgb-slide   { to { background-position: 320% 0; } }
@keyframes rgb-slide-y { to { background-position: 0 320%; } }
@keyframes hue-cycle   { to { filter: hue-rotate(360deg); } }

.fit-card { position: relative; }
.fit-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  border-radius: 14px 14px 0 0;
  background: var(--rgb); background-size: 320% 100%;
  animation: rgb-slide 7s linear infinite;
}

.key-rgb { background: var(--rgb); background-size: 300% 100%; animation: rgb-slide 4s linear infinite; }

/* lighting inside the case drawing */
.fit-svg .d-rgb { animation: hue-cycle 8s linear infinite; }
.d-bg      { fill: #0c1119; }
.d-fanring { fill: none; stroke-width: 4; }
.d-glow    { opacity: .55; }
.d-gpustrip{ stroke: none; }
