.smo-template-link {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.smo-template-link:hover { color: #0f4c81; text-decoration: underline; text-underline-offset: 3px; }
.smo-template-link:focus-visible { outline: 2px solid #7cc4ed; outline-offset: 2px; border-radius: 2px; }
.smo-template-preview-overlay { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; overflow-y: auto; background: rgba(20, 38, 60, .44); padding: 12px; }
.smo-template-preview-modal { width: min(560px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; border-radius: 12px; background: #fff; box-shadow: 0 22px 65px rgba(20, 38, 60, .28); }
.smo-template-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #dce5ee; padding: 12px 14px 10px; }
.smo-template-preview-head h3 { margin: 0; color: var(--navy); font-size: 15px; }
.smo-template-preview-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.smo-template-preview-close { display: inline-grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #edf2f7; color: #405a76; padding: 0; font: inherit; font-size: 21px; line-height: 1; cursor: pointer; }
.smo-template-preview-close:focus-visible { outline: 3px solid #7cc4ed; outline-offset: 2px; }
.smo-template-preview-body { padding: 10px 14px 4px; }
.smo-template-period-nav { display: flex; flex-wrap: nowrap; gap: 5px; overflow-x: auto; margin-bottom: 9px; padding-bottom: 1px; }
.smo-template-period-step { flex-shrink: 0; border: 1px solid #cbd9e7; border-radius: 999px; background: #fff; color: #405a76; padding: 4px 7px; font: inherit; font-size: 10px; font-weight: 650; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.smo-template-period-step:hover { border-color: #7aa7cf; background: #eff6ff; }
.smo-template-period-step.active { border-color: #1e6fa8; background: #1e6fa8; color: #fff; }
.smo-template-period-step:focus-visible { outline: 2px solid #7cc4ed; outline-offset: 1px; }
.smo-template-compare-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; margin-bottom: 9px; }
.smo-template-compare-current, .smo-template-compare-future { display: grid; gap: 3px; border: 1px solid #dce5ee; border-radius: 7px; background: #f8fafc; padding: 7px 9px; color: #526b84; font-size: 10px; line-height: 1.35; }
.smo-template-compare-current strong { color: #344d66; font-size: 11px; }
.smo-template-compare-future { border-color: #cfdef2; background: #eff6ff; color: #315b88; }
.smo-template-compare-future strong { color: #185f90; font-size: 11px; }
.smo-template-compare-arrow { align-self: center; color: #6b7d8e; font-size: 16px; }
.smo-template-preview-grid { margin-bottom: 8px; padding: 6px; }
.smo-template-preview-grid .pers-tpl-table { font-size: 10px; }
.smo-template-preview-grid .pers-tpl-table th, .smo-template-preview-grid .pers-tpl-table td { padding: 3px; }
.smo-template-preview-grid .pers-tpl-cell { min-width: 18px; padding: 2px 1px !important; line-height: 12px; cursor: default; }
.smo-template-preview-grid .pers-tpl-cell:hover { filter: none; }
.smo-template-preview-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; border-top: 1px solid #dce5ee; padding: 10px 14px 12px; }
.smo-template-preview-actions [data-smo-preview-close] { margin-right: auto; }
@media (max-width: 600px) {
  .smo-template-preview-overlay { padding: 8px; }
  .smo-template-preview-modal { max-height: calc(100dvh - 16px); }
  .smo-template-preview-head, .smo-template-preview-body, .smo-template-preview-actions { padding-left: 11px; padding-right: 11px; }
  .smo-template-preview-head h3 { font-size: 14px; }
  .smo-template-compare-summary { gap: 5px; }
  .smo-template-compare-current, .smo-template-compare-future { padding: 6px; }
}
