:root {
  --ink: #16181D; --muted: #606878; --line: #E6E8EE;
  --bg: #F7F6FB; --card: #FFFFFF; --accent: #7C3AED; --accent-soft: #F1EEFB;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ECEEF3; --muted: #99A1B3; --line: #262A35;
    --bg: #0F1116; --card: #171A21; --accent: #A98BF5; --accent-soft: #221C33;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
header.site {
  border-bottom: 1px solid var(--line); background: var(--card);
  position: sticky; top: 0; z-index: 5;
}
header.site .wrap {
  display: flex; align-items: center; gap: 16px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
header.site nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
header.site nav a { font-size: 13px; text-decoration: none; color: var(--muted); }
header.site nav a:hover { color: var(--accent); }

.hero { padding: 56px 0 40px; }
.hero h1 { font-size: 34px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.01em; }
.hero p { font-size: 17px; color: var(--muted); margin: 0 0 26px; max-width: 60ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 13px 22px; border-radius: 12px; background: var(--accent); color: #fff;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 21px; margin: 0 0 8px; }
section > p.lead { color: var(--muted); margin: 0 0 22px; max-width: 62ch; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
/* Dört öğelik ızgara 2x2 duruyor.
   auto-fit üç sütun veriyordu ve dördüncü kart alt satırda TEK BAŞINA
   kalıyordu — yanındaki boşluk kartı yarım bırakılmış gibi gösteriyor. */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
}
.card h3 { margin: 0 0 5px; font-size: 14px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

article { padding: 34px 0 10px; }
article h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -0.01em; }
article .updated { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
article h2 {
  font-size: 17px; margin: 32px 0 10px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
article h3 { font-size: 14px; margin: 22px 0 6px; color: var(--accent); letter-spacing: 0.02em; }
article p { margin: 0 0 13px; }
article ul { margin: 0 0 14px; padding-left: 20px; }
article li { margin-bottom: 5px; }
article hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }

.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 14px 16px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 0 38px; margin-bottom: 12px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; display: flex;
  align-items: center; justify-content: center;
}
.note {
  background: var(--accent-soft); border-radius: 12px; padding: 14px 16px;
  font-size: 14px; margin: 20px 0 0;
}

footer.site {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 30px 0 44px; color: var(--muted); font-size: 13px;
}
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site .company { line-height: 1.7; }

/* --- Katalog ızgarası ---
   Bu kurallar sunucuda üretilen katalog sayfaları için; onlar da aynı
   stil dosyasını kullanıyor, böylece katalog sitenin geri kalanından
   kopuk bir sayfa gibi durmuyor. */
.products {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
}
.product {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.product img, .product-blank {
  display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  background: var(--accent-soft);
}
.product-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 3px; }
.product-body strong {
  font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-body span { font-size: 11px; color: var(--muted); }
.product-body .price { color: var(--accent); font-weight: 600; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--accent); }

/* --- Arama --- */
.searchbox { display: flex; gap: 10px; margin: 0 0 8px; }
.searchbox input {
  flex: 1; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); min-width: 0;
}
.searchbox input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchbox .btn { border: none; cursor: pointer; padding: 12px 20px; }

/* --- Ürün sayfası --- */
.product-page { padding-top: 30px; }
.product-hero { display: flex; gap: 24px; align-items: flex-start; }
.product-cover {
  width: 200px; aspect-ratio: 2 / 3; object-fit: cover; flex: none;
  border-radius: 14px; border: 1px solid var(--line); background: var(--accent-soft);
}
.product-info { flex: 1; min-width: 0; }
.product-info h1 { font-size: 25px; margin: 0 0 6px; line-height: 1.25; }
.crumb { margin: 0 0 8px; font-size: 12px; }
.crumb a { text-decoration: none; }
.byline { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.bigprice { margin: 0 0 18px; font-size: 20px; font-weight: 700; color: var(--accent); }
.metatable {
  margin: 28px 0 6px; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: var(--card);
}
.metarow {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 15px; font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.metarow:last-child { border-bottom: none; }
.metarow span { color: var(--muted); }
/* Dar ekranda kapak ile bilgiyi ALT ALTA: yan yana sıkışınca başlık
   iki harflik sütunlara bölünüyordu. */
@media (max-width: 560px) {
  .product-hero { flex-direction: column; }
  .product-cover { width: 150px; }
}

/* Alınamayan ürün: düğme yerine sade bir not. Tıklanınca hata veren
   bir düğme, olmayan bir şeyi vaat etmek olurdu. */
.soft-note {
  display: inline-block; font-size: 13px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 10px; padding: 12px 16px;
}

/* --- Ana sayfa vitrini --- */
.showcase-head {
  display: flex; align-items: baseline; gap: 16px;
  justify-content: space-between; margin-bottom: 18px;
}
.showcase-head h2 { margin: 0; }
.showcase-head a { font-size: 13px; text-decoration: none; white-space: nowrap; }
/* Kayıt/giriş: gezinmenin geri kalanından AYRILSIN. Aynı gri renkte
   olsalardı sitedeki tek eylem bağlantısı diğer altı bağlantının
   arasında kaybolurdu. */
.auth-slot a { color: var(--accent); font-weight: 600; }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 6px 13px; border-radius: 8px;
}

/* --- Yatırımcı sayfası --- */
.investor-hero { padding-bottom: 30px; }
.eyebrow {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 12px;
}
/* Tek büyük sayı: yatırımcı sayfasında en çok bakılan yer burası,
   gerisi onun açıklaması. */
.bignum {
  font-size: 52px; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; margin: 4px 0 26px;
  font-variant-numeric: tabular-nums;
}
.bignum span {
  display: block; font-size: 14px; font-weight: 500;
  letter-spacing: 0; color: var(--muted); margin-top: 8px;
}
.numgrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.numgrid div {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.numgrid strong {
  display: block; font-size: 20px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.numgrid span { font-size: 12px; color: var(--muted); }
/* Numaralı üç adım: sıra BİLGİ taşıyor — soğuk başlangıç, çözüm,
   sonuç. Süs olsaydı numaralandırmazdım. */
.thesis { counter-reset: t; list-style: none; padding: 0; margin: 0; }
.thesis li {
  counter-increment: t; position: relative; padding-left: 46px;
  margin-bottom: 22px;
}
.thesis li::before {
  content: counter(t); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.thesis strong { display: block; font-size: 16px; margin-bottom: 5px; }
.thesis span { color: var(--muted); font-size: 14px; line-height: 1.65; }
.fineprint { font-size: 12px; color: var(--muted); margin: 18px 0 0; line-height: 1.6; }
@media (max-width: 620px) { .bignum { font-size: 40px; } }

/* --- Yönetim paneli --- */
.panel { max-width: 720px; }
.panel h2 { margin-top: 36px; }
.panel-key { margin: 22px 0 8px; }
.panel-key label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.panel-key input {
  font: inherit; font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}
.panel-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 14px;
  align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.panel-label { display: flex; flex-direction: column; min-width: 0; }
.panel-label strong { font-size: 14px; }
.panel-label span { font-size: 12px; color: var(--muted); }
.panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-actions .btn { padding: 9px 16px; font-size: 13px; border: none; cursor: pointer; }
.panel-actions .btn:disabled { opacity: .55; cursor: default; }
.panel-count {
  width: 78px; font: inherit; font-size: 13px; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink);
}
/* Sonuc HAM JSON olarak gosteriliyor: ozetlenirse hangi alanin ne
   dondugu kaybolur ve hata ayiklamak zorlasir. */
.panel-result {
  grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.5;
  background: var(--accent-soft); border-radius: 9px; padding: 10px 12px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.panel-result.error { background: rgba(192, 57, 43, .10); }

/* --- Okuyucu / oynatıcı --- */
.reader-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 14px; border-bottom: 1px solid var(--line);
}
.reader-bar > a:first-child {
  font-weight: 600; text-decoration: none; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reader-tools { margin-left: auto; display: flex; gap: 10px; }
.reader-tools .btn { padding: 9px 16px; font-size: 13px; }
.reader { padding: 26px 0 40px; }

/* Kitap metni: satır uzunluğu 66 karakter civarında tutuluyor.
   Ekran genişliğinde akan bir metinde göz satır başını kaybediyor —
   uzun metin okumanın en bilinen sorunu. */
.reader-book { max-width: 34em; margin: 0 auto; font-size: 18px; line-height: 1.75; }
.reader-book p { margin: 0 0 1.1em; }
.reader-book h1, .reader-book h2, .reader-book h3 { margin: 1.8em 0 .6em; line-height: 1.3; }
.reader-book img { max-width: 100%; height: auto; }
.reader-book pre { white-space: pre-wrap; word-break: break-word; }
.reader-book table { width: 100%; border-collapse: collapse; font-size: .9em; }
.reader-book td, .reader-book th { border: 1px solid var(--line); padding: 6px 8px; }

.reader-pdf {
  width: 100%; height: 82vh; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card);
}
.reader-media { width: 100%; border-radius: 12px; background: #000; display: block; }
.reader-cover {
  display: block; width: 190px; margin: 0 auto 20px;
  border-radius: 12px; aspect-ratio: 1 / 1; object-fit: cover;
}
.reader-image {
  display: block; max-width: 100%; height: auto; margin: 0 auto;
  border-radius: 12px; background: var(--accent-soft);
}
.reader-download { text-align: center; padding: 40px 0; }
.reader-download p { color: var(--muted); margin: 0 0 20px; }

/* Yazı tipi önizlemesi: örnekler GERÇEKTEN o yazı tipiyle çiziliyor.
   Görmeden indirmek, ne indirdiğini bilmemek demek. */
.font-preview p {
  font-family: "ShopyPreview", Georgia, serif;
  margin: 0 0 22px; line-height: 1.3; word-break: break-word;
}
.fp-xl { font-size: 40px; }
.fp-lg { font-size: 32px; }
.fp-md { font-size: 22px; }
.fp-sm { font-size: 17px; line-height: 1.6; }
@media (max-width: 620px) {
  .fp-xl { font-size: 27px; }
  .fp-lg { font-size: 23px; }
  .reader-pdf { height: 70vh; }
  .reader-book { font-size: 17px; }
}

/* --- Ödeme --- */
.checkout-summary {
  display: flex; gap: 14px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; background: var(--card); margin: 20px 0 0;
}
.checkout-summary img, .checkout-summary .product-blank {
  width: 56px; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 7px; flex: none; background: var(--accent-soft);
}
.checkout-summary div { display: flex; flex-direction: column; min-width: 0; }
.checkout-summary strong { font-size: 14px; }
.checkout-summary span { font-size: 12px; color: var(--muted); }
.checkout-summary .price { color: var(--accent); font-weight: 700; font-size: 14px; }

/* Onay kutusu METNIYLE BIRLIKTE tiklanabilir ve metin küçültülmedi:
   kullanıcının yasal bir hakkından vazgeçtiği yer burası, okunması
   gereken tek satır bu. */
.consent { margin: 22px 0 0; }
.consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent input { margin-top: 4px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }
.consent span { font-size: 14px; line-height: 1.5; }
.consent-why { margin: 10px 0 0 27px; font-size: 12px; color: var(--muted); }
#paymentElement { margin: 22px 0 0; }
#checkoutAction { margin-top: 20px; }
.testmode {
  margin: 22px 0 0; font-size: 12px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px;
}

/* --- Hesap --- */
.auth-slot { display: inline-flex; gap: 16px; }
.auth-slot a { font-size: 13px; text-decoration: none; color: var(--accent); font-weight: 600; }
article.auth { max-width: 400px; }
article.auth form { display: flex; flex-direction: column; gap: 14px; margin: 22px 0 0; }
article.auth label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--muted);
}
article.auth input {
  font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
}
article.auth input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
article.auth .btn { border: none; cursor: pointer; text-align: center; width: 100%; }
article.auth .btn:disabled { opacity: 0.55; cursor: default; }
/* Hata mesajı formun İÇİNDE, üstte bir şerit değil: kullanıcı gözünü
   düğmeye götürmüşken hatayı orada görüyor. */
.form-error {
  margin: 0; font-size: 13px; color: #C0392B;
  background: rgba(192, 57, 43, 0.10); border-radius: 9px; padding: 10px 12px;
}
@media (prefers-color-scheme: dark) { .form-error { color: #FF9C90; } }
.or { text-align: center; color: var(--muted); margin: 18px 0; font-size: 12px; }
.switch { font-size: 13px; color: var(--muted); margin-top: 22px; }
@media (max-width: 620px) {
  .hero { padding: 38px 0 30px; }
  .hero h1 { font-size: 27px; }
  /* Dar ekranda gezinmenin TAMAMI gizleniyordu — katalog bağlantısı,
     dil değiştirme ve giriş/kayıt dahil. Telefonda siteye giren kişi
     hiçbir bağlantı görmüyordu.
     Artık yalnızca İKİNCİL bağlantılar gizleniyor; ilk bağlantı
     (katalog) ve giriş/kayıt her boyutta duruyor. */
  header.site nav > a { display: none; }
  header.site nav > a:first-of-type { display: inline; }
  header.site .wrap { gap: 10px; }
  .auth-slot { gap: 10px; }
  .auth-slot a { font-size: 12px; }
  .nav-cta { padding: 6px 11px; }
}
@media (max-width: 380px) {
  /* Çok dar ekranda katalog bağlantısı da gidiyor: giriş ve kayıt
     kalmalı, çünkü sitenin tek eylemi onlar. */
  header.site nav > a:first-of-type { display: none; }
}