:root {
  color-scheme: light;
  --bg: #eef2f8;
  --ink: #111827;
  --ink-soft: #536071;
  --ink-muted: #7a8493;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-muted: #f3f6fb;
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(17, 24, 39, 0.16);
  --accent: #2454f4;
  --accent-strong: #1638a8;
  --accent-soft: rgba(36, 84, 244, 0.12);
  --accent-teal: #0f9f8f;
  --danger: #a61e44;
  --danger-soft: rgba(166, 30, 68, 0.1);
  --success: #087c68;
  --shadow-lg: 0 28px 80px rgba(21, 32, 56, 0.14);
  --shadow-md: 0 14px 34px rgba(21, 32, 56, 0.1);
  --shadow-sm: 0 8px 18px rgba(21, 32, 56, 0.08);
  --radius-2xl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(36, 84, 244, 0.22), transparent 26rem),
    radial-gradient(circle at 90% 18%, rgba(13, 139, 111, 0.16), transparent 24rem),
    linear-gradient(135deg, #f8fafc 0%, var(--bg) 46%, #e8edf7 100%);
}

button,
textarea,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.page-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 36px) 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, auto) 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  margin-bottom: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.82)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(21, 32, 56, 0.12);
  backdrop-filter: blur(24px);
}

.brand,
.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 32%),
    linear-gradient(135deg, #111827, #1f4fff 58%, #11a893);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(36, 84, 244, 0.22);
}

.brand strong,
.auth-user strong {
  display: block;
  line-height: 1.1;
}

.brand small,
.auth-user small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  justify-content: center;
  width: fit-content;
  justify-self: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
}

.site-nav a:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.auth-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-status {
  max-width: 230px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(8, 124, 104, 0.08);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-status.is-ok {
  color: var(--success);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: stretch;
  padding: clamp(28px, 5vw, 64px) 0 34px;
}

.hero-copy,
.hero-panel,
.product-card,
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}

.hero-copy {
  min-height: 460px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.card-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-intro h2,
.assistant-heading h2 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.section-intro h2,
.assistant-heading h2 {
  font-size: clamp(30px, 4vw, 52px);
}

.hero-text,
.section-intro p,
.chat-subtitle,
.empty-text,
.auth-copy {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-link,
.secondary-link,
.ghost-button,
.primary-button,
.google-button,
.link-button,
.tab-button {
  border: 0;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  font-weight: 800;
}

.primary-link,
.primary-button {
  background: linear-gradient(135deg, var(--accent), #5e82ff);
  color: #fff;
  box-shadow: 0 16px 30px rgba(36, 84, 244, 0.26);
}

.secondary-link,
.ghost-button {
  background: rgba(17, 24, 39, 0.06);
  color: var(--ink);
}

.primary-link:hover,
.secondary-link:hover,
.ghost-button:hover,
.primary-button:hover,
.google-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at top right, rgba(15, 159, 143, 0.16), transparent 18rem),
    rgba(255, 255, 255, 0.76);
}

.hero-panel > div {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.66)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

.hero-panel > div::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(36, 84, 244, 0.08);
}

.metric {
  display: block;
  margin-bottom: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(26px, 4vw, 42px);
  color: var(--accent-strong);
  letter-spacing: -0.06em;
}

.hero-panel p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.dev-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin: 6px 0 34px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(15, 159, 143, 0.2);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at top left, rgba(15, 159, 143, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.76));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

.dev-notice-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.dev-notice-copy p:last-child {
  margin: 12px 0 0;
  max-width: 780px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #19a8e8, #2474ff);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(36, 116, 255, 0.22);
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.telegram-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(36, 116, 255, 0.28);
}

.product-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
  padding: 28px 0 46px;
}

.section-intro {
  padding: clamp(10px, 2vw, 24px) 0;
}

.product-card {
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--radius-2xl);
}

.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.tab-button {
  padding: 12px 16px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-weight: 800;
}

.tab-button.is-active {
  background: var(--ink);
  color: #fff;
}

.tab-panel {
  display: none;
  min-height: 200px;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(36, 84, 244, 0.1), transparent),
    var(--surface-solid);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

.tab-panel.is-active {
  display: block;
}

.tab-panel h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.tab-panel p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 22px;
}

.assistant-heading {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.card {
  border-radius: var(--radius-2xl);
}

.section-screen,
.chat-screen {
  min-height: 72vh;
  padding: clamp(18px, 2.4vw, 26px);
}

.card-head,
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.card h2,
.chat-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-grid {
  display: grid;
  gap: 14px;
}

.section-card {
  position: relative;
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: var(--surface-solid);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
  cursor: pointer;
}

.section-card:hover {
  border-color: rgba(36, 84, 244, 0.22);
  box-shadow: 0 16px 30px rgba(36, 84, 244, 0.12);
}

.section-card.is-active {
  border-color: rgba(36, 84, 244, 0.36);
  background: linear-gradient(180deg, rgba(36, 84, 244, 0.08), rgba(255, 255, 255, 0.96));
}

.section-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.section-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.section-card footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-count {
  color: var(--ink-muted);
  font-size: 13px;
}

.section-card-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.section-card-link {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 159, 143, 0.1);
  color: #087c68;
  font-size: 13px;
  font-weight: 900;
}

.section-card-link:hover {
  background: rgba(15, 159, 143, 0.16);
}

.section-card-badge {
  flex: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.ghost-button,
.primary-button,
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
}

.compact {
  min-height: 40px;
  padding: 0 13px;
  font-size: 14px;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.chat-screen {
  display: flex;
  flex-direction: column;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 240px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread {
  flex: 1;
  min-height: 420px;
  max-height: calc(72vh - 190px);
  overflow-y: auto;
  padding: 6px 4px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
}

.empty-state {
  margin: auto;
  max-width: 470px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(36, 84, 244, 0.06);
  border: 1px dashed rgba(36, 84, 244, 0.24);
  text-align: center;
}

.empty-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}

.message {
  max-width: min(78%, 820px);
  display: grid;
  gap: 6px;
}

.message.is-user {
  align-self: flex-end;
}

.message.is-assistant {
  align-self: flex-start;
}

.message-meta {
  padding: 0 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-body {
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--surface-solid);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow-md);
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-body strong {
  padding: 0 0.18em;
  border-radius: 0.45em;
  background: rgba(36, 84, 244, 0.1);
  color: var(--accent-strong);
  font-weight: 900;
}

.source-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0.12em;
  padding: 0.14em 0.58em;
  border: 1px solid rgba(36, 84, 244, 0.18);
  border-radius: 999px;
  background: rgba(36, 84, 244, 0.09);
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
  vertical-align: baseline;
  white-space: normal;
}

.source-link::after {
  content: "↗";
  margin-left: 0.35em;
  font-size: 0.85em;
}

.source-link:hover {
  border-color: rgba(36, 84, 244, 0.34);
  background: rgba(36, 84, 244, 0.14);
}

.message.is-user .message-body {
  background: linear-gradient(135deg, var(--accent), #5d7eff);
  color: #fff;
  border: none;
}

.message.is-initial .message-body {
  background: rgba(17, 24, 39, 0.05);
}

.message.is-error .message-body {
  background: var(--danger-soft);
  color: var(--danger);
}

.message.is-loading .message-body {
  min-width: min(360px, 100%);
}

.typing-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  animation: bounce 0.9s infinite ease-in-out;
  will-change: transform, opacity;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.24s;
}

.typing-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.job-note {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.job-progress {
  position: relative;
  display: block;
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 84, 244, 0.12);
}

.job-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: progress-slide 1.2s infinite ease-in-out;
}

.chat-form {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.chat-input-wrap {
  flex: 1;
  display: flex;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 24px;
  background: var(--surface-solid);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: var(--shadow-md);
}

#chat-input {
  width: 100%;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  line-height: 1.6;
}

#chat-input::placeholder,
input::placeholder {
  color: #8d95a8;
}

.auth-dialog,
.sources-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: transparent;
}

.sources-dialog {
  width: min(760px, calc(100% - 28px));
}

.auth-dialog::backdrop,
.sources-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.auth-card,
.sources-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.auth-card h2,
.sources-card h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.sources-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.sources-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
}

.source-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(36, 84, 244, 0.05), rgba(15, 159, 143, 0.05));
}

.source-item:hover {
  border-color: rgba(36, 84, 244, 0.24);
  box-shadow: var(--shadow-sm);
}

.source-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.source-title {
  min-width: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
}

.source-domain {
  justify-self: end;
  max-width: 190px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(36, 84, 244, 0.1);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}

.field input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  outline: none;
}

.field input:focus {
  border-color: rgba(36, 84, 244, 0.55);
  box-shadow: 0 0 0 4px rgba(36, 84, 244, 0.12);
}

.full,
.google-button {
  width: 100%;
}

.google-button {
  background: #111827;
  color: #fff;
}

.link-button {
  justify-self: center;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 800;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.84);
    opacity: 0.55;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes progress-slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(240%);
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .section-screen,
  .chat-screen {
    min-height: auto;
  }

  .chat-thread {
    min-height: 380px;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 12px 12px 34px;
  }

  .site-header {
    position: static;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border-radius: 26px;
  }

  .header-actions,
  .hero-cta,
  .card-head,
  .chat-head,
  .chat-actions,
  .chat-form {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    display: grid;
    gap: 10px;
  }

  .auth-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-status {
    max-width: none;
    min-height: 40px;
    padding: 9px 12px;
    text-align: center;
  }

  .hero {
    padding-top: 16px;
  }

  .hero-copy,
  .product-card,
  .section-screen,
  .chat-screen {
    border-radius: 24px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .dev-notice {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .telegram-link {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 54px);
  }

  .primary-link,
  .secondary-link,
  .primary-button,
  .ghost-button,
  .google-button {
    width: 100%;
  }

  .site-header .primary-button,
  .site-header .ghost-button {
    width: 100%;
    min-height: 42px;
  }

  .section-card footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-card-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .section-card-link,
  .section-card-badge {
    justify-content: center;
    text-align: center;
  }

  .section-chip {
    max-width: none;
    justify-content: center;
  }

  .message {
    max-width: 100%;
  }

  .chat-form {
    position: sticky;
    bottom: 10px;
    padding: 10px;
    margin: 18px -10px -10px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
  }

  .auth-card {
    padding: 24px 18px;
  }

  .sources-card {
    padding: 24px 18px;
  }

  .source-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .source-domain {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero-copy {
    padding: 24px 18px;
  }

  .product-tabs {
    display: grid;
  }

  .tab-button {
    width: 100%;
  }
}
