/* bnc7.dev — whois & sözlük */

:root {
  --bg: #0e1014;
  --bg-elev: #14171d;
  --bg-inset: #0a0c0f;
  --border: #252a33;
  --border-strong: #353b47;
  --text: #d9dce2;
  --text-strong: #f3f4f6;
  --muted: #8b93a1;
  --faint: #5c6370;
  --accent: #6fdc8c;
  --accent-ink: #0b2615;
  --amber: #e5b567;
  --danger: #ff7b72;
  --info: #79c0ff;
  --focus: #6fdc8c;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--info); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

code, pre, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .08em .35em;
  overflow-wrap: anywhere;
}
pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: .86rem;
}

.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 6px 10px; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo {
  font-family: var(--mono); font-weight: 600; color: var(--text-strong); text-decoration: none; font-size: 1rem;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.logo .tilde { color: var(--accent); margin-right: 2px; }
.logo .cursor {
  display: inline-block; width: .55em; height: 1.05em; margin-left: 4px; background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .logo .cursor { animation: none; } }
.site-nav { display: flex; gap: 4px; font-family: var(--mono); font-size: .9rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-strong); background: var(--bg-elev); }

main { flex: 1; padding-top: 40px; padding-bottom: 64px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); color: var(--faint); font: .82rem/1.6 var(--mono); }
.site-footer .wrap { padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--muted); }

/* typography */
h1, h2, h3 { color: var(--text-strong); line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin: 0 0 .4em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.08rem; margin: 1.8em 0 .5em; }
h2[id], h3[id] { scroll-margin-top: 20px; }
p, ul, ol { margin: 0 0 1.05em; }
li + li { margin-top: .3em; }
.lead { font-size: 1.12rem; color: var(--text-strong); }
blockquote { margin: 1.2em 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .93rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-family: var(--mono); font-size: .8rem; text-transform: lowercase; }
tr:target td { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.kicker { font-family: var(--mono); font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
.kicker .p { color: var(--accent); }

/* breadcrumbs */
.crumbs { font: .82rem var(--mono); color: var(--faint); margin-bottom: 24px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text-strong); }

/* article */
.doc { max-width: 720px; }
.doc header { margin-bottom: 28px; }
.doc h1 code { font-size: .85em; background: none; border: 0; padding: 0; color: var(--accent); }
.toc {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev);
  padding: 14px 18px; margin: 0 0 32px; font-size: .92rem;
}
.toc p { font: 600 .78rem var(--mono); color: var(--muted); margin: 0 0 6px; text-transform: lowercase; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--info); text-decoration: underline; }
.related { margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--border-strong); }
.related h2 { margin-top: 0; font-size: 1rem; font-family: var(--mono); color: var(--muted); }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.related li + li { margin: 0; }
.related a {
  display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  text-decoration: none; color: var(--text); background: var(--bg-elev);
}
.related a:hover { border-color: var(--border-strong); color: var(--text-strong); }
.cta {
  margin-top: 32px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.cta p { margin: 0; color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: 600 .9rem var(--mono);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { border-color: var(--muted); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* glossary index */
.term-groups { display: grid; gap: 40px; margin-top: 32px; }
.term-group h2 { margin: 0 0 12px; font-family: var(--mono); font-size: 1rem; color: var(--muted); }
.term-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.term-list li + li { margin: 0; }
.term-list a {
  display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev); text-decoration: none; color: var(--text);
}
.term-list a:hover { border-color: var(--border-strong); }
.term-list strong { display: block; color: var(--text-strong); margin-bottom: 4px; font-weight: 600; }
.term-list .code-title { font-family: var(--mono); font-size: .92rem; }
.term-list span { display: block; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ---------- lookup tool ---------- */
.hero h1 { margin-bottom: .25em; }
.hero .sub { color: var(--muted); max-width: 620px; margin-bottom: 28px; }

.term-form {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px 8px 8px 16px; font-family: var(--mono);
}
.term-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.term-form label { color: var(--accent); white-space: nowrap; font-size: .95rem; user-select: none; }
.term-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-strong);
  font: 1.05rem var(--mono); padding: 8px 0; outline: none;
}
.term-form input::placeholder { color: var(--faint); }
.examples { margin: 12px 0 0; font: .82rem var(--mono); color: var(--faint); }
.examples a { color: var(--muted); margin-right: 10px; text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.examples a:hover { color: var(--text-strong); }

.result { margin-top: 32px; }
.result:empty { display: none; }

.panel { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-elev); overflow: hidden; }
.panel-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); font: .85rem var(--mono); background: var(--bg-inset);
}
.panel-head .cmd { color: var(--text-strong); overflow-wrap: anywhere; }
.panel-head .cmd .p { color: var(--accent); }
.panel-head .meta { color: var(--faint); font-size: .78rem; }

.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button {
  font: .85rem var(--mono); color: var(--muted); background: none; border: 0; padding: 8px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--text-strong); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text-strong); }
.tabpanel { padding: 20px 16px; }
.tabpanel[hidden] { display: none; }

.kv { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
.kv dt { color: var(--muted); font: .82rem/1.9 var(--mono); padding-right: 12px; }
.kv dt a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--faint); }
.kv dt a:hover { color: var(--info); }
.kv dd { color: var(--text-strong); overflow-wrap: anywhere; min-width: 0; }
.kv dd .dim { color: var(--muted); font-size: .88rem; }
.kv dd .reason { margin-top: 4px; line-height: 1.5; max-width: 60ch; }
.kv dd .reason-src { margin-top: 2px; font-family: var(--mono); font-size: .78rem; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .kv dd { padding-top: 2px; }
}

.badge {
  display: inline-block; font: 600 .74rem/1.2 var(--mono); padding: 3px 8px; border-radius: 999px;
  border: 1px solid currentColor; margin-left: 6px; vertical-align: 1px; white-space: nowrap;
}
.badge.ok { color: var(--accent); }
.badge.warn { color: var(--amber); }
.badge.bad { color: var(--danger); }
.badge.info { color: var(--info); }

.mono { font-family: var(--mono); font-size: .92rem; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li + li { margin-top: 2px; }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.status-list li + li { margin: 0; }
.status-item { display: grid; gap: 2px; }
.status-item a, .status-item .code { font: .9rem var(--mono); color: var(--text-strong); }
.status-item a { text-decoration-color: var(--faint); }
.status-item a:hover { color: var(--info); }
.status-item span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.status-item.warn a, .status-item.warn .code { color: var(--amber); }
.status-item.bad a, .status-item.bad .code { color: var(--danger); }

.notice { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); }
.notice.error { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.notice.error strong { color: var(--danger); }
.notice.free strong { color: var(--accent); }
.notice p { margin: 6px 0 0; color: var(--muted); }

.dns-group + .dns-group { margin-top: 20px; }
.dns-group h3 { margin: 0 0 6px; font: 600 .85rem var(--mono); color: var(--muted); }
.dns-group h3 a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--faint); }
.dns-group h3 a:hover { color: var(--info); }
.dns-table { font-family: var(--mono); font-size: .84rem; margin: 0; display: table; table-layout: fixed; }
.dns-table td { padding: 6px 10px 6px 0; overflow-wrap: anywhere; }
.dns-table td.ttl { width: 80px; color: var(--muted); }
.dns-empty { color: var(--faint); font: .84rem var(--mono); margin: 0; }

.raw-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.raw { max-height: 520px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.loading { font-family: var(--mono); color: var(--muted); padding: 18px 16px; }
.loading::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }

/* home info */
.home-info { margin-top: 72px; display: grid; gap: 8px; }
.home-info h2 { margin-top: 1.6em; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.feature { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 16px; }
.feature h3 { margin: 0 0 6px; font: 600 .92rem var(--mono); color: var(--text-strong); }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.faq h3 { font-size: 1rem; }
.faq p { color: var(--text); }

.notfound { text-align: left; max-width: 560px; }
.notfound pre { color: var(--muted); }
