/* Scoped to the illustrated result so the surrounding gallery keeps its paper style. */
.serp-preview {
  container-type: inline-size;
  width: 100%;
  max-width: 680px;
  min-width: 0;
  margin: 0;
  color: #202124;
  font: 14px/1.5 Arial, sans-serif;
  text-align: left;
  letter-spacing: normal;
  color-scheme: light;
}

.serp-preview *,
.serp-preview *::before,
.serp-preview *::after {
  box-sizing: border-box;
}

.serp-card {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(39 48 40 / 10%), 0 2px 6px rgb(39 48 40 / 5%);
}

.serp-chrome {
  padding: 18px 24px 0;
  border-bottom: 1px solid #ebedf0;
  border-radius: 12px 12px 0 0;
  background: #fff;
}

.serp-searchline {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.serp-google {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  font: 500 23px/1 Arial, sans-serif;
  letter-spacing: -1.1px;
  user-select: none;
}

.serp-google span:nth-child(1),
.serp-google span:nth-child(4) { color: #4285f4; }
.serp-google span:nth-child(2),
.serp-google span:nth-child(6) { color: #ea4335; }
.serp-google span:nth-child(3) { color: #fbbc05; }
.serp-google span:nth-child(5) { color: #34a853; }

.serp-searchbox {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #dadce0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(60 64 67 / 7%);
}

.serp-query {
  display: block;
  flex: 1;
  min-width: 0;
  color: #303134;
  font: 13px/1.45 Arial, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: text;
}

.serp-search-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: #5f6368;
}

.serp-search-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.serp-search-tabs {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 11px 0 0 84px;
  color: #5f6368;
  font: 12px/1.4 Arial, sans-serif;
}

.serp-search-tabs > span {
  display: block;
  padding: 5px 0 9px;
  border-bottom: 3px solid transparent;
}

.serp-search-tabs .serp-search-tab-current {
  color: #1a73e8;
  border-color: #1a73e8;
  font-weight: 600;
}

.serp-result {
  min-width: 0;
  padding: 20px 24px 22px;
  color: #202124;
  font: 14px/1.5 Arial, sans-serif;
  overflow-wrap: break-word;
}

.serp-sponsored {
  margin: 0 0 12px;
  color: #202124;
  font: 600 12px/1.4 Arial, sans-serif;
}

.serp-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.serp-favicon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: #f1f3f4;
  border: 1px solid #e8eaed;
  border-radius: 50%;
}

.serp-favicon img {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 6px;
}

.serp-advertiser { min-width: 0; }

.serp-brand {
  display: block;
  margin-bottom: 1px;
  color: #202124;
  font: 400 14px/1.3 Arial, sans-serif;
}

.serp-display-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  color: #4d5156;
  font: 12px/1.4 Arial, sans-serif;
  overflow-wrap: anywhere;
}

.serp-display-url > span { min-width: 0; }

.serp-path-separator {
  display: inline-flex;
  align-items: center;
  color: #70757a;
}

.serp-path-separator svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.serp-preview .serp-headline {
  display: block;
  margin: 11px 0 6px;
  padding: 0;
  color: #1a0dab;
  font: 400 20px/1.35 Arial, sans-serif;
  text-decoration: none;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: anywhere;
}

.serp-divider { color: #1a0dab; }

.serp-preview .serp-description {
  margin: 0;
  color: #4d5156;
  font: 14px/1.55 Arial, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
}

.serp-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: #3c4043;
  font: 12px/1.5 Arial, sans-serif;
}

.serp-callouts li {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.serp-callouts li + li::before {
  content: '·';
  display: inline-block;
  padding: 0 7px;
  color: #5f6368;
}

.serp-sitelinks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #f0f1f3;
}

.serp-sitelink { min-width: 0; }

.serp-preview .serp-sitelink a {
  display: inline-block;
  color: #1a0dab;
  font: 400 16px/1.35 Arial, sans-serif;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.serp-preview .serp-sitelink p {
  margin: 3px 0 0;
  color: #4d5156;
  font: 12px/1.5 Arial, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
}

.serp-preview .serp-headline:hover,
.serp-preview .serp-sitelink a:hover {
  color: #1a0dab;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.serp-preview a:focus-visible,
.serp-query:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 4px;
  border-radius: 2px;
}

.serp-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 12px;
  margin-top: 11px;
  padding: 0 2px;
  color: #536158;
  font: 11px/1.5 Arial, sans-serif;
  overflow-wrap: anywhere;
}

@container (max-width: 500px) {
  .serp-chrome { padding: 15px 18px 0; }
  .serp-searchline { gap: 12px; }
  .serp-search-tabs { margin-left: 80px; gap: 21px; }
  .serp-result { padding: 18px; }
  .serp-preview .serp-headline { font-size: 19px; }
  .serp-sitelinks { gap: 12px 18px; }
}

@container (max-width: 350px) {
  .serp-chrome { padding: 13px 14px 0; }
  .serp-searchline { align-items: center; gap: 9px; }
  .serp-google { font-size: 20px; }
  .serp-searchbox { gap: 7px; padding: 8px 10px; }
  .serp-query { font-size: 12px; }
  .serp-search-tabs { margin-left: 0; gap: 22px; }
  .serp-result { padding: 16px 14px 18px; }
  .serp-sponsored { margin-bottom: 10px; }
  .serp-preview .serp-headline { font-size: 18px; }
  .serp-preview .serp-description { font-size: 13px; }
  .serp-sitelinks { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .serp-caption { display: grid; }
}

/* Viewport fallback also covers browsers without container query support. */
@media (max-width: 350px) {
  .serp-chrome { padding: 13px 14px 0; }
  .serp-searchline { gap: 9px; }
  .serp-google { font-size: 20px; }
  .serp-searchbox { gap: 7px; padding: 8px 10px; }
  .serp-query { font-size: 12px; }
  .serp-search-tabs { margin-left: 0; gap: 22px; }
  .serp-result { padding: 16px 14px 18px; }
  .serp-preview .serp-headline { font-size: 18px; }
  .serp-preview .serp-description { font-size: 13px; }
  .serp-sitelinks { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .serp-caption { display: grid; }
}
