.ctc-summary { padding: 10px 12px; }
.ctc-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ctc-summary-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; }
.ctc-summary-heading strong { font-size: 13px; }
.ctc-summary-heading small, .ctc-template-card small { color: var(--muted, #81766d); font-size: 11px; }
.ctc-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ctc-template-card { min-width: 0; border: 1px solid var(--line, #e6d8cb); border-radius: 9px; padding: 10px 12px; background: var(--paper, #fff); }
.ctc-template-card.is-recommended { border-color: var(--blue, #ec6d35); }
.ctc-template-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.ctc-template-title strong { font-size: 13px; line-height: 1.35; }
.ctc-template-card p { margin: 4px 0; color: var(--muted, #81766d); font-size: 12px; }
.ctc-recommended { background: #e9f6ef; color: #217856; border-radius: 5px; padding: 2px 5px; font-size: 10px; white-space: nowrap; }
.ctc-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.ctc-button { min-height: 29px !important; height: auto !important; padding: 5px 9px !important; font-size: 11px !important; line-height: 1.3 !important; white-space: normal; overflow-wrap: anywhere; }
.ctc-guide-link { font-size: 11px !important; line-height: 1.35; }
.ctc-staff-notes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line, #e6d8cb); margin-top: 8px; padding-top: 8px; }
.ctc-staff-notes > span { color: var(--muted, #81766d); font-size: 11px; }
.ctc-file-details { color: var(--muted, #81766d); font-size: 10px; margin-top: 7px; }
.ctc-file-details > span { display: block; overflow-wrap: anywhere; margin-top: 4px; }
.ctc-author-notes { margin-top: 8px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.ctc-author-notes ul { margin: 6px 0 0; padding-left: 18px; }
.ctc-author-notes li { margin: 4px 0; }
.ctc-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ctc-inline-error, .ctc-loading, .ctc-program-note { font-size: 12px; line-height: 1.45; }
.ctc-inline-error, .ctc-error { color: #a43c1e; }
.ctc-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.ctc-modal { font-size: 13px; }
.modal-card:has(.ctc-modal) { width: min(790px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 20px 22px; }
.ctc-modal h2 { font-size: 20px; margin: 6px 0 12px; }
.ctc-modal .ctc-catalog-intro, .ctc-modal .ctc-program-note { margin: 8px 0 12px; }
.ctc-guide h3 { font-size: 14px; margin: 0 0 6px; }
.ctc-guide p { font-size: 12px; line-height: 1.5; margin: 7px 0 10px; }
.ctc-guide-steps { margin: 10px 0; padding-left: 23px; }
.ctc-guide-steps li { padding-left: 3px; margin-bottom: 9px; font-size: 12px; line-height: 1.5; }
.ctc-guide-steps strong, .ctc-guide-steps span { display: block; }
.ctc-guide-steps strong { margin-bottom: 2px; }
.ctc-guide-checks { border: 1px solid var(--line, #e6d8cb); border-radius: 8px; padding: 9px 11px; background: var(--surface, #faf6f2); font-size: 12px; }
.ctc-guide-checks ul { margin: 5px 0 0; padding-left: 18px; }
.ctc-guide-checks li { margin: 3px 0; line-height: 1.45; }
.ctc-network-note { border-left: 3px solid var(--blue, #ec6d35); padding: 7px 9px; background: var(--surface, #faf6f2); }
.ctc-modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 13px; border-top: 1px solid var(--line, #e6d8cb); padding-top: 10px; }
html[data-theme="dark"] .ctc-template-card { background: #29231f; border-color: #57463b; }
html[data-theme="dark"] .ctc-template-card.is-recommended { border-color: #f47a27; }
html[data-theme="dark"] .ctc-summary-heading small,
html[data-theme="dark"] .ctc-template-card small,
html[data-theme="dark"] .ctc-template-card p,
html[data-theme="dark"] .ctc-staff-notes > span,
html[data-theme="dark"] .ctc-file-details,
html[data-theme="dark"] .ctc-author-notes { color: #bfb0a5; }
html[data-theme="dark"] .ctc-guide-checks,
html[data-theme="dark"] .ctc-network-note { background: #29231f; border-color: #57463b; }
html[data-theme="dark"] .ctc-error,
html[data-theme="dark"] .ctc-inline-error { color: #ffad8f; }
html[data-theme="dark"] .modal-card:has(.ctc-modal) { background: #211d19; color: #f3e6dd; }
html[data-theme="dark"] .ctc-modal p { color: #c8b8ac; }
@media (max-width: 620px) {
  .ctc-summary { padding: 9px; }
  .ctc-template-grid { grid-template-columns: minmax(0, 1fr); }
  .ctc-summary-heading { align-items: flex-start; }
  .ctc-summary-heading > div { gap: 3px; flex-direction: column; }
  .ctc-template-card { padding: 9px 10px; }
  .ctc-inline { align-items: stretch; width: 100%; }
  .ctc-inline .ctc-button { flex: 1 1 150px; }
  .ctc-inline .ctc-guide-link { padding: 6px 1px; }
  .ctc-modal h2 { font-size: 18px; }
  .modal-card:has(.ctc-modal) { width: 100%; padding: 16px; max-height: calc(100dvh - 16px); }
}

