/* Community Gap Finder (free tool) */
.cg-form { gap: 16px; }
.cg-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.cg-f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.cg-f em { font-style: normal; font-weight: 400; color: var(--muted); }
.cg-f input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); background: #fff; min-width: 0; }
.cg-f input:focus { outline: 3px solid var(--green-t2); border-color: var(--green); }
.cg-fields .cg-f:nth-child(3) { grid-column: 1 / -1; }
.cg-form .chips { margin: 0; }
@media (max-width: 720px) { .cg-fields { grid-template-columns: minmax(0, 1fr); } }

.cg-progress { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; max-width: 640px; }
.cg-progress ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cg-progress li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15px; }
.cg-progress li::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.cg-progress li.on { color: var(--ink); font-weight: 600; }
.cg-progress li.on::before { border-color: var(--green); border-top-color: transparent; animation: cg-spin 0.8s linear infinite; }
.cg-progress li.done { color: var(--ink-2); }
.cg-progress li.done::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--green); }
@keyframes cg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cg-progress li.on::before { animation: none; } }
.cg-error { margin: 0; background: var(--red-t); color: var(--red); border-radius: 12px; padding: 12px 16px; font-weight: 600; max-width: 720px; }
.cg-error a { color: inherit; }

.cg-results { padding-top: 40px; }
.cg-results .wrap { display: flex; flex-direction: column; gap: 22px; }
.cg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cg-head h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.cg-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cg-kpi { border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); }
.cg-kpi b { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.cg-kpi span { font-size: 13px; color: var(--muted); }
.cg-kpi.gap { background: var(--red-t); border-color: transparent; } .cg-kpi.gap b { color: var(--red); }
.cg-kpi.open { background: var(--yellow-t); border-color: transparent; }
.cg-kpi.named { background: var(--green-t); border-color: transparent; } .cg-kpi.named b { color: var(--green-d); }
@media (max-width: 720px) { .cg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cg-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.cg-panel h3 { margin: 0; font-size: 17px; }
.cg-bar { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 14px; }
.cg-bar i { display: block; height: 12px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.cg-bar i s { display: block; height: 100%; border-radius: 6px; background: var(--ink-2); text-decoration: none; transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.cg-bar.you { font-weight: 700; } .cg-bar.you i s { background: var(--green); } .cg-bar.you.zero { color: var(--red); }
.cg-bar small { font-family: var(--mono); font-size: 12px; text-align: right; color: var(--ink-2); }

.cg-list { display: flex; flex-direction: column; gap: 12px; }
.cg-th { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; }
.cg-th.mark-replied, .cg-th.mark-ignored { opacity: 0.6; }
.cg-th-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cg-th-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cg-th-main > b { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.cg-th-main p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.cg-th-side { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cg-th-side > span { font-size: 12px; color: var(--muted); }
.cg-names { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-names span { padding: 3px 9px; border-radius: 8px; background: var(--mist-2); font-size: 13px; }
.cg-names em { font-style: normal; color: var(--muted); font-size: 13px; }
.cg-th-act { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cg-th-act .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.cg-st { display: inline-block; padding: 2px 10px; border-radius: 99px; font-family: var(--body); font-size: 12px; font-weight: 700; }
.cg-st.gap { background: var(--red-t); color: var(--red); }
.cg-st.open { background: var(--yellow-t); color: #6B5300; }
.cg-st.named { background: var(--green-t); color: var(--green-d); }
.cg-sig { padding: 2px 10px; border-radius: 99px; background: var(--lav-t); color: #3730A3; font-family: var(--body); font-size: 12px; font-weight: 600; }
.cg-prio { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.cg-draft { flex: 1 0 100%; display: flex; flex-direction: column; gap: 8px; }
.cg-draft textarea { width: 100%; box-sizing: border-box; min-height: 150px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; font-size: 14.5px; line-height: 1.55; resize: vertical; background: var(--mist); }
.cg-draft small { color: var(--muted); }
.cg-more { background: var(--ink); color: #fff; border-radius: 20px; padding: 24px 26px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.cg-more b { font-family: var(--display); font-size: 24px; line-height: 1.2; display: block; }
.cg-more p { margin: 6px 0 0; color: #C9D3CB; max-width: 40em; }
.cg-empty { color: var(--muted); }

.cg-how { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.cg-stat { background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--yellow); padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.cg-stat b { font-family: var(--display); font-size: 56px; line-height: 1; }
.cg-stat small { color: var(--muted); }
.cg-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.cg-kinds > div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cg-kinds p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
@media (max-width: 820px) { .cg-how, .cg-kinds { grid-template-columns: minmax(0, 1fr); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
