:root {
  --blue: #1a73e8;
  --link: #1a0dab;
  --visited: #6e3ab4;
  --url-green: #0d652d;
  --snippet: #4d5156;
  --label: #70757a;
  --border: #dfe1e5;
  --bg: #fff;
  --hover-bg: #f8f9fa;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: Arial, sans-serif; background: var(--bg); color: #202124; font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* ── Shared search input ── */
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 14px;
  height: 44px;
  gap: 10px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}
.search-box:focus-within {
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
  border-color: rgba(223,225,229,0);
  outline: none;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #202124;
  background: transparent;
  min-width: 0;
}
.search-icon { flex-shrink: 0; color: var(--label); }

/* ── Homepage ── */
.home-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 20px;
  gap: 20px;
}
.home-header nav { display: flex; gap: 16px; }
.home-header nav a { font-size: 13px; color: #202124; }
.home-header nav a:hover { text-decoration: underline; }
.home-header-right { display: flex; align-items: center; gap: 16px; }
.home-header-right a { font-size: 13px; color: #202124; }
.home-header-right a:hover { text-decoration: underline; }
.signin-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: .25px;
}
.signin-btn:hover { background: #1765cc; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.home-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 80px;
  padding: 0 20px;
}

.logo-home {
  font-family: 'Product Sans', Arial, sans-serif;
  font-size: 80px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 28px;
  line-height: 1;
}

.home-search-form { width: 100%; max-width: 560px; }
.home-search-form .search-box { width: 100%; }
.home-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.home-btn {
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  font-size: 14px;
  padding: 9px 20px;
  cursor: pointer;
  transition: box-shadow .1s, border-color .1s;
}
.home-btn:hover { box-shadow: 0 1px 3px rgba(0,0,0,.2); border-color: #dadce0; color: #202124; }

.bobble-offer { margin-top: 28px; font-size: 13px; color: #202124; }
.bobble-offer a { color: var(--blue); margin: 0 4px; }
.bobble-offer a:hover { text-decoration: underline; }

.home-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f2f2f2;
  border-top: 1px solid #e4e4e4;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--label);
}
.home-footer a { color: var(--label); margin: 0 12px; }
.home-footer a:hover { text-decoration: underline; }
.home-footer-section { display: flex; gap: 0; }

/* ── Results page header ── */
.results-header {
  border-bottom: 1px solid var(--border);
  padding: 10px 20px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}
.results-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.logo-small {
  font-family: 'Product Sans', Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  flex-shrink: 0;
  line-height: 1;
}

.results-search-wrap { flex: 1; max-width: 600px; min-width: 200px; }
.results-search-wrap .search-box { height: 40px; }
.results-search-wrap .search-box input { font-size: 15px; }

.results-header-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.results-header-right a { font-size: 13px; color: #202124; }
.results-header-right a:hover { text-decoration: underline; }

.result-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.result-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--label);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .1s;
}
.tab:hover { color: #202124; }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── Results body layout ── */
.results-body {
  display: flex;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 48px 160px;
}
.results-main { flex: 1; max-width: 660px; min-width: 0; }
.results-sidebar { width: 340px; flex-shrink: 0; }

/* ── Result meta ── */
.result-meta { font-size: 13px; color: var(--label); margin-bottom: 16px; }

/* ── Individual result ── */
.result { margin-bottom: 28px; }
.result--sponsored { position: relative; }

.result-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.favicon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.result-source-text { display: flex; flex-direction: column; line-height: 1.3; }
.result-site { font-size: 13px; color: #202124; }
.result-url { font-size: 12px; color: var(--label); }

.sponsored-badge {
  font-size: 11px;
  color: var(--label);
  border: 1px solid var(--label);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: auto;
  flex-shrink: 0;
}

.result-title {
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: var(--link);
  line-height: 1.3;
  margin-bottom: 4px;
}
.result-title:hover { text-decoration: underline; }
.result-title:visited { color: var(--visited); }

.result-snippet { font-size: 14px; color: var(--snippet); line-height: 1.58; }
.result-snippet strong { font-weight: 700; color: #202124; }

.sitelinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sitelink {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--link);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex: 1;
  min-width: 120px;
  transition: background .1s;
}
.sitelink:hover { background: var(--hover-bg); text-decoration: underline; }
.sitelink:last-child { border-right: none; }

/* ── Featured snippet ── */
.featured-snippet {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.featured-body { font-size: 14px; color: var(--snippet); line-height: 1.7; margin-bottom: 12px; }
.featured-body strong { color: #202124; }
.featured-source { display: flex; flex-direction: column; gap: 2px; }
.featured-link { font-size: 14px; color: var(--link); }
.featured-link:hover { text-decoration: underline; }
.featured-url { font-size: 12px; color: var(--label); }

/* ── Knowledge panel ── */
.knowledge-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  font-size: 14px;
}
.panel-logo { line-height: 1; margin-bottom: 6px; }
.panel-name { font-size: 22px; font-weight: 400; color: #202124; margin-bottom: 2px; }
.panel-type { font-size: 13px; color: var(--label); margin-bottom: 12px; }
.panel-description { font-size: 14px; color: var(--snippet); line-height: 1.6; margin-bottom: 14px; }
.panel-facts { border-top: 1px solid var(--border); margin-bottom: 14px; }
.panel-fact { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.panel-fact-label { color: var(--label); min-width: 90px; flex-shrink: 0; }
.panel-fact-value { color: #202124; font-weight: 500; }
.panel-links { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-link {
  color: var(--link);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  transition: background .1s;
}
.panel-link:hover { background: var(--hover-bg); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .results-body { padding: 16px 16px 48px; flex-direction: column; }
  .results-sidebar { width: 100%; }
  .results-main { max-width: 100%; }
}

@media (max-width: 600px) {
  .logo-home { font-size: 56px; }
  .results-header-right { display: none; }
}
