html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

:root {
  color-scheme: light dark;
  --google-sans: 'Google Sans', Arial, sans-serif;
  --page-bg: #fff;
  --text: #1f1f1f;
  --muted: #5f6368;
  --link: #1a0dab;
  --button-bg: #f8f9fa;
  --button-border: #f8f9fa;
  --button-hover: #f1f3f4;
  --search-bg: #fff;
  --search-border: #dfe1e5;
  --search-shadow: 0 1px 6px rgba(32, 33, 36, 0.16);
  --ai-bg: #f1f3f4;
  --signin-bg: #0b57d0;
  --signin-text: #fff;
  --footer-bg: #f4f5f6;
  --footer-line: #dadce0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #22242a;
    --text: #e8e8e8;
    --muted: #bfbfbf;
    --link: #99c3ff;
    --button-bg: #303134;
    --button-border: #303134;
    --button-hover: #3c4043;
    --search-bg: #4d5156;
    --search-border: transparent;
    --search-shadow: none;
    --ai-bg: #5f6368;
    --signin-bg: #c2e7ff;
    --signin-text: #001d35;
    --footer-bg: #16171a;
    --footer-line: #444746;
  }
}

@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url('https://fonts.gstatic.com/s/googlesans/v29/4UaGrENHsxJlGDuGo1OIlL3Owp5eKQtG.woff2')
    format('woff2');
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-width: 400px;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr) auto;
  background: var(--page-bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 48px;
}

.toplink {
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  padding-left: 15px;
}

.apps-button,
.search-tool,
.ai-mode,
.cta-row button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.apps-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin: 0 12px 0 19px;
  border-radius: 50%;
}

.apps-button:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.apps-button svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  opacity: 0.78;
}

.signin {
  min-width: 85px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 100px;
  background: var(--signin-bg);
  color: var(--signin-text);
  font-size: 14px;
  font-family: var(--google-sans);
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
}

.signin:hover {
  text-decoration: none;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.3),
    0 1px 3px rgba(60, 64, 67, 0.15);
}

.homepage {
  display: flex;
  justify-content: center;
  min-height: 0;
  padding: clamp(96px, 19.4svh, 145px) 20px 40px;
}

.search-panel {
  width: min(688px, 100%);
  text-align: center;
}

.brand {
  width: 272px;
  height: 92px;
  display: block;
  margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
  .brand path {
    fill: #fff;
  }
}

.search-form {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 23px;
  padding: 0 8px 0 0;
  border: 1px solid var(--search-border);
  border-radius: 26px;
  background: var(--search-bg);
  box-shadow: var(--search-shadow);
}

.search-form:hover,
.search-form:focus-within {
  box-shadow: var(--search-shadow);
}

.search-input {
  min-width: 0;
  height: 100%;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-tool {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
}

.search-tool svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

.add-tool {
  width: 50px;
  height: 50px;
  margin-right: 0;
}

.add-tool svg {
  width: 24px;
  height: 24px;
}

.search-tool:hover,
.ai-mode:hover {
  filter: brightness(0.97);
}

.ai-mode {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 0;
  padding: 0 8px;
  border-radius: 100px;
  background: var(--ai-bg);
  color: var(--text);
  font-family: var(--google-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}

.ai-mode svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 29px;
}

.cta-row button {
  min-width: 54px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--text);
  font-family: var(--google-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 34px;
}

.cta-row button:hover {
  border-color: color-mix(in srgb, var(--text) 12%, var(--button-border));
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.language {
  margin: 44px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 28px;
}

.language a {
  color: var(--link);
}

.footer {
  background: var(--footer-bg);
  color: var(--text);
  font-size: 14px;
}

.country {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 27px;
  border-bottom: 1px solid var(--footer-line);
  font-weight: 500;
}

.footer-links {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 31px;
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 29px;
}

.footer-group a {
  line-height: 46px;
  font-weight: 500;
}

.footer-group-right {
  gap: 31px;
}

@media (max-width: 720px) {
  body {
    grid-template-rows: 56px minmax(0, 1fr) auto;
  }

  .topbar {
    padding: 8px 12px;
  }

  .topnav {
    gap: 11px;
  }

  .homepage {
    padding: clamp(72px, 16svh, 122px) 14px 34px;
  }

  .search-form {
    height: 50px;
    margin-top: 30px;
  }

  .footer-links {
    height: auto;
    min-height: 46px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 10px 24px;
  }

  .footer-group {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 26px;
  }
}

@media (max-width: 520px) {
  .toplink {
    font-size: 13px;
  }

  .signin {
    min-width: 70px;
    padding: 0 18px;
  }

  .brand {
    width: min(272px, 72vw);
    height: auto;
    aspect-ratio: 272 / 92;
  }

  .search-form {
    gap: 4px;
    padding: 0 8px 0 11px;
  }

  .search-actions {
    gap: 7px;
  }

  .ai-mode {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .ai-mode span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .cta-row {
    flex-wrap: wrap;
  }

  .country {
    justify-content: center;
    padding: 0 20px;
  }
}

/* Mock reCAPTCHA */
.mockcaptcha {
  font-family: Roboto, Helvetica, Arial, sans-serif;
  position: relative;
}

.mockcaptcha-anchor {
  width: 300px;
  height: 74px;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  background: #f9f9f9;
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.08);
  color: #000;
  cursor: pointer;
  font:
    400 14px/17px Roboto,
    Helvetica,
    Arial,
    sans-serif;
  text-align: left;
}

.mockcaptcha-box {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  margin: 0 12px 2px;
  position: relative;
}

.mockcaptcha-box::before {
  content: '';
  width: 24px;
  height: 24px;
  position: absolute;
  left: 0;
  top: 0;
  border: 2px solid #444746;
  border-radius: 2px;
  background: #fff;
}

.mockcaptcha-anchor-loading {
  cursor: default;
}

.mockcaptcha-anchor-loading .mockcaptcha-box::before {
  width: 26px;
  height: 26px;
  left: -6px;
  top: -4px;
  border: 6px solid #4d90fe;
  border-radius: 36px;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
  animation: mockcaptcha-spin 2.5s linear infinite;
}

@keyframes mockcaptcha-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  10% {
    -webkit-transform: rotate(135deg);
    transform: rotate(135deg);
  }
  25% {
    -webkit-transform: rotate(245deg);
    transform: rotate(245deg);
  }
  60% {
    -webkit-transform: rotate(700deg);
    transform: rotate(700deg);
  }
  75% {
    -webkit-transform: rotate(810deg);
    transform: rotate(810deg);
  }
  100% {
    -webkit-transform: rotate(3turn);
    transform: rotate(3turn);
  }
}

.mockcaptcha-anchor-text {
  width: 152px;
  flex: 0 0 auto;
}

.mockcaptcha-brand {
  width: 70px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  padding-top: 10px;
  color: #555;
  text-align: center;
  user-select: none;
  margin: 0 0 0 auto;
}

.mockcaptcha-logo {
  width: 32px;
  height: 32px;
  display: block;
  background: url('https://www.gstatic.com/recaptcha/api2/logo_48.png') center /
    32px 32px no-repeat;
}

.mockcaptcha-name {
  margin-top: 5px;
  font-size: 10px;
  line-height: 10px;
}

.mockcaptcha-links {
  margin-top: 2px;
  font-size: 8px;
  line-height: 10px;
  white-space: nowrap;
}

.mockcaptcha-modal {
  display: block;
  position: fixed;
  left: var(--mockcaptcha-modal-left, 0);
  top: var(--mockcaptcha-modal-top, 0);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mockcaptcha-modal-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mockcaptcha-modal::before,
.mockcaptcha-modal::after {
  content: '';
  position: absolute;
  top: var(--mockcaptcha-arrow-top, 50%);
  width: 0;
  height: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.mockcaptcha-modal::before {
  left: -15px;
  border-top: 15px solid transparent;
  border-right: 15px solid #c7c7c7;
  border-bottom: 15px solid transparent;
}

.mockcaptcha-modal::after {
  left: -14px;
  border-top: 14px solid transparent;
  border-right: 14px solid #fff;
  border-bottom: 14px solid transparent;
}

.mockcaptcha-card {
  width: 400px;
  border: 1px solid #d7d7d7;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.24);
}

.mockcaptcha-final {
  display: none;
  width: 400px;
  min-height: 300px;
  border: 1px solid #d7d7d7;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.24);
}

.mockcaptcha-modal-final .mockcaptcha-card {
  display: none;
}

.mockcaptcha-modal-final .mockcaptcha-final {
  display: block;
}

.mockcaptcha-header {
  height: 112px;
  margin: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 14px 0 24px;
  background: #1a73e8;
  color: #fff;
}

.mockcaptcha-heading {
  min-width: 0;
  font-weight: 400;
  line-height: 1.25;
}

.mockcaptcha-heading span {
  display: block;
  font-size: 16px;
}

.mockcaptcha-heading strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.mockcaptcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 7px;
}

.mockcaptcha-tile {
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 0;
  position: relative;
  border: 0;
  background-color: #f1f3f4;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
  overflow: visible;
  transform: scale(1);
  transition:
    transform 100ms ease-in-out,
    box-shadow 100ms ease-in-out;
}

.mockcaptcha-tile::before {
  content: none;
}

.mockcaptcha-tile::after {
  content: none;
}

.mockcaptcha-check {
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  position: absolute;
  left: -4px;
  top: -4px;
  z-index: 2;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
  color: #fff;
}

.mockcaptcha-check svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mockcaptcha-tile-selected {
  box-shadow: inset 0 0 0 5px #fff;
  transform: scale(0.92);
}

.mockcaptcha-tile-selected .mockcaptcha-check {
  display: grid;
}

.mockcaptcha-error {
  display: none;
  margin: -2px 0 7px;
  color: #d93025;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
}

.mockcaptcha-error-visible {
  display: block;
}

.mockcaptcha-footer {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  border-top: 1px solid #ddd;
}

.mockcaptcha-tools {
  display: flex;
  align-items: center;
  gap: 0;
}

.mockcaptcha-tool {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 32px 32px;
  cursor: pointer;
  opacity: 0.55;
}

.mockcaptcha-tool:hover,
.mockcaptcha-tool:focus-visible {
  opacity: 0.8;
  outline: none;
}

.mockcaptcha-tool:focus-visible {
  background-color: #d8d8d8;
}

.mockcaptcha-tool-reload {
  background-image: url('https://www.gstatic.com/recaptcha/api2/refresh_2x.png');
}

.mockcaptcha-tool-audio {
  background-image: url('https://www.gstatic.com/recaptcha/api2/audio_2x.png');
}

.mockcaptcha-tool-liveness {
  background-image: url('https://www.gstatic.com/recaptcha/api2/liveness_dark.png');
}

.mockcaptcha-tool-help {
  background-image: url('https://www.gstatic.com/recaptcha/api2/info_2x.png');
}

.mockcaptcha-verify {
  min-width: 102px;
  height: 44px;
  padding: 0 23px;
  border: 0;
  border-radius: 2px;
  background: #1a73e8;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.mockcaptcha-verify:active {
  background: #3367d6;
}

.mockcaptcha-body {
  margin: 7px;
  font-size: 16px;
  line-height: 1.25;
  color: #202124;
  font-weight: 400;
  padding: 7px 0 14px 0;
}
.mockcaptcha-body__title {
  display: block;
  margin-bottom: 12px;
}
.mockcaptcha-body ol {
  margin: 0;
  padding: 0 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mockcaptcha-body ol li::marker {
  color: #1a73e8;
  font-weight: 700;
  line-height: 1.5;
}
.mockcaptcha-body ol b {
  font-weight: 700;
}
.mockcaptcha-footer__text {
  font-size: 14px;
  max-width: 240px;
  line-height: 1.4;
  color: #202124;
}

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.32);
}

/* macOS Terminal-style финальный экран */
.mockcaptcha-final--mac {
  width: 480px;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: #f6f6f6;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.25),
    0 30px 60px -15px rgba(0, 0, 0, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Helvetica Neue', sans-serif;
  overflow: hidden;
  user-select: none;
}

.mockcaptcha-mac-titlebar {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: linear-gradient(#dcdcdc, #c2c2c2);
  border-bottom: 1px solid #b6b6b6;
}

.mockcaptcha-mac-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.mockcaptcha-mac-light {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
  cursor: default;
  pointer-events: none;
}

.mockcaptcha-mac-light--red {
  background: #ff5f57;
}
.mockcaptcha-mac-light--yellow {
  background: #febc2e;
}
.mockcaptcha-mac-light--green {
  background: #28c840;
}

.mockcaptcha-mac-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #3a3a3a;
  pointer-events: none;
  line-height: 28px;
}

.mockcaptcha-final--mac .mockcaptcha-body {
  margin: 0;
  padding: 18px 22px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: #1d1d1f;
}

.mockcaptcha-final--mac .mockcaptcha-body__title {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

.mockcaptcha-final--mac .mockcaptcha-body ol {
  padding: 0 0 0 22px;
  gap: 6px;
}

.mockcaptcha-final--mac .mockcaptcha-body ol li::marker {
  color: #0a84ff;
}

.mockcaptcha-final--mac .mockcaptcha-footer {
  height: auto;
  padding: 12px 22px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mockcaptcha-final--mac .mockcaptcha-footer__text {
  font-size: 13px;
  color: #6e6e73;
  max-width: 260px;
}

.mockcaptcha-final--mac .mockcaptcha-verify {
  height: 36px;
  min-width: 96px;
  padding: 0 18px;
  border-radius: 8px;
  background: #0a84ff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.mockcaptcha-final--mac .mockcaptcha-verify:active {
  background: #0066d6;
}

@media (prefers-color-scheme: dark) {
  .mockcaptcha-final--mac {
    background: #2c2c2e;
    box-shadow:
      0 0 0 0.5px rgba(255, 255, 255, 0.12),
      0 30px 60px -15px rgba(0, 0, 0, 0.7);
  }
  .mockcaptcha-final--mac .mockcaptcha-mac-titlebar {
    background: linear-gradient(#3c3c3e, #2a2a2c);
    border-bottom-color: #1c1c1e;
  }
  .mockcaptcha-final--mac .mockcaptcha-mac-title {
    color: #d1d1d6;
  }
  .mockcaptcha-final--mac .mockcaptcha-body {
    color: #f5f5f7;
  }
  .mockcaptcha-final--mac .mockcaptcha-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
  .mockcaptcha-final--mac .mockcaptcha-footer__text {
    color: #98989d;
  }
}
