* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; background: #1a1a2e; color: #eee; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.demo-toolbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; background: rgba(26,26,46,0.95); border-bottom: 1px solid rgba(255,255,255,0.1); }
.demo-toolbar a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #5fa6a6; font-size: 1rem; }
.demo-toolbar .logo { height: 32px; }
.demo-toolbar .brand-wf { font-weight: 520; }
.demo-toolbar .brand-js { font-weight: 700; }
.demo-toolbar .demo-info { font-size: 11px; color: rgba(255,255,255,0.6); text-align: right; }
.demo-toolbar .demo-info strong { color: rgba(255,255,255,0.9); }

.container { max-width: 720px; margin: 0 auto; padding: 80px 24px 40px; }

.card { background: #16213e; border-radius: 12px; padding: 28px 28px; margin-bottom: 24px; border: 1px solid rgba(95,166,166,0.2); }
.card h1 { font-size: 1.5rem; color: #5fa6a6; margin-bottom: 12px; }
.card h2 { font-size: 1.2rem; color: #5fa6a6; margin-bottom: 10px; }
.card h3 { font-size: 1rem; margin: 14px 0 8px; }
.hint { color: rgba(255,255,255,0.65); font-size: 0.88rem; line-height: 1.6; margin-bottom: 14px; }
.hint code { background: rgba(95,166,166,0.15); padding: 2px 6px; border-radius: 3px; color: #5fa6a6; font-size: 0.82rem; }

.tag { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); font-weight: 600; margin-left: 8px; }

.field-row { display: flex; gap: 16px; margin-bottom: 12px; }
.field-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.field-row input { padding: 8px 10px; font-size: 0.95rem; border-radius: 6px; border: 1px solid rgba(95,166,166,0.3); background: #0f1a30; color: #eee; width: 100px; }

.total-line { font-size: 1rem; margin: 12px 0 4px; }
.over-budget-msg { color: #e07a5f; font-size: 0.85rem; margin-bottom: 10px; }

button, .load-btn, .place-order-btn { padding: 10px 22px; font-size: 0.95rem; font-family: inherit; background: #5fa6a6; color: #1a1a2e; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; transition: background 0.2s, opacity 0.2s; }
button:hover, .load-btn:hover, .place-order-btn:hover { background: #7cc4c4; }
button:disabled, .place-order-btn:disabled { opacity: 0.35; cursor: not-allowed; }

#order-slot { margin-top: 16px; }
#order-slot:empty { display: none; }

.checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.check-row { font-size: 0.88rem; color: rgba(255,255,255,0.75); display: flex; align-items: baseline; gap: 10px; }
.check-row code { background: rgba(95,166,166,0.15); padding: 1px 5px; border-radius: 3px; color: #5fa6a6; font-size: 0.8rem; }
/* One flex item for the whole description, badge included. Without this
   wrapper, a <code> tag inside the row's text becomes its OWN flex item
   (each text node before/after it becomes a separate anonymous item too),
   so the sentence wraps as several independently-sized columns instead of
   one paragraph, and the resulting overflow shrinks the badge with it. */
.check-text { flex: 1 1 auto; min-width: 0; }

.badge { display: inline-block; flex-shrink: 0; min-width: 58px; text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; }
.badge.pending { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
.badge.pass { background: rgba(95,166,166,0.25); color: #7cc4c4; }
.badge.fail { background: rgba(224,122,95,0.25); color: #e07a5f; }

.verify-log { list-style: none; max-height: 220px; overflow-y: auto; background: #0f1a30; border-radius: 8px; padding: 10px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.verify-log li { padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.verify-log li:last-child { border-bottom: none; }
.verify-log .t { color: rgba(255,255,255,0.4); display: inline-block; width: 64px; }
.verify-log .e { color: #7cc4c4; }
.verify-log .x { color: rgba(255,255,255,0.5); }

.source-section { margin-top: 32px; text-align: left; }
.source-section h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.source-section pre { border-radius: 8px; margin-bottom: 16px; font-size: 0.85rem; }

@media (max-width: 600px) {
    .demo-toolbar { padding: 8px 12px; }
    .demo-toolbar a { font-size: 0.85rem; gap: 6px; }
    .demo-toolbar .logo { height: 26px; }
    .demo-toolbar .demo-info { font-size: 0.7rem; }
    .container { padding: 70px 16px 32px; }
    .card { padding: 20px 18px; }
    .field-row { flex-wrap: wrap; }
    .source-section pre { font-size: 0.75rem; }
}
