/* Free tool pages: Google Business Profile checker and review request message maker (scripts/tools_pages.py).
   Loaded only on those pages, after site.css. Reuses the site tokens (--brand, --line, --r-lg ...). */
.tool-page [hidden] { display: none !important; }
.tool-hero { padding-bottom: 8px; }
.tool-hero h1 { font-size: clamp(30px, 4.2vw, 44px); margin: .2em 0 .3em; }
.tool-hero .lead { max-width: 720px; }

/* Yes / No and channel / tone pickers */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--paper); }
.seg label { position: relative; display: block; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 18px; border-radius: 999px; font: 600 14px/1.2 var(--sans); color: var(--muted); transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--brand-glow); outline-offset: 2px; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span:hover, .seg label:hover input:checked + span { color: #fff; }

/* Checker */
.gc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 16px; }
.gc-group { margin-bottom: 22px; }
.gc-group h2 { font-size: 22px; margin: 0 0 10px; }
.gc-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.gc-q legend { float: left; padding: 0; font-size: 15.5px; line-height: 1.45; color: var(--text); max-width: 34em; }
.gc-q .seg { flex: none; }
.gc-q:has(input[value="yes"]:checked) { border-color: #BFE6D5; background: #F4FBF8; }
.gc-q:has(input[value="no"]:checked) { border-color: #F2D7B0; background: #FFFAF2; }
.gc-q:has(input[value="no"]:checked) input[value="no"]:checked + span { background: var(--warn); }
.gc-result { position: sticky; top: 88px; }
.gc-result h2 { font-size: 22px; margin: 0 0 14px; }
.gc-result h3 { font-size: 17px; margin: 18px 0 6px; }
.gc-ring { --p: 0; --c: var(--danger); width: 156px; height: 156px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); transition: background .3s; }
.gc-ring[data-level="mid"] { --c: var(--gold); }
.gc-ring[data-level="high"] { --c: var(--brand); }
.gc-ring > div { width: 122px; height: 122px; border-radius: 50%; background: var(--paper); display: grid; place-content: center; text-align: center; }
.gc-ring b { font: 800 44px/1 var(--display); letter-spacing: -.03em; color: var(--text); }
.gc-ring span { font-size: 13px; color: var(--muted); }
.gc-level { text-align: center; font-weight: 600; min-height: 1.5em; margin: 12px 0 8px; }
.gc-progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.gc-progress > div { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.gc-result #gc-progress { margin: 6px 0 0; text-align: center; }
.gc-tips { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.gc-tips li { padding: 12px 14px; border-radius: var(--r-sm); background: #FFFAF2; border: 1px solid #F2D7B0; font-size: 14.5px; line-height: 1.5; }
.gc-tips li strong { display: block; font-size: 14px; margin-bottom: 4px; }
.gc-tip-cta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gc-tip-cta .btn { margin: 0; }
.gc-allyes { color: var(--brand-d); font-weight: 600; }
.gc-privacy { margin: 10px 0 0; }

/* Review request message maker */
.rq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 16px; }
.rq-field { border: 0; padding: 0; margin: 10px 0; }
.rq-field legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.rq-help { margin: 0 0 4px; }
.rq-out h2 { font-size: 22px; margin: 0 0 10px; }
.rq-out textarea, .rq-subject input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font: 15px/1.55 var(--sans); background: var(--bg); color: var(--text); resize: vertical; }
.rq-subject { display: grid; gap: 6px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.rq-warn { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: #FFFAF2; border: 1px solid #F2D7B0; color: var(--warn); }
.rq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rq-actions .btn { margin: 0; }
.rq-rules .grid3 { margin-top: 12px; }

/* Bottom box and links */
.tool-guide { max-width: 820px; }
.tool-cta .btn + .btn { margin-left: 0; }
.tool-more { margin-top: 24px; }
@media (hover: none) and (pointer: coarse) { .on-desktop-note { display: none; } }

@media (max-width: 860px) {
  .gc-grid, .rq-grid { grid-template-columns: 1fr; }
  .gc-result { position: static; }
}
@media (max-width: 600px) {
  .gc-q { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .gc-q .seg { align-self: flex-start; }
  .seg span { padding: 8px 16px; }
}
[dir="rtl"] .gc-q legend { float: right; }
.rq-grid .form-grid { margin-top: 0; }
.rq-actions .is-disabled, .rq-actions button:disabled { opacity: .5; cursor: not-allowed; }
