.nmc-widget {
  --nmc-navy: #0b2545;
  --nmc-navy-light: #13355e;
  --nmc-teal: #0d9488;
  --nmc-teal-light: #14b8a6;
  --nmc-teal-dim: #ccfbf1;
  --nmc-bg: #f4f8f9;
  --nmc-border: #d7e2e6;
  --nmc-text: #0b2545;
  --nmc-text-muted: #4a6178;

  max-width: 980px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--nmc-text);
  background: var(--nmc-bg);
  border: 1px solid var(--nmc-border);
  border-radius: 14px;
  padding: 24px;
  box-sizing: border-box;
}
.nmc-widget *, .nmc-widget *::before, .nmc-widget *::after { box-sizing: border-box; }

.nmc-header { margin-bottom: 20px; }
.nmc-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nmc-teal); }
.nmc-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: var(--nmc-navy); }
.nmc-subtitle { margin: 0; font-size: 14px; line-height: 1.5; color: var(--nmc-text-muted); max-width: 640px; }

.nmc-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .nmc-layout { grid-template-columns: 1fr; } }

.nmc-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--nmc-navy); margin-bottom: 14px; }
.nmc-field-wide { width: 100%; }
.nmc-field small { font-weight: 400; color: var(--nmc-text-muted); }

.nmc-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--nmc-border);
  color: var(--nmc-text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}
.nmc-tip:hover, .nmc-tip:focus { background: var(--nmc-teal); color: #fff; outline: none; }
.nmc-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 220px;
  max-width: 60vw;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--nmc-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s;
  z-index: 20;
  pointer-events: none;
}
.nmc-tip:hover::after, .nmc-tip:focus::after { opacity: 1; visibility: visible; }

.nmc-input, .nmc-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nmc-navy);
  background: #fff;
  border: 1px solid var(--nmc-border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
}
.nmc-input:focus, .nmc-select:focus { border-color: var(--nmc-teal); }
.nmc-select { cursor: pointer; color: var(--nmc-teal); font-weight: 700; }

.nmc-input-group { display: flex; gap: 8px; }
.nmc-input-group .nmc-input { flex: 1; }
.nmc-select-unit { width: 84px; flex: none; }

.nmc-time-group { display: flex; gap: 8px; }
.nmc-time-field { flex: 1; }
.nmc-time-field .nmc-input { text-align: center; }

.nmc-section { border: 1px solid var(--nmc-border); border-radius: 10px; margin-bottom: 14px; background: #fff; }
.nmc-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--nmc-navy);
  text-align: left;
}
.nmc-section-caret { color: var(--nmc-teal); font-size: 11px; transition: transform .15s; }
.nmc-section.nmc-collapsed .nmc-section-caret { transform: rotate(-90deg); }
.nmc-section-body { padding: 4px 14px 14px; }
.nmc-section.nmc-collapsed .nmc-section-body { display: none; }

.nmc-input-affixed { position: relative; }
.nmc-input-affixed .nmc-input { width: 100%; }
.nmc-input-prefix, .nmc-input-suffix-inset {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--nmc-teal);
  pointer-events: none;
}
.nmc-input-prefix { left: 12px; }
.nmc-input-suffix-inset { right: 12px; }
.nmc-input-affixed .nmc-input-has-prefix { padding-left: 34px; }
.nmc-input-affixed .nmc-input-has-suffix { padding-right: 64px; }

.nmc-currency-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.nmc-currency-row .nmc-field { flex: 1; min-width: 120px; margin-bottom: 0; }
.nmc-custom-currency-fields { display: flex; gap: 8px; }
.nmc-custom-currency-fields .nmc-field { min-width: 80px; }

.nmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s, background .15s;
}
.nmc-btn-block { width: 100%; }
.nmc-btn-primary { background: var(--nmc-teal); color: #fff; }
.nmc-btn-primary:hover { filter: brightness(0.94); }
.nmc-btn-outline { background: #fff; color: var(--nmc-navy); border-color: var(--nmc-border); font-size: 13px; padding: 8px 12px; }
.nmc-btn-outline:hover { border-color: var(--nmc-teal); color: var(--nmc-teal); }
.nmc-btn-small { flex: 1; }
.nmc-btn-text { background: transparent; color: var(--nmc-teal); border: none; }
.nmc-btn-text:hover { text-decoration: underline; }

.nmc-toggle-row { margin-bottom: 14px; }
.nmc-toggle-label { display: block; font-size: 13px; font-weight: 600; color: var(--nmc-navy); margin-bottom: 6px; }
.nmc-pill-row { display: flex; gap: 8px; }
.nmc-pill { flex: 1; }
.nmc-pill input { position: absolute; opacity: 0; pointer-events: none; }
.nmc-pill span {
  display: block;
  text-align: center;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nmc-navy);
  background: #fff;
  border: 1px solid var(--nmc-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.nmc-pill input:checked + span { background: var(--nmc-teal); border-color: var(--nmc-teal); color: #fff; }

.nmc-error { background: #fde8e8; color: #9b1c1c; border: 1px solid #f5c2c2; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }

.nmc-result-sticky { position: sticky; top: 16px; background: var(--nmc-navy); border-radius: 14px; padding: 20px; color: #fff; }

.nmc-result-headline { text-align: center; margin-bottom: 8px; }
.nmc-result-headline-label { display: block; font-size: 12px; color: var(--nmc-teal-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.nmc-result-headline-value { display: block; font-size: 32px; font-weight: 800; color: #fff; line-height: 1.1; }

.nmc-result-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.nmc-result-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.nmc-result-row span:first-child { color: var(--nmc-teal-dim); }
.nmc-result-row span:last-child { font-weight: 700; }

.nmc-compare-banner {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(20,184,166,0.15);
  color: var(--nmc-teal-light);
}
.nmc-compare-banner.nmc-compare-bad { background: rgba(239,68,68,0.15); color: #fca5a5; }

.nmc-hint { font-size: 12px; color: var(--nmc-text-muted); line-height: 1.5; margin: 14px 0; }
.nmc-result-sticky .nmc-hint { color: var(--nmc-teal-dim); }
.nmc-disclaimer { opacity: .85; }

.nmc-result-actions { display: flex; gap: 8px; margin-top: 4px; }
.nmc-result-sticky .nmc-btn-outline { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.25); }
.nmc-result-sticky .nmc-btn-outline:hover { border-color: var(--nmc-teal-light); color: var(--nmc-teal-light); }
.nmc-result-sticky .nmc-btn-text { color: var(--nmc-teal-light); margin-top: 10px; }

.nmc-history-panel { margin-top: 20px; border-top: 1px solid var(--nmc-border); padding-top: 16px; }
.nmc-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.nmc-history-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--nmc-navy); }
.nmc-history-list { display: flex; flex-direction: column; gap: 8px; }
.nmc-history-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--nmc-border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.nmc-history-item-main { display: flex; flex-direction: column; gap: 2px; }
.nmc-history-item-time { font-weight: 800; color: var(--nmc-teal); }
.nmc-history-item-meta { color: var(--nmc-text-muted); font-size: 12px; }
.nmc-history-item-remove { background: none; border: none; color: #9b1c1c; cursor: pointer; font-size: 12px; font-weight: 700; }
.nmc-history-empty { font-size: 13px; color: var(--nmc-text-muted); }

.nmc-export-card { position: absolute; left: -9999px; top: -9999px; width: 480px; padding: 24px; background: #fff; color: var(--nmc-navy); font-family: inherit; }
