/* ==========================================================================
   Sangam Steels India — RM cost calculator (services.html)
   Uses the v3 design tokens; only layout and the few calculator-specific
   pieces (option cards, working tables) are defined here.
   ========================================================================== */
.rmc { display: grid; gap: 24px; }

.rmc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); }
.rmc-card h3 { margin-bottom: 6px; }
.rmc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.rmc-head p { margin: 0; }

/* Inputs */
.rmc-fields { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.rmc-fields .field input { width: 100%; font-variant-numeric: tabular-nums; }
.rmc-derived { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.rmc-derived > div { padding: 14px 18px; border-right: 1px solid var(--line); }
.rmc-derived > div:last-child { border-right: 0; }
.rmc-derived dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.rmc-derived dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.rmc-reset { font-size: .82rem; }

/* Option cards */
.rmc-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rmc-option { position: relative; transition: border-color .4s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.rmc-option .rmc-opt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.rmc-option .rmc-opt-head h3 { margin: 0; font-size: 1.05rem; }
.rmc-badge { display: none; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #2F7A5A; background: #E4F3EB; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.rmc-option.is-best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rmc-option.is-best .rmc-badge { display: inline-block; }
.rmc-big { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.2rem); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.rmc-big small { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 400; color: var(--muted); letter-spacing: .04em; margin-top: 8px; }
.rmc-option dl { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); display: grid; gap: 8px; }
.rmc-option dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.rmc-option dt { color: var(--muted); }
.rmc-option dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rmc-option p { margin-top: 16px; }

/* Differences */
.rmc td.is-saving { color: #2F7A5A; font-weight: 600; }
.rmc td.is-extra { color: #B54747; font-weight: 600; }
.rmc-verdict { max-width: 80ch; }

/* Working */
/* The working is always on show; it used to sit behind a disclosure toggle. */
.rmc-detail { border-top: 1px solid var(--line); padding-top: 4px; }
.rmc-work-title { margin: 18px 0 4px; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rmc-work { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; margin-top: 8px; }
.rmc-work table { font-size: .88rem; }
.rmc-work th, .rmc-work td { padding: 10px 12px; }
.rmc-work th { font-size: .68rem; }
.rmc-work td.num { font-variant-numeric: tabular-nums; }
.rmc-work tbody tr.rmc-total td { font-weight: 600; color: var(--ink); background: var(--surface-2); }
.rmc-work .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
.rmc-work .table-wrap { border: 0; border-radius: 0; background: transparent; }
.rmc-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rmc-inline input { width: 72px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: .88rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.rmc-inline input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rmc-inline .unit { font-size: .78rem; color: var(--muted); }
.rmc-fixed { color: var(--muted); font-size: .82rem; }

.rmc.is-invalid .rmc-option.is-best { border-color: var(--line); box-shadow: none; }

@media (max-width: 1100px) {
  .rmc-work { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .rmc-fields { grid-template-columns: repeat(3, 1fr); }
  .rmc-derived { grid-template-columns: repeat(2, 1fr); }
  .rmc-derived > div:nth-child(2n) { border-right: 0; }
  .rmc-derived > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rmc-compare { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rmc-fields { grid-template-columns: 1fr 1fr; }
  .rmc-fields .field:last-child { grid-column: 1 / -1; }
}
