/* Protokol Gezgini — mavi çizim (blueprint) teması */
:root {
  --bg: #fdfdfe; --panel: #fefeff; --panel-2: #f5f8fe;
  --ink: #0032a0; --ink-strong: #00238a; --ink-soft: #5a73a8; --ink-muted: #7d96c6;
  --line: #6f94c9; --line-mid: #c8d6ec; --line-soft: #e3e9f3; --grid: #e8eef9;
  --hl: #e6eefc; --hl-strong: #cfe0fb;
  --blue: #1f6fe8; --green: #00a86b; --amber: #f8b900; --purple: #7656e0; --teal: #0e95a3; --red: #e5484d; --pink: #e0439a; --gray: #8495b2;
  --active: #1f5fe0; --active-fg: #ffffff;
  --row-active-bg: #fff1f1; --row-active-line: #e5484d;
  --face-top: #ffffff; --face-left: #dfe9fb; --face-right: #c3d4f5; --face-dark: #9fbcf0;
  --shadow: 0 1px 0 rgba(0, 50, 160, .06);
  --font: "Iosevka", "Cascadia Mono", "SF Mono", Consolas, "DejaVu Sans Mono", Menlo, ui-monospace, monospace;
  --side-w: 300px; --over-w: 340px; --pkt-h: 262px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a111f; --panel: #0f1829; --panel-2: #131f35;
  --ink: #8fb0ff; --ink-strong: #bcd0ff; --ink-soft: #8da4d3; --ink-muted: #6c83b3;
  --line: #355494; --line-mid: #28406f; --line-soft: #1a2944; --grid: #14213a;
  --hl: #16264a; --hl-strong: #1d3466;
  --blue: #4c8dff; --green: #19d28f; --amber: #f6c33a; --purple: #9a82ff; --teal: #28c4d4; --red: #ff6b70; --pink: #f26cb8; --gray: #8392b3;
  --active: #3b78f5; --active-fg: #ffffff;
  --row-active-bg: #2a1620; --row-active-line: #ff6b70;
  --face-top: #1c2c4d; --face-left: #172542; --face-right: #1f3159; --face-dark: #2c4473;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 13px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--active); outline-offset: 1px; }
[hidden] { display: none !important; }
svg text { font-family: var(--font); }
.ui-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------ düzen */
.app { height: 100vh; display: flex; flex-direction: column; padding: 10px 14px 12px; gap: 10px; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; flex-wrap: nowrap; }
.workspace {
  flex: 1; min-height: 0; display: grid; gap: 12px;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--over-w);
  grid-template-rows: minmax(0, 1fr) var(--pkt-h);
  grid-template-areas: "side sim over" "side pkt pkt";
}
.sidebar { grid-area: side; }
.simulation { grid-area: sim; }
.overview { grid-area: over; }
.packets { grid-area: pkt; }
.app[data-sidebar="0"] .workspace { grid-template-columns: 0 minmax(0, 1fr) var(--over-w); gap: 0 12px; }
.app[data-sidebar="0"] .sidebar { display: none; }
.app[data-ins="1"] .workspace { grid-template-rows: minmax(0, 1fr) 196px; }
.app[data-focus="1"] .workspace { grid-template-columns: 1fr; grid-template-rows: 1fr; grid-template-areas: "sim"; }
.app[data-focus="1"] .sidebar, .app[data-focus="1"] .overview, .app[data-focus="1"] .packets { display: none; }

.panel { background: var(--panel); border: 1.5px solid var(--line); min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-mid); flex: none; flex-wrap: wrap; }
.panel-title { margin: 0; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-strong); font-weight: 700; }
.panel-title.sm { font-size: 15px; }

/* ------------------------------------------------------------ üst çubuk */
.brand { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; }
.brand .mark { width: 46px; height: 46px; flex: none; }
.brand .t1 { display: block; font-size: 22px; font-weight: 700; letter-spacing: .09em; color: var(--ink-strong); line-height: 1.05; white-space: nowrap; }
.brand .t1 i { font-style: italic; }
.brand .t2 { display: block; font-size: 10.5px; letter-spacing: .26em; color: var(--ink-soft); white-space: nowrap; }
.osi { display: flex; align-items: flex-end; gap: 6px; margin-left: 8px; }
.osi .lbl { font-size: 10px; letter-spacing: .14em; color: var(--ink-strong); font-weight: 700; padding-bottom: 6px; white-space: nowrap; }
.osi .cells { display: flex; gap: 4px; position: relative; padding-top: 14px; }
.osi .cur { position: absolute; top: -1px; font-size: 10px; letter-spacing: .12em; color: var(--ink-strong); font-weight: 700; white-space: nowrap; right: 0; }
.osi button { width: 26px; height: 24px; border: 1px solid var(--line-mid); background: var(--panel); color: var(--ink-soft); font-size: 11px; }
.osi button.is-here { border-color: var(--active); color: var(--active); font-weight: 700; }
.osi button.is-filter, .osi button.is-here.is-filter { background: var(--active); color: var(--active-fg); border-color: var(--active); }
.spacer { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 8px; min-width: 210px; height: 36px; padding: 0 10px; background: var(--panel); border: 1.5px solid var(--line-mid); color: var(--ink-soft); }
.search-btn:hover { border-color: var(--ink); }
.search-btn svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search-btn span { white-space: nowrap; }
.search-btn kbd, .kbd { white-space: nowrap; margin-left: auto; font: inherit; font-size: 10px; border: 1px solid var(--line-mid); padding: 1px 6px; color: var(--ink-soft); background: var(--panel-2); }
.tool-btn { width: 36px; height: 36px; display: grid; place-items: center; background: var(--panel); border: 1.5px solid var(--line-mid); color: var(--ink); padding: 0; }
.tool-btn:hover, .tool-btn.is-on { border-color: var(--ink); background: var(--hl); }
.tool-btn svg, .btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.credit { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-strong); text-decoration: none; line-height: 1.3; text-align: left; white-space: nowrap; }
.credit span { display: block; color: var(--ink-soft); font-size: 9.5px; }
.credit:hover { text-decoration: underline; }
.menu { position: relative; }
.menu-btn { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--panel); border: 1.5px solid var(--line-mid); font-weight: 700; color: var(--ink); }
.menu-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.menu-list { position: absolute; right: 0; top: 40px; z-index: 30; min-width: 150px; background: var(--panel); border: 1.5px solid var(--ink); box-shadow: 0 8px 24px rgba(0, 30, 100, .18); padding: 4px; }
.menu-list button { display: flex; gap: 10px; width: 100%; padding: 7px 10px; background: none; border: 0; text-align: left; color: var(--ink); }
.menu-list button:hover, .menu-list button.is-on { background: var(--hl); }
.menu-list b { width: 24px; font-weight: 700; }
.seg { display: flex; border: 1.5px solid var(--ink); }
.seg button { width: 36px; height: 33px; display: grid; place-items: center; background: var(--panel); border: 0; color: var(--ink); padding: 0; }
.seg button.is-active { background: var(--active); color: var(--active-fg); }
.seg svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drawer-btn { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--panel); border: 1.5px solid var(--ink); color: var(--ink-strong); font-weight: 700; letter-spacing: .08em; }
.drawer-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ------------------------------------------------------------ butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--panel); border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; letter-spacing: .08em; font-size: 12px; text-transform: uppercase; white-space: nowrap; }
.btn:hover { background: var(--hl); }
.btn.icon { width: 32px; padding: 0; }
.btn.primary { background: var(--active); border-color: var(--active); color: var(--active-fg); min-width: 98px; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { height: 26px; font-size: 11px; padding: 0 9px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.speed { min-width: 58px; position: relative; }

/* ------------------------------------------------------------ kenar çubuğu */
.sidebar .panel-head { padding: 12px 14px 8px; border: 0; }
.drawer-close { display: none; margin-left: auto; width: 30px; height: 30px; background: var(--panel); border: 1.5px solid var(--line-mid); color: var(--ink); }
.tabs { display: flex; margin: 0 12px 8px; border: 1px solid var(--line); flex: none; }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 2px; background: var(--panel); border: 0; border-right: 1px solid var(--line-mid); font-size: 10.5px; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; }
.tab:last-child { border-right: 0; }
.tab .n { font-size: 9.5px; background: var(--hl); color: var(--ink); padding: 0 5px; border-radius: 9px; }
.tab.is-active { background: var(--panel); color: var(--ink-strong); box-shadow: inset 0 -3px 0 var(--active); }
.tab.is-active .n { background: var(--active); color: var(--active-fg); }
.proto-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 12px 12px; }
.proto-item { border-bottom: 1px solid var(--line-soft); }
.proto-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; background: none; border: 1.5px solid transparent; text-align: left; color: var(--ink); }
.proto-row:hover { background: var(--hl); }
.proto-row .dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink-muted); flex: none; }
.proto-row .nm { flex: 1; min-width: 0; line-height: 1.25; }
.proto-row .nm b { display: block; font-size: 13px; color: var(--ink-strong); }
.proto-row .nm small { display: block; font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proto-row .chev { width: 16px; height: 16px; stroke: var(--ink-strong); fill: none; stroke-width: 2; flex: none; transition: transform .2s var(--ease); }
.proto-item.is-active > .proto-row { background: var(--row-active-bg); border-color: var(--row-active-line); }
.proto-item.is-active > .proto-row .dot { background: var(--amber); border-color: var(--amber); }
.proto-item.is-active > .proto-row .chev { transform: rotate(90deg); }
.proto-item.is-soon .proto-row { opacity: .5; pointer-events: none; }
.steps { padding: 8px 6px 10px 12px; position: relative; }
.step-btn { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 4px 4px; background: none; border: 0; text-align: left; position: relative; color: var(--ink); }
.step-btn:hover { background: var(--hl); }
.step-btn .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--line-mid); color: var(--panel); flex: none; z-index: 1; }
.step-btn:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 26px; bottom: -4px; border-left: 2px dotted var(--line-mid); }
.step-btn .tx { line-height: 1.25; padding-top: 1px; min-width: 0; }
.step-btn .tx b { display: block; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-strong); text-transform: uppercase; }
.step-btn .tx small { display: block; font-size: 10.5px; color: var(--ink-soft); }
.step-btn.is-done .num { background: var(--blue); }
.step-btn.is-current .num { background: var(--green); box-shadow: 0 0 0 4px rgba(0, 168, 107, .22); }
.step-btn.is-current .tx b { color: var(--green); }
.empty-note { padding: 18px 14px; color: var(--ink-soft); font-size: 12px; }

/* ------------------------------------------------------------ simülasyon */
.simulation { overflow: hidden; }
.sim-tools { position: absolute; left: 12px; top: 12px; z-index: 5; display: flex; border: 1.5px solid var(--line-mid); background: var(--panel); }
.sim-tools button { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: none; border: 0; font-weight: 700; letter-spacing: .08em; font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; }
.sim-tools button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sim-tools button.is-active { background: var(--active); color: var(--active-fg); }
.sim-note { position: absolute; right: 12px; top: 12px; z-index: 5; max-width: 46%; text-align: right; font-size: 11px; color: var(--ink-soft); }
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; background-position: -1px -1px; }
.stage svg.net { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .seqwrap { position: absolute; inset: 0; overflow: auto; }
.seqhead { position: sticky; top: 0; z-index: 3; padding-top: 50px; background: var(--panel); border-bottom: 1px solid var(--line-mid); }
.stage .seqwrap svg { display: block; margin: 0 auto; }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); }

.link { stroke: var(--line); stroke-width: 2; stroke-dasharray: 7 6; fill: none; opacity: .85; }
.link.is-hot { stroke: var(--blue); stroke-dasharray: none; stroke-width: 3; opacity: 1; }
.node { transition: opacity .35s var(--ease); }
.node.is-dim { opacity: .42; }
.node .ico * { vector-effect: non-scaling-stroke; }
.ico .s { stroke: var(--ink); stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.ico .f-top { fill: var(--face-top); } .ico .f-left { fill: var(--face-left); } .ico .f-right { fill: var(--face-right); } .ico .f-dark { fill: var(--face-dark); }
.ico .f-none { fill: none; }
.ico .led { fill: var(--ink); stroke: none; }
.ico .led.g { fill: var(--green); } .ico .led.a { fill: var(--amber); }
.node.is-hot .ico .s { stroke: var(--blue); }
.node.is-hot .halo { opacity: 1; }
.node .halo { fill: none; stroke: var(--blue); stroke-width: 2; stroke-dasharray: 5 5; opacity: 0; transition: opacity .25s; }
.node .nm { font-size: 14px; font-weight: 700; fill: var(--ink-strong); text-anchor: middle; paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.node .ip { font-size: 12.5px; fill: var(--ink-soft); text-anchor: middle; paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.callout rect { fill: var(--panel); stroke: var(--blue); stroke-width: 1.8; }
.callout path { fill: var(--panel); stroke: var(--blue); stroke-width: 1.8; }
.callout text { font-size: 12.5px; font-weight: 700; fill: var(--ink-strong); text-anchor: middle; }
.callout { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pkt-dot circle { stroke: var(--panel); stroke-width: 2.5; }
.pkt-dot text { font-size: 11.5px; font-weight: 700; text-anchor: middle; fill: var(--ink-strong); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }
.ripple { fill: none; stroke-width: 2.5; animation: ripple .8s ease-out forwards; }
@keyframes ripple { from { r: 8; opacity: .9; } to { r: 44; opacity: 0; } }
.zone rect { fill: none; stroke: var(--line-mid); stroke-width: 1.5; stroke-dasharray: 3 5; }
.zone text { font-size: 11px; fill: var(--ink-muted); letter-spacing: .1em; }

/* sıralama (ladder) */
.seq .lane { stroke: var(--line-mid); stroke-width: 1.6; stroke-dasharray: 5 5; }
.seq .head rect { fill: var(--panel); stroke: var(--ink); stroke-width: 1.6; }
.seq .head text { font-size: 12.5px; font-weight: 700; fill: var(--ink-strong); text-anchor: middle; }
.seq .head .ip { font-weight: 400; fill: var(--ink-soft); font-size: 11px; }
.seq .arrow { cursor: pointer; }
.seq .arrow line { stroke-width: 2.2; }
.seq .arrow .lbl { font-size: 12px; fill: var(--ink-strong); }
.seq .arrow .tm { font-size: 10.5px; fill: var(--ink-muted); }
.seq .arrow:hover .lbl { text-decoration: underline; }
.seq .arrow.is-future { opacity: .22; }
.seq .arrow.is-cur line { stroke-width: 3.2; }
.seq .arrow .hit { fill: transparent; }
.seq .stepbar { fill: var(--hl); }
.seq .steplbl { font-size: 10.5px; fill: var(--ink-soft); letter-spacing: .08em; font-weight: 700; }

/* ------------------------------------------------------------ genel bakış */
.overview { overflow: hidden; }
.overview .body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px 16px; }
.ov-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.ov-title h3 { margin: 0; font-size: 30px; letter-spacing: .06em; color: var(--ink-strong); line-height: 1.1; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .12em; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #d8f5e8; color: #0b7a4b; flex: none; }
:root[data-theme="dark"] .tag { background: #123a2b; color: #34e0a0; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ov-sub { color: var(--ink-strong); font-weight: 700; margin: 2px 0 8px; }
.ov-text { color: var(--ink); margin: 0 0 12px; line-height: 1.55; }
.kv { border-top: 1px solid var(--line-mid); }
.kv > div { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.kv dt { margin: 0; font-size: 10.5px; letter-spacing: .1em; color: var(--ink-strong); font-weight: 700; text-transform: uppercase; padding-top: 1px; }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.stepcard .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stepcard .eyebrow { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-soft); font-weight: 700; }
.stepcard .count { display: inline-block; margin-top: 2px; font-size: 11px; color: var(--green); font-weight: 700; letter-spacing: .1em; }
.stepcard h3 { margin: 2px 0 2px; font-size: 22px; letter-spacing: .05em; color: var(--ink-strong); }
.stepcard .progress { display: flex; gap: 4px; margin: 10px 0 12px; }
.stepcard .progress i { flex: 1; height: 4px; background: var(--line-mid); }
.stepcard .progress i.on { background: var(--blue); } .stepcard .progress i.cur { background: var(--green); }

/* ------------------------------------------------------------ paket akışı */
.packets { overflow: hidden; }
.packets .panel-head { gap: 14px; padding: 8px 14px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); flex: 1; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ctrl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.speed-pop { position: absolute; bottom: 36px; left: 0; background: var(--panel); border: 1.5px solid var(--ink); z-index: 20; padding: 3px; }
.speed-pop button { display: block; width: 100%; padding: 5px 14px; background: none; border: 0; text-align: left; color: var(--ink); }
.speed-pop button:hover, .speed-pop button.is-on { background: var(--hl); }
.table-wrap { flex: 1; min-height: 0; overflow: auto; }
table.pk { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pk th { position: sticky; top: 0; z-index: 1; background: var(--panel); text-align: left; font-size: 10.5px; letter-spacing: .1em; color: var(--ink-strong); padding: 7px 12px; border-bottom: 1px solid var(--line-mid); white-space: nowrap; }
.pk td { padding: 6px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; color: var(--ink); }
.pk td.info { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pk td.sz, .pk th.sz { text-align: right; }
.pk tr.row { cursor: pointer; }
.pk tr.row:hover { background: var(--hl); }
.pk tr.row.is-inspected { background: var(--hl-strong); box-shadow: inset 3px 0 var(--active); }
.pk tr.row.is-new { animation: rowin .6s var(--ease); }
.pk tr.row.is-flight td { color: var(--ink-muted); }
@keyframes rowin { from { background: var(--hl-strong); transform: translateX(-6px); opacity: .2; } to { transform: none; } }
.pk .no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c, var(--gray)); color: #fff; font-size: 11px; font-weight: 700; }
.pk .empty { padding: 22px 14px; color: var(--ink-soft); }
.pk .lock { display: inline-block; vertical-align: -3px; margin-right: 6px; color: var(--ink-soft); }
.pk .lock svg { width: 14px; height: 14px; }
.pk .seg-note { color: var(--ink-muted); font-size: 11px; margin-left: 6px; }

/* ------------------------------------------------------------ inspector */
.inspector { position: absolute; inset: 0; z-index: 8; background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.ins-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line-mid); flex: none; }
.ins-head .no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--gray)); color: #fff; font-weight: 700; }
.ins-head .tt { min-width: 0; flex: 1; }
.ins-head .tt b { display: block; font-size: 16px; letter-spacing: .06em; color: var(--ink-strong); }
.ins-head .tt small { display: block; color: var(--ink-soft); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-sub { padding: 4px 14px 0; font-style: italic; color: var(--ink-soft); font-size: 11.5px; flex: none; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ins-tabs { display: flex; gap: 0; }
.ins-tabs button { padding: 3px 10px; font-size: 11px; background: var(--panel); border: 1px solid var(--line-mid); color: var(--ink-soft); font-style: normal; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ins-tabs button.is-active { background: var(--active); color: var(--active-fg); border-color: var(--active); }
.layerbar { display: flex; margin: 6px 14px 6px; height: 32px; flex: none; gap: 2px; }
.layerbar button[style*="--amber"], .layerbar button[style*="--teal"] { color: #14213d; }
.layerbar button { min-width: 38px; border: 0; padding: 2px 4px 0; text-align: left; color: #fff; background: var(--c); position: relative; overflow: hidden; }
.layerbar button b { display: block; font-size: 11px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layerbar button small { display: block; font-size: 10px; opacity: .9; }
.layerbar button.is-trailer { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .25) 0 4px, transparent 4px 8px); }
.layerbar button:hover { filter: brightness(1.12); }
.ins-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; border-top: 1px solid var(--line-mid); }
.ins-fields { overflow: auto; padding: 4px 14px 14px; min-width: 0; }
.ins-hex { overflow: auto; padding: 8px 12px 14px 12px; border-left: 1px solid var(--line-mid); background: var(--panel-2); min-width: 0; }
.lay { margin-top: 12px; }
.lay > h4 { margin: 0; padding: 6px 0; font-size: 13.5px; color: var(--ink-strong); border-bottom: 2px solid var(--c, var(--ink)); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; cursor: default; }
.lay > h4 em { font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: 11.5px; }
.frow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; padding: 6px 0 6px 2px; border-bottom: 1px dotted var(--line-mid); }
.frow:hover, .frow.hl { background: var(--hl); }
.frow .fn { font-weight: 700; color: var(--ink-strong); font-size: 12px; overflow-wrap: anywhere; }
.frow .fv { color: var(--ink); overflow-wrap: anywhere; }
.frow .fd { grid-column: 2; color: var(--ink-soft); font-size: 11.5px; line-height: 1.4; }
.frow.sub { padding-left: 16px; border-bottom-style: none; }
.frow.sub .fn { font-weight: 400; color: var(--ink-soft); }
.frow.depth-2 { padding-left: 30px; }
.frow.depth-3 { padding-left: 44px; }
.badge-ex { display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 9px; letter-spacing: .08em; background: #fff1cc; color: #7a5a00; border-radius: 2px; vertical-align: 1px; font-weight: 700; }
:root[data-theme="dark"] .badge-ex { background: #4a3b10; color: #ffd466; }
.hexhead { font-size: 10.5px; letter-spacing: .1em; color: var(--ink-strong); font-weight: 700; margin-bottom: 6px; white-space: nowrap; }
.hexhead span { font-weight: 400; color: var(--ink-soft); }
.hexgrid { display: grid; grid-template-columns: auto auto auto; gap: 0 12px; font-size: 12px; }
.hexrow { display: contents; }
.hexrow .off { color: var(--ink-muted); }
.hexrow .hx, .hexrow .as { white-space: nowrap; }
.hexrow .hx span, .hexrow .as span { display: inline-block; }
.hexrow .hx span { width: 1.9ch; text-align: center; }
.hexrow .hx span:nth-child(8) { margin-right: .7ch; }
.hexrow .as span { width: 1ch; text-align: center; color: var(--ink-soft); }
.hexgrid span.b { color: var(--ink); }
.hexgrid span.b.syn { background-image: repeating-linear-gradient(135deg, var(--line-mid) 0 2px, transparent 2px 4px); }
.hexgrid span.b.hl { background: var(--active); color: var(--active-fg); }
.hexgrid span.b.lay-hl { background: var(--hl-strong); }
.ins-foot { flex: none; padding: 6px 14px; border-top: 1px solid var(--line-mid); display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); }
.ins-foot .hat { display: inline-block; width: 18px; height: 8px; vertical-align: middle; margin-right: 6px; background-image: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 4px); }

/* ------------------------------------------------------------ diyaloglar */
dialog.dialog { padding: 0; border: 1.5px solid var(--ink); background: var(--panel); color: var(--ink); max-width: min(560px, 94vw); width: 100%; box-shadow: 0 20px 60px rgba(0, 20, 80, .35); }
dialog.dialog::backdrop { background: rgba(8, 20, 60, .35); backdrop-filter: blur(1px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-mid); }
.dialog-title { margin: 0; font-size: 16px; letter-spacing: .1em; color: var(--ink-strong); }
.keys { padding: 8px 16px 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.keys .k { display: flex; gap: 4px; justify-content: flex-end; }
.keys kbd { font: inherit; font-size: 11px; padding: 2px 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-strong); min-width: 24px; text-align: center; }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-mid); }
.pal-input svg { width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; }
.pal-input input { flex: 1; border: 0; background: none; color: var(--ink-strong); font: inherit; font-size: 15px; outline: none; }
.pal-list { max-height: 50vh; overflow: auto; padding: 6px; }
.pal-item { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; color: var(--ink); }
.pal-item.is-sel, .pal-item:hover { background: var(--hl); }
.pal-item b { color: var(--ink-strong); min-width: 120px; }
.pal-item small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .lv { margin-left: auto; font-size: 10px; border: 1px solid var(--line-mid); padding: 0 5px; color: var(--ink-soft); }
.pal-foot { display: flex; gap: 18px; padding: 8px 16px; border-top: 1px solid var(--line-mid); color: var(--ink-soft); font-size: 11px; }
.scrim { display: none; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink-strong); color: var(--panel); padding: 8px 16px; z-index: 50; font-size: 12px; }

/* ------------------------------------------------------------ duyarlı */
@media (max-width: 1420px) {
  .credit { display: none; }
}
@media (max-width: 1260px) {
  :root { --side-w: 270px; --over-w: 300px; }
  .credit { display: none; }
  .search-btn { min-width: 150px; }
}
@media (max-width: 1060px) {
  .app { padding: 8px 10px 10px; }
  .workspace, .app[data-sidebar="0"] .workspace { grid-template-columns: minmax(0, 1fr) var(--over-w); grid-template-areas: "sim over" "pkt pkt"; gap: 10px; }
  .sidebar, .app[data-sidebar="0"] .sidebar { display: flex; position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 8px 0 30px rgba(0, 20, 80, .25); }
  .app[data-drawer="1"] .sidebar { transform: none; }
  .app[data-drawer="1"] .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8, 20, 60, .35); }
  .drawer-btn { display: inline-flex; }
  .drawer-close { display: block; }
  .tool-btn.list-btn { display: none; }
  .osi .lbl { display: none; }
}
@media (max-width: 760px) {
  html, body { height: auto; }
  .app { height: auto; min-height: 100vh; }
  .topbar { flex-wrap: wrap; row-gap: 8px; gap: 8px; }
  .drawer-btn { font-size: 0; height: 36px; padding: 0 9px; }
  .brand .t2 { display: none; }
  .brand .mark { width: 34px; height: 34px; }
  .brand .t1 { font-size: 15px; }
  .osi { order: 9; width: 100%; margin: 0; overflow-x: auto; }
  .search-btn { min-width: 0; width: 36px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .tool-btn { display: none; }
  .menu-btn { height: 32px; }
  .seg button { width: 32px; height: 29px; }
  .stage { overflow: auto; }
  .nethost { position: relative !important; inset: auto !important; width: 700px; height: 434px; margin: 0 auto; }
  .workspace, .app[data-sidebar="0"] .workspace { display: flex; flex-direction: column; gap: 10px; }
  .simulation { height: 58vh; min-height: 430px; flex: none; }
  .overview { max-height: none; }
  .overview .body { overflow: visible; }
  .packets { height: 340px; flex: none; }
  .frow { grid-template-columns: 110px minmax(0, 1fr); }
  .ins-body { grid-template-columns: 1fr; overflow: auto; }
  .ins-hex { border-left: 0; border-top: 1px solid var(--line-mid); }
  .sim-note { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
