/* Concept C · Concierge mockup: guided route planner in the home hero.
   Builds on tokens.css + components.css + concept-c.css; only adds cg-* parts. */

.cg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cg-muted { color: var(--muted); }

/* ---------------------------------------------------------------- Hero input states */
html.cg-active .concept-flag, html.cg-active .sticky-cta { display: none; }
.intent.is-shake .intent-box { animation: cg-shake 360ms var(--ease-out); }
@keyframes cg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hero-c.cg-open .intent-suggest { display: none; }

/* Live reading strip under the input */
.cg-live { margin: 12px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; text-align: left; animation: cg-pop var(--dur) var(--ease-out); }
.cg-live[hidden] { display: none; }
.cg-live-route { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--r-pill); background: var(--white); border: 1px solid rgba(26, 106, 179, 0.25); box-shadow: 0 8px 24px rgba(26, 106, 179, 0.1); }
.cg-live-route.is-swap .cg-live-ico { animation: cg-spin-in 420ms var(--ease-out); }
.cg-live-route.is-swap b { animation: cg-pop 320ms var(--ease-out); }
.cg-live-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--azure-500); }
.cg-live-ico .ico { width: 16px; height: 16px; }
.cg-live-route small { display: block; font: 700 0.62rem/1 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--azure-500); margin-bottom: 3px; }
.cg-live-route b { display: block; font: 600 0.88rem/1.2 var(--font-sans-head); color: var(--navy-900); }
.cg-live-hint { width: 100%; text-align: center; font: 600 0.74rem/1.3 var(--font-sans-head); color: var(--muted); }
.cg-live-hint kbd { font: 700 0.68rem/1 var(--font-sans-head); padding: 3px 6px; border-radius: 6px; background: var(--white); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 var(--line-strong); color: var(--navy-900); }
@keyframes cg-spin-in { from { transform: rotate(-90deg) scale(0.6); opacity: 0; } }

.cg-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cg-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.9); border: 1px dashed rgba(26, 106, 179, 0.4); font: 600 0.74rem/1.1 var(--font-sans-head); color: var(--azure-600); animation: cg-pop 360ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.cg-tag.is-auto { border-style: solid; background: var(--brand-soft); border-color: transparent; }
.cg-tag.is-link { border-style: solid; border-color: var(--line); background: var(--white); color: var(--navy-900); text-decoration: none; }
.cg-tag.is-link:hover { border-color: var(--navy-900); }
.cg-tag .ico { width: 14px; height: 14px; color: var(--azure-500); }
.cg-tag em { font-style: normal; font-weight: 500; color: var(--muted); }

/* ---------------------------------------------------------------- Panel */
.cg { width: min(1080px, 100%); margin: 16px auto 0; text-align: left; }
.cg[hidden] { display: none; }
.cg.is-in .cg-panel { animation: cg-rise 520ms var(--ease-out); }
@keyframes cg-rise { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes cg-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

.cg-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: clamp(500px, calc(100svh - 230px), 660px); background: var(--white); border: 1px solid var(--card-line); border-radius: var(--sheet-radius); box-shadow: var(--card-shadow), 0 30px 80px rgba(6, 21, 41, 0.08); overflow: hidden; }
.cg-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }

.cg-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px 18px; }
.cg-head-ico { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--canvas); color: var(--navy-800); border: 1px solid var(--line); }
.cg-head-ico .ico { width: 20px; height: 20px; }
.cg-head-txt { flex: 1; min-width: 0; }
.cg-head-txt small { display: flex; align-items: center; gap: 7px; font: 600 0.74rem/1 var(--font-sans-head); color: var(--muted); margin-bottom: 6px; }
.cg-head-txt small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--azure-500); box-shadow: 0 0 0 3px rgba(26, 106, 179, 0.16); flex: none; }
.cg-head-txt b { display: block; font: 600 1.02rem/1.2 var(--font-sans-head); color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-head-txt b.is-swap { animation: cg-pop 360ms var(--ease-out); }
.cg-head-actions { display: flex; align-items: center; gap: 6px; }
.cg-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--white); font: 600 0.76rem/1 var(--font-sans-head); color: var(--ink-2); cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast); }
.cg-pill:hover { border-color: var(--navy-900); color: var(--navy-900); }
.cg-pill .ico { width: 14px; height: 14px; }
.cg-pill b { font-weight: 700; color: var(--azure-500); }
.cg-brief-toggle { display: none; }
.cg-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--canvas); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.cg-x:hover { background: var(--gray-200); color: var(--navy-900); }
.cg-x .ico { width: 16px; height: 16px; }

.cg-progress { flex: none; height: 3px; background: var(--canvas); }
.cg-progress span { display: block; height: 100%; width: 4%; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, var(--azure-500), var(--pastel-300)); transition: width 600ms var(--ease-out); }

/* ---------------------------------------------------------------- Thread */
.cg-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 12px; display: flex; flex-direction: column; gap: 10px; background: radial-gradient(80% 60% at 0% 0%, rgba(154, 207, 233, 0.16), transparent 70%); scrollbar-width: thin; }
.cg-msg { display: flex; align-items: flex-end; gap: 10px; max-width: 86%; animation: cg-pop 380ms var(--ease-out); }
.cg-msg.is-user { align-self: flex-end; flex-direction: row-reverse; }
.cg-msg.is-card { max-width: 100%; width: 100%; }
.cg-ava { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.cg-ava img { width: 20px; height: 20px; object-fit: contain; }
.cg-ava.is-tip { background: var(--brand-soft); border-color: transparent; color: var(--azure-500); }
.cg-ava.is-tip .ico { width: 15px; height: 15px; }
.cg-bubble { min-width: 0; padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: var(--canvas); color: var(--navy-900); font-size: 0.93rem; line-height: 1.5; }
.cg-bubble b { font-weight: 600; }
.cg-msg.is-user .cg-bubble { border-radius: 18px 18px 6px 18px; background: var(--navy-900); color: #fff; font-weight: 500; }
.cg-msg.is-user .cg-bubble small { color: rgba(255, 255, 255, 0.72); }
.cg-msg.is-skip .cg-bubble { background: transparent; border: 1px dashed var(--line-strong); }
.cg-msg.is-skip .cg-muted { color: var(--muted); }
.cg-msg.is-tip .cg-bubble { background: var(--white); border: 1px solid rgba(26, 106, 179, 0.22); color: var(--navy-900); box-shadow: 0 6px 18px rgba(26, 106, 179, 0.06); }
.cg-tip-label { display: block; font: 700 0.62rem/1 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--azure-500); margin-bottom: 5px; }
.cg-msg.is-card .cg-bubble { flex: 1; padding: 0; background: none; border-radius: 0; }
.cg-bubble .cg-tags { display: flex; margin: 8px 0 6px; }
.cg-bubble > small.cg-muted { display: block; font-size: 0.8rem; }

.cg-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.cg-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.35; animation: cg-dot 1s infinite; }
.cg-dots i:nth-child(2) { animation-delay: 0.15s; }
.cg-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cg-dot { 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------------------------------------------------------------- Composer */
.cg-compose { flex: none; padding: 12px 16px 14px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.cg-compose:empty { padding: 0; border-top: 0; }
.cg-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-opt { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--white); font: 600 0.84rem/1.25 var(--font-sans-head); color: var(--navy-900); text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(6, 21, 41, 0.04); animation: cg-pop 340ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.cg-opt:hover { border-color: var(--azure-500); color: var(--azure-600); transform: translateY(-1px); }
.cg-opt:focus-visible { outline: 3px solid rgba(26, 106, 179, 0.35); outline-offset: 2px; }
.cg-opt .ico { width: 15px; height: 15px; color: var(--azure-500); }
.cg-opt.is-other { border-style: dashed; color: var(--muted); }
.cg-opt .cg-tick { width: 0; opacity: 0; transition: width var(--dur-fast), opacity var(--dur-fast); }
.cg-opt[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.cg-opt[aria-pressed="true"] .cg-tick { width: 15px; opacity: 1; color: var(--pastel-300); }
.is-suggest { margin-bottom: 10px; }
.is-suggest .cg-opt { min-height: 34px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 0.78rem; background: rgba(255, 255, 255, 0.7); }
.is-routes .cg-opt { min-height: 44px; }

.cg-text { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--line-strong); transition: border-color var(--dur), box-shadow var(--dur); }
.cg-text:focus-within { border-color: var(--azure-500); box-shadow: 0 0 0 4px rgba(26, 106, 179, 0.12); }
.cg-text input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 9px 0; font: 500 0.95rem/1.4 var(--font-sans-body); color: var(--navy-900); }
.cg-send { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--navy-900); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background var(--dur-fast); }
.cg-send:hover { background: var(--azure-500); }
.cg-send .ico { width: 18px; height: 18px; }

.cg-compose-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cg-compose-foot.is-end { margin-top: 0; flex-wrap: wrap; justify-content: space-between; }
.cg-skip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; border: 0; background: none; font: 600 0.78rem/1 var(--font-sans-head); color: var(--muted); cursor: pointer; text-decoration: none; }
.cg-skip:hover { color: var(--navy-900); }
.cg-skip .ico { width: 14px; height: 14px; }
.cg-hint { flex: 1; text-align: right; font-size: 0.78rem; color: var(--muted); }
.cg-continue[disabled] { opacity: 0.45; pointer-events: none; }
.cg-compose-note { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.cg-compose-note .ico { width: 14px; height: 14px; flex: none; }

/* ---------------------------------------------------------------- Contact card */
.cg-contact { padding: 18px; border-radius: var(--card-radius); background: var(--white); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cg-contact .btn, .cg-done .btn { white-space: normal; text-align: center; }
.cg-done { grid-template-columns: minmax(0, 1fr); }
.cg-contact-head { display: flex; align-items: center; gap: 12px; }
.cg-contact-head b { display: block; font: 600 1rem/1.25 var(--font-sans-head); }
.cg-contact-head small { display: block; font-size: 0.82rem; color: var(--ink-2); margin-top: 2px; }
.cg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.cg-field { display: grid; gap: 5px; min-width: 0; }
.cg-field > span, .cg-field > label > span, .cg-pref legend { font: 600 0.74rem/1.2 var(--font-sans-head); color: var(--ink-2); }
.cg-field i { font-style: normal; color: var(--red-500); }
.cg-field input, .cg-field select { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-soft); font: 500 0.92rem/1 var(--font-sans-body); color: var(--navy-900); transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast); }
.cg-field input:focus, .cg-field select:focus { outline: 0; border-color: var(--azure-500); background: var(--white); box-shadow: 0 0 0 4px rgba(26, 106, 179, 0.12); }
.cg-field.is-invalid input { border-color: var(--red-500); background: #fff8f8; }
.cg-ferr { font-style: normal; font-size: 0.74rem; color: var(--red-600); min-height: 0; }
.cg-ferr:empty { display: none; }
.cg-phone-row { display: flex; gap: 6px; }
.cg-phone-row select { flex: none; width: 96px; padding: 0 8px; }
.cg-pref { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cg-pref legend { float: left; margin-right: 6px; }
.cg-pref label { cursor: pointer; }
.cg-pref input { position: absolute; opacity: 0; pointer-events: none; }
.cg-pref span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font: 600 0.78rem/1 var(--font-sans-head); color: var(--ink-2); transition: all var(--dur-fast); }
.cg-pref span .ico { width: 14px; height: 14px; color: var(--wa-green); }
.cg-pref input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.cg-pref input:checked + span .ico { color: #6ee7a0; }
.cg-pref input:focus-visible + span { outline: 3px solid rgba(26, 106, 179, 0.35); outline-offset: 2px; }
.cg-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; color: var(--ink-2); cursor: pointer; }
.cg-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--navy-900); }
.cg-form-err { padding: 10px 12px; border-radius: 12px; background: var(--red-100); color: var(--red-600); font: 600 0.82rem/1.4 var(--font-sans-head); }
.cg-contact .btn.is-busy { opacity: 0.8; }
.cg-contact.is-sent { opacity: 0.6; border-color: var(--line); box-shadow: none; }
.cg-contact.is-sent .btn { background: #13814a; }

/* ---------------------------------------------------------------- Done card */
.cg-done { padding: 18px; border-radius: var(--card-radius); background: var(--white); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); display: grid; gap: 16px; }
.cg-done-top { display: flex; gap: 14px; align-items: flex-start; }
.cg-check { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #e5f6ec; color: #13814a; animation: cg-check-in 600ms var(--ease-out); }
.cg-check .ico { width: 22px; height: 22px; stroke-width: 2.4; stroke-dasharray: 30; stroke-dashoffset: 0; animation: cg-draw 600ms 200ms var(--ease-out) both; }
@keyframes cg-check-in { from { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12); } }
@keyframes cg-draw { from { stroke-dashoffset: 30; } }
.cg-done-top small { display: block; font: 700 0.66rem/1 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: #13814a; margin-bottom: 6px; }
.cg-done-top b { display: block; font: 600 1.05rem/1.3 var(--font-sans-head); }
.cg-done-top p { font-size: 0.86rem; color: var(--ink-2); margin-top: 3px; }
.cg-plan small, .cg-addons small, .cg-est small { display: block; font: 700 0.64rem/1 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.cg-plan ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; counter-reset: s; }
.cg-plan li { counter-increment: s; position: relative; padding: 12px 12px 12px 42px; border-radius: 14px; background: var(--canvas); animation: cg-pop 400ms var(--ease-out) both; animation-delay: calc(300ms + var(--i, 0) * 90ms); }
.cg-plan li::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: #fff; font: 700 0.7rem/1 var(--font-sans-head); }
.cg-plan li b { display: block; font: 600 0.86rem/1.25 var(--font-sans-head); }
.cg-plan li span { display: block; font-size: 0.78rem; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.cg-addons { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-addons small { width: 100%; margin-bottom: 2px; }
.cg-done-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Live brief */
.cg-brief { min-height: 0; overflow-y: auto; padding: 18px; border-left: 1px solid var(--line); background: var(--surface-soft); display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.cg-brief-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cg-brief-top > small { font: 700 0.66rem/1 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-900); }
.cg-live-dot { display: inline-flex; align-items: center; gap: 6px; font: 600 0.7rem/1 var(--font-sans-head); color: var(--muted); }
.cg-live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: pulse 2s infinite; }
.cg-brief-route { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.cg-brief-route b { display: block; font: 600 0.9rem/1.25 var(--font-sans-head); }
.cg-brief-route small { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.cg-meter { position: relative; display: flex; align-items: center; gap: 12px; }
.cg-meter svg { flex: none; width: 52px; height: 52px; transform: rotate(-90deg); }
.cg-ring-bg { fill: none; stroke: var(--gray-200); stroke-width: 5; }
.cg-ring { fill: none; stroke: var(--azure-500); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 700ms var(--ease-out); }
.cg-meter-num { position: absolute; left: 0; top: 0; width: 52px; height: 52px; display: grid; place-items: center; font: 700 0.72rem/1 var(--font-sans-head); color: var(--navy-900); }
.cg-meter small { display: block; font-size: 0.72rem; color: var(--muted); }
.cg-meter b { display: block; font: 600 0.92rem/1.2 var(--font-sans-head); }
.cg-brief-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cg-brief-list li { position: relative; display: grid; gap: 3px; padding: 9px 34px 9px 10px; border-radius: 12px; transition: background var(--dur); }
.cg-brief-list li > span { display: flex; align-items: center; gap: 6px; font: 600 0.68rem/1 var(--font-sans-head); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cg-brief-list li > b { font: 600 0.84rem/1.35 var(--font-sans-head); color: var(--navy-900); overflow-wrap: anywhere; }
.cg-brief-list li > b small { font: 500 0.76rem/1.4 var(--font-sans-body); color: var(--ink-2); }
.cg-brief-list li.is-empty > b { color: var(--gray-300); font-weight: 500; }
.cg-brief-list li.is-skipped > b { color: var(--muted); font-weight: 500; font-style: italic; }
.cg-brief-list li.is-contact > b { font-size: 0.78rem; color: var(--muted); }
.cg-brief-list li.is-flash { animation: cg-flash 1.4s var(--ease-out); }
@keyframes cg-flash { 0% { background: rgba(154, 207, 233, 0.55); } 100% { background: transparent; } }
.cg-skel { display: block; width: 60%; height: 10px; margin-top: 2px; border-radius: 6px; background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100)); background-size: 200% 100%; animation: cg-shimmer 1.6s linear infinite; }
@keyframes cg-shimmer { to { background-position: -200% 0; } }
.cg-auto { padding: 2px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--azure-600); font-size: 0.6rem; letter-spacing: 0.06em; }
.cg-edit { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--dur-fast), background var(--dur-fast); }
.cg-edit .ico { width: 14px; height: 14px; }
.cg-brief-list li:hover .cg-edit, .cg-edit:focus-visible { opacity: 1; }
.cg-edit:hover { background: var(--white); color: var(--navy-900); }
@media (hover: none) { .cg-edit { opacity: 1; } }
.cg-est { padding: 12px 14px; border-radius: 14px; background: var(--navy-900); color: #fff; animation: cg-pop 400ms var(--ease-out); }
.cg-est small { color: var(--pastel-300); margin-bottom: 6px; }
.cg-est b { display: block; font: 600 1.05rem/1.2 var(--font-sans-head); }
.cg-est span { display: block; font-size: 0.74rem; color: rgba(255, 255, 255, 0.7); margin-top: 3px; }
.cg-brief .cg-addons .cg-tag { animation-delay: 0ms; }
.cg-brief-foot { margin-top: auto; display: flex; gap: 8px; align-items: flex-start; font-size: 0.76rem; color: var(--muted); line-height: 1.45; }
.cg-brief-foot .ico { flex: none; width: 14px; height: 14px; color: var(--wa-green); margin-top: 1px; }
.badge .ico { stroke-width: 2.4; }

/* ---------------------------------------------------------------- Tablet: brief becomes an overlay */
@media (max-width: 980px) {
  .cg-panel { grid-template-columns: 1fr; }
  .cg-brief-toggle { display: inline-flex; }
  .cg-brief { display: none; position: absolute; z-index: 3; inset: 69px 0 0 0; border-left: 0; border-top: 1px solid var(--line); animation: cg-pop 260ms var(--ease-out); }
  .cg.show-brief .cg-brief { display: flex; }
  .cg-change-label { display: none; }
}

/* ---------------------------------------------------------------- Phone: full-screen app sheet */
@media (max-width: 720px) {
  html.cg-lock, html.cg-lock body { overflow: hidden; }
  .cg:not([hidden]) { position: fixed; inset: 0; z-index: 90; width: auto; margin: 0; background: rgba(6, 21, 41, 0.4); }
  .cg.is-in .cg-panel { animation: cg-sheet 460ms var(--ease-out); }
  @keyframes cg-sheet { from { transform: translateY(40px); opacity: 0; } }
  .cg-panel { height: 100%; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .cg-head { padding: 12px 12px 10px 14px; gap: 10px; }
  .cg-head-ico { width: 36px; height: 36px; border-radius: 10px; }
  .cg-head-txt b { font-size: 0.95rem; }
  .cg-head-txt small { white-space: nowrap; letter-spacing: 0.06em; }
  .cg-pill { padding: 0 10px; }
  [data-cg-change] span { display: none; }
  .cg-brief { inset: calc(61px + env(safe-area-inset-top)) 0 0 0; }
  .cg-thread { padding: 16px 12px 10px; }
  .cg-msg { max-width: 92%; }
  .cg-ava { width: 26px; height: 26px; }
  .cg-ava img { width: 17px; height: 17px; }
  .cg-bubble { font-size: 0.9rem; padding: 10px 13px; }
  .cg-compose { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); max-height: 46vh; overflow-y: auto; }
  .cg-opt { min-height: 40px; font-size: 0.82rem; padding: 8px 12px; }
  .cg-fields { grid-template-columns: minmax(0, 1fr); }
  .cg-head-txt small { overflow: hidden; text-overflow: ellipsis; }
  .cg-contact, .cg-done { padding: 14px; }
  .cg-hint { display: none; }
  .cg-compose-foot { justify-content: space-between; }
  .cg-live { justify-content: flex-start; }
  .cg-live-hint { text-align: left; }
  .cg-done-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cg *, .cg-live * { animation: none !important; }
}

/* ---------------------------------------------------------------- Region insight cards (awareness)
   Same language as the rest of Concept C: white app-card, pillar-style icon, Montserrat
   600 title with a two-tone second part, stat-band numbers, date-pill rows, azure accents. */
.cg-live-route { order: 1; }
.cg-live > .cg-tags { order: 2; }
.cg-live-insight { order: 3; display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(6, 21, 41, 0.04); color: var(--navy-900); font: 500 0.76rem/1.2 var(--font-sans-head); animation: cg-pop 360ms var(--ease-out); }
.cg-live-insight .ico { width: 15px; height: 15px; color: var(--azure-500); }
.cg-live-insight b { font-weight: 700; }
.cg-live-insight em { font-style: normal; padding: 4px 8px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--azure-600); font-size: 0.66rem; font-weight: 700; }
.cg-live-hint { order: 4; }

.cg-insight { padding: 18px; border-radius: var(--card-radius); background: var(--white); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); color: var(--navy-900); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cg-ins-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cg-ins-head { display: flex; gap: 12px; align-items: flex-start; }
.cg-ins-pin { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--canvas); color: var(--navy-800); border: 1px solid var(--line); }
.cg-ins-pin .ico { width: 19px; height: 19px; }
.cg-ins-head small, .cg-ins-sec > small { display: block; font: 600 0.72rem/1.3 var(--font-sans-head); color: var(--azure-500); }
.cg-ins-sec > small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.cg-ins-head b { display: block; margin-top: 4px; font: 600 1.3rem/1.15 var(--font-sans-head); letter-spacing: -0.02em; }
.cg-ins-local { font-weight: 600; color: var(--two-tone); margin-left: 2px; }
.cg-ins-head p { margin-top: 4px; font-size: 0.86rem; color: var(--ink-2); }
.cg-ins-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--card-line); border-radius: 18px; overflow: hidden; }
.cg-ins-stats > div { padding: 12px 14px; border-left: 1px solid var(--line); animation: cg-pop 420ms var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 80ms); }
.cg-ins-stats > div:first-child { border-left: 0; }
.cg-ins-stats b { display: block; font: var(--stat-weight) 1.5rem/1 var(--stat-font); letter-spacing: -0.03em; color: var(--stat-ink); }
.cg-ins-stats small { display: block; margin-top: 6px; font: 600 0.62rem/1.3 var(--font-sans-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cg-ins-sec { display: grid; gap: 8px; }
.cg-ins-hubs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cg-ins-hubs li { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 14px; background: var(--canvas); animation: cg-pop 360ms var(--ease-out) both; animation-delay: calc(300ms + var(--i, 0) * 60ms); }
.cg-ins-hubs b { font: 600 0.84rem/1.2 var(--font-sans-head); color: var(--navy-900); }
.cg-ins-hubs span { font-size: 0.72rem; color: var(--ink-2); line-height: 1.3; }
.cg-ins-pop, .cg-ins-top, .cg-ins-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cg-ins-pop li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(50px, 1fr) auto auto; gap: 12px; align-items: center; font-size: 0.84rem; animation: cg-pop 360ms var(--ease-out) both; animation-delay: calc(400ms + var(--i, 0) * 80ms); }
.cg-ins-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-bar { height: 6px; border-radius: 6px; background: var(--canvas); overflow: hidden; }
.cg-bar i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--azure-500), var(--pastel-300)); animation: cg-grow 900ms 500ms var(--ease-out) both; }
@keyframes cg-grow { from { width: 0; } }
.cg-insight em { font-style: normal; font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.cg-ins-rating { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cg-stars { --p: calc(var(--r) / 5 * 100%); font-size: 0.78rem; letter-spacing: 1px; background: linear-gradient(90deg, var(--azure-500) var(--p), var(--gray-200) var(--p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cg-rate { font: 700 0.78rem/1 var(--font-sans-head); color: var(--navy-900); }
.cg-ins-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); animation: cg-pop 360ms var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 90ms); }
.cg-ins-rows b { display: block; font: 600 0.92rem/1.2 var(--font-sans-head); }
.cg-ins-rows div > span { font-size: 0.76rem; color: var(--muted); }
.cg-ins-top li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-2); animation: cg-pop 360ms var(--ease-out) both; animation-delay: calc(450ms + var(--i, 0) * 90ms); }
.cg-ins-code { min-width: 58px; padding: 9px 8px; border-radius: 12px; background: var(--canvas); text-align: center; font: 700 0.74rem/1 var(--font-sans-head); color: var(--navy-900); }
.cg-ins-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.76rem; color: var(--ink-2); }
.cg-ins-foot .ico { width: 13px; height: 13px; color: var(--azure-500); }
.cg-insight.is-compact { gap: 12px; padding: 16px; }
.cg-insight.is-compact .cg-ins-stats b { font-size: 1.15rem; }
@media (max-width: 720px) {
  .cg-insight { padding: 14px; }
  .cg-ins-stats > div { padding: 10px; }
  .cg-ins-stats b { font-size: 1.15rem; }
  .cg-ins-pop li { grid-template-columns: minmax(0, 1fr) auto; }
  .cg-ins-pop .cg-bar { display: none; }
  .cg-ins-pop em { grid-column: 1 / -1; margin-top: -4px; }
  .cg-ins-rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .cg-ins-rows em { grid-row: 2; }
  .cg-ins-top li { grid-template-columns: auto minmax(0, 1fr); }
  .cg-ins-top .cg-ins-rating { grid-column: 2; }
}

/* Compact first: title + one line, details on request */
.cg-insight.is-collapsed { gap: 10px; padding: 14px 16px; }
.cg-insight.is-collapsed .cg-ins-head b { font-size: 1.1rem; }
.cg-ins-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-left: 52px; font: 600 0.8rem/1.4 var(--font-sans-head); color: var(--navy-900); }
.cg-ins-quick i { font-style: normal; color: var(--gray-300); }
.cg-ins-more { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-left: 52px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--white); font: 600 0.76rem/1 var(--font-sans-head); color: var(--navy-900); cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast); }
.cg-ins-more:hover { border-color: var(--azure-500); color: var(--azure-600); }
.cg-ins-more .ico { width: 14px; height: 14px; transition: transform var(--dur) var(--ease-out); }
.cg-ins-more[aria-expanded="true"] .ico { transform: rotate(180deg); }
.cg-ins-body { display: grid; gap: 16px; animation: cg-pop 360ms var(--ease-out); }
.cg-ins-body[hidden] { display: none; }
@media (max-width: 720px) {
  .cg-ins-quick, .cg-ins-more { padding-left: 0; margin-left: 0; }
}

/* Honeypot field for bots (hidden from people and screen readers) */
.cg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "Continue your brief": an unfinished brief saved in this browser session */
.cg-resume { margin: 12px auto 0; width: min(640px, 100%); display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--white); border: 1px solid rgba(26, 106, 179, 0.25); box-shadow: 0 8px 24px rgba(26, 106, 179, 0.1); text-align: left; animation: cg-pop var(--dur) var(--ease-out); }
.cg-resume[hidden] { display: none; }
.cg-resume-txt { min-width: 0; display: grid; gap: 2px; }
.cg-resume-txt small { font: 700 0.62rem/1.2 var(--font-sans-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--azure-500); }
.cg-resume-txt b { font: 600 0.9rem/1.25 var(--font-sans-head); color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-resume-txt em { font-style: normal; font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-c.cg-open .cg-resume { display: none; }
@media (max-width: 720px) {
  .cg-resume { grid-template-columns: auto minmax(0, 1fr); }
  .cg-resume .btn { grid-column: 1 / -1; }
  .cg-resume .cg-skip { grid-column: 1 / -1; justify-self: center; }
}
