.custom-homepage-widget {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  color: #263238;
  overflow-wrap: anywhere;
}
.custom-homepage-widget .widget-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold, #b99540);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--navy, #152139);
}
.custom-widget-content { font-size: 14px; line-height: 1.6; }
.custom-widget-content > :first-child { margin-top: 0; }
.custom-widget-content > :last-child { margin-bottom: 0; }
.custom-widget-content p { margin: 0 0 12px; }
.custom-widget-content h2, .custom-widget-content h3,
.custom-widget-content h4, .custom-widget-content h5,
.custom-widget-content h6 { margin: 12px 0 8px; font-size: 16px; line-height: 1.4; letter-spacing: 0; }
.custom-widget-content ul, .custom-widget-content ol { padding-left: 22px; margin: 8px 0; }
.custom-widget-content img { display: block; max-width: 100%; height: auto; }
.custom-widget-content iframe { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.custom-widget-content table { display: block; max-width: 100%; overflow-x: auto; }
.custom-widget-content a { color: #205e89; text-decoration: underline; }
.custom-homepage-widget .custom-widget-button {
  display: block;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  background: #f5f7f8;
  color: var(--navy, #152139);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  text-decoration: none;
}
.custom-homepage-widget .custom-widget-button:hover { background: #e8edf0; }
.custom-widget-button:focus-visible { outline: 2px solid #205e89; outline-offset: 3px; }
.homepage-widget-form input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  background: var(--bg, #f5f5f3);
  color: var(--navy, #152139);
  font: inherit;
}

.sidebar-box-colored { background: var(--sidebar-bg); color: var(--sidebar-fg); }
.sidebar-box-colored > .widget-title { color: var(--sidebar-fg); border-bottom-color: var(--sidebar-accent); }
.sidebar-box-colored .custom-widget-content a { color: var(--sidebar-fg); }
.sidebar-box-colored > .qn-item .qn-label,
.sidebar-box-colored > .qn-item .qn-phone,
.sidebar-box-colored > .res-link,
.sidebar-box-colored > .evt-item .evt-info .title,
.sidebar-box-colored > .evt-item .evt-info .sub,
.sidebar-box-colored.grant-card h3,
.sidebar-box-colored.grant-card p { color: var(--sidebar-fg); }
.sidebar-color-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border, #ddd); }
.sidebar-color-row label { flex: 1; min-width: 0; }
.sidebar-color-sample { display: grid; place-items: center; width: 48px; height: 38px; border: 1px solid #999; border-radius: 4px; background: var(--sidebar-bg); color: var(--sidebar-fg); }
.sidebar-color-row input[type="color"], .widget-colors input[type="color"] { width: 52px; height: 38px; padding: 2px; border: 1px solid var(--border, #ddd); border-radius: 4px; cursor: pointer; }
.widget-colors { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.widget-colors .form-group { margin-bottom: 0; }
