@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

.spm-wrapper {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: 48px 20px;
  color: #f8f6e9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(1000px 560px at 8% -12%, rgba(229, 205, 130, .16) 0%, rgba(229, 205, 130, 0) 62%), radial-gradient(820px 640px at 92% 2%, rgba(255, 242, 180, .10) 0%, rgba(255, 242, 180, 0) 58%), radial-gradient(900px 700px at 78% 104%, rgba(9, 26, 6, .55) 0%, rgba(9, 26, 6, 0) 66%), linear-gradient(155deg, #15370D 0%, #1E4014 32%, #2F4D25 56%, #4F6C48 78%, #728E6D 100%);
}
.spm-wrapper, .spm-wrapper * { box-sizing: border-box; }
.spm-wrapper button, .spm-wrapper input, .spm-wrapper select { font: inherit; }
.spm-shell { max-width: 1280px; margin: 0 auto; }
.spm-hero { text-align: center; margin: 0 auto 24px; }
.spm-eyebrow { margin: 0 0 9px; color: #f5df8e; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.spm-hero h1 { margin: 0; color: #fffdf5; font-size: 48px; font-weight: 800; letter-spacing: -.055em; line-height: 1.05; }
.spm-subtitle { max-width: 520px; margin: 14px auto 0; color: #e5efd9; font-size: 16px; line-height: 1.6; }
.spm-status { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto 18px; padding: 10px 15px; border: 1px solid rgba(242, 211, 117, .30); border-radius: 12px; background: rgba(8, 29, 18, .38); color: #f9f4dc; font-size: 13px; backdrop-filter: blur(14px); }
.spm-status-type { font-weight: 750; color: #ffe79a; }
.spm-status-updated { display: inline-flex; gap: 7px; align-items: center; color: #d7edcf; }
.spm-status-updated i { width: 7px; height: 7px; border-radius: 50%; background: #b8ee7f; box-shadow: 0 0 0 4px rgba(184,238,127,.13); }
.spm-app-grid { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(0, 1.22fr); gap: 20px; align-items: start; }
.spm-panel { border: 1px solid rgba(244, 218, 132, .24); border-radius: 20px; background: linear-gradient(145deg, rgba(10, 40, 24, .82), rgba(24, 62, 39, .70)); box-shadow: 0 18px 45px rgba(5, 24, 11, .26), inset 0 1px 0 rgba(255,255,255,.07); backdrop-filter: blur(18px); }
.spm-controls-panel { overflow: hidden; }
.spm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 9px; border-bottom: 1px solid rgba(245,224,153,.17); background: rgba(6, 26, 14, .28); }
.spm-tab { min-height: 42px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #cfe0c8; cursor: pointer; font-size: 14px; font-weight: 750; transition: .2s ease; }
.spm-tab:hover { color: #fff7cf; background: rgba(255,241,172,.09); }
.spm-tab.is-active { border-color: rgba(251,222,119,.35); background: linear-gradient(135deg, rgba(231,196,86,.27), rgba(208,167,47,.10)); color: #fff6cf; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.spm-tab-panel { padding: 20px; }
.spm-tab-panel h2, .spm-subsection-title { margin: 0; color: #fff9e6; font-size: 15px; font-weight: 780; letter-spacing: -.01em; }
.spm-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spm-field { display: flex; flex-direction: column; gap: 7px; color: #dcebd7; font-size: 12px; font-weight: 700; }
.spm-field input, .spm-field select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid rgba(245,229,166,.25); border-radius: 9px; outline: none; background: rgba(4, 25, 13, .52); color: #fffdf5; font-size: 14px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.spm-field input::placeholder { color: #93aa91; }
.spm-field select option { background: #183c26; color: #fffdf5; }
.spm-field input[type="color"] { padding: 4px; cursor: pointer; }
.spm-field input:focus, .spm-field select:focus, .spm-tab:focus-visible, .spm-wrapper button:focus-visible, .spm-check-row input:focus-visible { border-color: #ffe37e; box-shadow: 0 0 0 3px rgba(255,226,113,.22); }
.spm-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; }
.spm-section-heading span { color: #adc8aa; font-size: 12px; }
.spm-mini-button, .spm-secondary-button, .spm-primary-button, .spm-danger-button { min-height: 40px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 780; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.spm-mini-button { min-height: 33px; padding: 6px 9px; border-color: rgba(244,220,136,.30); background: rgba(244,220,136,.10); color: #fff0ae; font-size: 12px; }
.spm-primary-button { background: linear-gradient(135deg, #f1cf68, #dcae3b); color: #19351c; box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.spm-secondary-button { border-color: rgba(241,225,164,.30); background: rgba(6, 30, 16, .43); color: #f8f1d2; }
.spm-danger-button { border-color: rgba(255,169,142,.31); background: rgba(122, 42, 30, .30); color: #ffd7c8; }
.spm-mini-button:hover, .spm-secondary-button:hover { border-color: #f9d96e; background: rgba(247,216,103,.13); }
.spm-primary-button:hover { background: linear-gradient(135deg, #ffe58d, #eac153); }
.spm-danger-button:hover { background: rgba(160, 49, 33, .50); border-color: #ffb595; }
.spm-wrapper button:active { transform: translateY(1px) scale(.99); }
.spm-series-list { display: grid; gap: 8px; }
.spm-series-row { display: grid; grid-template-columns: 1fr 42px 32px; gap: 8px; align-items: center; padding: 8px; border: 1px solid rgba(229,222,172,.16); border-radius: 10px; background: rgba(4, 25, 13, .25); }
.spm-series-row input[type="text"] { min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid rgba(245,229,166,.22); border-radius: 7px; background: rgba(4,25,13,.48); color: #fffdf5; outline: none; }
.spm-series-row input[type="color"] { width: 38px; height: 36px; padding: 3px; border: 1px solid rgba(245,229,166,.25); border-radius: 7px; background: transparent; }
.spm-icon-button { width: 32px; height: 32px; border: 0; border-radius: 7px; background: rgba(255,137,111,.13); color: #ffd1c2; cursor: pointer; font-size: 18px; }
.spm-data-import, .spm-add-point { margin-top: 20px; padding-top: 19px; border-top: 1px solid rgba(244,227,159,.14); }
.spm-data-import h2, .spm-add-point h2 { margin: 0 0 11px; }
.spm-check-row { display: flex; align-items: center; gap: 8px; min-height: 34px; color: #dcebd7; cursor: pointer; font-size: 13px; font-weight: 650; }
.spm-check-row input { width: 17px; height: 17px; accent-color: #efd267; }
.spm-data-import .spm-check-row { margin: 5px 0 8px; }
.spm-add-point-row { display: grid; grid-template-columns: .7fr .7fr 1fr; gap: 9px; align-items: end; }
.spm-points-list { max-height: 250px; overflow: auto; border: 1px solid rgba(245,229,166,.16); border-radius: 10px; background: rgba(3, 22, 11, .24); }
.spm-point-row { display: grid; grid-template-columns: 30px 1fr 1fr 36px; gap: 7px; align-items: center; padding: 7px 8px; border-bottom: 1px solid rgba(245,229,166,.10); }
.spm-point-row:last-child { border-bottom: 0; }
.spm-point-index { color: #a7c3a2; font-size: 11px; text-align: center; }
.spm-point-row input { min-width: 0; min-height: 33px; padding: 6px 8px; border: 1px solid rgba(245,229,166,.18); border-radius: 6px; background: rgba(5,29,15,.55); color: #fffdf5; outline: none; font-size: 13px; }
.spm-point-empty { padding: 18px; color: #b9ceb5; text-align: center; font-size: 13px; }
.spm-action-row { display: flex; gap: 9px; margin-top: 16px; }
.spm-action-row button { flex: 1; }
.spm-inline-message, .spm-export-feedback { min-height: 19px; margin: 12px 0 0; color: #ffd29c; font-size: 12px; line-height: 1.45; }
.spm-inline-message.is-success, .spm-export-feedback.is-success { color: #c9f39f; }
.spm-range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.spm-field output { color: #ffe484; font-size: 12px; }
.spm-field input[type="range"] { min-height: 20px; padding: 0; border: 0; accent-color: #f0cf63; background: transparent; }
.spm-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 18px 0; }
.spm-subsection-title { margin: 22px 0 11px; }
.spm-axis-grid { grid-template-columns: repeat(2, 1fr); }
.spm-color-control { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-top: 7px; border: 1px solid rgba(245,229,166,.15); border-radius: 8px; color: #dcebd7; font-size: 13px; }
.spm-color-control input { width: 42px; height: 31px; padding: 3px; border: 1px solid rgba(245,229,166,.24); border-radius: 6px; background: transparent; }
.spm-preview-column { display: grid; gap: 20px; min-width: 0; }
.spm-preview-panel { position: relative; padding: 18px; overflow: hidden; }
.spm-preview-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.spm-preview-heading p { margin: 0 0 4px; color: #a8c59f; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.spm-preview-heading h2 { margin: 0; color: #fff9e9; font-size: 19px; letter-spacing: -.02em; }
.spm-live-pill { padding: 5px 8px; border: 1px solid rgba(184,238,127,.30); border-radius: 999px; background: rgba(184,238,127,.11); color: #d9ffbd; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.spm-chart-host { width: 100%; min-height: 300px; border: 1px solid rgba(249,226,143,.22); border-radius: 13px; overflow: hidden; background: #163b2a; }
.spm-chart-host svg { display: block; width: 100%; height: auto; min-height: 300px; }
.spm-tooltip { position: absolute; z-index: 4; display: none; max-width: 180px; padding: 8px 10px; border: 1px solid rgba(255,231,141,.48); border-radius: 8px; background: rgba(6, 27, 15, .95); color: #fff9e7; box-shadow: 0 10px 25px rgba(0,0,0,.25); font-size: 12px; line-height: 1.45; pointer-events: none; }
.spm-analysis-card { padding: 17px 18px; }
.spm-analysis-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.spm-analysis-heading h2 { margin: 0; color: #fff9e6; font-size: 16px; }
.spm-analysis-heading span { color: #a9c5a5; font-size: 11px; }
.spm-analysis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.spm-metric { padding: 9px; border: 1px solid rgba(245,229,166,.14); border-radius: 9px; background: rgba(5, 28, 14, .25); }
.spm-metric span { display: block; color: #abc4a7; font-size: 10px; font-weight: 700; }
.spm-metric strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #fff9e8; font-size: 13px; }
.spm-analysis-equation { margin: 10px 0 0; padding: 9px; border-radius: 8px; background: rgba(241,207,99,.10); color: #ffeb9e; font-size: 12px; line-height: 1.45; }
.spm-analysis-empty { margin: 0; color: #c5d8c0; font-size: 13px; line-height: 1.5; }
.spm-export-note { margin: 8px 0 18px; color: #c4d7bf; font-size: 13px; line-height: 1.5; }
.spm-export-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.spm-export-grid button { width: 100%; }
@media (max-width: 900px) {
  .spm-app-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .spm-wrapper { padding: 30px 12px; }
  .spm-hero h1 { font-size: 36px; }
  .spm-subtitle { font-size: 14px; }
  .spm-tab-panel { padding: 15px; }
  .spm-field-grid, .spm-range-grid { grid-template-columns: 1fr; }
  .spm-add-point-row { grid-template-columns: 1fr 1fr; }
  .spm-add-point-row button { grid-column: 1 / -1; }
  .spm-toggle-grid { grid-template-columns: 1fr; }
  .spm-export-grid { grid-template-columns: 1fr; }
  .spm-action-row { flex-direction: column; }
  .spm-status { font-size: 12px; }
  .spm-chart-host svg { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .spm-wrapper *, .spm-wrapper *::before, .spm-wrapper *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}