:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f1f1f7;
  --text: #16161d;
  --muted: #62627a;
  --border: #e4e4ee;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --ok: #059669;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 4px 16px rgba(20, 20, 40, .05);
  color-scheme: light;
}
.dark {
  --bg: #0e0e14;
  --surface: #17171f;
  --surface-2: #1f1f2a;
  --text: #ececf3;
  --muted: #9a9ab0;
  --border: #2a2a38;
  --accent: #8b85ff;
  --accent-2: #b48cff;
  --accent-soft: #23223a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
kbd {
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { font-weight: 750; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.header-nav { display: flex; gap: 16px; flex: 1; overflow: hidden; }
.header-nav a { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.header-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.search-btn { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 16px; }
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 28px 20px; flex-wrap: wrap; }
.footer-inner p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.footer-inner nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.footer-inner nav a { color: var(--muted); }
@media (max-width: 860px) { .header-nav { display: none; } .search-btn .sb-text, .search-btn kbd { display: none; } .search-btn { padding: 7px 11px; } }

/* ---------- hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 14px; background: linear-gradient(135deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 26px; }
.hero-search { display: inline-flex; align-items: center; gap: 12px; width: min(560px, 100%); justify-content: space-between; padding: 15px 16px 15px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); color: var(--muted); font: inherit; font-size: 16px; cursor: pointer; }
.hero-search:hover { border-color: var(--accent); }
.badges { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.badges span { font-size: 13.5px; padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- grid / cards */
.cat-section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head a { font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-icon { font-size: 22px; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); }
.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-body strong { font-size: 15.5px; }
.card-body span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* ---------- pages */
.page { padding-top: 26px; }
.page.center { text-align: center; padding-top: 80px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.page h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 6px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 20px; margin-top: 28px; }
.tool-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.fav-btn { flex: none; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.fav-btn[aria-pressed="true"] { background: #fff7d6; border-color: #f5c84c; color: #8a6100; }
.dark .fav-btn[aria-pressed="true"] { background: #3a3012; color: #f5d57a; border-color: #8a6a1a; }
.privacy-note { font-size: 14px; color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); padding: 9px 14px; border-radius: 10px; margin-bottom: 16px; }
.tool-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); min-height: 140px; }
.loading { color: var(--muted); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr; } .tool-panel { padding: 16px; } }
.info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.info h2 { font-size: 17px; margin: 0 0 10px; }
.info ol { margin: 0; padding-left: 20px; color: var(--muted); }
.info li { margin: 5px 0; }
details { border-top: 1px solid var(--border); padding: 10px 0; }
details:first-of-type { border-top: 0; padding-top: 0; }
summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details p { color: var(--muted); margin: 8px 0 0; font-size: 14.5px; }

/* ---------- tool UI primitives (araç modülleri bunları kullanır) */
.dropzone { border: 2px dashed var(--border); border-radius: 14px; padding: 34px 20px; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 17px; margin-bottom: 4px; }
.dropzone span { color: var(--muted); font-size: 14px; }
.dropzone .dz-icon { font-size: 30px; display: block; margin-bottom: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.options { display: flex; gap: 16px 22px; flex-wrap: wrap; align-items: flex-end; padding: 14px 0; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
input[type=text], input[type=number], input[type=search], input[type=url], input[type=tel], input[type=email], select, textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; outline: none; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; min-height: 220px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.5; }
textarea.plain { font-family: inherit; font-size: 16px; }
input[type=range] { accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 13.5px; }
.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.file-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex: none; }
.file-item .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-item .name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .sub { font-size: 13px; color: var(--muted); }
.file-item .acts { display: flex; gap: 6px; flex: none; }
.mini { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px; }
.mini:hover { border-color: var(--accent); }
.mini:disabled { opacity: .35; cursor: default; }
.good { color: var(--ok); font-weight: 600; }
.bad { color: var(--err); font-weight: 600; }
.error { color: var(--err); }
.msg { padding: 10px 14px; border-radius: 10px; font-size: 14.5px; }
.msg.err { background: color-mix(in srgb, var(--err) 10%, transparent); color: var(--err); }
.msg.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.out-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.out-line code { flex: 1; font-size: 15.5px; word-break: break-all; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; transition: width .2s, background .2s; }
table.conv { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.conv td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.conv td:last-child { text-align: right; font-family: ui-monospace, Menlo, monospace; }
table.conv tr.active td { color: var(--accent); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--surface); color: var(--muted); padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------- search modal */
.search-modal { position: fixed; inset: 0; background: rgba(10, 10, 20, .45); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.search-modal[hidden] { display: none; }
.search-panel { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: hidden; }
.search-panel input { width: 100%; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 18px 20px; font-size: 17px; box-shadow: none !important; }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: 55vh; overflow: auto; }
.search-results li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.search-results li a:hover, .search-results li.sel a { background: var(--accent-soft); text-decoration: none; }
.search-results .ri { font-size: 20px; }
.search-results .rt { display: flex; flex-direction: column; }
.search-results .rt small { color: var(--muted); }
.search-results .empty { padding: 16px; color: var(--muted); text-align: center; }

/* ---------- toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14.5px; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 2. paket bileşenleri */
.result-big { font-size: clamp(28px, 5vw, 40px); font-weight: 750; line-height: 1.1; letter-spacing: -.01em; }
.calc-card { background: var(--surface-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.calc-card h3 { margin: 0; font-size: 15.5px; }
.calc-card .row input { width: 130px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-family: ui-monospace, Menlo, monospace; text-align: right; word-break: break-all; }
.diff { border: 1px solid var(--border); border-radius: 12px; overflow: auto; max-height: 70vh; font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.diff div { display: grid; grid-template-columns: 44px 44px 18px 1fr; white-space: pre-wrap; word-break: break-word; }
.diff span { padding: 0 6px; }
.diff .ln { color: var(--muted); text-align: right; user-select: none; background: var(--surface-2); }
.diff .add { background: color-mix(in srgb, #16a34a 14%, transparent); }
.diff .del { background: color-mix(in srgb, #dc2626 14%, transparent); }
.diff .gap { color: var(--muted); background: var(--surface-2); text-align: center; display: block; padding: 2px; }
.hl { white-space: pre-wrap; word-break: break-word; font: 14px/1.6 ui-monospace, Menlo, Consolas, monospace; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-height: 80px; max-height: 50vh; overflow: auto; }
.hl mark { background: color-mix(in srgb, #facc15 55%, transparent); color: inherit; border-radius: 3px; }
.hl mark:nth-of-type(even) { background: color-mix(in srgb, #38bdf8 40%, transparent); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.swatch { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface); padding: 0; font: inherit; color: var(--text); }
.swatch i { display: block; height: 44px; }
.swatch span { display: block; font-size: 12px; padding: 4px; font-family: ui-monospace, Menlo, monospace; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.badge.pass { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.fail { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.jwt-part { border-radius: 10px; padding: 12px; margin: 0; overflow: auto; font: 13.5px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; background: var(--surface-2); }
.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; user-select: none; line-height: 0; }
.crop-stage img { max-width: 100%; max-height: 65vh; display: block; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); cursor: move; outline: 1px solid rgba(0, 0, 0, .4); }
.crop-box::before, .crop-box::after { content: ''; position: absolute; inset: 33.33% 0; border-top: 1px solid rgba(255, 255, 255, .5); border-bottom: 1px solid rgba(255, 255, 255, .5); pointer-events: none; }
.crop-box::after { inset: 0 33.33%; border: 0; border-left: 1px solid rgba(255, 255, 255, .5); border-right: 1px solid rgba(255, 255, 255, .5); }
.crop-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; cursor: nwse-resize; z-index: 1; }
.crop-wrap { overflow: hidden; display: flex; justify-content: center; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; border-radius: 12px; padding: 10px; }
