/* ==========================================================================
   cankurtaranlik.com — ana stil dosyasi
   Palet: derin deniz lacivert + cankurtaran turkuazi + kurtarma kirmizisi
   ========================================================================== */

:root {
  --deep: #052a3d;
  --deep-2: #073b53;
  --ink: #0d1f28;
  --teal: #0e7f8c;
  --teal-dark: #0a5c66;
  --teal-soft: #e7f4f6;
  --red: #dc4a30;
  --sand: #faf6ee;
  --paper: #ffffff;
  --line: #e2e8ea;
  --muted: #5c7079;
  --shadow-sm: 0 1px 2px rgba(5, 42, 61, .06), 0 4px 14px rgba(5, 42, 61, .06);
  --shadow-md: 0 10px 34px rgba(5, 42, 61, .12);
  --r: 14px;
  --r-lg: 22px;
  --wrap: 1200px;
  --ff-head: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration-color: rgba(14, 127, 140, .35); text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { font-family: var(--ff-head); line-height: 1.22; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--deep); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.2rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 999; background: var(--red); color: #fff; padding: .6rem 1rem; border-radius: 8px; }

/* ------------------------------------------------------------- butonlar */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  font-family: var(--ff-head); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.35rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(220, 74, 48, .28); }
.btn--primary:hover { background: #c33d26; color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn--wa { background: #25d366; color: #05331a; box-shadow: 0 8px 22px rgba(37, 211, 102, .25); }
.btn--wa:hover { background: #1eb355; color: #05331a; transform: translateY(-2px); }

.chip {
  display: inline-block; font-family: var(--ff-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--teal-dark); background: var(--teal-soft); padding: .3rem .7rem; border-radius: 999px;
}
.chip--solid { background: var(--red); color: #fff; }
.chip:hover { background: var(--teal); color: #fff; }

/* --------------------------------------------------------------- header */
.topbar { background: var(--deep); color: rgba(255, 255, 255, .78); font-size: .8rem; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.topbar__right { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.topbar__tel { color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.topbar__tel:hover { color: #7fd4de; }
.topbar__brand { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.topbar__brand strong { color: #7fd4de; }
.topbar__brand img { height: 34px; width: auto; }
.topbar__brand:hover img { opacity: .85; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--deep); }
.logo__mark {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background:
    conic-gradient(from 45deg, var(--red) 0 25%, #fff 0 50%, var(--red) 0 75%, #fff 0);
  border: 2px solid var(--deep); box-shadow: inset 0 0 0 3px #fff;
}
.logo__txt { font-family: var(--ff-head); font-size: 1.12rem; letter-spacing: -.03em; }
.logo__txt strong { font-weight: 700; }
.logo__txt em { font-style: normal; color: var(--teal); }

.nav { display: flex; gap: 1.15rem; margin-right: auto; font-size: .92rem; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--red); border-color: var(--red); }

.search { display: flex; align-items: center; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search input { border: 0; background: transparent; padding: .55rem .9rem; font: inherit; font-size: .85rem; width: 172px; outline: none; }
.search button { border: 0; background: var(--deep); color: #fff; font-family: var(--ff-head); font-size: .8rem; padding: .55rem 1rem; cursor: pointer; }
.search button:hover { background: var(--teal); }

.nav-toggle { display: none; align-items: center; gap: .5rem; background: var(--deep); color: #fff; border: 0; border-radius: 999px; padding: .5rem .95rem; font-family: var(--ff-head); font-size: .85rem; cursor: pointer; }

/* ----------------------------------------------------------------- hero */
.hero { background: linear-gradient(175deg, var(--deep) 0%, var(--deep-2) 62%, #0b5468 100%); padding: 3rem 0 4.5rem; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, var(--paper) 60%, transparent 61%) repeat-x;
  background-size: 120px 60px;
}
.hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2.2rem; position: relative; z-index: 2; }
.hero__main { background: var(--paper); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.hero__media img { aspect-ratio: 16 / 8; object-fit: cover; width: 100%; }
.hero__body { padding: 1.6rem 1.8rem 1.9rem; }
.hero__title { font-size: clamp(1.55rem, 2.9vw, 2.35rem); margin: .7rem 0 .5rem; }
.hero__title a { color: var(--deep); text-decoration: none; }
.hero__title a:hover { color: var(--red); }
.hero__excerpt { color: var(--muted); margin: 0 0 .8rem; }

.hero__side { display: flex; flex-direction: column; gap: .9rem; }
.mini { display: grid; grid-template-columns: 108px 1fr; gap: .85rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); padding: .7rem; }
.mini img { border-radius: 10px; aspect-ratio: 16/10; object-fit: cover; }
.mini h3 { font-size: .98rem; margin: 0 0 .3rem; }
.mini h3 a { color: #fff; text-decoration: none; }
.mini h3 a:hover { color: #ffc4b6; }
.mini .card__meta { color: rgba(255, 255, 255, .6); }

.card__meta { display: flex; gap: .5rem; align-items: center; font-size: .8rem; color: var(--muted); font-family: var(--ff-head); }

/* ----------------------------------------------------------------- band */
.band { margin: 3rem auto; }
.band__in { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; background: var(--sand); border: 1px solid #eee3cf; border-radius: var(--r-lg); padding: 2rem 2.2rem; }
.band__title { font-size: 1.5rem; margin-bottom: .4rem; }
.band__text { color: var(--muted); margin: 0; }
.band__links { display: flex; flex-direction: column; gap: .55rem; justify-content: center; }
.band__links a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .65rem 1rem; text-decoration: none; font-family: var(--ff-head); font-size: .92rem; font-weight: 600; color: var(--deep); }
.band__links a:hover { border-color: var(--teal); color: var(--teal-dark); transform: translateX(3px); transition: .15s; }
.band__links .band__cta { background: var(--deep); color: #fff; border-color: var(--deep); }
.band__links .band__cta:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* -------------------------------------------------------------- bolumler */
.section { margin: 3.2rem auto; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--line); padding-bottom: .7rem; margin-bottom: 1.6rem; }
.section__head h2 { margin: 0; position: relative; }
.more { font-family: var(--ff-head); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.6rem; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfe3e6; }
.card__media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card__body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card__title { font-size: 1.08rem; margin: 0; }
.card__title a { color: var(--deep); text-decoration: none; }
.card__title a:hover { color: var(--red); }
.card__excerpt { margin: 0; font-size: .92rem; color: var(--muted); flex: 1; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.1rem; }
.catcard { display: block; text-decoration: none; padding: 1.4rem 1.35rem; border-radius: var(--r); background: linear-gradient(160deg, var(--teal-soft), #fff); border: 1px solid #d6e9eb; }
.catcard h3 { margin: 0 0 .35rem; font-size: 1.12rem; }
.catcard p { margin: 0 0 .7rem; font-size: .88rem; color: var(--muted); }
.catcard__count { font-family: var(--ff-head); font-size: .78rem; font-weight: 600; color: var(--teal-dark); }
.catcard:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------- sayfa ust */
.pagehead { padding: 2.6rem 0 1.4rem; }
.pagehead h1 { margin: .4rem 0 .5rem; }
.pagehead__intro { color: var(--muted); max-width: 70ch; margin: 0; }
.crumbs { font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }

/* ---------------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 2.6rem; align-items: start; padding-bottom: 3rem; }
.layout__main { min-width: 0; }
.sidebar { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 1.3rem; }

.widget { border: 1px solid var(--line); border-radius: var(--r); padding: 1.15rem 1.25rem; background: var(--paper); }
.widget__title { font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 .8rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.widget__list { list-style: none; margin: 0; padding: 0; }
.widget__list li + li { border-top: 1px dashed var(--line); }
.widget__list a { display: block; padding: .5rem 0; text-decoration: none; font-size: .93rem; }
.widget__posts { list-style: none; margin: 0; padding: 0; counter-reset: p; display: flex; flex-direction: column; gap: .8rem; }
.widget__posts a { display: grid; grid-template-columns: 74px 1fr; gap: .7rem; align-items: center; text-decoration: none; font-size: .88rem; color: var(--deep); font-weight: 500; }
.widget__posts img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; }
.widget__posts a:hover { color: var(--red); }
.tagcloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.tagcloud a { font-size: .78rem; background: var(--sand); border: 1px solid #ece2cf; padding: .28rem .6rem; border-radius: 999px; text-decoration: none; color: var(--muted); }
.tagcloud a:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

.toc { font-size: .9rem; }
.toc a { text-decoration: none; }

/* -------------------------------------------------------------------- cta */
.cta { background: linear-gradient(160deg, var(--deep) 0%, #0a4a63 100%); color: #fff; border-radius: var(--r-lg); padding: 1.7rem 1.6rem; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.cta__badge { display: inline-block; font-family: var(--ff-head); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .14); padding: .28rem .7rem; border-radius: 999px; margin-bottom: .7rem; }
.cta__logo { display: inline-block; margin-bottom: 1rem; position: relative; z-index: 1; }
.cta__logo img { height: 46px; width: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .55rem; position: relative; z-index: 1; }
.cta__phone { display: inline-block; margin-top: .9rem; color: #fff; font-family: var(--ff-head); font-weight: 600; font-size: 1.02rem; text-decoration: none; letter-spacing: .01em; }
.cta__phone::before { content: "☎"; margin-right: .4rem; opacity: .7; }
.cta__phone:hover { color: #7fd4de; }
.cta__title { color: #fff; font-size: 1.25rem; margin: 0 0 .5rem; }
.cta__text { font-size: .93rem; color: rgba(255, 255, 255, .82); margin: 0 0 1.1rem; }
.cta__note { font-size: .78rem; color: rgba(255, 255, 255, .55); margin: .8rem 0 0; }
.cta--compact { margin: 2rem 0; }
.cta--compact .cta__title { font-size: 1.15rem; }

/* ------------------------------------------------------------------ yazi */
.post__head { padding: 2.4rem 0 1.2rem; max-width: 900px; }
.post__title { margin: .6rem 0 .6rem; }
.post__lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 1rem; }
.post__meta { display: flex; gap: .55rem; flex-wrap: wrap; font-family: var(--ff-head); font-size: .84rem; color: var(--muted); }
.post__hero { margin: 0 auto 2.2rem; }
.post__hero img { border-radius: var(--r-lg); aspect-ratio: 16/8; object-fit: cover; width: 100%; box-shadow: var(--shadow-md); }
.post__hero figcaption, .body-figure figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .6rem; }

.toc--inline { background: var(--sand); border: 1px solid #eee3cf; border-radius: var(--r); padding: 1.2rem 1.4rem; margin-bottom: 2rem; }
.toc--inline h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .6rem; }
.toc--inline ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc--inline li { margin-bottom: .3rem; break-inside: avoid; }

.prose { font-size: 1.06rem; }
.prose > h2 { margin-top: 2.4rem; padding-top: .3rem; }
.prose > h2::before { content: ""; display: block; width: 46px; height: 4px; border-radius: 2px; background: var(--red); margin-bottom: .7rem; }
.prose > h3 { margin-top: 1.8rem; color: var(--teal-dark); }
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.35rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--teal); font-weight: 600; }
.prose blockquote { margin: 1.6rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--teal); background: var(--teal-soft); border-radius: 0 var(--r) var(--r) 0; }
.prose blockquote p { margin: 0; font-style: italic; color: var(--teal-dark); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose code { background: var(--sand); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }
.body-figure { margin: 1.8rem 0; }
.body-figure img { border-radius: var(--r); }

.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--teal-soft); font-family: var(--ff-head); font-size: .85rem; color: var(--deep); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fbfcfc; }

.faq { margin: 2.6rem 0; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1.1rem; margin-bottom: .7rem; background: var(--paper); }
.faq details[open] { border-color: var(--teal); background: #fbfeff; }
.faq summary { cursor: pointer; font-family: var(--ff-head); font-weight: 600; color: var(--deep); }
.faq summary::marker { color: var(--red); }
.faq details > div { padding-top: .7rem; color: var(--muted); font-size: .97rem; }

.post__tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 2rem 0 1.4rem; }
.share { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .9rem 0; }
.share a { text-decoration: none; font-family: var(--ff-head); font-weight: 600; font-size: .82rem; border: 1px solid var(--line); padding: .3rem .8rem; border-radius: 999px; }
.share a:hover { background: var(--deep); color: #fff; border-color: var(--deep); }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.prevnext__item { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; text-decoration: none; display: flex; flex-direction: column; gap: .3rem; }
.prevnext__item span { font-size: .78rem; color: var(--muted); font-family: var(--ff-head); }
.prevnext__item strong { color: var(--deep); font-size: .98rem; line-height: 1.35; }
.prevnext__item:hover { border-color: var(--teal); background: var(--teal-soft); }
.prevnext__item--next { text-align: right; align-items: flex-end; }

/* ------------------------------------------------------------ sayfalama */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin: 2.6rem 0 1rem; }
.page { min-width: 42px; text-align: center; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-family: var(--ff-head); font-size: .88rem; }
.page:hover { border-color: var(--teal); }
.page--current { background: var(--deep); color: #fff; border-color: var(--deep); }
.page--gap { border: 0; }

.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); background: var(--sand); border-radius: var(--r); }

/* ---------------------------------------------------------------- formlar */
.form { display: grid; gap: 1rem; max-width: 620px; }
.field { display: grid; gap: .35rem; }
.field label { font-family: var(--ff-head); font-size: .85rem; font-weight: 600; color: var(--deep); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .95rem; padding: .7rem .9rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.notice { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: .93rem; }
.notice--ok { background: #e6f6ee; border: 1px solid #b6e2cb; color: #14603c; }
.notice--err { background: #fdeceb; border: 1px solid #f5c3bc; color: #93291a; }

/* ----------------------------------------------------------------- 404 */
.notfound { text-align: center; padding: 5rem 0; }
.notfound__code { font-family: var(--ff-head); font-size: 5rem; font-weight: 700; color: var(--teal-soft); margin: 0; line-height: 1; }
.notfound__actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.notfound .btn--ghost { border-color: var(--line); color: var(--deep); }
.notfound .btn--ghost:hover { background: var(--sand); color: var(--deep); }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, .74); margin-top: 3rem; padding: 3.2rem 0 4.5rem; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.2rem; }
.footer__col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.footer__col ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer__col a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer__col a:hover { color: #ffc4b6; }
.footer__col--brand p { margin: .6rem 0; }
.logo--footer .logo__txt { color: #fff; }
.logo--footer .logo__txt em { color: #7fd4de; }
.footer__brandline { background: rgba(255, 255, 255, .07); border-left: 3px solid var(--red); padding: .9rem 1rem; border-radius: 0 10px 10px 0; font-size: .88rem; }
.footer__brandline p { margin: 0; }
.footer__brandline a { color: #fff; }
.footer__brandlogo { display: inline-block; margin-bottom: .6rem; }
.footer__brandlogo img { height: 42px; width: auto; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.4rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: rgba(255, 255, 255, .55); }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: rgba(255, 255, 255, .8); }

/* --------------------------------------------------------- whatsapp butonu */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #25d366; color: #05331a; text-decoration: none;
  font-family: var(--ff-head); font-weight: 600; font-size: .9rem;
  padding: .7rem 1.1rem; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(5, 42, 61, .25), 0 2px 6px rgba(5, 42, 61, .18);
  transition: transform .15s ease, background .15s ease;
}
.wa-float:hover { background: #1eb355; color: #05331a; transform: translateY(-2px); }
.wa-float svg { flex: 0 0 auto; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1360px) {
  .nav { gap: .85rem; font-size: .88rem; }
  .search input { width: 150px; }
}

@media (max-width: 1180px) {
  .search { display: none; }
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .header__cta { display: none; }
  .search { display: flex; }
  .search input { width: 150px; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .band__in { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .toc--inline ol { columns: 1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar__txt { display: none; }
  .topbar__in { justify-content: center; }
  .wa-float { right: 12px; bottom: 12px; padding: .7rem; }
  .wa-float span { display: none; }
  .header__in { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; order: 2; margin-left: auto; }
  .nav { display: none; order: 4; width: 100%; flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .5rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .search { order: 3; width: 100%; margin-top: .6rem; }
  .search input { width: 100%; }
  .mini { grid-template-columns: 88px 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext__item--next { text-align: left; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- koyu tema */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1a22;
    --ink: #dbe7eb;
    --deep: #eaf4f6;
    --line: #1f3641;
    --muted: #93aab3;
    --sand: #12232c;
    --teal-soft: #102f36;
  }
  body { background: #0a151b; }
  .site-header { background: rgba(10, 21, 27, .92); }
  .nav a { color: var(--ink); }
  .search { background: #12232c; }
  .search button { background: var(--teal); }
  .card, .widget, .faq details, .prevnext__item { background: var(--paper); }
  .catcard { background: linear-gradient(160deg, #102f36, #0c1a22); border-color: #1f3641; }
  .band__in { background: #12232c; border-color: #1f3641; }
  .toc--inline { background: #12232c; border-color: #1f3641; }
  .field input, .field textarea, .field select { background: #0f1e26; color: var(--ink); }
  tbody tr:nth-child(even) { background: #0f1e26; }
  .topbar, .site-footer { background: #061118; }
  .hero { background: linear-gradient(175deg, #061118 0%, #08222e 62%, #0a3340 100%); }
  .hero::after { background: radial-gradient(ellipse 60% 100% at 50% 100%, #0a151b 60%, transparent 61%) repeat-x; background-size: 120px 60px; }
  .hero__main { background: var(--paper); }
  .notfound__code { color: #12303a; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
