/* ============================================================
   NOME FORGE — configurator, "Steel & Quench" editorial system
   Sharp (0 radius), hairline, monochrome; ember only as a hair.
   ============================================================ */
.cfg-body { padding-top: 56px; }
.cfg-main { padding-top: 48px; padding-bottom: 100px; }
.cfg-head { max-width: 680px; margin-bottom: 32px; }
.cfg-head h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.015em; margin: 14px 0 14px; line-height: 1; color: var(--ink-bright); }
.cfg-head p { color: var(--dim); font-size: 16px; }
.game-switch { display: grid; grid-template-columns: auto minmax(220px, 340px) auto; align-items: center; gap: 10px; margin: 14px 0 10px; }
.game-switch label, .game-switch span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.game-switch select { appearance: none; background: var(--surface); color: var(--ink); border: .5px solid var(--border); border-radius: 0; padding: 10px 36px 10px 12px; font-family: var(--font-body); font-size: 14px; }
.game-switch select:focus { outline: none; border-color: var(--faint); }
button:disabled { cursor: not-allowed; opacity: .58; }

/* AI bar */
.ai-bar { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 0; background: var(--surface); border: 0.5px solid var(--border); margin-bottom: 16px; }
.ai-bar:focus-within { border-color: var(--faint); }
.ai-bar .ai-ico { color: var(--faint); font-size: 15px; }
.ai-bar input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-family: var(--font-body); font-size: 15px; }
.ai-bar input::placeholder { color: var(--faint); }

/* presets */
.preset-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.preset-label { font-size: 11px; color: var(--faint); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.chip { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 9px 16px; border-radius: 0; cursor: pointer; background: transparent; border: 0.5px solid var(--border); color: var(--dim); transition: all .15s; }
.chip:hover { border-color: var(--faint); color: var(--ink); }
.chip.ghost { color: var(--faint); }

/* grid */
.cfg-grid { display: grid; grid-template-columns: 1fr 350px; gap: 0; align-items: start; border: 0.5px solid var(--border); }
.builder { padding: 30px; border-right: 0.5px solid var(--border); }
.block-title { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--faint); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 16px; }

/* framework options */
.fw-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-bottom: 36px; border: 0.5px solid var(--border); }
.fw-opt { position: relative; padding: 18px; border-radius: 0; background: transparent; border-right: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background-color .15s; }
.fw-opt:hover { background: var(--surface); }
.fw-opt.active { background: var(--surface2); box-shadow: inset 2px 0 0 var(--ink); }
.fw-opt .nm { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--ink-bright); }
.fw-opt .de { font-size: 12px; color: var(--faint); margin-top: 6px; }
.fw-opt .rec { position: absolute; top: 12px; right: 12px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--accent); background: none; padding: 0; }
.fw-opt .check { position: absolute; bottom: 14px; right: 14px; width: 14px; height: 14px; border-radius: 0; border: 0.5px solid var(--border); display: grid; place-items: center; }
.fw-opt.active .check { background: var(--ink); border-color: var(--ink); }
.fw-opt.active .check::after { content: "✓"; font-size: 9px; color: var(--bg); }

/* category accordions */
.category { border-radius: 0; background: transparent; border: 0.5px solid var(--border); margin-bottom: -0.5px; overflow: hidden; }
.cat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none; }
.cat-head:hover { background: var(--surface); }
.cat-head .cat-ic { font-size: 13px; filter: grayscale(1) opacity(.6); }
.cat-head .cat-nm { font-family: var(--font-display); font-weight: 400; font-size: 16px; flex: 1; color: var(--ink); }
.cat-head .cat-n { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-right: 6px; }
.cat-head .caret { color: var(--faint); transition: transform .25s var(--ease); font-family: var(--font-mono); }
.category.open .caret { transform: rotate(90deg); }
.cat-body { display: none; padding: 4px 14px 14px; }
.category.open .cat-body { display: block; }

/* resource row */
.res { display: flex; align-items: flex-start; gap: 14px; padding: 13px 14px; border-radius: 0; cursor: pointer; transition: background .15s; border: 0.5px solid transparent; }
.res:hover { background: var(--surface); }
.res.on { background: var(--surface2); border-color: var(--border); }
.res.locked { opacity: .5; cursor: not-allowed; }
.res .box { flex-shrink: 0; width: 16px; height: 16px; border-radius: 0; border: 0.5px solid var(--border); margin-top: 3px; display: grid; place-items: center; transition: all .15s; }
.res.on .box { background: var(--ink); border-color: var(--ink); }
.res.on .box::after { content: "✓"; font-size: 10px; color: var(--bg); }
.res .meta { flex: 1; min-width: 0; }
.res .meta .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.res .meta .nm { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--ink); }
.res .meta .lic { font-family: var(--font-mono); font-size: 10px; color: var(--faint); background: none; padding: 1px 0; border-radius: 0; border: none; }
.res .meta .core-tag { font-family: var(--font-mono); font-size: 10px; color: var(--faint); border: 0.5px solid var(--border); padding: 1px 7px; border-radius: 0; }
.res .meta .dsc { font-size: 13px; color: var(--dim); margin-top: 3px; }
.res .meta .dep { font-size: 11px; color: var(--faint); margin-top: 4px; font-family: var(--font-mono); }
.res .load-dots { display: flex; gap: 3px; margin-top: 5px; }
.res .load-dots i { width: 4px; height: 4px; border-radius: 0; background: var(--border); }
.res .load-dots i.fill { background: var(--faint); }

/* summary panel */
.summary { position: sticky; top: 80px; }
.summary-card { border-radius: 0; background: transparent; border: none; padding: 24px; }
.summary-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 18px; margin-bottom: 18px; color: var(--ink-bright); }
.sum-stat { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13px; color: var(--dim); border-top: 0.5px solid var(--border); }
.sum-stat:first-of-type { border-top: none; }
.sum-stat b { color: var(--ink); font-family: var(--font-mono); font-weight: 400; }
.load-bar { height: 2px; border-radius: 0; background: var(--border); overflow: hidden; margin: 8px 0 4px; }
.load-fill { height: 100%; width: 8%; border-radius: 0; background: var(--dim); transition: width .4s var(--ease); }
.conflicts { margin: 12px 0 4px; }
.conflict { display: flex; gap: 8px; font-size: 12px; color: var(--dim); padding: 8px 10px; border-radius: 0; background: var(--surface); border: 0.5px solid var(--border); border-left: 2px solid var(--faint); margin-top: 6px; }
.conflict.ok { color: var(--dim); border-left-color: var(--border); }

.hosting-pick { margin: 22px 0; padding-top: 20px; border-top: 0.5px solid var(--border); }
.hosting-pick h4 { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.radio { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 0; border: 0.5px solid var(--border); cursor: pointer; margin-bottom: -0.5px; transition: background-color .15s; }
.radio:hover { background: var(--surface); }
.radio input { accent-color: var(--ink); width: 14px; height: 14px; }
.radio span { display: flex; flex-direction: column; }
.radio b { font-size: 14px; font-weight: 500; color: var(--ink); }
.radio small { font-size: 12px; color: var(--faint); }
.radio:has(input:checked) { background: var(--surface2); }
.radio.disabled { cursor: not-allowed; opacity: .62; }
.radio.disabled:hover { background: transparent; }
.radio.disabled input { cursor: not-allowed; }

.price-line { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; border-top: 0.5px solid var(--border); margin-top: 4px; }
.price-line span { color: var(--faint); font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.price-line b { font-family: var(--font-display); font-weight: 400; font-size: 32px; color: var(--ink-bright); }
.full { width: 100%; justify-content: center; }
.micro { font-size: 11px; color: var(--faint); margin-top: 12px; line-height: 1.6; font-family: var(--font-mono); }
.micro code, .res code { font-family: var(--font-mono); color: var(--dim); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(11,11,12,.86); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-card { width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto; border-radius: 0; background: var(--bg); border: 0.5px solid var(--border); padding: 36px; position: relative; }
.modal-x { position: absolute; top: 18px; right: 18px; background: none; border: none; color: var(--faint); font-size: 18px; cursor: pointer; font-family: var(--font-mono); }
.modal-x:hover { color: var(--ink); }
.modal-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; margin: 14px 0 8px; color: var(--ink-bright); }
.modal-sub { color: var(--dim); font-size: 14px; margin-bottom: 20px; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface); border: 0.5px solid var(--border); border-bottom: none; border-radius: 0; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.copy-btn { background: transparent; border: 0.5px solid var(--border); color: var(--dim); font-family: var(--font-mono); font-size: 11px; padding: 5px 12px; border-radius: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
.copy-btn:hover { border-color: var(--faint); color: var(--ink); }
.code-block { background: var(--surface); border: 0.5px solid var(--border); border-radius: 0; padding: 18px; overflow-x: auto; max-height: 360px; overflow-y: auto; }
.code-block code { font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--dim); white-space: pre; }
.modal-actions { display: flex; gap: 12px; margin: 20px 0 8px; flex-wrap: wrap; }

@media (max-width: 920px) {
  .cfg-grid { grid-template-columns: 1fr; }
  .builder { border-right: none; border-bottom: 0.5px solid var(--border); }
  .summary { position: static; }
  .fw-options { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .fw-options { grid-template-columns: 1fr; } .ai-bar { flex-wrap: wrap; } .ai-bar input { width: 100%; padding: 6px 0; } }
@media (max-width: 560px) { .game-switch { grid-template-columns: 1fr; align-items: stretch; } }
