/* /google-seo-ai premium V2 — page-only styles (loaded after service-page.css) */
.ys-sa {
  --sa-orange: var(--ys-sd-orange, #e67a2e);
  --sa-orange-d: #b9581b;
  --sa-navy: #071426;
  --sa-ink: #15243a;
  --sa-muted: #5b6b82;
  --sa-line: rgba(16, 33, 58, 0.1);
  --sa-soft: #f6f8fb;
  --sa-ok: #1e9468;
  --sa-warn: #c9821a;
  --sa-watch: #56739f;
  --sa-link: #1b3a66;
  --sa-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Hero layout ---------- */
.ys-sa .ys-sd-hero {
  padding-block: 3.25rem 3.5rem;
}

.ys-sa .ys-sd-hero__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(1.5rem, 3.2vw, 3.25rem);
}

.ys-sa .ys-sd-hero h1 {
  max-width: 9.8em;
}

/* ---------- Hero: Dijital Görünürlük Merkezi ---------- */
.ys-sa-hub {
  container: sahub / inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: clamp(28.5rem, 26.5rem + 6.04vw, 34rem);
  color: var(--sa-ink);
}

.ys-sa-win {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38), 0 0 0 6px rgba(255, 255, 255, 0.03);
}

.ys-sa-win__bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-block-end: 1px solid var(--sa-line);
  background: #eef2f7;
}

.ys-sa-win__dots {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  margin-inline-end: 1.2rem;
  border-radius: 50%;
  background: #cfd7e3;
  box-shadow: 0.8rem 0 0 #cfd7e3, 1.6rem 0 0 #cfd7e3;
}

.ys-sa-win__url {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(16, 33, 58, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--sa-muted);
  font-size: 0.66rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ys-sa-win__url i {
  font-size: 0.6rem;
}

.ys-sa-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: rgba(230, 122, 46, 0.14);
  color: var(--sa-orange-d);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ys-sa-badge--soft {
  border: 1px solid rgba(16, 33, 58, 0.1);
  background: var(--sa-soft);
  color: var(--sa-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.ys-sa-win__query {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem 0.6rem;
  padding: 0.75rem 0.9rem 0;
}

.ys-sa-win__query > .bi-search {
  display: grid;
  width: 2.05rem;
  height: 2.05rem;
  place-items: center;
  border-radius: 50%;
  background: var(--sa-navy);
  color: #fff;
  font-size: 0.78rem;
}

.ys-sa-q {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 2.05rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(16, 33, 58, 0.14);
  border-radius: 999px;
  color: var(--sa-ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.ys-sa-q__text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
}

.ys-sa-q::after {
  content: "";
  width: 1.5px;
  height: 1rem;
  margin-inline-start: 2px;
  background: var(--sa-orange);
  opacity: 0;
}

.ys-sa-win__tabs {
  display: flex;
  grid-column: 1 / -1;
  gap: 1.1rem;
  border-block-end: 1px solid var(--sa-line);
}

.ys-sa-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0 0.5rem;
  color: var(--sa-muted);
  font-size: 0.68rem;
  font-weight: 700;
  transition: color 0.35s ease;
}

.ys-sa-tab::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--sa-orange);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.ys-sa-tab i {
  color: var(--sa-orange);
  font-size: 0.66rem;
}

.ys-sa-win__stage {
  position: relative;
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 0;
  padding: 0.75rem 0.9rem 0.9rem;
}

.ys-sa-feed {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.ys-sa-results {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: opacity 0.4s ease;
}

.ys-sa-results li {
  display: grid;
  gap: 0.18rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  opacity: 0;
  transform: translateY(0.45rem);
  transition: opacity 0.45s ease, transform 0.45s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}

.ys-sa-results li:nth-child(2) { transition-delay: 0.12s; }
.ys-sa-results li:nth-child(3) { transition-delay: 0.24s; }

.ys-sa-res__site {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  color: var(--sa-ink);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.ys-sa-res__site small {
  overflow: hidden;
  color: var(--sa-muted);
  font-size: 0.6rem;
  font-weight: 500;
  text-overflow: ellipsis;
}

.ys-sa-res__site > i,
.ys-sa-snip__url > i {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e7edf5;
  color: var(--sa-link);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 800;
}

.ys-sa-res__title {
  color: var(--sa-link);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.ys-sa-res__desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sa-muted);
  font-size: 0.68rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ys-sa-pin {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.05rem 0.32rem;
  border-radius: 0.25rem;
  background: var(--sa-orange);
  color: #fff;
  font-family: var(--sa-mono);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 0.1em;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ys-sa-answer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.ys-sa-answer p {
  margin: 0;
}

.ys-sa-answer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.4rem;
  color: var(--sa-ink) !important;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3 !important;
}

.ys-sa-answer__head i {
  color: var(--sa-orange);
}

.ys-sa-answer__head span {
  color: var(--sa-muted);
  font-size: 0.6rem;
  font-weight: 600;
}

.ys-sa-answer__text {
  color: #24364f !important;
  font-size: 0.78rem;
  line-height: 1.6 !important;
}

.ys-sa-answer mark {
  padding: 0 0.1rem;
  border-block-end: 1.5px dotted rgba(230, 122, 46, 0.45);
  background: transparent;
  color: inherit;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.ys-sa-answer__more {
  color: var(--sa-muted) !important;
  font-size: 0.7rem;
  line-height: 1.55 !important;
}

.ys-sa-answer__label {
  margin-block-start: auto !important;
  padding-block-start: 0.55rem;
  border-block-start: 1px solid var(--sa-line);
  color: var(--sa-muted) !important;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2 !important;
  text-transform: uppercase;
}

.ys-sa-answer__src {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sasrc;
}

.ys-sa-answer__src li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
  color: var(--sa-muted);
  font-size: 0.62rem;
  white-space: nowrap;
  counter-increment: sasrc;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.ys-sa-answer__src li::before {
  content: counter(sasrc);
  display: grid;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.25rem;
  background: #e7edf5;
  color: var(--sa-link);
  font-size: 0.52rem;
  font-weight: 800;
}

.ys-sa-insp {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.7rem;
  background: var(--sa-soft);
}

.ys-sa-insp p {
  margin: 0;
}

.ys-sa-insp__head {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--sa-ink) !important;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3 !important;
  text-transform: uppercase;
}

.ys-sa-insp__blk {
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0.22;
  filter: grayscale(1);
  transform: translateY(0.25rem);
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}

.ys-sa-insp__meta {
  display: grid;
  gap: 0.3rem;
}

.ys-sa-insp__meta p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.4rem;
  background: #fff;
}

.ys-sa-insp__meta b,
.ys-sa-insp__tree li::before,
.ys-sa-outline li::before {
  font-family: var(--sa-mono);
  font-size: 0.54rem;
  font-weight: 700;
}

.ys-sa-insp__meta b {
  color: var(--sa-orange-d);
}

.ys-sa-insp__meta span {
  overflow: hidden;
  color: var(--sa-ink);
  font-size: 0.62rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ys-sa-ok {
  position: relative;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: rgba(30, 148, 104, 0.14);
}

.ys-sa-ok::after,
.ys-sa-insp__tech li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.2rem;
  height: 0.36rem;
  border: solid var(--sa-ok);
  border-width: 0 1.5px 1.5px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.ys-sa-insp__tree {
  display: grid;
  gap: 0.18rem;
}

.ys-sa-insp__tree li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--sa-ink);
  font-size: 0.62rem;
  white-space: nowrap;
}

.ys-sa-insp__tree li::before,
.ys-sa-outline li::before {
  content: attr(data-h);
  min-width: 1.35rem;
  padding: 0.04rem 0.2rem;
  border-radius: 0.2rem;
  background: var(--sa-navy);
  color: #fff;
  text-align: center;
}

.ys-sa-insp__tree li[data-h="H2"] { padding-inline-start: 0.7rem; }
.ys-sa-insp__tree li[data-h="H3"] { padding-inline-start: 1.4rem; }
.ys-sa-insp__tree li[data-h="H2"]::before { background: #37506f; }
.ys-sa-insp__tree li[data-h="H3"]::before { background: #7a8aa0; }

.ys-sa-insp__tech {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem 0.5rem;
}

.ys-sa-insp__tech li {
  position: relative;
  padding-inline-start: 1.15rem;
  color: var(--sa-ink);
  font-size: 0.62rem;
  line-height: 1.5;
  white-space: nowrap;
}

.ys-sa-insp__tech li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: rgba(30, 148, 104, 0.14);
  transform: translateY(-50%) scale(0.4);
  transition: transform 0.35s ease;
}

.ys-sa-insp__tech li::before {
  z-index: 1;
  left: 0.425rem;
  top: 46%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ys-sa-insp__tech li:nth-child(2)::after, .ys-sa-insp__tech li:nth-child(2)::before { transition-delay: 0.15s; }
.ys-sa-insp__tech li:nth-child(3)::after, .ys-sa-insp__tech li:nth-child(3)::before { transition-delay: 0.3s; }
.ys-sa-insp__tech li:nth-child(4)::after, .ys-sa-insp__tech li:nth-child(4)::before { transition-delay: 0.45s; }
.ys-sa-insp__tech li:nth-child(5)::after, .ys-sa-insp__tech li:nth-child(5)::before { transition-delay: 0.6s; }
.ys-sa-insp__tech li:nth-child(6)::after, .ys-sa-insp__tech li:nth-child(6)::before { transition-delay: 0.75s; }

.ys-sa-insp__ctx {
  position: absolute;
  inset: 2.3rem 0.75rem 0.75rem;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  opacity: 0;
  filter: none;
  pointer-events: none;
}

.ys-sa-insp__label {
  color: var(--sa-muted) !important;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.3 !important;
}

.ys-sa-insp__ctx p:not(.ys-sa-insp__label) {
  display: grid;
  gap: 0.05rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--sa-line);
  border-inline-start: 2px solid #c9d3e0;
  border-radius: 0.4rem;
  background: #fff;
  line-height: 1.3;
  transition: border-color 0.35s ease, background-color 0.35s ease;
}

.ys-sa-insp__ctx b {
  color: var(--sa-ink);
  font-size: 0.64rem;
}

.ys-sa-insp__ctx span {
  color: var(--sa-muted);
  font-size: 0.58rem;
}

.ys-sa-hub__foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.ys-sa-steps {
  display: flex;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ys-sa-steps button {
  position: relative;
  padding: 0.3rem 0.45rem 0.45rem;
  border: 0;
  background: none;
  color: rgba(244, 247, 251, 0.5);
  cursor: pointer;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
}

.ys-sa-steps button::after {
  content: "";
  position: absolute;
  inset: auto 0.45rem 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.3s ease;
}

.ys-sa-steps button:hover {
  color: #fff;
}

.ys-sa-hub__note {
  margin: 0;
  overflow: hidden;
  color: rgba(244, 247, 251, 0.46) !important;
  font-size: 0.62rem;
  line-height: 1.3 !important;
  text-align: end;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Step states (no-JS default: data-step="tech") */
.ys-sa-hub:is([data-step="results"], [data-step="page"], [data-step="tech"]) .ys-sa-results li {
  opacity: 1;
  transform: none;
}

.ys-sa-hub:is([data-step="page"], [data-step="tech"]) .ys-sa-results li:not(.is-focus) {
  opacity: 0.42;
  transition-delay: 0s;
}

.ys-sa-hub:is([data-step="page"], [data-step="tech"]) .ys-sa-results li.is-focus {
  background: #fff7f0;
  box-shadow: inset 0 0 0 1.5px rgba(230, 122, 46, 0.55), 0 10px 24px rgba(230, 122, 46, 0.1);
  transition-delay: 0s;
}

.ys-sa-hub[data-step="page"] .ys-sa-pin,
.ys-sa-hub[data-step="tech"] .ys-sa-pin {
  opacity: 1;
  transform: none;
}

.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-results {
  opacity: 0;
}

.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-answer {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.ys-sa-hub:not([data-step="ai"]):not([data-step="sources"]) .ys-sa-tab--web,
.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-tab--ai {
  color: var(--sa-ink);
}

.ys-sa-hub:not([data-step="ai"]):not([data-step="sources"]) .ys-sa-tab--web::after,
.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-tab--ai::after {
  transform: none;
}

.ys-sa-hub:is([data-step="page"], [data-step="tech"]) .ys-sa-insp__meta,
.ys-sa-hub[data-step="tech"] .ys-sa-insp__tree,
.ys-sa-hub[data-step="tech"] .ys-sa-insp__tech {
  opacity: 1;
  filter: none;
  transform: none;
}

.ys-sa-hub[data-step="tech"] .ys-sa-insp__tech li::after {
  transform: translateY(-50%);
}

.ys-sa-hub[data-step="tech"] .ys-sa-insp__tech li::before {
  opacity: 1;
}

.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-insp > .ys-sa-insp__blk:not(.ys-sa-insp__ctx) {
  opacity: 0;
}

.ys-sa-hub:is([data-step="ai"], [data-step="sources"]) .ys-sa-insp__ctx {
  opacity: 1;
  transform: none;
}

.ys-sa-hub[data-step="ai"] .ys-sa-insp__ctx {
  opacity: 0.55;
}

.ys-sa-hub[data-step="sources"] .ys-sa-answer mark {
  border-color: var(--sa-orange);
  background: rgba(230, 122, 46, 0.14);
}

.ys-sa-hub[data-step="sources"] .ys-sa-answer__src li,
.ys-sa-hub[data-step="sources"] .ys-sa-insp__ctx p[data-src] {
  border-color: var(--sa-orange);
  background: #fff7f0;
  color: var(--sa-ink);
}

.ys-sa-hub[data-step="sources"] [data-src="2"] { transition-delay: 0.35s; }
.ys-sa-hub[data-step="sources"] [data-src="3"] { transition-delay: 0.7s; }

.ys-sa-hub[data-step="query"] [data-go="query"],
.ys-sa-hub[data-step="results"] [data-go="results"],
.ys-sa-hub[data-step="page"] [data-go="page"],
.ys-sa-hub[data-step="tech"] [data-go="tech"],
.ys-sa-hub[data-step="ai"] [data-go="ai"],
.ys-sa-hub[data-step="sources"] [data-go="sources"] {
  color: #fff;
}

.ys-sa-hub[data-step="query"] [data-go="query"]::after,
.ys-sa-hub[data-step="results"] [data-go="results"]::after,
.ys-sa-hub[data-step="page"] [data-go="page"]::after,
.ys-sa-hub[data-step="tech"] [data-go="tech"]::after,
.ys-sa-hub[data-step="ai"] [data-go="ai"]::after,
.ys-sa-hub[data-step="sources"] [data-go="sources"]::after {
  background: var(--sa-orange);
}

/* Typing + caret run only while the hub is on screen */
.ys-sa-hub.is-live[data-step="query"] .ys-sa-q__text {
  animation: ys-sa-type 1.5s steps(22, end) 0.25s both;
}

.ys-sa-hub.is-live[data-step="query"] .ys-sa-q::after {
  animation: ys-sa-caret 0.9s steps(1) 4;
}

@keyframes ys-sa-type {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes ys-sa-caret {
  0% { opacity: 1; }
  50% { opacity: 0; }
}

@container sahub (max-width: 31rem) {
  .ys-sa-results li:nth-child(3),
  .ys-sa-insp__tree li[data-h="H3"] {
    display: none;
  }
}

/* Narrow hub (tablet column, phones): one column, inspector as a bottom sheet */
@container sahub (max-width: 27rem) {
  .ys-sa-win__bar {
    padding: 0.4rem 0.6rem;
  }

  .ys-sa-win__dots {
    margin-inline-end: 1rem;
  }

  .ys-sa-win__query {
    padding: 0.55rem 0.65rem 0;
    gap: 0.45rem 0.5rem;
  }

  .ys-sa-win__query > .bi-search,
  .ys-sa-q {
    height: 1.8rem;
  }

  .ys-sa-win__query > .bi-search {
    width: 1.8rem;
  }

  .ys-sa-q {
    font-size: 0.76rem;
  }

  .ys-sa-win__stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.55rem 0.65rem 0.65rem;
  }

  .ys-sa-results li {
    padding: 0.45rem 0.55rem;
  }

  .ys-sa-insp {
    position: absolute;
    inset: auto 0.5rem 0.5rem;
    max-height: calc(100% - 1rem);
    gap: 0.45rem;
    box-shadow: 0 -12px 30px rgba(7, 20, 38, 0.16);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .ys-sa-hub[data-step="tech"] .ys-sa-insp {
    opacity: 1;
    transform: none;
  }

  .ys-sa-insp__meta,
  .ys-sa-insp__tree,
  .ys-sa-insp__ctx {
    display: none;
  }

  .ys-sa-answer__more {
    display: none;
  }

  .ys-sa-insp__tech {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ys-sa-steps button {
    width: 1.55rem;
    padding: 0.55rem 0;
    font-size: 0;
  }

  .ys-sa-steps button::after {
    inset: auto 0.15rem 0.35rem;
  }
}

@container sahub (max-width: 23rem) {
  .ys-sa-results li:nth-child(3) {
    display: none;
  }

  .ys-sa-answer {
    padding: 0.6rem 0.7rem;
    gap: 0.4rem;
  }

  .ys-sa-answer__text {
    font-size: 0.72rem;
    line-height: 1.5 !important;
  }

  .ys-sa-answer__src li:nth-child(3) {
    display: none;
  }

  .ys-sa-win__url {
    font-size: 0.6rem;
  }
}

/* ---------- Article: grouped topics ---------- */
.ys-sa-article.is-grouped {
  container: saart / inline-size;
}

@container saart (max-width: 42rem) {
  .ys-sa-sec--audit ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container saart (max-width: 30rem) {
  .ys-sa-sec:is(.ys-sa-sec--tech, .ys-sa-sec--aiprep, .ys-sa-sec--deliver) ul,
  .ys-sa-sec--scope ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container saart (max-width: 21rem) {
  .ys-sa-sec--audit ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ys-sa-article.is-grouped > .ys-sa-sec + .ys-sa-sec {
  position: relative;
  margin-block-start: 3.1rem;
  padding-block-start: 2.7rem;
  border-block-start: 1px solid var(--sa-line);
}

.ys-sa-article.is-grouped > .ys-sa-sec + .ys-sa-sec::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 2.75rem;
  height: 2px;
  background: var(--sa-orange);
}

.ys-sa-sec > h2 {
  margin-block-start: 0;
  scroll-margin-top: 7rem;
}

.ys-sa-sec > :last-child {
  margin-block-end: 0;
}

.ys-sa-sec--intro > p:first-of-type,
.ys-sa-sec--ai > p:first-of-type {
  color: #2a3b53;
  font-size: 1.1rem;
  line-height: 1.75;
}

/* check lists */
.ys-sa-sec:is(.ys-sa-sec--tech, .ys-sa-sec--aiprep, .ys-sa-sec--deliver) ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.6rem;
  padding: 0;
  list-style: none;
}

.ys-sa-sec:is(.ys-sa-sec--tech, .ys-sa-sec--aiprep, .ys-sa-sec--deliver) li {
  position: relative;
  padding-inline-start: 1.75rem;
  line-height: 1.6;
}

.ys-sa-sec:is(.ys-sa-sec--tech, .ys-sa-sec--aiprep, .ys-sa-sec--deliver) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid rgba(230, 122, 46, 0.45);
  border-radius: 50%;
  background: rgba(230, 122, 46, 0.07);
}

.ys-sa-sec:is(.ys-sa-sec--tech, .ys-sa-sec--aiprep, .ys-sa-sec--deliver) li::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.45rem;
  width: 0.26rem;
  height: 0.5rem;
  border: solid var(--sa-orange);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.ys-sa-sec--deliver ul {
  padding: 1.35rem 1.5rem !important;
  border: 1px solid var(--sa-line);
  border-radius: 0.9rem;
  background: #fff;
}

/* numbered scope list */
.ys-sa-sec--scope ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.75rem;
  padding: 0;
  border-block-start: 1px solid var(--sa-line);
  list-style: none;
  counter-reset: sascope;
}

.ys-sa-sec--scope li {
  position: relative;
  padding: 0.62rem 0 0.62rem 2.3rem;
  border-block-end: 1px solid var(--sa-line);
  line-height: 1.55;
  counter-increment: sascope;
}

.ys-sa-sec--scope li::before {
  content: counter(sascope, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.85rem;
  color: var(--sa-orange);
  font-family: var(--sa-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

/* schema types as tokens */
.ys-sa-sec--schema ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.ys-sa-sec--schema li {
  padding: 0.36rem 0.75rem;
  border: 1px solid rgba(16, 33, 58, 0.12);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--sa-ink);
  font-family: var(--sa-mono);
  font-size: 0.82rem;
  line-height: 1.4;
}

.ys-sa-sec--schema li::before {
  content: "@";
  margin-inline-end: 0.15rem;
  color: var(--sa-orange);
}

/* compact audit grid */
.ys-sa-sec--audit ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.ys-sa-sec--audit li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--sa-ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.ys-sa-sec--audit li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 0.12rem;
  background: var(--sa-orange);
}

/* audience */
.ys-sa-sec--audience ul {
  gap: 0;
  padding: 0.4rem 1.4rem;
  border: 1px solid rgba(230, 122, 46, 0.2);
  border-radius: 0.9rem;
  background: #fff9f4;
  list-style: none;
}

.ys-sa-sec--audience li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.5rem;
  line-height: 1.55;
}

.ys-sa-sec--audience li + li {
  border-block-start: 1px solid rgba(230, 122, 46, 0.14);
}

.ys-sa-sec--audience li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 1.2rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--sa-orange);
  border-radius: 50%;
}

/* sub-topic inset (h3 groups) */
.ys-sa-sec--keyword .ys-sa-sub {
  margin-block-start: 1.9rem;
  padding: 1.45rem 1.6rem 0.4rem;
  border: 1px solid var(--sa-line);
  border-inline-start: 3px solid var(--sa-orange);
  border-radius: 0.9rem;
  background: #fff;
}

.ys-sa-sec--keyword .ys-sa-sub > h3 {
  margin-block-start: 0;
}

/* honest-answer panels */
.ys-sa-article.is-grouped > :is(.ys-sa-sec--aiguar, .ys-sa-sec--rank) {
  padding: 1.7rem 1.8rem 1.5rem;
  border: 1px solid var(--sa-line);
  border-block-start: 3px solid var(--sa-navy);
  border-radius: 1rem;
  background: #fff;
}

.ys-sa-article.is-grouped > :is(.ys-sa-sec--aiguar, .ys-sa-sec--rank)::before {
  display: none;
}

.ys-sa-sec:is(.ys-sa-sec--aiguar, .ys-sa-sec--rank) > h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.8rem);
}

/* process rail */
.ys-sa-sec--process .ys-sa-sub {
  position: relative;
  padding: 0 0 0.4rem 2.7rem;
}

.ys-sa-sec--process .ys-sa-sub::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 0.4rem;
  bottom: -0.4rem;
  width: 1px;
  background: linear-gradient(rgba(230, 122, 46, 0.55), rgba(16, 33, 58, 0.12));
}

.ys-sa-sec--process .ys-sa-sub:last-child::before {
  display: none;
}

.ys-sa-sec--process .ys-sa-sub > h3 {
  position: relative;
  margin-block: 1.4rem 0.45rem;
}

.ys-sa-sec--process .ys-sa-sub > h3::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--sa-orange);
  border-radius: 50%;
  background: #f7f9fc;
  box-shadow: 0 0 0 4px #f7f9fc;
}

.ys-sa-sec--process .ys-sa-sub:first-of-type > h3 {
  margin-block-start: 1.6rem;
}

/* in-article FAQ */
.ys-sa-article.is-grouped > .ys-sa-sec--faq {
  padding: 1.8rem 1.9rem 0.6rem;
  border: 1px solid var(--sa-line);
  border-radius: 1rem;
  background: #fff;
}

.ys-sa-article.is-grouped > .ys-sa-sec--faq::before {
  display: none;
}

.ys-sa-sec--faq > h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.8rem);
}

.ys-sa-sec--faq details {
  margin: 0;
  padding: 0;
  border: 0;
  border-block-start: 1px solid var(--sa-line);
  border-radius: 0;
  background: transparent;
}

.ys-sa-sec--faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 0;
  list-style: none;
  font-size: 1rem;
}

.ys-sa-sec--faq summary::-webkit-details-marker {
  display: none;
}

.ys-sa-sec--faq summary::after {
  content: "";
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 auto;
  border: 1px solid rgba(16, 33, 58, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 0.6rem 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 0.6rem no-repeat;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.ys-sa-sec--faq details[open] summary {
  margin: 0;
  color: #a94d16;
}

.ys-sa-sec--faq details[open] summary::after {
  border-color: rgba(230, 122, 46, 0.42);
  background:
    linear-gradient(currentColor, currentColor) center / 0.6rem 1.5px no-repeat,
    rgba(230, 122, 46, 0.08);
}

.ys-sa-sec--faq details > :not(summary) {
  margin: 0 2.6rem 1.1rem 0;
  font-size: 0.95rem;
}

/* ---------- Scenes (shared frame) ---------- */
.ys-sa-scene {
  container: sascene / inline-size;
  margin: 2.1rem 0 0.4rem;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 58, 0.1);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 44px rgba(7, 20, 38, 0.07);
}

/* The article's own p/li/ul rules are more specific than single classes: scene text reads its values from
   custom properties set by the component classes below. */
.ys-service-article .ys-sa-scene :is(p, li, dt, dd) {
  margin: 0;
  color: var(--sa-c, #33445c);
  font-size: var(--sa-fs, 0.875rem);
  line-height: var(--sa-lh, 1.55);
}

.ys-service-article .ys-sa-scene :is(ul, ol) {
  margin: 0;
  padding: 0;
  gap: var(--sa-gap, 0);
}

.ys-sa-scene__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.85rem 1.1rem;
  border-block-end: 1px solid var(--sa-line);
  background: #fbfcfe;
}

.ys-sa-scene__title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--sa-navy);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ys-sa-scene__title i {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 0.55rem;
  background: rgba(230, 122, 46, 0.1);
  color: var(--sa-orange);
  font-size: 0.9rem;
}

.ys-sa-scene__note {
  --sa-c: var(--sa-muted);
  --sa-fs: 0.76rem;
  padding: 0.75rem 1.1rem;
  border-block-start: 1px solid var(--sa-line);
  background: #fbfcfe;
}

.ys-sa-scene__note > i {
  margin-inline-end: 0.35rem;
  color: var(--sa-orange);
}

.ys-sa-code {
  margin: 0;
  overflow-x: auto;
  padding: 0.8rem 0.95rem;
  border-radius: 0.6rem;
  background: #0b1d33;
  color: #d7e2f2;
  font-family: var(--sa-mono);
  font-size: 0.74rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ys-sa-code code {
  color: inherit;
  font: inherit;
}

.ys-sa-st {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sa-ok);
  box-shadow: 0 0 0 3px rgba(30, 148, 104, 0.14);
}

.ys-sa-st--warn {
  background: var(--sa-warn);
  box-shadow: 0 0 0 3px rgba(201, 130, 26, 0.16);
}

.ys-sa-st--watch {
  background: var(--sa-watch);
  box-shadow: 0 0 0 3px rgba(86, 115, 159, 0.16);
}

.ys-sa-outline {
  --sa-gap: 0.4rem;
  display: grid;
  align-content: start;
  gap: var(--sa-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ys-sa-outline li {
  --sa-c: var(--sa-ink);
  --sa-fs: 0.84rem;
  --sa-lh: 1.45;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.ys-sa-outline li[data-h="H2"] { padding-inline-start: 1rem; }
.ys-sa-outline li[data-h="H2"]::before { background: #37506f; }

/* ---------- Scene A: audit ---------- */
.ys-sa-audit__body {
  display: grid;
  grid-template-columns: minmax(12.5rem, 0.82fr) minmax(0, 1.6fr);
}

.ys-sa-audit__cats {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding: 0.6rem;
  border-inline-end: 1px solid var(--sa-line);
  background: #fbfcfe;
}

.ys-sa-audit__cats button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.52rem 0.7rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: #3a4b63;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: start;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ys-sa-audit__cats button > i {
  color: #7d8ca1;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.ys-sa-audit__cats button > span {
  flex: 1 1 auto;
  min-width: 0;
}

.ys-sa-audit__cats button:hover {
  background: #f1f4f8;
}

.ys-sa-audit__cats button[aria-selected="true"] {
  background: #fff;
  color: var(--sa-navy);
  box-shadow: inset 3px 0 0 var(--sa-orange), 0 4px 14px rgba(7, 20, 38, 0.07);
}

.ys-sa-audit__cats button[aria-selected="true"] > i {
  color: var(--sa-orange);
}

.ys-sa-audit__panes {
  display: grid;
  min-width: 0;
}

.ys-sa-audit__pane {
  display: grid;
  grid-area: 1 / 1;
  align-content: start;
  gap: 0.9rem;
  min-width: 0;
  padding: 1.3rem 1.45rem 1.4rem;
}

.ys-sa-audit__pane[hidden] {
  display: none;
}

.ys-sa-audit__kicker {
  --sa-c: var(--sa-orange-d);
  --sa-fs: 0.72rem;
  --sa-lh: 1.3;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ys-sa-audit__what {
  --sa-c: #3d4e66;
  --sa-fs: 0.93rem;
  --sa-lh: 1.7;
}

.ys-sa-audit__res {
  --sa-fs: 0.85rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.9rem;
  border-inline-start: 3px solid var(--sa-ok);
  border-radius: 0.5rem;
  background: rgba(30, 148, 104, 0.06);
}

.ys-sa-audit__res b {
  color: var(--sa-ok);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ys-sa-audit__res--warn {
  border-color: var(--sa-warn);
  background: rgba(201, 130, 26, 0.07);
}

.ys-sa-audit__res--warn b {
  color: #a96a10;
}

.ys-sa-audit__res--watch {
  border-color: var(--sa-watch);
  background: rgba(86, 115, 159, 0.07);
}

.ys-sa-audit__res--watch b {
  color: var(--sa-watch);
}

.ys-sa-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin-block-end: 0.3rem;
  color: var(--sa-ink);
  font-weight: 650;
}

.ys-sa-legend .ys-sa-st:not(:first-child) {
  margin-inline-start: 0.5rem;
}

.ys-sa.is-ready .ys-sa-audit.is-live .ys-sa-audit__pane:not([hidden]) {
  animation: ys-sa-pane 0.4s ease both;
}

@keyframes ys-sa-pane {
  from { opacity: 0; transform: translateY(0.35rem); }
  to { opacity: 1; transform: none; }
}

/* ---------- Scene B: SERP preview ---------- */
.ys-sa-toggle {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid rgba(16, 33, 58, 0.12);
  border-radius: 999px;
  background: #fff;
}

.ys-sa-toggle button {
  min-width: 4.6rem;
  padding: 0.38rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sa-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.ys-sa-toggle button[aria-pressed="true"] {
  background: var(--sa-navy);
  color: #fff;
}

.ys-sa-serp__body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.ys-sa-serp__col {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  padding: 1.25rem 1.35rem 1.35rem;
}

.ys-sa-serp__page {
  grid-template-rows: auto 1fr;
  border-inline-start: 1px solid var(--sa-line);
  background: #fbfcfe;
}

.ys-sa-serp__label {
  --sa-c: var(--sa-muted);
  --sa-fs: 0.7rem;
  --sa-lh: 1.3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ys-sa-serp__label span {
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--sa-soft);
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.ys-sa-snip,
.ys-sa-serp__page .ys-sa-outline {
  grid-area: 2 / 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ys-sa-snip {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 20, 38, 0.05);
}

.ys-sa-snip__url {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--sa-muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.ys-sa-snip__title {
  color: var(--sa-link);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
}

.ys-sa-snip__desc {
  color: var(--sa-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.ys-sa-checks {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ys-sa-checks li {
  --sa-c: #3a4b63;
  --sa-fs: 0.84rem;
  --sa-lh: 1.4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-block-end: 1px solid var(--sa-line);
}

.ys-sa-checks b {
  flex: 0 0 auto;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: rgba(30, 148, 104, 0.1);
  color: var(--sa-ok);
  font-size: 0.7rem;
  font-weight: 800;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.ys-sa-checks b::after {
  content: attr(data-after);
}

.ys-sa-serp[data-mode="before"] .ys-sa-checks b {
  background: rgba(201, 130, 26, 0.12);
  color: #a96a10;
}

.ys-sa-serp[data-mode="before"] .ys-sa-checks b::after {
  content: attr(data-before);
}

.ys-sa-serp .ys-sa-outline--before li {
  --sa-c: var(--sa-muted);
}

.ys-sa-serp .ys-sa-outline--before li::before {
  background: #b9c3d1;
}

.ys-sa-serp [data-state] {
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s;
}

.ys-sa-serp[data-mode="after"] [data-state="before"],
.ys-sa-serp[data-mode="before"] [data-state="after"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.35rem);
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}

/* no-JS: both previews stacked and labelled */
.ys-sa:not(.is-ready) .ys-sa-serp [data-state] {
  grid-area: auto;
  opacity: 1;
  transform: none;
  visibility: visible;
}

.ys-sa:not(.is-ready) .ys-sa-serp [data-state]::before {
  content: attr(data-state);
  color: var(--sa-orange-d);
  font-family: var(--sa-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.ys-sa:not(.is-ready) .ys-sa-toggle {
  display: none;
}

/* ---------- Scene C: AI visibility ---------- */
.ys-sa-ai__chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  padding: 1.05rem 1.2rem 0;
}

.ys-sa-ai__chain button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(16, 33, 58, 0.12);
  border-radius: 0.6rem;
  background: #fff;
  color: #3a4b63;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ys-sa-ai__chain button:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -1.05rem;
  top: 50%;
  width: 0.9rem;
  height: 1px;
  background: rgba(230, 122, 46, 0.55);
}

.ys-sa-ai__chain button i {
  color: var(--sa-orange);
}

.ys-sa-ai__chain button[aria-pressed="true"] {
  border-color: var(--sa-navy);
  background: var(--sa-navy);
  color: #fff;
}

.ys-sa-ai__map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.2rem;
}

.ys-sa-ai__node {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--sa-line);
  border-radius: 0.75rem;
  background: #fff;
  transition: opacity 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.ys-sa-ai__q {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem 0.9rem;
  border-color: rgba(230, 122, 46, 0.25);
  background: #fff9f4;
}

.ys-sa-ai__tag {
  --sa-c: var(--sa-muted);
  --sa-fs: 0.68rem;
  --sa-lh: 1.3;
  overflow: hidden;
  font-family: var(--sa-mono);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ys-sa-ai__q .ys-sa-ai__tag {
  --sa-c: var(--sa-orange-d);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #fff;
}

.ys-sa-ai__ask {
  --sa-c: var(--sa-navy);
  --sa-fs: 0.98rem;
  --sa-lh: 1.45;
  font-weight: 700;
}

.ys-sa-ai__page .ys-sa-outline li {
  --sa-fs: 0.8rem;
}

.ys-sa-ai__meta {
  --sa-c: var(--sa-muted);
  --sa-fs: 0.74rem;
  --sa-lh: 1.45;
  display: flex;
  gap: 0.4rem;
  padding-block-start: 0.55rem;
  border-block-start: 1px dashed var(--sa-line);
}

.ys-sa-ai__meta i {
  color: var(--sa-ok);
}

.ys-sa-ai__entity dl {
  --sa-fs: 0.8rem;
  --sa-lh: 1.4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem 0.75rem;
  margin: 0;
}

.ys-sa-ai__entity dt {
  --sa-c: var(--sa-muted);
  font-weight: 600;
}

.ys-sa-ai__entity dd {
  --sa-c: var(--sa-ink);
  font-weight: 700;
}

.ys-sa-ai__data .ys-sa-code {
  font-size: 0.68rem;
}

.ys-sa-ai[data-layer]:not([data-layer="all"]) .ys-sa-ai__node {
  opacity: 0.42;
}

.ys-sa-ai[data-layer="soru"] [data-node="soru"],
.ys-sa-ai[data-layer="sayfa"] [data-node="sayfa"],
.ys-sa-ai[data-layer="marka"] [data-node="marka"],
.ys-sa-ai[data-layer="veri"] [data-node="veri"] {
  border-color: var(--sa-orange);
  box-shadow: 0 12px 28px rgba(230, 122, 46, 0.14);
  opacity: 1;
}

.ys-sa-ai__explain {
  display: grid;
  padding: 0 1.2rem 1.05rem;
}

.ys-sa-ai__explain p {
  --sa-fs: 0.9rem;
  --sa-lh: 1.65;
  grid-area: 1 / 1;
  padding: 0.75rem 0.95rem;
  border-inline-start: 3px solid var(--sa-orange);
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--sa-soft);
}

.ys-sa-ai__explain p[hidden] {
  display: none;
}

.ys-sa-ai__venn {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block-start: 1px solid var(--sa-line);
}

.ys-sa-ai__venn p {
  --sa-c: var(--sa-muted);
  --sa-fs: 0.8rem;
  --sa-lh: 1.5;
  display: grid;
  align-content: start;
  gap: 0.25rem;
  padding: 0.95rem 1.2rem;
}

.ys-sa-ai__venn p + p {
  border-inline-start: 1px solid var(--sa-line);
}

.ys-sa-ai__venn b {
  color: var(--sa-navy);
  font-size: 0.8rem;
}

.ys-sa-ai__venn p:first-child {
  background: #fff9f4;
}

.ys-sa-ai__venn p:first-child b {
  color: var(--sa-orange-d);
}

/* ---------- Sidebar ---------- */
/* Sticky only while the whole card fits the viewport (ys-seo-ai.js measures it and adds .is-sticky); otherwise, and
   without JS, it scrolls with the page instead of staying pinned with its lower part off-screen. */
.ys-sa .ys-sa-side {
  position: static;
}

@media (min-width: 1025px) {
  .ys-sa .ys-sa-side.is-sticky {
    position: sticky;
    top: var(--sa-side-top, 6.5rem);
  }
}

.ys-sa-side .ys-sd-summary__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ys-sa-side__ico {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.75rem;
  background: rgba(230, 122, 46, 0.1);
  color: var(--sa-orange);
  font-size: 1.05rem;
}

.ys-sa-side .ys-sd-summary__head p:last-child {
  margin-block-end: 0;
}

/* ---------- Scope / process / delivery / references ---------- */
.ys-sa-caps .ys-sd-capability {
  position: relative;
}

.ys-sa-caps__ico {
  position: absolute;
  top: 1.3rem;
  right: 1.4rem;
  color: rgba(230, 122, 46, 0.8);
  font-size: 1.2rem;
  line-height: 1;
}

.ys-sa-caps .ys-sd-capability h3 {
  padding-inline-end: 2rem;
}

.ys-sa-flow li > span {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
}

.ys-sa-flow .ys-sa-flow__phase {
  display: inline-flex;
  height: 1.45rem;
  margin-block-end: 0.85rem;
  padding: 0 0.55rem;
  align-items: center;
  border-radius: 0.35rem;
  background: rgba(230, 122, 46, 0.1);
  color: var(--sa-orange-d);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ys-sa-flow li:last-child .ys-sa-flow__phase {
  background: var(--sa-navy);
  color: #fff;
}

.ys-sa-flow .ys-sa-flow__node {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-block-end: 0.9rem;
  place-items: center;
  border: 1px solid rgba(230, 122, 46, 0.45);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 22px rgba(7, 20, 38, 0.06);
  color: var(--sa-orange);
  font-size: 1.05rem;
}

.ys-sa-flow .ys-sa-flow__no {
  display: block;
  margin-block-end: 0.3rem;
  color: var(--sa-orange);
  font-family: var(--sa-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.ys-sa-flow li:not(:last-child)::before {
  left: 3.2rem;
  right: 0.6rem;
  top: 3.6rem;
  background: linear-gradient(90deg, rgba(230, 122, 46, 0.6), rgba(16, 33, 58, 0.14));
}

.ys-sa-delivery {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--sa-line);
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(7, 20, 38, 0.05);
}

.ys-sa-delivery .ys-sd-deliverables__grid article > span {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
}

.ys-sa-refcta {
  grid-template-columns: auto minmax(0, 7fr) minmax(14rem, 3fr);
}

.ys-sa-refcta__ico {
  display: grid;
  width: 3.4rem;
  height: 3.4rem;
  place-items: center;
  border-radius: 0.9rem;
  background: var(--sa-navy);
  color: var(--sa-orange);
  font-size: 1.35rem;
}

.ys-sa-final {
  background:
    radial-gradient(circle at 88% 45%, rgba(230, 122, 46, 0.12), transparent 24%),
    radial-gradient(circle at 12% 60%, rgba(230, 122, 46, 0.08), transparent 25%),
    linear-gradient(145deg, var(--ys-sd-navy-3), var(--ys-sd-navy));
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .ys-sa .ys-sd-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }

  .ys-sa .ys-sd-hero h1 {
    font-size: 2.75rem;
  }

  .ys-sa .ys-sd-hero__lead {
    font-size: 1rem;
    line-height: 1.65 !important;
  }

  .ys-sa-hub {
    height: 28rem;
  }
}

@media (max-width: 1023.98px) {
  .ys-sa .ys-sd-hero {
    padding-block: 3.6rem;
  }

  .ys-sa .ys-sd-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 1.5rem;
  }

  .ys-sa .ys-sd-hero h1 {
    max-width: none;
    font-size: 2.3rem;
    line-height: 1.02;
  }

  .ys-sa .ys-sd-hero__lead {
    font-size: 0.95rem;
    line-height: 1.6 !important;
  }

  .ys-sa .ys-sd-hero__visual {
    display: flex;
  }

  .ys-sa-hub {
    width: 100%;
    height: auto;
    min-height: 26rem;
  }

  .ys-sa-flow li:nth-child(3)::before {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .ys-sa .ys-sd-hero {
    padding-block: 2.6rem 2.6rem;
  }

  .ys-sa .ys-sd-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .ys-sa .ys-sd-hero h1 {
    max-width: 11em;
    font-size: clamp(2.1rem, 8vw, 2.4rem);
    line-height: 1;
  }

  .ys-sa .ys-sd-breadcrumb {
    margin-block-end: 1rem;
  }

  .ys-sa-hub {
    height: 16.45rem;
    min-height: 0;
  }

  .ys-sa-refcta {
    grid-template-columns: minmax(0, 1fr);
  }

  .ys-sa-article.is-grouped > :is(.ys-sa-sec--aiguar, .ys-sa-sec--rank, .ys-sa-sec--faq) {
    padding-inline: 1.15rem;
  }

  .ys-sa-sec--keyword .ys-sa-sub {
    padding-inline: 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .ys-sa .ys-sd-hero__lead {
    font-size: 0.95rem;
    line-height: 1.6 !important;
  }

  .ys-sa-flow li {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    column-gap: 0.9rem;
  }

  .ys-sa-flow .ys-sa-flow__node {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin: 0;
  }

  .ys-sa-flow .ys-sa-flow__phase {
    justify-self: start;
    margin-block-end: 0.4rem;
  }

  .ys-sa-flow .ys-sa-flow__phase,
  .ys-sa-flow .ys-sa-flow__no,
  .ys-sa-flow h3,
  .ys-sa-flow p {
    grid-column: 2;
  }

  .ys-sa-flow li:not(:last-child)::before {
    left: 1.3rem;
    right: auto;
    top: 2.8rem;
    bottom: 0.2rem;
    width: 1px;
    height: auto;
    background: linear-gradient(rgba(230, 122, 46, 0.6), rgba(16, 33, 58, 0.14));
  }

}

/* Scenes follow their own width (article column), not the viewport */
@container sascene (max-width: 46rem) {
  .ys-sa-ai__map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ys-sa-ai__data {
    grid-column: 1 / -1;
  }

  .ys-sa-ai__chain {
    gap: 0.9rem;
  }

  .ys-sa-ai__chain button:not(:last-child)::after {
    right: -0.8rem;
    width: 0.7rem;
  }
}

@container sascene (max-width: 36rem) {
  .ys-sa-scene__bar {
    padding: 0.75rem 0.9rem;
  }

  .ys-sa-scene__note {
    padding: 0.7rem 0.9rem;
  }

  .ys-sa-audit__body,
  .ys-sa-serp__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ys-sa-audit__cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    border-inline-end: 0;
    border-block-end: 1px solid var(--sa-line);
  }

  .ys-sa-audit__cats button {
    gap: 0.45rem;
    padding: 0.5rem 0.55rem;
    font-size: 0.76rem;
  }

  .ys-sa-audit__pane {
    padding: 1.05rem 1rem 1.15rem;
  }

  .ys-sa-serp__page {
    border-inline-start: 0;
    border-block-start: 1px solid var(--sa-line);
  }

  .ys-sa-serp__col {
    padding: 1rem;
  }

  .ys-sa-ai__chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.9rem 1rem 0;
  }

  .ys-sa-ai__chain button::after {
    display: none;
  }

  .ys-sa-ai__map {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.9rem 1rem;
  }

  .ys-sa-ai__q {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .ys-sa-ai__explain {
    padding: 0 1rem 1rem;
  }

  .ys-sa-ai__venn {
    grid-template-columns: minmax(0, 1fr);
  }

  .ys-sa-ai__venn p + p {
    border-inline-start: 0;
    border-block-start: 1px solid var(--sa-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ys-sa-hub *,
  .ys-sa-scene *,
  .ys-sa-hub *::before,
  .ys-sa-hub *::after {
    animation: none !important;
    transition: none !important;
  }
}
