/* muratok.dev/ai — MO-2013
   Layout: aynı SAP GUI çerçevesi; içi kırmızı makine görüşü. Hero tam genişlik HUD,
   altında protokol, üç cepheli görev kayıtları, çalışan ABAP tarayıcısı, yükseltme geçmişi.
   Bilerek tek tema: makine görüşü karanlıkta okunur. */

:root.t, :root.t[data-theme] {
  --paper:   #070102;
  --sheet:   #12050a;
  --ink:     #ffe9e4;
  --ink-2:   #c98a82;
  --rule:    #3a1015;
  --kw:      #ff4a35;
  --amber:   #ff4a35;
  --amber-bg:#3a0d0d;
  --add:     #ffb199;
  --add-bg:  #2a0b0b;
  --del:     #ff2a1a;
  --del-bg:  #3a0808;
  --code-bg: #0d0305;
  --red:     #ff2a1a;
  --red-2:   #ff6a4d;
  --red-dim: #7a1410;
  --f-hud: "Share Tech Mono", "DM Mono", ui-monospace, monospace;
  --f-t: "Chakra Petch", "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: dark;
}
.t body { background: radial-gradient(1200px 600px at 50% -200px, rgba(255,42,26,.12), transparent 70%), var(--paper); }

/* Menüdeki AI bağlantısı (iki sayfada da kullanılıyor) */
.nav a.nav-ai { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Hero: makine görüşü ---------- */
.t-hero { padding-block: clamp(20px, 3vw, 36px) clamp(30px, 5vw, 56px); }
.vision {
  position: relative; overflow: hidden; border-radius: 6px; min-height: clamp(460px, 62vw, 640px);
  background: radial-gradient(120% 100% at 60% 40%, #2a0306, #0a0102 70%);
  border: 1px solid var(--rule); box-shadow: 0 0 0 1px #000, 0 30px 90px -30px rgba(255,42,26,.45);
}
#t-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.vision::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0,0,0,.85)); }
.v-scan { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(255,42,26,.06) 0 1px, transparent 1px 3px); }
.v-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(transparent, rgba(255,80,60,.10), transparent); animation: vscan 6s linear infinite; }
@keyframes vscan { to { top: 100%; } }
.v-col { position: absolute; top: 0; bottom: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.v-left { left: 10px; width: 120px; -webkit-mask: linear-gradient(transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.v-col pre { margin: 0; font-family: var(--f-hud); font-size: 11px; line-height: 1.5; color: rgba(255,90,70,.55); }
.v-hud { position: relative; z-index: 3; min-height: inherit; padding: clamp(18px, 3vw, 32px) clamp(18px, 3vw, 32px) clamp(18px, 3vw, 28px) clamp(18px, 12vw, 150px);
  display: grid; grid-template-rows: auto 1fr auto; gap: 18px; color: #ffd8d0; font-family: var(--f-hud); }
.v-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; letter-spacing: .14em; color: var(--red-2); }
.v-rec { display: inline-flex; align-items: center; gap: 6px; }
.v-rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.2s steps(2) infinite; }
.v-main { align-self: center; display: grid; gap: 14px; max-width: 40rem; }
.v-kick { font-size: 13px; letter-spacing: .18em; color: var(--red-2); }
.v-kick b { color: #fff; font-weight: 400; }
.t-title { font-family: var(--f-t); font-weight: 700; text-transform: uppercase; line-height: .92; letter-spacing: .01em;
  font-size: clamp(2.8rem, 8.5vw, 6.4rem); color: #fff; text-shadow: 0 0 24px rgba(255,42,26,.55); }
.t-title em { font-style: normal; color: var(--red); display: block; }
.t-lead { font-family: var(--f-body); font-size: clamp(1rem, 1.5vw, 1.15rem); color: #f2c9c1; max-width: 36rem; }
.v-readout { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 6px 26px; font-size: 12px; }
.v-readout div { display: grid; gap: 2px; }
.v-readout dt { color: var(--red-2); letter-spacing: .14em; }
.v-readout dd { margin: 0; color: #fff; letter-spacing: .06em; }
@media (max-width: 760px) {
  .v-left { display: none; }
  .v-hud { padding-left: clamp(18px, 3vw, 32px); }
  .v-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Bölümler ---------- */
.t .sec { border-top-color: var(--rule); }
.t .sec-head h2 { font-family: var(--f-t); text-transform: uppercase; letter-spacing: .02em; }
.t .tc { color: var(--red); font-family: var(--f-hud); }
.t .btn { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.t .btn-primary { background: var(--red); color: #1a0000; border-color: var(--red); }

/* Protokol */
.proto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: p; }
.proto li { position: relative; display: grid; gap: 6px; align-content: start; padding: 16px; background: var(--sheet); border: 1px solid var(--rule); border-top: 2px solid var(--red-dim); }
.proto li::after { content: ""; position: absolute; right: -10px; top: 26px; width: 10px; height: 2px; background: var(--red-dim); }
.proto li:last-child::after { display: none; }
.p-n { font-family: var(--f-hud); font-size: 12px; color: var(--red); }
.proto b { font-family: var(--f-t); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; }
.proto li > span:not(.p-n):not(.p-who) { font-size: var(--s-sm); color: var(--ink-2); }
.p-who { justify-self: start; margin-top: 4px; font-family: var(--f-hud); font-size: 11px; letter-spacing: .14em; padding: 2px 8px; border: 1px solid #ffd8d0; color: #ffd8d0; }
.p-ai { border-color: var(--red); color: var(--red); }
@media (max-width: 860px) { .proto { grid-template-columns: repeat(2, minmax(0, 1fr)); } .proto li::after { display: none; } }
@media (max-width: 480px) { .proto { grid-template-columns: minmax(0, 1fr); } }

/* Görev kayıtları */
.logs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lg-col { background: var(--sheet); border: 1px solid var(--rule); min-width: 0; }
.lg-col header { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); background: linear-gradient(90deg, rgba(255,42,26,.10), transparent); }
.lg-id { font-family: var(--f-hud); font-size: 11px; color: var(--red-2); }
.lg-col h3 { font-family: var(--f-t); font-size: 1.3rem; text-transform: uppercase; }
.lg-st { font-family: var(--f-hud); font-size: 10px; letter-spacing: .14em; color: #8affb0; }
.lg-ai .lg-st { color: var(--red); animation: pulse 1.4s steps(2) infinite; }
.lg-col ul { list-style: none; margin: 0; padding: 6px 14px 14px; display: grid; }
.lg-col li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.lg-col li:last-child { border-bottom: 0; }
.lg-col li b { font-family: var(--f-hud); font-weight: 400; font-size: 14px; color: #fff; letter-spacing: .02em; }
.lg-col li b::before { content: "> "; color: var(--red); }
.lg-col li span { font-size: var(--s-sm); color: var(--ink-2); }
.lg-ai { border-color: var(--red-dim); box-shadow: 0 0 0 1px rgba(255,42,26,.15), 0 20px 50px -30px rgba(255,42,26,.6); }
@media (max-width: 900px) { .logs { grid-template-columns: minmax(0, 1fr); } }

/* Tarayıcı */
.scanner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sc-in, .sc-out { display: grid; grid-template-rows: auto 1fr auto; background: var(--code-bg); border: 1px solid var(--rule); min-width: 0; }
.sc-out { grid-template-rows: auto auto 1fr auto; }
.sc-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-family: var(--f-hud); font-size: 11px; letter-spacing: .12em; color: var(--red-2); }
.sc-ex { font-family: var(--f-hud); font-size: 11px; letter-spacing: .08em; color: var(--ink-2); background: none; border: 1px solid var(--rule); padding: 3px 8px; cursor: pointer; }
.sc-ex:hover { color: #fff; border-color: var(--red-dim); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#sc-code { width: 100%; min-height: 360px; resize: vertical; border: 0; outline: 0; padding: 14px; background: transparent; color: #ffd8d0;
  font-family: var(--f-hud); font-size: 13px; line-height: 1.6; tab-size: 2; }
#sc-code:focus-visible { box-shadow: inset 0 0 0 1px var(--red); }
.sc-go { margin: 12px; justify-self: start; cursor: pointer; padding: 10px 26px; font-family: var(--f-t); font-weight: 700; font-size: 1.05rem; letter-spacing: .2em;
  color: #1a0000; background: var(--red); border: 0; box-shadow: 0 0 0 1px #000, 0 0 24px rgba(255,42,26,.5); }
.sc-go:hover { filter: brightness(1.12); }
.sc-go.busy { animation: pulse .5s steps(2) infinite; }
.threat { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--rule); font-family: var(--f-hud); font-size: 12px; color: var(--ink-2); }
.th-bar { height: 8px; background: #200608; border: 1px solid var(--rule); overflow: hidden; }
.th-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb199, var(--red)); transition: width .8s ease-out; }
.threat b { font-weight: 400; color: #fff; letter-spacing: .1em; min-width: 6em; text-align: right; }
.findings { list-style: none; margin: 0; padding: 6px 12px; display: grid; align-content: start; gap: 0; max-height: 440px; overflow: auto; }
.fd { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px dashed var(--rule); animation: fdIn .3s ease-out both; }
@keyframes fdIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.fd-l { font-family: var(--f-hud); font-size: 11px; letter-spacing: .1em; align-self: start; padding: 2px 0; text-align: center; border: 1px solid currentColor; }
.fd-crit .fd-l { color: #ff2a1a; } .fd-med .fd-l { color: #ff8a4d; } .fd-low .fd-l { color: #ffd0a0; }
.fd-t { font-family: var(--f-hud); color: #fff; font-size: 14px; }
.fd-t em { font-style: normal; color: var(--ink-2); font-size: 12px; margin-left: 6px; }
.fd-d { grid-column: 2; font-size: var(--s-sm); color: var(--ink-2); }
.fd-ok { grid-template-columns: minmax(0, 1fr); font-family: var(--f-hud); color: #8affb0; }
.sc-note { padding: 12px; border-top: 1px solid var(--rule); font-size: var(--s-xs); color: var(--ink-2); }
@media (max-width: 900px) { .scanner { grid-template-columns: minmax(0, 1fr); } #sc-code { min-height: 280px; } }

/* Yükseltmeler */
.ups { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--red-dim); }
.ups li { position: relative; display: grid; grid-template-columns: 5.5em 4em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 0 10px 20px; font-family: var(--f-hud); font-size: 14px; color: var(--ink-2); }
.ups li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--red-dim); }
.u-y { color: #fff; }
.u-v { color: var(--red-2); }
.u-now::before { background: var(--red) !important; border-color: var(--red) !important; box-shadow: 0 0 10px var(--red); }
.u-now { color: #fff; }
@media (max-width: 520px) { .ups li { grid-template-columns: 4.5em minmax(0, 1fr); } .u-v { display: none; } }

.t-end { display: grid; justify-items: center; text-align: center; gap: 18px; }
.t-end-h { font-family: var(--f-t); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 4.6vw, 3rem); color: #fff; text-shadow: 0 0 22px rgba(255,42,26,.5); }

@media (prefers-reduced-motion: reduce) {
  .v-scan::after, .v-rec i, .lg-ai .lg-st, .fd, .sc-go.busy { animation: none; }
  .th-bar i { transition: none; }
}

/* ---------- Konfederasyon ---------- */
.t .t-title { font-size: clamp(2.1rem, 5vw, 4.1rem); line-height: .96; max-width: 15ch; }
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ag { position: relative; display: grid; gap: 8px; align-content: start; padding: 18px; min-width: 0;
  background: linear-gradient(180deg, rgba(255,42,26,.06), transparent 60%), var(--sheet); border: 1px solid var(--rule); }
.ag::before { content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border-left: 2px solid var(--red); border-top: 2px solid var(--red); }
.ag::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-right: 2px solid var(--red-dim); border-bottom: 2px solid var(--red-dim); }
.ag-id { font-family: var(--f-hud); font-size: 12px; letter-spacing: .12em; color: var(--red); }
.ag h3 { font-family: var(--f-t); font-size: 1.4rem; text-transform: uppercase; letter-spacing: .02em; }
.ag p { font-size: var(--s-sm); color: var(--ink-2); }
.ag-st { justify-self: start; margin-top: 4px; font-family: var(--f-hud); font-size: 10px; letter-spacing: .16em; padding: 2px 8px; border: 1px solid var(--red-dim); color: var(--red-2); }
.ag-live { border-color: #8affb0; color: #8affb0; animation: pulse 1.6s steps(2) infinite; }
.ag-human { border-color: #ffd8d0; background: linear-gradient(180deg, rgba(255,216,208,.08), transparent 60%), var(--sheet); }
.ag-human .ag-id, .ag-human .ag-st { color: #ffd8d0; border-color: #ffd8d0; }
.ag-human::before { border-color: #fff; }
.road { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: linear-gradient(90deg, var(--red) 0 37%, var(--red-dim) 37%); }
.road li { position: relative; display: grid; gap: 4px; padding: 24px 12px 0 0; font-family: var(--f-hud); min-width: 0; }
.road li::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--red-dim); }
.road li.done::before { background: var(--red); border-color: var(--red); }
.road li.now::before { background: var(--red); border-color: #fff; box-shadow: 0 0 12px var(--red); }
.road b { font-weight: 400; color: #fff; font-size: 13px; letter-spacing: .1em; }
.road span { font-size: 13px; color: var(--ink-2); font-family: var(--f-body); }
.road li.now b::after { content: " ◂ NOW"; color: var(--red); }
@media (max-width: 900px) { .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .agents { grid-template-columns: minmax(0, 1fr); }
  .road { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-left: 22px; }
  .road::before { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(var(--red) 0 37%, var(--red-dim) 37%); }
  .road li { padding: 0; } .road li::before { left: -22px; top: 2px; }
}
@media (prefers-reduced-motion: reduce) { .ag-live { animation: none; } }
.ag-mine { color: #ffd8d0; letter-spacing: .08em; }
.ag:has(.ag-mine) { border-color: var(--red-dim); }
