/* ============================================
   AI bağlantı sayfası (.mcp): adres kartı, bağlama adımları, sorgulanabilen bilgiler, MCP tanımı.
   Hero: net-tools-page.css (.ntp-hero). Hiçbir bölüm hero'ya ya da komşusuna binmez; ipuçları akış dışıdır.
   ============================================ */

.mcp ::selection { background: var(--hm-tint-line); color: var(--hm-ink); }
.mcp-hero ::selection { background: rgb(58 144 206 / .45); color: #fff; }
.mcp-body { padding-bottom: 8px; }
.mcp [id] { scroll-margin-top: 92px; }

/* ---- Hero şeması (pages/ai-connect/hero-viz): 721 px ve üstü 460 × 200 px'lik satır, görsel kutusuyla ölçeklenir ----
   Standarda bildirilen oranlar: çizilen alan kutunun tamamı genişliğinde, %43,5'i yüksekliğindedir (460 × 200 px). */
.hs-cloud .mc-viz { --hs-fw: 1; --hs-fh: .4348; --hs-dx: 0; --hs-dy: 0; --hs-lx: 0; min-height: 0; aspect-ratio: 460 / 200; overflow: visible; container-type: inline-size; }
@media (min-width: 960px) {
    /* Başlık üç satırda kalsın: en uzun satır (12,6 em) dar metin sütununa (sağ dolgu ve kaydırma çubuğu payıyla) sığacak kadar küçülür */
    .cs .mcp-hero .hs-t { font-size: min(clamp(1.75rem, 3.3vw, 2.625rem), calc((100vw - 616px) / 12.6)); }
}
.mc-dg { position: relative; font-family: var(--font-body); color: #fff; }
.mc-chat, .mc-res {
    box-sizing: border-box; padding: 12px; border: 1px solid rgb(140 196 232 / .42); border-radius: 12px;
    background: linear-gradient(180deg, rgb(16 66 110 / .78), rgb(9 40 68 / .88));
    box-shadow: 0 18px 36px -22px rgb(0 0 0 / .7);
}
.mc-chat-h, .mc-res-h { display: flex; align-items: center; gap: 7px; font: 600 12px/1.3 var(--font-body); color: #bcd6ec; white-space: nowrap; }
.mc-live { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ecf7a; box-shadow: 0 0 0 3px rgb(62 207 122 / .2); }
.mc-q { margin: 10px 0 0 auto; width: fit-content; max-width: 100%; padding: 7px 10px; border-radius: 10px 10px 3px 10px; background: var(--hm-blue-600); font: 600 12.5px/1.35 var(--font-body); }
.mc-a { display: flex; gap: 4px; width: fit-content; margin-top: 8px; padding: 9px 11px; border-radius: 10px 10px 10px 3px; background: rgb(255 255 255 / .1); }
.mc-a i { width: 5px; height: 5px; border-radius: 50%; background: #bcd6ec; }

.mc-hub { position: relative; display: grid; justify-items: center; }
.mc-hub-art { display: block; width: 88px; height: 88px; overflow: visible; }
.mc-hub-l { display: grid; justify-items: center; gap: 2px; margin-top: 2px; text-align: center; white-space: nowrap; }
.mc-hub-l b { font: 700 12.5px/1.3 var(--hm-display); }
.mc-hub-l span { font: 600 12px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #8fd0ff; }

.mc-res ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.mc-res li { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 8px; border-radius: 8px; background: rgb(255 255 255 / .06); font: 600 12.5px/1.25 var(--font-body); white-space: nowrap; }
.mc-res li span { flex: 1; min-width: 0; }
.mc-res li .cs-i { font-size: 15px; color: #6cb8ee; }
.mc-res li .mc-ok { font-size: 15px; color: #3ecf7a; }

/* Bağlantı çizgileri: yatay (.mc-ln, üzerinde dolaşan ışık) ve dikey (.mc-v, dar ekran) */
.mc-ln { position: relative; display: block; height: 1.5px; border-radius: 1px; background: #4aa3e6; }
.mc-ln::before, .mc-ln::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #dff1ff; box-shadow: 0 0 0 3px rgb(74 163 230 / .28); }
.mc-ln::before { left: -3px; }
.mc-ln::after { right: -3px; }
.mc-ln b { position: absolute; top: 50%; left: 0; width: 14px; height: 3px; margin-top: -1.5px; border-radius: 2px; background: #eb5c28; opacity: 0; }
.mc-v { display: none; width: 1.5px; height: 22px; background: #4aa3e6; }

@media (prefers-reduced-motion: no-preference) {
    .mc-ln b { opacity: 1; animation: mc-run 2.4s cubic-bezier(.45, 0, .55, 1) infinite; }
    .mc-ln-2 b { animation-delay: 1.2s; }
    .mc-a i { animation: mc-dot 1.2s ease-in-out infinite; }
    .mc-a i:nth-child(2) { animation-delay: .15s; }
    .mc-a i:nth-child(3) { animation-delay: .3s; }
    .mc-ring { transform-origin: 60px 60px; animation: mc-spin 24s linear infinite; }
}
@keyframes mc-run { from { left: 0; } to { left: calc(100% - 14px); } }
@keyframes mc-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes mc-spin { to { transform: rotate(360deg); } }

@media (min-width: 721px) {
    .mc-dg { --mc-s: tan(atan2(100cqw, 460px)); display: flex; align-items: center; width: 460px; height: 200px; transform-origin: 0 0; transform: scale(var(--mc-s)); }
    .mc-chat { flex: none; width: 140px; }
    .mc-res { flex: none; width: 186px; }
    .mc-hub { flex: none; width: 98px; }
    .mc-ln { flex: 1 1 0; min-width: 12px; margin: 0 4px 22px; }
}
@supports not (transform: scale(tan(atan2(100cqw, 460px)))) {
    @media (min-width: 721px) {
        .mc-dg { --mc-s: 1; }
        .hs-cloud .mc-viz { aspect-ratio: auto; width: 460px; height: 200px; }
    }
}
/* 720 px ve altı: dikey akış (sohbet → MCP sunucusu → izHost verisi) */
@media (max-width: 720px) {
    .cs .mcp-hero .hs-t { font-size: clamp(1.375rem, 6.6vw, 2rem); }
    .hs-cloud .mc-viz { aspect-ratio: auto; margin-top: 26px; }
    .mc-dg { display: grid; justify-items: center; width: 100%; }
    .mc-ln { display: none; }
    .mc-v { display: block; }
    .mc-chat, .mc-res { width: min(100%, 300px); }
    .mc-q { font-size: 14px; }
    .mc-chat-h, .mc-res-h { font-size: 13px; }
    .mc-res li { min-height: 36px; font-size: 14px; }
}
.mcp .mcp-copy:focus-visible, .mcp-tip:focus-visible { outline: 2px solid var(--hm-blue-600); outline-offset: 2px; }

/* ---- Sunucu adresi kartı ---- */
.mcp-ep {
    background: #fff; border: 1px solid var(--hm-line); border-radius: 16px;
    box-shadow: 0 1px 2px rgb(6 32 51 / .04), 0 20px 40px -32px rgb(6 32 51 / .35);
}
.mcp-ep-main {
    display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto) auto; grid-template-areas: "ic tx url copy";
    align-items: center; gap: 16px 20px; padding: 22px 22px 22px 24px;
}
.mcp-ep-ic { grid-area: ic; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--hm-navy-950); color: #fff; }
.mcp-ep-ic .cs-i { font-size: 22px; }
.mcp-ep-tx { grid-area: tx; min-width: 0; }
.cs .mcp-ep-tx h2 { margin: 0; font: 700 1.25rem/1.2 var(--hm-display); letter-spacing: -.02em; color: var(--hm-ink); }
.mcp-ep-tx p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--hm-ink-2); }
.cs .mcp-url {
    grid-area: url; min-width: 0; padding: 12px 18px; border: 1px solid var(--hm-tint-line); border-radius: 10px; background: var(--hm-tint);
    font: 700 clamp(17px, 1.7vw, 21px)/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.01em;
    color: var(--hm-blue-700); overflow-wrap: anywhere; user-select: all;
}
.cs .mcp-copy {
    grid-area: copy; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; cursor: pointer;
    border: 1px solid var(--hm-blue-600); border-radius: 10px; background: var(--hm-blue-600); color: #fff; font: 700 15px/1 var(--hm-display); white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.cs .mcp-copy .cs-i { font-size: 18px; }
.cs .mcp-copy:hover { border-color: var(--hm-blue-700); background: var(--hm-blue-700); }
.cs .mcp-copy.is-copied { border-color: #059669; background: #ecfdf5; color: #047857; }
.cs .mcp-copy.is-failed { border-color: var(--hm-cta); background: #fff; color: var(--hm-cta); }

.cs .mcp-facts {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0;
    border-top: 1px solid var(--hm-line); border-radius: 0 0 16px 16px; background: #f7fafd;
}
.mcp-facts > div { min-width: 0; padding: 14px 22px 16px 24px; }
.mcp-facts > div + div { border-left: 1px solid var(--hm-line); }
.mcp-facts dt { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--hm-ink-2); }
.mcp-facts dt .cs-i { font-size: 15px; color: var(--hm-blue-600); }
.mcp-facts dd { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font: 700 15.5px/1.3 var(--hm-display); color: var(--hm-ink); }

/* ---- İpucu (bilgi simgesi) ---- */
.mcp-tip { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; color: var(--hm-blue-600); cursor: help; }
.mcp-tip .cs-i { font-size: 15px; }
.mcp-tip::after {
    content: attr(data-tip); position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
    width: max-content; max-width: min(300px, calc(100vw - 64px)); padding: 9px 11px; border-radius: 8px;
    background: var(--hm-navy-950); color: #fff; font: 500 13.5px/1.45 var(--font-body); letter-spacing: 0; text-align: left; white-space: normal;
    box-shadow: 0 8px 24px -8px rgb(6 32 51 / .5); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s;
}
.mcp-tip:hover::after, .mcp-tip:focus-visible::after { opacity: 1; visibility: visible; }

/* ---- Bölüm başı ---- */
.mcp-sec { margin-top: 56px; }
.mcp-head { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.cs .mcp-head h2 { margin: 0; font: 700 clamp(1.35rem, 2.1vw, 1.65rem)/1.2 var(--hm-display); letter-spacing: -.02em; color: var(--hm-ink); text-wrap: balance; }

/* ---- Bağlama adımları ---- */
.mcp-clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; }
.mcp-client { min-width: 0; padding: 22px 26px 18px; }
.mcp-client + .mcp-client { border-left: 1px solid var(--hm-line); }
.mcp-client-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hm-line); }
.cs .mcp-client-head h3 { margin: 0; font: 700 1.15rem/1.25 var(--hm-display); letter-spacing: -.015em; color: var(--hm-ink); }
.mcp-count { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--hm-tint); border: 1px solid var(--hm-tint-line); font-size: 13px; font-weight: 600; color: var(--hm-blue-700); }
.cs .mcp-steps { margin: 6px 0 0; padding: 0; list-style: none; }
.mcp-steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
/* Numaraları birleştiren çizgi: bir numaranın altından sonrakinin üstüne (metin kaç satır olursa olsun) */
.mcp-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 42px; bottom: -12px; width: 1px; background: var(--hm-tint-line); }
.mcp-n {
    position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
    background: #fff; border: 1px solid var(--hm-tint-line); color: var(--hm-blue-700); font: 700 14px/1 var(--hm-display); font-variant-numeric: tabular-nums;
}
.mcp-steps li:last-child .mcp-n { background: var(--hm-blue-600); border-color: var(--hm-blue-600); color: #fff; }
.mcp-step-tx { align-self: center; font-size: 15px; line-height: 1.5; color: var(--hm-ink); overflow-wrap: anywhere; }
.mcp-note {
    display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 0; padding: 14px 18px; border-radius: 12px;
    background: var(--hm-tint); border: 1px solid var(--hm-tint-line); font-size: 14.5px; line-height: 1.5; color: var(--hm-ink);
}
.mcp-note .cs-i { flex: none; margin-top: 1px; font-size: 19px; color: var(--hm-blue-600); }

/* ---- Sorgulanabilen bilgiler ---- */
.cs .mcp-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; }
.mcp-feats li { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 24px; }
.mcp-feats li:nth-child(even) { border-left: 1px solid var(--hm-line); }
.mcp-feats li:nth-child(n + 3) { border-top: 1px solid var(--hm-line); }
.mcp-feat-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--hm-tint); border: 1px solid var(--hm-tint-line); color: var(--hm-blue-600); }
.mcp-feat-ic .cs-i { font-size: 20px; }
.cs .mcp-feats h3 { margin: 0; font: 700 16.5px/1.3 var(--hm-display); letter-spacing: -.01em; color: var(--hm-ink); }
.mcp-feats p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--hm-ink-2); }

/* ---- MCP nedir ---- */
.mcp-about { display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); gap: 48px; align-items: start; padding-top: 40px; border-top: 1px solid var(--hm-line); }
.cs .mcp-about h2 { margin: 0; font: 700 clamp(1.35rem, 2.1vw, 1.65rem)/1.2 var(--hm-display); letter-spacing: -.02em; color: var(--hm-ink); text-wrap: balance; }
.mcp-about-tx { max-width: 68ch; }
.mcp-about-tx p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--hm-ink-2); }
.mcp-about-tx p + p { margin-top: 14px; }

.mcp-faq { margin-top: 56px; }

/* ---- Duyarlı ---- */
@media (max-width: 1100px) {
    .mcp-ep-main { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic tx tx" "url url copy"; }
    .cs .mcp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mcp-facts > div:nth-child(3) { border-left: 0; }
    .mcp-facts > div:nth-child(n + 3) { border-top: 1px solid var(--hm-line); }
}
@media (max-width: 900px) {
    .mcp-clients, .cs .mcp-feats { grid-template-columns: minmax(0, 1fr); }
    .mcp-client + .mcp-client { border-left: 0; border-top: 1px solid var(--hm-line); }
    .mcp-feats li:nth-child(even) { border-left: 0; }
    .mcp-feats li + li { border-top: 1px solid var(--hm-line); }
    .mcp-about { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 32px; }
    .mcp-sec, .mcp-faq { margin-top: 44px; }
    /* Dar ekranda ipucu simgeye değil satıra/bilgi şeridine yaslanır: ekran dışına taşmaz */
    .mcp-head, .cs .mcp-facts { position: relative; }
    .mcp-tip { position: static; }
    .mcp-tip::after { left: 12px; right: 12px; width: auto; max-width: none; transform: none; bottom: calc(100% + 6px); }
}
@media (max-width: 560px) {
    .mcp-ep-main { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic tx" "url url" "copy copy"; gap: 14px; padding: 18px 16px; }
    .cs .mcp-url { padding: 11px 14px; }
    .cs .mcp-copy { width: 100%; }
    .mcp-facts > div { padding: 12px 16px 14px; }
    .mcp-client { padding: 18px 16px 12px; }
    .mcp-feats li { padding: 18px 16px 20px; gap: 14px; }
    .mcp-note { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .cs .mcp-copy, .mcp-tip::after { transition: none; }
}
