/**
 * Dilekçe Masası + Karar defteri — bematrx.com/<dil>/dilekce, /kararlar
 * (2026-09-12, gece işi W4)
 * ================================================================
 * "Ephemera" dili (DESIGN.md): açık editoryal zemin; form bir antetli kâğıt
 * (.bm-letterhead), kararlar numaralı belge satırları. Hareket yok.
 * Emoji yok. subpages.css'ten SONRA yüklenir (aynı precedence, sıra korunur).
 */

/* =====================  Hero + form  ============================== */

/* Form geniş kalsın: 7:5 yerine yarı yarıya. Yalnız iki sütunlu genişlikte —
   subpages.css'in 960px yığma kuralını ezmemek için medya sorgusu içinde. */
.bm-pet-split { align-items: start; }
@media (min-width: 961px) {
  .bm-pet-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.bm-pet-card { padding: clamp(1.25rem, 3vw, 2.25rem); }
.bm-pet-card .bm-letterhead__head { margin-bottom: var(--bm-space-3); flex-wrap: wrap; }

.bm-pet-form { display: grid; gap: .6rem; }

.bm-pet-label {
  font-weight: 700;
  font-size: var(--bm-fs-body);
  color: var(--bm-text);
}

.bm-pet-area {
  display: block;
  inline-size: 100%;
  min-block-size: 11rem;
  box-sizing: border-box;
  padding: .9rem 1rem;
  font: inherit;
  font-size: var(--bm-fs-body);
  line-height: 1.55;
  color: var(--bm-text);
  background: var(--bm-white);
  border: 1px solid var(--bm-border-strong);
  border-radius: var(--bm-radius-md);
  resize: vertical;
  transition: border-color var(--bm-dur-fast) ease, box-shadow var(--bm-dur-fast) ease;
}
.bm-pet-area::placeholder { color: var(--bm-text-muted); opacity: .75; }
.bm-pet-area:focus {
  outline: none;
  border-color: var(--bm-primary-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-primary) 20%, transparent);
}
.bm-pet-area[aria-invalid="true"] { border-color: var(--bm-primary-text); }

.bm-pet-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
}
.bm-pet-hint {
  margin: 0;
  font-size: var(--bm-fs-small);
  line-height: 1.5;
  color: var(--bm-text-muted);
  text-wrap: pretty;
}
.bm-pet-count {
  flex: 0 0 auto;
  font-family: var(--bm-font-print);
  font-weight: 700;
  font-size: .8rem;
  color: var(--bm-text-muted);
  font-variant-numeric: tabular-nums;
}
.bm-pet-count.is-full { color: var(--bm-primary-text); }

/* Hata: kırmızı çerçeveli not; renk tek başına anlam taşımaz (metin var). */
.bm-pet-err {
  margin: .15rem 0 0;
  padding: .7rem .9rem;
  font-size: var(--bm-fs-small);
  line-height: 1.5;
  font-weight: 600;
  color: var(--bm-primary-text);
  background: var(--bm-primary-soft);
  border: 1px solid #F6C9D1;
  border-inline-start-width: 4px;
  border-radius: var(--bm-radius-sm);
}

.bm-pet-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-block-size: 48px;
  padding: .75rem 1.4rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--bm-white);
  background: var(--bm-primary-text);
  border: 2px solid var(--bm-primary-text);
  border-radius: var(--bm-radius-full);
  cursor: pointer;
  transition: background var(--bm-dur-fast) ease, border-color var(--bm-dur-fast) ease;
}
.bm-pet-btn:hover:not(:disabled) {
  background: var(--bm-primary-text-hover);
  border-color: var(--bm-primary-text-hover);
  color: var(--bm-white);
}
.bm-pet-btn:focus-visible { outline: 3px solid var(--bm-dark); outline-offset: 2px; }
.bm-pet-btn:disabled { opacity: .55; cursor: progress; }
.bm-pet-btn--block { inline-size: 100%; margin-top: .35rem; }
.bm-pet-btn--ghost { background: transparent; color: var(--bm-primary-text); }
.bm-pet-btn--ghost:hover:not(:disabled) {
  background: var(--bm-primary-soft);
  color: var(--bm-primary-text-hover);
}

.bm-pet-anon {
  margin: .2rem 0 0;
  font-size: var(--bm-fs-small);
  line-height: 1.5;
  color: var(--bm-text-muted);
  text-wrap: pretty;
}

/* Başarı — formun yerine geçer. */
.bm-pet-ok { display: grid; gap: .8rem; justify-items: start; padding-block: .5rem; }
.bm-pet-ok:focus { outline: none; }
.bm-pet-ok:focus-visible { outline: 3px solid var(--bm-dark); outline-offset: 4px; border-radius: var(--bm-radius-sm); }
.bm-pet-ok__stamp { --r: -3deg; }
.bm-pet-ok__title {
  font-size: clamp(1.4rem, 1vw + 1.1rem, 1.8rem);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.bm-pet-ok__body { color: var(--bm-text-muted); line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
.bm-pet-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }

/* =====================  Masada ne olur  =========================== */

.bm-pet-how {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
@media (max-width: 899px) {
  .bm-pet-how { grid-template-columns: minmax(0, 1fr); }
}

.bm-pet-steps {
  counter-reset: bm-pet;
  list-style: none;
  margin: var(--bm-space-4) 0 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.bm-pet-steps li {
  counter-increment: bm-pet;
  position: relative;
  padding-inline-start: 2.6rem;
  line-height: 1.6;
  color: var(--bm-text);
  text-wrap: pretty;
}
.bm-pet-steps li::before {
  content: counter(bm-pet, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: .1rem;
  font-family: var(--bm-font-print);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--bm-primary-text);
}

.bm-pet-ledger-link { min-height: 0; }
/* Karar defteri hero'sunda kart başlığı h2 (başlık sırası atlanmasın), görünüşü
   .bm-counter h3 ile aynı. */
.bm-pet-ledger-link__title { font-size: 1.32rem; font-weight: 700; line-height: 1.3; }

/* =====================  Karar defteri  ============================ */

.bm-dec-wrap { max-width: 880px; }

.bm-dec-headline {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-bottom: var(--bm-space-4);
}
/* Künye satırı — sayaç BÜYÜTÜLMEZ (sözleşme). */
.bm-dec-facts {
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem;
  margin: 0;
  font-family: var(--bm-font-print);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--bm-text-muted);
  font-variant-numeric: tabular-nums;
}

.bm-dec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }

.bm-dec {
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-inline-start: 4px solid var(--bm-stamp-indigo);
  border-radius: var(--bm-radius-md);
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1.1rem, 2.6vw, 1.75rem);
}
.bm-dec__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .25rem 1rem;
  padding-bottom: .6rem;
  margin-bottom: .7rem;
  border-bottom: 1px dashed var(--bm-border-strong);
}
.bm-dec__no {
  font-family: var(--bm-font-print);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bm-stamp-indigo);
}
.bm-dec__date {
  font-family: var(--bm-font-print);
  font-size: .78rem;
  font-weight: 700;
  color: var(--bm-text-muted);
}
.bm-dec__summary {
  font-size: var(--bm-fs-body-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--bm-text);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.bm-dec__meta {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem;
  margin: .7rem 0 0;
  font-size: var(--bm-fs-small);
  color: var(--bm-text-muted);
}
.bm-dec__name { font-weight: 700; color: var(--bm-text); }

.bm-dec-state,
.bm-dec-empty {
  background: var(--bm-white);
  border: 1px dashed var(--bm-border-strong);
  border-radius: var(--bm-radius-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  color: var(--bm-text-muted);
}
.bm-dec-empty { display: grid; gap: .7rem; justify-items: center; }
.bm-dec-empty__title { font-size: 1.2rem; font-weight: 800; color: var(--bm-text); }
.bm-dec-empty p { max-width: 48ch; line-height: 1.6; text-wrap: pretty; }

.bm-dec-pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: var(--bm-space-4);
  font-weight: 700;
}
.bm-dec-pager a { color: var(--bm-primary-text); text-underline-offset: 3px; }

.bm-dec-privacy { margin-top: var(--bm-space-4); max-width: 70ch; }
