/*
  SEO-Assist visual system.
  Loaded after page-local styles so legacy tools keep their behaviour while
  sharing one visual language.
*/

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --text: #182033;
  --text-muted: #5e687c;
  --border: #dfe3ea;
  --primary: #4f5af7;
  --primary-600: #3f49d8;
  --primary-soft: #eef0ff;
  --accent-teal: #0f7d75;
  --accent-amber: #a96000;
  --success: #238a5a;
  --success-soft: #edf8f2;
  --warning: #a96000;
  --warning-soft: #fff7e8;
  --danger: #c53b4a;
  --danger-soft: #fff1f3;
  --radius: 8px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(24, 32, 51, .06);
  --shadow-sm: 0 4px 14px rgba(24, 32, 51, .04);
  --tool-radius-lg: 10px;
  --tool-radius-md: 8px;
  --tool-radius-sm: 6px;
  --tool-border: 1px solid rgba(24, 32, 51, .10);
  --tool-border-strong: 1px solid rgba(79, 90, 247, .22);
  --tool-panel-bg: #fff;
  --tool-soft-bg: #f7f8fb;
  --tool-field-bg: #fff;
  --tool-field-border: rgba(24, 32, 51, .16);
  --tool-focus-ring: 0 0 0 3px rgba(79, 90, 247, .15);
  --tool-shadow: 0 6px 18px rgba(24, 32, 51, .045);
  --tool-shadow-soft: none;
}

html {
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4, h5, h6, .page-title, .tool-title, .card-title, .tool-panel-title) {
  letter-spacing: 0;
}

.content {
  padding: 28px 24px;
}

.page,
.page-wide {
  margin-inline: auto;
}

.topbar {
  min-height: 58px;
  padding: 14px 24px;
  background: rgba(250, 251, 253, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.breadcrumbs {
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.breadcrumbs [aria-current="page"] {
  min-width: 0;
  color: #39445a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar {
  background: #f8f9fb;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #39445a;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-close svg {
  width: 20px;
  height: 20px;
}

.sidebar-close:hover,
.sidebar-close:focus-visible {
  border-color: rgba(79, 90, 247, .34);
  background: var(--primary-soft);
  color: var(--primary-600);
  outline: 2px solid rgba(79, 90, 247, .22);
  outline-offset: 2px;
}

.nav-link {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-link:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(24, 32, 51, .08);
}

.nav-link.active {
  background: #eef0ff;
  color: var(--primary-600);
  box-shadow: inset 0 0 0 1px rgba(79, 90, 247, .18);
}

.icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--primary-600);
}

.card,
.tool-tile,
.home-start-card,
.home-category-block,
.table-card {
  border-color: rgba(24, 32, 51, .10);
  border-radius: 8px;
  box-shadow: none;
}

.btn,
.btn-secondary,
.btn-ghost {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
}

.btn {
  box-shadow: 0 6px 16px rgba(79, 90, 247, .18);
}

.btn:hover {
  box-shadow: 0 8px 18px rgba(63, 73, 216, .22);
}

.btn-secondary,
.btn-ghost {
  box-shadow: none;
}

.input,
.textarea,
select {
  border-radius: 8px;
}

.badge,
.status-pill,
.metric-chip,
.home-tool-filter__chip,
.tool-chip,
.tool-metric {
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
}

.page-title {
  font-size: clamp(32px, 3.5vw, 40px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

/* Home */
.home-hero {
  border-radius: 10px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.home-hero .page-title {
  max-width: 15ch;
  font-size: clamp(38px, 4vw, 46px);
  line-height: 1.04;
}

.hero-kicker {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.home-start-grid {
  gap: 10px;
}

.home-start-card {
  padding: 15px 16px;
  background: #fafbfc;
}

.home-start-card:hover,
.home-start-card:focus-visible {
  border-color: rgba(79, 90, 247, .24);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.home-tool-filter {
  padding: 16px;
  border: 1px solid rgba(24, 32, 51, .10);
  border-radius: 8px;
  background: #fff;
}

.home-category-block {
  padding: 0;
  border: 0;
  background: transparent;
}

.home-tools-grid {
  gap: 10px;
}

.tool-tile {
  padding: 15px 16px;
  background: #fff;
}

.tool-tile:hover,
.tool-tile:focus-visible {
  border-color: rgba(79, 90, 247, .22);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.tool-tile__title {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.tool-tile__desc {
  line-height: 1.55;
}

.tool-tile__meta {
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.tool-tile__meta--ops {
  display: none;
}

.tool-tile__link {
  margin-top: auto;
  font-weight: 700;
}

/* Shared tool pages */
.tool-shell,
.semantic-shell {
  gap: 16px;
}

.tool-shell .tool-hero,
.tool-shell .tool-panel,
.tool-shell .tool-side-card,
.tool-shell .tool-card,
.tool-shell .tool-input-card,
.tool-shell .tool-status-card,
.tool-shell .tool-info-card,
.tool-shell .workspace-card,
.tool-shell .upload-card,
.tool-shell .decision-card,
.tool-shell .start-card,
.tool-shell .flow-step,
.tool-shell .trust-card,
.tool-shell .preview-card,
.tool-shell .auto-route,
.tool-shell .mistake-card,
.tool-shell .mode-card,
.tool-shell .audience-card,
.tool-shell .recommendation-card,
.tool-shell .cluster-card,
.tool-shell .opportunity-card,
.tool-shell .competitor-card,
.tool-shell .queue-panel,
.tool-shell .queue-side-card,
.tool-shell .queue-result-card,
.semantic-command-center,
.semantic-panel,
.semantic-card {
  border-color: rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--tool-shadow);
}

.tool-shell .tool-title,
.semantic-panel-title,
.gsc-page-title {
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.tool-shell--action-first > .tool-hero .tool-title,
.gsc-page-title--compact {
  font-size: clamp(28px, 2.6vw, 34px);
  line-height: 1.1;
}

.tool-shell .tool-panel-title,
.tool-shell .card-title,
.ywm-step__title {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.tool-shell .tool-card-title,
.tool-shell .decision-card__title,
.tool-shell .auto-route__title {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.tool-shell .tool-kicker,
.semantic-kicker,
.ywm-step__label {
  font-weight: 700;
  letter-spacing: 0;
}

.tool-shell :where(.btn, .btn-secondary, .btn-ghost, button, label, summary, strong),
.semantic-shell :where(button, label, summary, strong) {
  letter-spacing: 0;
}

.tool-shell .btn,
.tool-shell .btn-secondary,
.tool-shell .btn-ghost,
.semantic-shell .btn,
.semantic-file-button {
  border-radius: 8px;
  font-weight: 700;
}

.tool-shell .input,
.tool-shell .textarea,
.tool-shell select,
.semantic-shell .input,
.semantic-shell .textarea,
.semantic-shell select {
  border-radius: 8px;
}

.tool-shell .btn[disabled],
.tool-shell .btn:disabled,
.tool-shell .btn-secondary[disabled],
.tool-shell .btn-secondary:disabled,
.tool-shell .btn-ghost[disabled],
.tool-shell .btn-ghost:disabled,
.semantic-shell button:disabled {
  border-color: #d7dce5;
  background: #edf0f4;
  color: #697386;
}

.tool-shell details.fancy,
.tool-shell .gsc-accordion-card,
.tool-shell .simple-help,
.tool-shell .report-fold,
.tool-shell .detail-accordion details,
.semantic-details,
.ywm-scenarios,
.ywm-tuning,
.ywm-additional {
  border-radius: 8px;
  box-shadow: none;
}

.tool-shell details.fancy > summary,
.tool-shell .gsc-accordion-card__summary,
.tool-shell .simple-help summary,
.tool-shell .report-fold__summary,
.tool-shell .detail-accordion summary,
.semantic-details summary,
.ywm-scenarios > summary,
.ywm-tuning > summary,
.ywm-additional > summary {
  min-height: 52px;
  font-weight: 700;
  letter-spacing: 0;
}

.tool-shell details.fancy > summary::after,
.tool-shell .gsc-accordion-card__summary::after,
.tool-shell .simple-help summary::after,
.tool-shell .report-fold__summary::after,
.tool-shell .detail-accordion summary::after {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

/* Flatten nested surfaces while preserving upload and status affordances. */
.tool-shell :where(.tool-panel, .tool-hero, .tool-input-card) :where(
  .tool-card,
  .tool-side-card,
  .tool-input-card,
  .tool-info-card,
  .tool-status-card,
  .semantic-card,
  .ywm-filter-card,
  .gsc-filter-card
) {
  border-radius: 8px;
  box-shadow: none;
}

/* Semantic sorting */
.semantic-command-center {
  padding: 18px;
}

.semantic-command-head,
.semantic-run-grid {
  gap: 12px;
}

.semantic-quick-summary,
.semantic-upload-card,
.semantic-launchpad,
.semantic-primary-path,
.semantic-details,
.semantic-file-picker {
  border-radius: 8px;
  box-shadow: none;
}

.semantic-secondary-link,
.semantic-safe-chip,
.semantic-risk-chip,
.semantic-chip {
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0;
}

.semantic-help-row {
  gap: 12px;
}

/* Yandex API */
.ywm-hero-compact {
  padding: 18px;
}

.ywm-form {
  gap: 12px;
}

.ywm-step,
.ywm-final {
  padding: 16px;
  border-radius: 10px;
  border-color: rgba(24, 32, 51, .10);
  background: #fff;
  box-shadow: var(--tool-shadow);
}

.ywm-step--soft {
  background: #fff;
}

.ywm-step__label {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
}

.ywm-step__title {
  margin-top: 6px;
}

.ywm-filter-card,
.ywm-choice-card,
.ywm-domain-card,
.ywm-host-panel,
.ywm-host-picker,
.ywm-option-help,
.ywm-additional-group,
.ywm-result-preview,
.ywm-submit-card,
.ywm-scenario-card,
.ywm-scenario-more {
  border-radius: 8px;
  box-shadow: none;
}

.ywm-choice-grid--source {
  gap: 8px;
}

.ywm-choice-card {
  padding: 12px;
}

.ywm-choice-card strong,
.ywm-choice-card span,
.ywm-choice-card em,
.ywm-field > span,
.ywm-field-title,
.ywm-domain-card,
.ywm-host-picker summary,
.ywm-summary-chip,
.ywm-scenarios > summary span,
.ywm-tuning > summary span,
.ywm-additional > summary span {
  letter-spacing: 0;
}

.ywm-summary-chip {
  border-radius: 6px;
  font-weight: 700;
}

.ywm-scenarios,
.ywm-tuning,
.ywm-additional {
  border-color: rgba(24, 32, 51, .10);
}

.ywm-final {
  grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr);
}

/* Job history */
.jobs-summary-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.jobs-summary-card {
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid rgba(24, 32, 51, .09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.jobs-summary-card:last-child {
  border-right: 0;
}

.jobs-summary-card strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.jobs-live-note,
.jobs-action-card,
.jobs-filter-bar,
.jobs-mobile-card,
.jobs-desktop-table.table-card {
  border-color: rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.jobs-action-board {
  gap: 12px;
}

.jobs-action-card {
  gap: 14px;
  padding: 16px;
}

.jobs-action-card__top {
  min-height: 112px;
}

.jobs-action-card__title strong,
.jobs-action-card .btn,
.jobs-filter-bar .label,
.jobs-filter-bar .input,
.jobs-filter-actions .btn,
.jobs-action-card__value,
.jobs-quick-filter,
.jobs-tool-filter-title {
  letter-spacing: 0;
}

.jobs-action-card__title strong {
  font-size: 18px;
}

.jobs-action-card__value {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
}

.jobs-action-card .btn,
.jobs-filter-actions .btn,
.jobs-filter-bar .input {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 700;
}

.jobs-filter-bar {
  padding: 16px;
}

.jobs-quick-filter {
  border-radius: 8px;
  font-weight: 700;
}

.jobs-desktop-table.table-card {
  border-radius: 10px;
}

/* Flat utility control instead of a decorative floating bubble. */
.scroll-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #fff;
  color: var(--primary-600);
  box-shadow: var(--shadow);
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  background: var(--primary-soft);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .sidebar-close {
    display: inline-flex;
  }

  .content {
    padding: 22px 18px;
  }

  .tool-shell .tool-hero,
  .tool-shell .tool-panel,
  .tool-shell .tool-side-card,
  .tool-shell .tool-card,
  .tool-shell .tool-input-card,
  .tool-shell .workspace-card,
  .tool-shell .upload-card,
  .tool-shell .decision-card,
  .tool-shell .start-card,
  .tool-shell .flow-step,
  .tool-shell .trust-card {
    border-radius: 10px;
  }

  .jobs-summary-card:nth-child(2) {
    border-right: 0;
  }

  .jobs-summary-card:nth-child(-n+2) {
    border-bottom: 1px solid rgba(24, 32, 51, .09);
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 58px;
    padding: 8px 12px;
  }

  .topbar-left {
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .breadcrumbs {
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
  }

  .breadcrumbs a,
  .breadcrumbs a + span {
    display: none;
  }

  .breadcrumbs [aria-current="page"] {
    display: block;
    max-width: 100%;
    font-size: 13px;
  }

  .content {
    padding: 18px 14px;
  }

  .page-title {
    font-size: 30px;
  }

  .home-hero {
    padding: 18px;
  }

  .home-hero .page-title {
    font-size: 32px;
    line-height: 1.06;
  }

  .home-start-card,
  .tool-tile {
    padding: 14px;
  }

  .home-tool-filter {
    padding: 14px;
  }

  .tool-shell .tool-title,
  .semantic-panel-title,
  .gsc-page-title,
  .tool-shell--action-first > .tool-hero .tool-title,
  .gsc-page-title--compact {
    font-size: 28px;
    line-height: 1.1;
  }

  .tool-shell .tool-hero,
  .tool-shell .tool-panel,
  .tool-shell .tool-side-card,
  .tool-shell .tool-card,
  .tool-shell .tool-input-card,
  .semantic-command-center,
  .semantic-panel,
  .semantic-card,
  .ywm-step,
  .ywm-final {
    border-radius: 10px;
  }

  .semantic-command-center,
  .ywm-step,
  .ywm-final {
    padding: 14px;
  }

  .ywm-choice-grid--source {
    grid-template-columns: 1fr;
  }

  .ywm-choice-card {
    min-height: 0;
  }

  .ywm-final {
    grid-template-columns: 1fr;
  }

  .jobs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jobs-summary-card {
    border-right: 1px solid rgba(24, 32, 51, .09);
  }

  .jobs-summary-card:nth-child(even) {
    border-right: 0;
  }

  .jobs-summary-card:nth-child(-n+2) {
    border-bottom: 1px solid rgba(24, 32, 51, .09);
  }

  .jobs-summary-card strong {
    font-size: 22px;
  }

  .jobs-summary-card span {
    font-size: 13px;
  }

  .jobs-action-card,
  .jobs-filter-bar,
  .jobs-mobile-card,
  .jobs-live-note {
    border-radius: 8px;
  }

  .scroll-top-btn {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}

/* GSC export: compact, task-first workspace. */
.tool-shell .gsc-connected-hero {
  padding: 18px;
  overflow: visible;
  border: 1px solid rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.tool-shell .gsc-connected-hero:has(.gsc-account-actions[open]) {
  z-index: 30;
}

.tool-shell .gsc-connected-hero__row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.tool-shell .gsc-connected-hero__content,
.tool-shell .gsc-connected-hero__summary {
  min-width: 0;
  gap: 8px;
}

.tool-shell .gsc-connected-hero__note {
  max-width: 72ch;
  color: var(--text-muted);
}

.tool-shell .gsc-connected-hero__quickline {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  max-width: none;
}

.tool-shell .gsc-connected-hero__quickline span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.tool-shell .gsc-connected-hero__quickline span:first-child {
  padding-left: 0;
  border-left: 0;
}

.tool-shell .gsc-connected-hero__quickline strong {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0;
}

.tool-shell .gsc-connected-hero__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tool-shell .gsc-connected-hero__status {
  min-height: 42px;
  width: auto;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.tool-shell .gsc-hero-actions--compact {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  margin: 0;
}

.tool-shell .gsc-hero-actions--compact .btn,
.tool-shell .gsc-hero-actions--compact form,
.tool-shell .gsc-hero-actions--compact form .btn {
  min-height: 42px;
  width: auto;
}

.gsc-account-actions {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.gsc-account-actions > summary {
  box-sizing: border-box;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #465168;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  overflow-wrap: anywhere;
  text-align: center;
}

.gsc-account-actions > summary::-webkit-details-marker {
  display: none;
}

.gsc-account-actions > summary:hover,
.gsc-account-actions > summary:focus-visible {
  border-color: rgba(79, 90, 247, .30);
  background: var(--primary-soft);
  color: var(--primary-600);
  outline: 2px solid rgba(79, 90, 247, .16);
  outline-offset: 2px;
}

.gsc-account-actions[open] > form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 24;
  width: min(220px, calc(100vw - 32px));
  max-width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gsc-account-actions[open] > form,
.gsc-account-actions[open] > form .btn {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.gsc-account-actions[open] > form .btn {
  width: 100%;
  min-height: 42px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tool-shell .gsc-page-workflow {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tool-shell .gsc-page-workflow > .card-body {
  padding: 0;
}

.tool-shell .gsc-workflow-steps {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.tool-shell .gsc-workflow-step {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
}

.tool-shell .gsc-workflow-step span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-weight: 800;
}

.tool-shell .gsc-main-card,
.tool-shell #gsc-report-settings,
.tool-shell .gsc-filter-panel,
.tool-shell .gsc-processing-settings {
  border: 1px solid rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.tool-shell details.fancy.gsc-filter-panel,
.tool-shell details.fancy.gsc-processing-settings,
.tool-shell details.fancy.gsc-accordion-card {
  padding: 0;
  overflow: hidden;
}

.tool-shell details.fancy.gsc-filter-panel::before {
  content: none;
  display: none;
}

.tool-shell details.fancy.gsc-filter-panel > summary,
.tool-shell details.fancy.gsc-processing-settings > summary,
.tool-shell details.fancy.gsc-accordion-card > summary {
  width: 100%;
  border-radius: 0;
  box-sizing: border-box;
}

.tool-shell details.fancy.gsc-filter-panel > summary:hover,
.tool-shell details.fancy.gsc-filter-panel > summary:focus-visible,
.tool-shell details.fancy.gsc-processing-settings > summary:hover,
.tool-shell details.fancy.gsc-processing-settings > summary:focus-visible,
.tool-shell details.fancy.gsc-accordion-card > summary:hover,
.tool-shell details.fancy.gsc-accordion-card > summary:focus-visible {
  outline: 0;
  background: #f5f7ff;
  box-shadow: inset 0 0 0 2px rgba(79, 90, 247, .14);
}

.tool-shell .gsc-main-card,
.tool-shell #gsc-report-settings {
  padding: 18px;
}

.tool-shell .gsc-main-card .tool-input-head,
.tool-shell #gsc-report-settings .tool-input-head {
  align-items: center;
}

.tool-shell .gsc-main-card > .gsc-primary-fields {
  align-items: start;
}

.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field {
  display: grid;
  grid-template-rows: 22px 44px auto;
  align-content: start;
  gap: 8px;
}

.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field > .label {
  min-height: 22px;
  margin: 0;
  line-height: 22px;
}

.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field > .helper,
.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field > .help {
  margin: 0;
}

.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field > .gsc-property-picker,
.tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field > .gsc-select-input {
  min-height: 44px;
  height: 44px;
  margin: 0;
}

.tool-shell .gsc-date-panel {
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
}

.tool-shell .gsc-select-input,
.tool-shell .gsc-date-input,
.tool-shell .gsc-history-filter-form .input,
.tool-shell .gsc-filter-card select {
  min-height: 44px;
  height: 44px;
  padding-block: 8px;
  border-radius: 8px;
  font-size: 15px;
}

.tool-shell .gsc-property-picker__control {
  min-height: 44px;
  height: 44px;
  min-width: 0;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
}

.tool-shell .gsc-site-field,
.tool-shell .gsc-property-picker {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.tool-shell .gsc-site-field {
  z-index: 2;
}

.tool-shell .gsc-property-picker__input {
  min-height: 42px;
  height: 42px;
  padding-block: 9px;
  font-size: 15px;
}

.tool-shell .gsc-site-field .gsc-property-picker__input {
  margin: 0;
}

.tool-shell .gsc-property-picker__toggle {
  right: 5px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.tool-shell .gsc-property-picker__menu {
  top: calc(100% + 6px);
  max-width: 100%;
  padding: 6px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.tool-shell .gsc-property-option {
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
}

.tool-shell .gsc-property-option + .gsc-property-option {
  border-top: 1px solid rgba(24, 32, 51, .07);
}

.tool-shell .gsc-range-chip {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 7px;
}

.tool-shell .gsc-launchpad--early {
  display: block;
  padding: 12px;
  border: 1px solid rgba(24, 32, 51, .10);
  border-radius: 10px;
  background: #fff;
}

.tool-shell .gsc-launchpad--early .gsc-start-readiness,
.tool-shell .gsc-launchpad--early .gsc-start-readiness.is-ready,
.tool-shell .gsc-launchpad--early .gsc-start-readiness.is-full-export,
.tool-shell .gsc-launchpad--early .gsc-start-readiness.is-warning {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tool-shell .gsc-start-readiness__top {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.tool-shell .gsc-start-readiness__checks {
  margin-top: 8px;
  gap: 6px;
}

.tool-shell .gsc-start-readiness__checks span {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
}

.tool-shell .gsc-auto-preflight,
.tool-shell .gsc-full-export-warning {
  margin-top: 10px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.tool-shell .gsc-filter-panel__summary {
  min-height: 68px;
  padding: 12px 14px;
}

.tool-shell .gsc-filter-panel__body {
  padding: 0 14px 14px;
}

.tool-shell .gsc-filter-panel__body > .grid-2 {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tool-shell .gsc-filter-card {
  min-height: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.tool-shell .gsc-filter-card + .gsc-filter-card {
  border-left: 1px solid var(--border);
}

.tool-shell .gsc-filter-card textarea {
  min-height: 104px;
  border-radius: 8px;
  background: #fff;
}

.tool-shell .gsc-filter-selection-note {
  min-height: 0;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
}

.tool-shell .gsc-preset-grid {
  gap: 8px;
}

.tool-shell .gsc-preset-card,
.tool-shell .gsc-dimension-card {
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
}

.tool-shell .gsc-custom-preset-box {
  margin-top: 0;
}

.gsc-output-format {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.gsc-output-format strong {
  flex: 0 0 auto;
  color: var(--text);
}

.tool-shell .gsc-processing-settings > summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}

.gsc-processing-settings__summary > span:first-child {
  display: grid;
  gap: 3px;
}

.gsc-processing-settings__summary strong {
  color: var(--text);
  font-size: 16px;
}

.gsc-processing-settings__summary small,
.gsc-mode-card__copy small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.gsc-processing-settings__action {
  flex: 0 0 auto;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 700;
}

.gsc-processing-settings__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.tool-shell .gsc-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.tool-shell .gsc-mode-card {
  grid-template-columns: 1fr;
  gap: 0;
}

.tool-shell .gsc-mode-card__label {
  min-height: 66px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 8px;
}

.gsc-mode-card__copy {
  display: grid;
  gap: 2px;
}

.tool-shell .gsc-launchpad--final {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(79, 90, 247, .24);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 32, 51, .07);
}

.tool-shell .gsc-launchpad--final .gsc-launchpad__intro {
  gap: 8px;
}

.tool-shell .gsc-run-summary-panel {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tool-shell .gsc-run-summary-panel__item,
.tool-shell .gsc-run-summary-panel__item:first-child {
  grid-column: auto;
  padding: 8px 9px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
}

.tool-shell .gsc-run-summary-panel__item:first-child {
  border-left: 0;
}

.tool-shell .gsc-run-summary-panel__item--advice {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  border-left: 0;
  background: var(--surface-2);
}

.tool-shell .gsc-form-submit-row--final,
.tool-shell .gsc-form-submit-row--final .btn {
  width: 100%;
  min-height: 48px;
}

.tool-shell .gsc-history-toolbar {
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.tool-shell .gsc-history-summary {
  display: flex;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tool-shell .gsc-history-summary__item {
  flex: 1 1 0;
  padding: 9px 11px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
}

.tool-shell .gsc-history-summary__item:first-child {
  border-left: 0;
}

.tool-shell .gsc-history-summary__item strong {
  font-size: 19px;
}

.tool-shell .gsc-history-filter-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
}

.tool-shell .gsc-history-filter-actions,
.tool-shell .gsc-history-filter-actions .btn {
  min-height: 44px;
}

.tool-shell .gsc-history-filter-actions .btn {
  min-width: 150px;
  border-radius: 8px;
}

.tool-shell .gsc-run-card {
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
}

.tool-shell .gsc-run-card__meta {
  gap: 8px;
}

.tool-shell .gsc-run-card__meta-group {
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-2);
}

.tool-shell .gsc-run-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tool-shell .gsc-run-card__actions > *,
.tool-shell .gsc-run-card__actions .gsc-history-action,
.tool-shell .gsc-run-card__actions form,
.tool-shell .gsc-run-card__actions form .btn {
  min-height: 42px;
  height: 42px;
  width: auto;
}

.tool-shell .gsc-run-card__actions .gsc-history-action {
  padding: 0 16px;
  border-radius: 8px;
}

.tool-shell .gsc-run-progress {
  padding: 9px 10px;
  border-radius: 8px;
}

@media (max-width: 1200px) {
  .tool-shell .gsc-connected-hero__row {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-connected-hero__rail {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .tool-shell .gsc-launchpad--final {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-form-submit-row--final {
    max-width: none;
  }

  .tool-shell .gsc-run-summary-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-shell .gsc-run-summary-panel__item,
  .tool-shell .gsc-run-summary-panel__item:first-child {
    border-top: 1px solid var(--border);
  }

  .tool-shell .gsc-run-summary-panel__item:nth-child(-n+2) {
    border-top: 0;
  }

  .tool-shell .gsc-run-summary-panel__item:nth-child(odd) {
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .tool-shell .gsc-connected-hero {
    padding: 14px;
  }

  .tool-shell .gsc-connected-hero,
  .tool-shell .gsc-connected-hero__row,
  .tool-shell .gsc-connected-hero__content,
  .tool-shell .gsc-connected-hero__rail,
  .tool-shell .gsc-connected-hero__rail > *,
  .gsc-account-actions,
  .gsc-account-actions > summary,
  .gsc-account-actions[open] > form,
  .gsc-account-actions[open] > form .btn {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tool-shell .gsc-connected-hero__quickline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tool-shell .gsc-connected-hero__quickline span,
  .tool-shell .gsc-connected-hero__quickline span:first-child {
    display: grid;
    gap: 1px;
    padding: 0;
    border: 0;
  }

  .tool-shell .gsc-connected-hero__rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tool-shell .gsc-connected-hero__status,
  .tool-shell .gsc-hero-actions--compact,
  .tool-shell .gsc-hero-actions--compact .btn,
  .gsc-account-actions,
  .gsc-account-actions > summary {
    width: 100%;
  }

  .gsc-account-actions {
    grid-column: 1 / -1;
  }

  .gsc-account-actions[open] > form {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }

  .tool-shell .gsc-workflow-steps {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tool-shell .gsc-workflow-step {
    flex: 0 0 auto;
  }

  .tool-shell .gsc-main-card,
  .tool-shell #gsc-report-settings {
    padding: 14px;
  }

  .tool-shell .gsc-main-card .tool-input-head > .tool-chip,
  .tool-shell #gsc-report-settings .tool-input-head > .tool-chip {
    display: none;
  }

  .tool-shell .gsc-date-panel {
    padding: 12px;
  }

  .tool-shell .gsc-main-card > .gsc-primary-fields > .gsc-form-field {
    grid-template-rows: auto 44px auto;
  }

  .tool-shell .gsc-filter-panel__summary {
    min-height: 62px;
    align-items: center;
  }

  .tool-shell .gsc-filter-panel__summary-note {
    display: none;
  }

  .tool-shell .gsc-filter-panel__body > .grid-2 {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-filter-card + .gsc-filter-card {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .gsc-output-format,
  .tool-shell .gsc-processing-settings > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-shell .gsc-accordion-card__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 2px 8px;
  }

  .tool-shell .gsc-accordion-card__summary > span,
  .tool-shell .gsc-accordion-card__summary > small {
    grid-column: 1;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tool-shell .gsc-accordion-card__summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .gsc-processing-settings__action {
    display: none;
  }

  .tool-shell .gsc-mode-grid {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-launchpad--final {
    padding: 14px;
  }

  .tool-shell .gsc-run-summary-panel {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-run-summary-panel__item,
  .tool-shell .gsc-run-summary-panel__item:first-child {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .tool-shell .gsc-run-summary-panel__item:first-child {
    border-top: 0;
  }

  .tool-shell .gsc-history-header {
    align-items: flex-start;
  }

  .tool-shell .gsc-history-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-shell .gsc-history-summary__item,
  .tool-shell .gsc-history-summary__item:first-child {
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  .tool-shell .gsc-history-summary__item:nth-child(-n+2) {
    border-top: 0;
  }

  .tool-shell .gsc-history-summary__item:nth-child(odd) {
    border-left: 0;
  }

  .tool-shell .gsc-history-filter-form {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-history-filter-actions,
  .tool-shell .gsc-history-filter-actions .btn {
    width: 100%;
  }

  .tool-shell .gsc-run-card__meta {
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-run-card__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tool-shell .gsc-run-card__actions > *,
  .tool-shell .gsc-run-card__actions .gsc-history-action,
  .tool-shell .gsc-run-card__actions form,
  .tool-shell .gsc-run-card__actions form .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .tool-shell .gsc-connected-hero__rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .gsc-account-actions {
    grid-column: auto;
  }
}
