.jm-calculator-page {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.jm-calculator-page__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 22px;
  background: linear-gradient(135deg, #162235, #20314b 62%, #1a2740);
  color: #f7f8fb;
  box-shadow: 0 18px 42px rgba(14, 21, 33, 0.22);
}

.jm-calculator-page__copy h1,
.jm-calculator-page__copy h2,
.jm-calculator-page__copy p {
  margin: 0;
}

.jm-calculator-page__copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.04;
}

.jm-calculator-page__copy h2 {
  margin-top: 12px;
  color: rgba(247, 248, 251, 0.78);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
}

.jm-calculator-page__copy p {
  margin-top: 10px;
  max-width: 60ch;
  color: rgba(247, 248, 251, 0.72);
  line-height: 1.6;
}

.jm-calculator-page__badge {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: radial-gradient(circle at 30% 30%, #1fb7a8, #1788d5);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.jm-calculator-page__suite .jm-calculator-suite {
  display: block;
}

.jm-calculator-page--no-hero .jm-calculator-page__suite {
  margin-top: 0;
}

.jm-calculator-suite {
  --jm-bg: #13233b;
  --jm-bg-strong: #0c1830;
  --jm-panel: linear-gradient(180deg, rgba(29, 47, 77, 0.98), rgba(18, 30, 50, 0.98));
  --jm-panel-soft: rgba(36, 55, 86, 0.92);
  --jm-panel-strong: rgba(17, 28, 48, 0.98);
  --jm-line: rgba(102, 136, 178, 0.2);
  --jm-text: #f5f8fd;
  --jm-muted: #b7c4d8;
  --jm-primary: #3b9cff;
  --jm-primary-dark: #1577df;
  --jm-accent: #1cc7c3;
  --jm-shadow: 0 24px 56px rgba(7, 13, 24, 0.32);
  --jm-radius-lg: 24px;
  --jm-radius-md: 16px;
  color: var(--jm-text);
  font-family: "Trebuchet MS", "Helvetica Neue", sans-serif;
}

.jm-calculator-suite *,
.jm-calculator-suite *::before,
.jm-calculator-suite *::after {
  box-sizing: border-box;
}

.jm-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  padding: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top right, rgba(28, 199, 195, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(17, 29, 49, 0.7), rgba(13, 22, 37, 0.18));
  border: 0;
  box-shadow: var(--jm-shadow);
  align-items: start;
}

.jm-sidebar,
.jm-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-radius-lg);
  background: var(--jm-panel);
  box-shadow: var(--jm-shadow);
  backdrop-filter: blur(12px);
}

.jm-sidebar::after,
.jm-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 141, 255, 0.12), transparent 66%);
  pointer-events: none;
}

.jm-sidebar {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.jm-sidebar h2,
.jm-hero-copy h1,
.jm-panel-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.jm-sidebar h2 {
  font-size: 1.55rem;
  line-height: 1;
}

.jm-sidebar p,
.jm-hero-copy p,
.jm-panel-header p,
.jm-result-card span,
.jm-summary dt,
.jm-form-message {
  color: var(--jm-muted);
}

.jm-sidebar p {
  margin: 8px 0 14px;
  line-height: 1.5;
}

.jm-nav {
  display: grid;
  gap: 10px;
}

.jm-nav-button {
  width: 100%;
  border: 1px solid rgba(130, 160, 200, 0.12);
  border-radius: 14px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--jm-text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.jm-nav-button:hover,
.jm-nav-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(27, 141, 255, 0.34);
  background: linear-gradient(135deg, rgba(27, 141, 255, 0.2), rgba(31, 183, 168, 0.08));
}

.jm-nav-button strong,
.jm-nav-button span {
  display: block;
}

.jm-nav-button strong {
  font-size: 0.98rem;
}

.jm-nav-button span {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--jm-muted);
}

.jm-main {
  display: grid;
  gap: 16px;
  align-content: start;
}

.jm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: end;
}

.jm-eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jm-accent);
}

.jm-hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.98;
}

.jm-hero-copy p {
  margin: 12px 0 0;
  max-width: 64ch;
  line-height: 1.65;
}

.jm-hero-badge {
  padding: 18px 20px;
  border-radius: var(--jm-radius-lg);
  background: linear-gradient(135deg, rgba(20, 111, 214, 0.98), rgba(31, 183, 168, 0.92));
  color: #ffffff;
  box-shadow: var(--jm-shadow);
}

.jm-hero-badge span,
.jm-hero-badge strong {
  display: block;
}

.jm-hero-badge span {
  margin-bottom: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.82;
}

.jm-hero-badge strong {
  font-size: 1.32rem;
  line-height: 1.2;
}

.jm-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.jm-panel {
  padding: 22px;
}

.jm-panel--inputs {
  background: linear-gradient(180deg, rgba(27, 46, 76, 0.98), rgba(16, 28, 48, 0.98));
  scroll-margin-top: 16px;
  outline: none;
}

.jm-panel--inputs:focus {
  outline: 2px solid rgba(59, 156, 255, 0.7);
  outline-offset: 3px;
}

.jm-panel--results {
  background: linear-gradient(180deg, rgba(31, 48, 76, 0.98), rgba(18, 31, 51, 0.98));
}

.jm-panel-header {
  margin-bottom: 16px;
}

.jm-panel-header--with-action {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.jm-panel-header h2 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

.jm-panel-header p {
  margin: 0;
  line-height: 1.6;
}

.jm-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.jm-field-grid .jm-field--full {
  grid-column: 1 / -1;
}

.jm-field,
.jm-slider-group {
  display: grid;
  gap: 8px;
}

.jm-field > span,
.jm-slider-label span {
  font-size: 0.92rem;
  font-weight: 700;
}

.jm-field input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(95, 133, 183, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(5, 17, 42, 0.9), rgba(6, 18, 44, 0.98));
  color: var(--jm-text);
  font: inherit;
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.jm-field input::placeholder {
  color: rgba(183, 194, 210, 0.72);
}

.jm-field input:focus,
.jm-slider-group input:focus,
.jm-action:focus,
.jm-nav-button:focus,
.jm-icon-action:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(27, 141, 255, 0.18);
}

.jm-slider-group {
  margin-top: 14px;
}

.jm-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.jm-slider-label strong {
  color: #dce9f9;
}

.jm-slider-group input[type="range"] {
  width: 100%;
  margin: 0;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jm-primary) 0%, rgba(255, 255, 255, 0.12) 0%);
}

.jm-slider-group input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 3px solid #dfeefe;
  border-radius: 50%;
  background: var(--jm-primary);
  box-shadow: 0 8px 18px rgba(12, 55, 110, 0.32);
  cursor: pointer;
}

.jm-slider-group input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #dfeefe;
  border-radius: 50%;
  background: var(--jm-primary);
  box-shadow: 0 8px 18px rgba(12, 55, 110, 0.32);
  cursor: pointer;
}

.jm-form-message {
  min-height: 24px;
  margin-top: 18px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.jm-action {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--jm-primary), var(--jm-accent));
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.jm-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(11, 58, 119, 0.32);
}

.jm-result-band,
.jm-result-grid,
.jm-summary {
  display: grid;
  gap: 16px;
}

.jm-icon-action {
  width: auto;
  min-width: 92px;
  height: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(77, 211, 207, 0.38);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 105, 190, 0.94), rgba(28, 199, 195, 0.86));
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(8, 42, 92, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.jm-icon-action:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 234, 222, 0.68);
  background: linear-gradient(135deg, rgba(32, 118, 209, 0.98), rgba(33, 211, 198, 0.9));
  box-shadow: 0 16px 28px rgba(8, 42, 92, 0.34);
}

.jm-icon-action__glyph {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.jm-icon-action__label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.jm-icon-action svg {
  display: block;
  width: 16px;
  height: 16px;
}

.jm-result-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.jm-result-grid {
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jm-result-card {
  display: grid;
  gap: 10px;
  min-height: 108px;
  padding: 18px 20px;
  border-radius: var(--jm-radius-md);
  background: linear-gradient(180deg, rgba(34, 50, 80, 0.86), rgba(30, 45, 71, 0.92));
  border: 1px solid rgba(130, 160, 200, 0.14);
  align-content: start;
}

.jm-result-card.is-strong {
  background: linear-gradient(135deg, rgba(30, 97, 175, 0.52), rgba(36, 88, 136, 0.88));
}

.jm-result-band .jm-result-card.is-strong:nth-child(2) {
  background: linear-gradient(135deg, rgba(33, 107, 163, 0.42), rgba(29, 136, 141, 0.86));
}

.jm-result-card strong {
  font-size: clamp(1.3rem, 2.25vw, 1.95rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.jm-result-card.is-compact-value strong {
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
}

.jm-result-card.is-extra-compact-value strong {
  font-size: clamp(0.98rem, 1.45vw, 1.3rem);
}

.jm-summary-wrap {
  margin-top: 22px;
  padding: 18px 18px 8px;
  border-radius: var(--jm-radius-md);
  background: linear-gradient(180deg, rgba(34, 48, 74, 0.94), rgba(28, 40, 64, 0.92));
  border: 1px solid rgba(95, 133, 183, 0.12);
}

.jm-summary-wrap h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jm-accent);
}

.jm-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.jm-summary div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--jm-line);
}

.jm-summary dt {
  margin-bottom: 6px;
  font-size: 0.84rem;
}

.jm-summary dd {
  margin: 0;
  font-weight: 700;
}

.jm-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 183, 168, 0.26);
  background: rgba(31, 183, 168, 0.08);
  color: var(--jm-muted);
  line-height: 1.6;
}

.jm-empty {
  padding: 28px;
  border-radius: var(--jm-radius-lg);
  border: 1px dashed rgba(130, 160, 200, 0.2);
  text-align: center;
  color: var(--jm-muted);
}

@media (max-width: 1100px) {
  .jm-shell,
  .jm-layout,
  .jm-hero {
    grid-template-columns: 1fr;
  }

  .jm-sidebar {
    position: static;
  }

  .jm-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .jm-calculator-page__hero {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .jm-panel {
    padding: 20px;
  }

  .jm-shell {
    gap: 14px;
  }

  .jm-nav,
  .jm-field-grid,
  .jm-result-band,
  .jm-result-grid,
  .jm-summary {
    grid-template-columns: 1fr;
  }

  .jm-panel-header--with-action {
    align-items: center;
  }

  .jm-icon-action {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .jm-hero-copy h1 {
    max-width: 12ch;
  }
}
