/* ==========================================================================
   ABB Calculator – Mobile-First Responsive Design System
   Proper padding, margins & text sizing for all screen sizes
   ========================================================================== */

/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --blue:          #2563eb;
  --blue-hover:    #1d4ed8;
  --blue-active:   #1e40af;
  --blue-light:    #eff6ff;
  --blue-border:   #bfdbfe;

  --text-900:  #0f172a;
  --text-600:  #475569;
  --text-400:  #64748b;
  --text-300:  #94a3b8;

  --border:    #e2e8f0;
  --bg-page:   #f1f5f9;
  --bg-card:   #ffffff;
  --bg-input:  #ffffff;
  --bg-subtle: #f8fafc;

  --err:       #ef4444;
  --err-bg:    #fef2f2;
  --err-bdr:   #fecaca;
  --err-txt:   #991b1b;

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full:9999px;

  --shadow-card: 0 4px 24px -4px rgba(15,23,42,.10), 0 0 0 1px rgba(15,23,42,.06);
  --shadow-btn:  0 4px 14px -2px rgba(37,99,235,.35);

  --ease: 150ms cubic-bezier(.4,0,.2,1);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  /* Prevent text resize on orientation change (iOS) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg-page);
  color: var(--text-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Allow normal text selection & typing inside input controls */
input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

/* ── Page wrapper ───────────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  align-items: flex-start;   /* top-align on small screens, center on desktop */
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-4);      /* 16px all sides on mobile */
}

@media (min-width: 480px) {
  .app-wrapper {
    align-items: center;
    padding: var(--sp-6);
  }
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.calculator-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ── Card Header ────────────────────────────────────────────────────────── */
.card-header {
  padding: var(--sp-6) var(--sp-5) var(--sp-4) var(--sp-5);
  text-align: center;
  background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 55%);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 480px) {
  .card-header {
    padding: 36px var(--sp-8) var(--sp-5) var(--sp-8);
  }
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue-active);
  margin-bottom: 10px;
  letter-spacing: .02em;
}

.brand-icon { width: 13px; height: 13px; }

.badge-separator {
  color: #94a3b8;
  font-size: 11px;
  opacity: 0.7;
}

.privacy-badge-icon {
  width: 12px;
  height: 12px;
  color: #10b981;
  flex-shrink: 0;
}

.privacy-badge-text {
  color: #059669;
  font-weight: 700;
}

.card-title {
  font-size: clamp(20px, 5vw, 26px); /* fluid type: 20px mobile → 26px desktop */
  font-weight: 800;
  color: var(--text-900);
  letter-spacing: -.025em;
  line-height: 1.2;
  margin-bottom: 5px;
}

.card-subtitle {
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 500;
  color: var(--text-600);
  line-height: 1.4;
}

/* ── Card Body ──────────────────────────────────────────────────────────── */
.card-body {
  padding: var(--sp-5) var(--sp-4) var(--sp-6) var(--sp-4);
}

@media (min-width: 480px) {
  .card-body {
    padding: var(--sp-6) var(--sp-8) var(--sp-8) var(--sp-8);
  }
}

/* ── Form Groups ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-5); }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-900);
  margin-bottom: var(--sp-2);
}

.optional-tag {
  font-weight: 400;
  color: var(--text-400);
  font-size: 12px;
}

/* ── Upload Dropzone ────────────────────────────────────────────────────── */
.upload-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--ease);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible {
  border-color: var(--blue);
  background: #f0f7ff;
}

.upload-dropzone.drag-active {
  border-color: var(--blue);
  border-style: solid;
  background: var(--blue-light);
  transform: scale(1.005);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon-container {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3) auto;
}

.upload-icon { width: 22px; height: 22px; color: var(--blue); }

.upload-prompt {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-600);
  margin-bottom: 3px;
  line-height: 1.4;
}

.upload-highlight { color: var(--blue); font-weight: 600; }

.upload-hint {
  font-size: 11px;
  color: var(--text-400);
  line-height: 1.4;
}

/* ── File Badge (after selection) ──────────────────────────────────────── */
.file-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-3);
  text-align: left;
}

.file-badge-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-badge-icon svg { width: 18px; height: 18px; color: var(--blue); }

.file-badge-details { flex: 1; min-width: 0; }

.file-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  display: block;
  font-size: 11px;
  color: var(--text-400);
  margin-top: 1px;
}

.file-remove-btn {
  background: none;
  border: none;
  color: var(--text-300);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.file-remove-btn:hover { background: #fee2e2; color: var(--err); }
.file-remove-btn svg { width: 15px; height: 15px; }

/* ── Password Field ─────────────────────────────────────────────────────── */
.password-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-leading-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--text-400);
  pointer-events: none;
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-900);
  background: var(--bg-input);
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  /* Prevent zoom on iOS when font-size < 16px */
  font-size: max(14px, 16px);
}

/* iOS: use 16px to prevent auto-zoom, visually correct with transform */
@supports (-webkit-overflow-scrolling: touch) {
  .form-input { font-size: 16px; }
}

.password-input {
  padding-left: 40px;
  padding-right: 42px;
  font-size: 14px;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-400);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.password-toggle-btn:hover { color: var(--text-900); }
.password-toggle-btn svg { width: 18px; height: 18px; }

.field-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-400);
  margin-top: var(--sp-2);
  line-height: 1.4;
}

.field-hint svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--blue);
}


/* ── Alert / Error Box ──────────────────────────────────────────────────── */
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: 13px var(--sp-4);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
  font-size: 13px;
  animation: fadeIn 200ms ease-out;
}

.error-alert {
  background: var(--err-bg);
  border: 1px solid var(--err-bdr);
  color: var(--err-txt);
}

.alert-icon { flex-shrink: 0; margin-top: 1px; }
.alert-icon svg { width: 18px; height: 18px; color: var(--err); }

.alert-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.alert-text { font-size: 12px; line-height: 1.45; }

/* ── Calculate Button ───────────────────────────────────────────────────── */
.action-group { margin-top: var(--sp-2); }

.btn {
  position: relative;
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  outline: none;
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -2px rgba(37,99,235,.42);
}

.btn-primary:active:not(:disabled) {
  background: var(--blue-active);
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-900);
  border: 1px solid var(--border);
  height: 46px;
}

.btn-secondary:hover { background: #e2e8f0; }

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Processing Progress ────────────────────────────────────────────────── */
.processing-status {
  margin-top: var(--sp-4);
  text-align: center;
}

.progress-bar-container {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: var(--sp-2);
}

.progress-bar {
  height: 100%;
  background: var(--blue);
  border-radius: var(--r-full);
  animation: progressFlow 1.4s infinite ease-in-out;
}

@keyframes progressFlow {
  0%   { transform: translateX(-100%); width: 35%; }
  50%  { width: 60%; }
  100% { transform: translateX(340%); width: 35%; }
}

.processing-step-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-400);
}

/* ── Result View ────────────────────────────────────────────────────────── */
.result-view {
  text-align: center;
  animation: fadeIn 300ms ease-out;
  padding: var(--sp-6) var(--sp-4) var(--sp-7) var(--sp-4);
}

@media (min-width: 480px) {
  .result-view {
    padding: 40px var(--sp-8) var(--sp-8) var(--sp-8);
  }
}

.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Green success checkmark accent */
.result-container::before {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--r-full);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  margin-bottom: var(--sp-4);
}

.result-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-400);
  margin-bottom: var(--sp-2);
}

.result-value-display {
  font-size: clamp(30px, 9vw, 44px);
  font-weight: 800;
  color: var(--blue-active);
  letter-spacing: -.03em;
  line-height: 1.1;
  word-break: break-all;
  margin-bottom: var(--sp-5);
  padding: 0 var(--sp-2);
}

/* ── Breakdown Summary ──────────────────────────────────────────────────── */
.calculation-summary-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: var(--sp-2);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-3);
  margin-bottom: var(--sp-6);
}

.summary-stat-box {
  flex: 1;
  text-align: center;
  min-width: 0;          /* prevent overflow on tiny screens */
  padding: 0 var(--sp-1);
}

.stat-box-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
  line-height: 1.3;
}

.stat-box-value {
  display: block;
  font-size: clamp(13px, 4vw, 16px);
  font-weight: 700;
  color: var(--text-900);
  word-break: break-word;
}

.summary-stat-divider {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
  user-select: none;
  flex-shrink: 0;
  padding: 0 2px;
}

.reset-btn { max-width: 300px; width: 100%; }

/* ── Card Footer ────────────────────────────────────────────────────────── */
.card-footer {
  padding: 14px var(--sp-5);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  text-align: center;
}

.dev-credit {
  margin: 0;
  font-size: clamp(13px, 3.8vw, 14.5px);
  color: var(--text-600);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.dev-credit .dev-name {
  color: var(--blue);
  font-weight: 700;
}

.btn-clear-cache {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-400);
  cursor: pointer;
  transition: all var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn-clear-cache svg {
  width: 12px;
  height: 12px;
  color: var(--text-400);
  transition: transform 0.4s ease, color var(--ease);
}

.btn-clear-cache:hover {
  background: #f8fafc;
  color: var(--text-900);
  border-color: #cbd5e1;
}

.btn-clear-cache:hover svg {
  transform: rotate(180deg);
  color: var(--blue);
}

.btn-clear-cache:active {
  transform: scale(0.96);
}

.btn-clear-cache:disabled {
  opacity: 0.7;
  cursor: wait;
}

.spinner-inline {
  animation: spin 0.75s linear infinite;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Clickable Days Button ──────────────────────────────────────────────── */
.stat-days-btn {
  /* Reset button defaults */
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(13px, 4vw, 16px);
  font-weight: 700;
  color: var(--blue);
  transition: background var(--ease), color var(--ease);
  text-decoration: underline dotted 1.5px;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.stat-days-btn:hover,
.stat-days-btn:focus-visible {
  background: var(--blue-light);
  color: var(--blue-active);
  outline: none;
}

/* ── Date Range Popup (Centered, Responsive Modal) ───────────────────────── */
.date-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: modalFadeIn 200ms ease-out forwards;
}

.date-popup-inner {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 
    0 24px 60px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.5);
  width: 100%;
  max-width: 330px;
  overflow: hidden;
  animation: modalPopIn 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.date-popup-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px var(--sp-4);
  background: var(--blue-light);
  border-bottom: 1px solid var(--blue-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-active);
}

.date-popup-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--blue);
}

.date-popup-header span {
  flex: 1;
}

.date-popup-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  color: var(--text-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.date-popup-close:hover {
  background: var(--blue-border);
  color: var(--blue-active);
}

.date-popup-close svg {
  width: 16px;
  height: 16px;
}

.date-popup-body {
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}

.date-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.date-popup-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-400);
  flex-shrink: 0;
}

.date-popup-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-900);
  text-align: right;
}

.date-popup-arrow {
  text-align: center;
  font-size: 16px;
  color: var(--blue);
  line-height: 1;
  padding: 2px 0;
  font-weight: 800;
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Calculating 5-Second Modal Popup ───────────────────────────────────── */
.calc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: modalFadeIn 240ms ease-out forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.calc-modal-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--r-xl);
  box-shadow: 
    0 24px 60px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.6);
  width: 100%;
  max-width: 380px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPopIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Radar / Pulse Icon Animation */
.calc-pulse-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
}

.calc-pulse-core {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 10px 24px -4px rgba(37, 99, 235, 0.55);
  z-index: 2;
}

.calc-pulse-core svg {
  width: 30px;
  height: 30px;
  animation: pulseCoreIcon 1.5s infinite ease-in-out;
}

@keyframes pulseCoreIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.calc-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.45);
  animation: pulseWave 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.calc-pulse-ring-2 {
  animation-delay: 0.9s;
}

@keyframes pulseWave {
  0%   { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Modal Title & Live Subtitle */
.calc-modal-title {
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 800;
  color: var(--text-900);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.calc-modal-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-400);
  margin-bottom: var(--sp-5);
  min-height: 20px;
  line-height: 1.4;
  transition: opacity 150ms ease-out;
}

/* 5-Second Progress Bar */
.calc-progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.calc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #2563eb, #1d4ed8);
  border-radius: var(--r-full);
  transition: width 0.1s linear;
}

.calc-progress-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-400);
  margin-bottom: var(--sp-5);
  padding: 0 2px;
}

#calc-progress-percent {
  color: var(--blue-active);
  font-weight: 700;
}

/* Prominent Developer Badge in Modal */
.calc-modal-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--r-full);
  padding: 8px 18px;
  font-size: clamp(12px, 3.4vw, 13px);
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.12);
}

.calc-dev-tag {
  color: var(--text-600);
  font-weight: 500;
}

.calc-dev-author {
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0.01em;
}
