/* Google SERP Preview — a result card built to the proportions a search
   results page uses, plus the measurement panel beside it.
   The card is styled with textContent-driven markup, so nothing a visitor
   types can inject markup into the preview. */

.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.sp-form > h2, .sp-side > h2 { margin-bottom: .9rem; font-size: 1.35rem; }
.sp-h2 { margin-top: 2rem !important; }
.sp-label { display: block; font-size: 13px; font-weight: 750; color: var(--ink); margin-bottom: 6px; }
.sp-form .field { margin-bottom: 1rem; }
@media (max-width: 940px) { .sp-layout { grid-template-columns: 1fr; } }

/* ---- the result card ---- */
.sp-card { background: #fff; border: 2px solid var(--line-2); border-radius: var(--r-md); padding: clamp(1rem, 2.5vw, 1.6rem); }
.sp-card[data-theme="dark"] { background: #202124; border-color: #3c4043; }
.sp-card[data-device="mobile"] { max-width: 412px; }
.sp-result { display: block; }
.sp-line1 { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: 14px; line-height: 1.3; color: #4d5156; }
.sp-card[data-theme="dark"] .sp-line1 { color: #bdc1c6; }
.sp-favicon { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #f1f3f4; border: 1px solid #dadce0; display: inline-grid; place-items: center; }
.sp-favicon::before { content: ""; width: 12px; height: 12px; border-radius: 2px; background: #9aa0a6; }
.sp-card[data-theme="dark"] .sp-favicon { background: #3c4043; border-color: #5f6368; }
.sp-site { font-size: 14px; color: #202124; white-space: nowrap; }
.sp-card[data-theme="dark"] .sp-site { color: #e8eaed; }
.sp-crumb { color: #4d5156; overflow-wrap: anywhere; }
.sp-date { margin-left: auto; color: #70757a; white-space: nowrap; font-size: 13px; }
.sp-title { margin: .35rem 0 .3rem; font-size: 20px; line-height: 1.3; font-weight: 400; color: #1a0dab; letter-spacing: normal; overflow-wrap: anywhere; }
.sp-card[data-theme="dark"] .sp-title { color: #99c3ff; }
.sp-card[data-device="mobile"] .sp-title { font-size: 17px; }
.sp-title[data-truncated="true"] { text-decoration: underline; text-decoration-color: rgba(255, 106, 48, .45); text-underline-offset: 3px; }
.sp-description { margin: 0; font-size: 14px; line-height: 1.58; color: #4d5156; overflow-wrap: anywhere; }
.sp-card[data-theme="dark"] .sp-description { color: #bdc1c6; }
.sp-description[data-truncated="true"] { text-decoration: underline; text-decoration-color: rgba(255, 106, 48, .45); text-underline-offset: 3px; }
.sp-rating { display: flex; align-items: center; gap: .35rem; margin-top: .4rem; font-size: 13px; color: #70757a; }
.sp-card[data-theme="dark"] .sp-rating { color: #9aa0a6; }
.sp-stars { position: relative; display: inline-block; color: #dadce0; letter-spacing: 1px; font-size: 15px; line-height: 1; }
.sp-card[data-theme="dark"] .sp-stars { color: #5f6368; }
.sp-stars-track { display: block; }
.sp-stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #fbbc04; }
.sp-rating-value { color: #202124; font-weight: 700; }
.sp-card[data-theme="dark"] .sp-rating-value { color: #e8eaed; }

/* ---- measurements ---- */
.sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin: 1rem 0; }
.sp-stat { background: var(--card); border: 2px solid var(--line-2); border-left: 4px solid var(--line-2); padding: .55rem .7rem; }
.sp-stat strong { display: block; font: 850 1.05rem/1.25 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sp-stat span { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.sp-stat-ok { border-left-color: var(--ok); }
.sp-stat-info { border-left-color: var(--info); }
.sp-stat-warn { border-left-color: var(--warn); }
.sp-issues:empty { display: none; }
.sp-issues { margin-bottom: .6rem; }
.sp-issue { font-size: 13px; line-height: 1.5; padding: .5rem .7rem; border-left: 4px solid var(--line-2); background: var(--card); margin-bottom: .35rem; }
.sp-issue-warn { border-left-color: var(--warn); background: var(--warn-soft); color: #5f3d00; }
.sp-issue-info { border-left-color: var(--info); background: var(--info-soft); color: #123f8c; }
.sp-faq { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.sp-faq summary { font-weight: 800; color: var(--ink); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.sp-faq p { margin: .4rem 0 .9rem; }
.sp-form code { font: 500 .85em var(--code); background: var(--m-soft); padding: .1em .35em; border-radius: 3px; }
