/* Harfiyen — site stilleri */

:root {
  --paper: #f5f3ee;
  --card: #ffffff;
  --ink: #1d1f22;
  --ink-2: #3d4248;
  --muted: #676c73;
  --line: #e2ded4;
  --line-2: #c8c3b6;
  --accent: #b4441c;
  --accent-2: #8f3514;
  --ok: #2e6b3c;
  --warn: #9a5b00;
  --bad: #b3261e;
  --radius: 6px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Cambria, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .18em;
}
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
img, svg { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 50;
  background: #fff; color: var(--ink); padding: 8px 12px; border: 1px solid var(--ink);
}
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* ---------- Üst bölüm ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.head-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px; padding-top: 12px; padding-bottom: 12px;
}
.logo {
  font-family: var(--serif); font-size: 1.65rem; font-weight: 700; line-height: 1;
  letter-spacing: -.02em; color: var(--ink); text-decoration: none; text-transform: lowercase;
}
.logo span { color: var(--accent); }
.logo:hover { color: var(--ink); }
.top-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }

.tools-nav { background: #fff; border-bottom: 1px solid var(--line); }
.tools-nav ul {
  position: relative; list-style: none; margin: 0 0 0 -12px; padding: 0;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tools-nav ul::-webkit-scrollbar { display: none; }
.tools-nav a {
  display: block; white-space: nowrap; padding: 10px 12px 8px; font-size: .92rem;
  color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent;
}
.tools-nav a:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.tools-nav a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* ---------- Sayfa ---------- */
.site-main { padding: 18px 0 56px; }
.crumbs { font-size: .87rem; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); text-decoration-color: var(--line-2); }
.crumbs span[aria-hidden] { margin: 0 7px; }
.page-head { max-width: 780px; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -.015em; margin-bottom: 10px; }
.lead { font-size: 1.08rem; color: var(--ink-2); margin: 0; }

/* ---------- Araç paneli ---------- */
.tool {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 40px;
}
.tool-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.tool-h { font-size: 1.15rem; margin: 26px 0 10px; }
.textarea, .input {
  display: block; width: 100%; padding: 11px 13px; font: inherit; font-size: 1.05rem; line-height: 1.55;
  color: var(--ink); background: #fffefa; border: 1px solid var(--line-2); border-radius: 5px;
}
.textarea { min-height: 170px; resize: vertical; }
.textarea-lg { min-height: 240px; }
.textarea-sm { min-height: 96px; }
.textarea:focus, .input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(180, 68, 28, .18); }
.textarea[readonly] { background: #faf9f5; }
.input { font-size: 1rem; padding: 8px 11px; }

.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.note { font-size: .86rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 14px; font: 600 .93rem/1.2 var(--sans);
  color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 5px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn.done { border-color: var(--ok); color: var(--ok); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.btn-link {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 600;
  color: var(--accent-2); text-decoration: underline; cursor: pointer;
}
.undo { font-size: .9rem; color: var(--ink-2); }

/* Sayaç kutuları */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 16px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
}
.stats > div { background: #fff; padding: 10px 12px; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dt { font-size: .84rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.55rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }

/* Platform sınırları tablosu */
.limit-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.limit-table th, .limit-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.limit-table thead th { font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom-color: var(--line-2); }
.limit-table th[scope=row] { font-weight: 400; }
.limit-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.limit-table .barcell { width: 26%; }
.bar { height: 6px; background: #ece8de; border-radius: 3px; overflow: hidden; min-width: 50px; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; }
tr.near .bar i { background: var(--warn); }
tr.over .bar i { background: var(--bad); }
tr.over .rem { color: var(--bad); font-weight: 600; }
.table-note { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.sms-line { margin: 14px 0 0; padding: 10px 12px; background: #faf9f5; border: 1px solid var(--line); border-radius: 5px; font-size: .95rem; }

/* Kelime sıklığı */
.kw-list { margin: 8px 0 0; padding-left: 1.5em; columns: 2; column-gap: 36px; font-size: .95rem; }
.kw-list li { break-inside: avoid; padding: 2px 0; }
.kw-list .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.kw-list.empty { list-style: none; padding-left: 0; columns: 1; }

/* Seçenekler */
.options { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 16px 0 6px; }
.options fieldset, .opt-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.options legend, .opt-title { font-weight: 600; font-size: .88rem; margin-bottom: 4px; padding: 0; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .95rem; padding: 3px 0; cursor: pointer; }
.check input { margin: .28em 0 0; flex: none; width: 16px; height: 16px; accent-color: var(--ink); }
.check small { color: var(--muted); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.seg legend { width: 100%; font-weight: 600; font-size: .88rem; margin-bottom: 6px; padding: 0; float: left; }
.seg label {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: 5px; background: #fff; font-size: .92rem; cursor: pointer;
}
.seg label:hover { border-color: var(--ink); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label.is-on, .seg label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg small { opacity: .75; }

.field { margin: 0 0 12px; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }

/* Girdi/çıktı yan yana */
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report { margin: 10px 0 0; font-size: .92rem; color: var(--ink-2); }
.count { font-variant-numeric: tabular-nums; }
.count strong { font-size: 1.05rem; }
.count.over strong, .count.over { color: var(--bad); }
.warn-line { margin: 8px 0 0; font-size: .92rem; color: var(--warn); }
.warn-line:empty { display: none; }

/* Biyo ve paylaşım önizlemesi */
.preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 20px; align-items: start; margin-top: 16px; }
.preview { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 16px; }
.preview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%; background: #ebe7dc; flex: none;
  display: grid; place-items: center; font: 700 1.3rem var(--serif); color: var(--ink-2);
}
.preview-name { font-weight: 700; }
.preview-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.preview-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.45; min-height: 1.45em; }
.preview-text mark { background: #fbd9d5; color: #7a1610; }
.preview-text .more { color: var(--muted); }

/* Yazı stilleri listesi */
.styles { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.styles li { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.styles .name { font-size: .88rem; color: var(--muted); }
.styles .out { font-size: 1.2rem; line-height: 1.4; overflow-wrap: anywhere; }
.styles .out.sample { color: var(--muted); }

/* ---------- Makale ve yan sütun ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.prose { max-width: 720px; font-size: 1.0625rem; line-height: 1.72; }
.prose h2 { font-size: 1.5rem; margin: 2.1em 0 .6em; }
.prose > h2:first-child, .prose > :first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 .45em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose thead th { font-family: var(--sans); font-size: .85rem; color: var(--muted); border-bottom-color: var(--line-2); }
.prose tbody th { font-weight: 600; }
.prose code { background: #ece9e1; padding: .1em .35em; border-radius: 3px; }
.prose pre {
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 12px 14px;
  overflow-x: auto; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1em 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; }
.table-wrap table { margin: 0; min-width: 520px; }
.defs dt { font-weight: 700; margin-top: 1em; }
.defs dd { margin: .15em 0 0; }
.example { border-left: 3px solid var(--line-2); padding: 2px 0 2px 16px; margin: 1em 0 1.4em; }
.example-label { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.example pre { margin: 0 0 12px; }
.updated { font-size: .88rem; color: var(--muted); margin-top: 2.5em; padding-top: 12px; border-top: 1px solid var(--line); }

.aside { font-size: .95rem; }
.aside-box { border-top: 2px solid var(--ink); padding-top: 10px; margin-bottom: 28px; }
.aside h2 { font-size: 1rem; margin: 0 0 6px; }
.aside ul { list-style: none; margin: 0; padding: 0; }
.aside li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.aside a { text-decoration: none; }
.aside a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.aside p { color: var(--ink-2); font-size: .92rem; margin: 0; }

/* ---------- Ana sayfa ---------- */
.home-head { max-width: 760px; margin: 6px 0 22px; }
.home-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); letter-spacing: -.02em; margin-bottom: 12px; }
.quick .stats { grid-template-columns: repeat(4, 1fr); }
.quick-foot { margin: 12px 0 0; font-size: .95rem; }
.section-h { font-size: 1.6rem; margin: 0 0 6px; }
.section-sub { color: var(--ink-2); margin: 0 0 14px; max-width: 700px; }
.tool-list { list-style: none; margin: 0 0 44px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.tool-list li { border-top: 1px solid var(--line-2); padding: 15px 0 18px; }
.tool-list h3 { font-size: 1.22rem; margin: 0 0 4px; }
.tool-list h3 a { text-decoration: none; }
.tool-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.tool-list p { margin: 0; color: var(--ink-2); }
.tool-list .ex { display: block; margin-top: 6px; font-family: var(--mono); font-size: .84rem; color: var(--muted); }
.sp { color: var(--accent); letter-spacing: .1em; }
.guide-list { list-style: none; margin: 0 0 44px; padding: 0; }
.guide-list li { border-top: 1px solid var(--line-2); padding: 14px 0 16px; }
.guide-list h3 { font-size: 1.15rem; margin: 0 0 4px; }
.guide-list h3 a { text-decoration: none; }
.guide-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.guide-list p { margin: 0; color: var(--ink-2); }
.home-about { max-width: 720px; border-top: 2px solid var(--ink); padding-top: 14px; }
.home-about h2 { font-size: 1.25rem; margin: 0 0 8px; }

/* ---------- 404 ---------- */
.notfound { max-width: 640px; padding: 20px 0 10px; }
.notfound h1 { font-size: 2.2rem; margin-bottom: 10px; }
.notfound ul { padding-left: 1.2em; }

/* ---------- Alt bilgi ---------- */
.site-footer { background: #22252a; color: #c9ccd1; font-size: .93rem; padding: 40px 0 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--accent); color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr 1fr; gap: 28px; }
.site-footer h2 { font-family: var(--sans); font-size: .85rem; font-weight: 600; color: #9da2a9; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.logo-foot, .logo-foot:hover { color: #fff; font-size: 1.4rem; }
.foot-about p { margin: 10px 0 0; max-width: 300px; color: #b4b8be; }
.foot-bottom { border-top: 1px solid #3a3e44; margin-top: 32px; padding-top: 16px; padding-bottom: 22px; font-size: .85rem; color: #9da2a9; }

/* ---------- Çerez bildirimi ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 600px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; font-size: .92rem;
  background: #fff; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.cookie p { margin: 0; }
.cookie[hidden] { display: none; }

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
  .preview-wrap { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .io { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tool-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .tool { padding: 14px; margin-left: -6px; margin-right: -6px; }
  .stats, .quick .stats { grid-template-columns: repeat(2, 1fr); }
  .stats dd { font-size: 1.35rem; }
  .kw-list { columns: 1; }
  .styles li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .styles .name { grid-column: 1 / -1; }
  .limit-table .barcell { display: none; }
  .cookie { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .tools-nav, .site-footer, .aside, .tool-actions, .cookie { display: none; }
  body { background: #fff; }
}

/* ---------- Küçük düzeltmeler ---------- */
.tool-h.first { margin-top: 0; }
.table-wrap.flush { margin: 0; }
.tool-label.mt { margin-top: 14px; }
.guide-list h2 { font-size: 1.25rem; margin: 0 0 4px; }
.guide-list h2 a { text-decoration: none; }
.guide-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.guide-list .note { margin-top: 6px; }
.legal h2 { font-size: 1.3rem; }
.contact-mail { font-size: 1.2rem; font-weight: 600; }
