.nlmed-after-summary,
.nlmed-variable-estimate,
.nlmed-simple-estimate {
  box-sizing: border-box;
}

.nlmed-after-summary {
  clear: both;
  width: 100%;
  margin: 16px 0 10px;
  padding-top: 0;
}

.nlmed-variable-estimate,
.nlmed-simple-estimate {
  width: 100%;
  margin: 0;
}

.nlmed-card,
.nlmed-card * {
  box-sizing: border-box;
}

.nlmed-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #d9e1ec;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff 0%, #f9fbfd 100%);
  box-shadow: 0 6px 18px rgba(27, 52, 91, .06);
  color: #17243b;
  font-family: inherit;
}

.nlmed-card__topline {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--nlmed-accent, #223f70), var(--nlmed-success, #1f9d79));
}

.nlmed-card__main,
.nlmed-card__side {
  min-width: 0;
}

.nlmed-card__headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.nlmed-card__heading-copy {
  min-width: 0;
}

.nlmed-card__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--nlmed-success, #1f9d79);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .72px;
  line-height: 1.2;
  text-transform: uppercase;
}

.nlmed-card h3,
.nlmed-lottery-card h3 {
  margin: 0;
  color: var(--nlmed-accent, #223f70);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.16;
}

.nlmed-card__coin {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(34, 63, 112, .16);
  border-radius: 999px;
  background: #fff;
  color: var(--nlmed-accent, #223f70);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.nlmed-card__numbers {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 8px;
}

.nlmed-card__primary-number,
.nlmed-card__secondary-number {
  display: flex;
  min-width: 0;
  min-height: 66px;
  padding: 8px 9px;
  flex-direction: column;
  justify-content: center;
  border-radius: 9px;
}

.nlmed-card__primary-number {
  background: var(--nlmed-accent, #223f70);
  color: #fff;
}

.nlmed-card__secondary-number {
  border: 1px solid #dce4ee;
  background: #fff;
  color: #17243b;
}

.nlmed-card__numbers span,
.nlmed-card__metrics span,
.nlmed-card__meta-line span {
  display: block;
  color: inherit;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .28px;
  line-height: 1.2;
  opacity: .72;
  text-transform: uppercase;
}

.nlmed-card__numbers strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 850;
  line-height: 1.05;
}

.nlmed-card__secondary-number strong {
  font-size: clamp(16px, 1.8vw, 20px);
}

.nlmed-card__numbers small {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: 9px;
  line-height: 1.25;
  opacity: .7;
}

.nlmed-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 5px;
}

.nlmed-card__metrics--1 { grid-template-columns: 1fr; }
.nlmed-card__metrics--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nlmed-card__metrics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nlmed-card__metrics--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.nlmed-card__metrics > div {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
}

.nlmed-card__metrics strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #17243b;
  font-size: 11.5px;
  line-height: 1.2;
}

.nlmed-card__meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 11px;
  margin-bottom: 5px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #f4f7fa;
  color: #657085;
}

.nlmed-card__meta-line span {
  margin: 0;
  font-size: 8.5px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

.nlmed-card__status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--nlmed-success, #1f9d79);
  box-shadow: 0 0 0 2px rgba(31, 157, 121, .12);
}

.nlmed-card__fleet-note {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding: 5px 7px;
  border: 1px solid #d8eadf;
  border-radius: 7px;
  background: #f2faf6;
  color: #235c48;
  font-size: 10px;
}

.nlmed-card__actions {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.nlmed-electricity,
.nlmed-card__details {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fff;
  color: #6c7688;
}

.nlmed-electricity summary,
.nlmed-card__details summary {
  padding: 7px 8px;
  cursor: pointer;
  color: var(--nlmed-accent, #223f70);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  list-style-position: inside;
}

.nlmed-electricity[open] summary,
.nlmed-card__details[open] summary {
  border-bottom: 1px solid #e3e8ef;
}

.nlmed-electricity__body,
.nlmed-card__details p {
  padding: 8px;
}

.nlmed-card__details p {
  margin: 0;
  color: #70798a;
  font-size: 9px;
  line-height: 1.4;
}

.nlmed-electricity__body label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5f6b7d;
  font-size: 10px;
  font-weight: 700;
}

.nlmed-electricity__body label span {
  margin-left: auto;
  color: #7d8797;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.nlmed-electricity__input {
  width: 78px !important;
  min-width: 78px;
  height: 30px;
  margin: 0 !important;
  padding: 4px 7px !important;
  border: 1px solid #cfd8e5 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #17243b !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.nlmed-electricity__results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.nlmed-electricity__results > div {
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  background: #f6f8fb;
}

.nlmed-electricity__results span {
  display: block;
  margin-bottom: 2px;
  color: #738095;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.nlmed-electricity__results strong {
  display: block;
  overflow-wrap: anywhere;
  color: #17243b;
  font-size: 10.5px;
  line-height: 1.2;
}

.nlmed-electricity__net.is-positive { color: #167657; }
.nlmed-electricity__net.is-negative { color: #a43a3a; }

.nlmed-electricity__body p {
  margin: 6px 0 0;
  color: #7b8493;
  font-size: 8px;
  line-height: 1.35;
}

.nlmed-message {
  display: flex;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 10px 12px;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #d9e1ec;
  border-left: 3px solid var(--nlmed-accent, #223f70);
  border-radius: 9px;
  background: #f7f9fc;
  color: #26344c;
}

.nlmed-message strong {
  color: var(--nlmed-accent, #223f70);
  font-size: 12px;
}

.nlmed-message span,
.nlmed-message small {
  color: #637086;
  font-size: 10px;
  line-height: 1.35;
}

.nlmed-message--warning {
  border-left-color: #c98723;
  background: #fffaf1;
}

/* Lottery / solo informational card: no percentages, no years, no numerical odds. */
.nlmed-lottery-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 13px 15px;
  border: 1px solid #eadfbd;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf0 100%);
  color: #5f5135;
}

.nlmed-lottery-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5e8bf;
  color: #805c13;
  font-size: 14px;
}

.nlmed-lottery-card__content > span {
  display: block;
  margin-bottom: 2px;
  color: #927019;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.nlmed-lottery-card h3 {
  color: #5d4615;
  font-size: 15px;
}

.nlmed-lottery-card p {
  margin: 4px 0 3px;
  color: #6c6251;
  font-size: 10.5px;
  line-height: 1.4;
}

.nlmed-lottery-card small {
  color: #8a7c63;
  font-size: 9px;
}


#nlmed-variant-comparison-slot {
  width: 100%;
}

/* Variant comparison */
.nlmed-compare {
  clear: both;
  width: min(980px, 100%);
  margin: 8px auto 0;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  background: #fff;
}

.nlmed-compare summary {
  padding: 8px 10px;
  cursor: pointer;
  color: var(--nlmed-accent, #223f70);
  font-size: 10px;
  font-weight: 800;
  list-style-position: inside;
}

.nlmed-compare[open] summary { border-bottom: 1px solid #e3e8ef; }

.nlmed-compare__scroll {
  overflow-x: auto;
  padding: 7px 9px 3px;
  -webkit-overflow-scrolling: touch;
}

.nlmed-compare table {
  width: 100%;
  min-width: 430px;
  margin: 0;
  border-collapse: collapse;
  background: transparent;
  font-size: 9.5px;
}

.nlmed-compare th,
.nlmed-compare td {
  padding: 6px 7px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
}

.nlmed-compare thead th {
  color: var(--nlmed-accent, #223f70);
  font-size: 9.5px;
  font-weight: 800;
}

.nlmed-compare tbody th {
  width: 108px;
  color: #6f7a8b;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.nlmed-compare td {
  color: #273650;
  font-weight: 700;
}

.nlmed-compare > p {
  margin: 3px 9px 8px;
  color: #818a99;
  font-size: 8.5px;
  line-height: 1.35;
}

/* Compact mining summary for WooCommerce product cards. */
.nlmed-loop-estimate {
  display: flex;
  margin: 7px 0 9px;
  padding: 7px 9px;
  flex-direction: column;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #f7f9fc;
  text-align: left;
}

.nlmed-loop-estimate span {
  color: #667287;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.nlmed-loop-estimate strong {
  margin: 1px 0;
  color: var(--nlmed-accent, #223f70);
  font-size: 12px;
  line-height: 1.25;
}

.nlmed-loop-estimate small {
  color: #788295;
  font-size: 9px;
  line-height: 1.3;
}

.nlmed-loop-estimate--lottery {
  border-color: #eadfbd;
  background: #fffaf0;
}

.nlmed-loop-estimate--lottery strong { color: #755816; }

@media (max-width: 900px) {
  .nlmed-card {
    grid-template-columns: 1fr;
    max-width: 980px;
  }

  .nlmed-card__actions {
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .nlmed-after-summary {
    margin-top: 16px;
  }

  .nlmed-card {
    gap: 9px;
    padding: 12px;
    border-radius: 11px;
  }

  .nlmed-card__numbers {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  }

  .nlmed-card__primary-number,
  .nlmed-card__secondary-number {
    min-height: 70px;
    padding: 9px;
  }

  .nlmed-card__metrics,
  .nlmed-card__metrics--3,
  .nlmed-card__metrics--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nlmed-card__actions {
    flex-direction: column;
  }

  .nlmed-electricity,
  .nlmed-card__details {
    width: 100%;
  }

  .nlmed-lottery-card {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .nlmed-card__numbers {
    grid-template-columns: 1fr;
  }

  .nlmed-card__numbers strong {
    font-size: 19px;
  }

  .nlmed-card__metrics,
  .nlmed-card__metrics--2,
  .nlmed-card__metrics--3,
  .nlmed-card__metrics--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nlmed-electricity__results {
    grid-template-columns: 1fr;
  }

  .nlmed-lottery-card {
    gap: 9px;
  }

  .nlmed-lottery-card__icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }
}

/* v1.2.0 UX refinements */
.nlmed-card__details--full {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  flex: none;
}

.nlmed-card__details--full .nlmed-card__details-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 14px;
  padding: 9px 10px 10px;
}

.nlmed-card__details--full .nlmed-card__details-body p {
  margin: 0;
  padding: 0;
  color: #70798a;
  font-size: 9.5px;
  line-height: 1.45;
}

.nlmed-card__actions .nlmed-electricity {
  width: 100%;
}

.nlmed-electricity__results--roi {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nlmed-electricity__roi {
  color: var(--nlmed-accent, #223f70) !important;
}

.nlmed-roi-summary {
  margin-top: 5px;
  padding: 7px 9px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fff;
}

.nlmed-roi-summary span,
.nlmed-roi-summary small {
  display: block;
  color: #738095;
  font-size: 8px;
  line-height: 1.3;
}

.nlmed-roi-summary span {
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.nlmed-roi-summary strong {
  display: block;
  margin: 2px 0;
  color: var(--nlmed-accent, #223f70);
  font-size: 12px;
  line-height: 1.25;
}

.nlmed-compare__roi {
  color: var(--nlmed-accent, #223f70) !important;
  font-weight: 800 !important;
}

@media (max-width: 700px) {
  .nlmed-electricity__results--roi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nlmed-card__details--full .nlmed-card__details-body {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .nlmed-electricity__results--roi {
    grid-template-columns: 1fr;
  }
}
/* Storefront clarity refinements */
.nlmed-card__metrics > div[title]{
  cursor:help;
}
.nlmed-card__metrics strong{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
.nlmed-electricity summary,
.nlmed-card__details summary,
.nlmed-compare summary,
.nlmed-electricity summary *,
.nlmed-card__details summary *,
.nlmed-compare summary *{
  cursor:pointer!important;
}
.nlmed-electricity summary:hover,
.nlmed-card__details summary:hover,
.nlmed-compare summary:hover{
  background:#f6f9fd;
}
.nlmed-loop-estimate__usd{
  margin-top:2px;
  color:var(--nlmed-accent,#223f70)!important;
  font-size:9.5px!important;
  font-weight:800;
}

/* v1.3.1 coin identity and translation-safe amounts */
.nlmed-coin-mark{
  display:inline-flex!important;
  align-items:center;
  gap:4px;
  white-space:nowrap;
  vertical-align:middle;
  text-transform:none!important;
  letter-spacing:0!important;
  opacity:1!important;
}
.nlmed-coin-mark img{
  display:block;
  width:14px;
  height:14px;
  flex:0 0 14px;
}
.nlmed-card__coin .nlmed-coin-mark img{width:15px;height:15px;flex-basis:15px}
.nlmed-amount{
  display:inline-flex!important;
  align-items:center;
  gap:3px;
  white-space:nowrap;
  text-transform:none!important;
  letter-spacing:0!important;
  opacity:1!important;
}
.nlmed-loop-estimate strong .nlmed-coin-mark img{width:13px;height:13px;flex-basis:13px}
.nlmed-loop-estimate__usd .woocommerce-Price-amount{white-space:nowrap}

/* v1.3.1 compact estimate freshness label */
.nlmed-loop-estimate__updated{margin-top:2px}
