/*  ____   ___  _   _ _   _ ____ _____ _   _ ____
 * |  _ \ / _ \| \ | | | | / ___|_   _| | | |  _ \
 * | | | | | | |  \| | | | \___ \ | | | | | | |_) |
 * | |_| | |_| | |\  | |_| |___) || | | |_| |  _ <
 * |____/ \___/|_| \_|\___/|____/ |_|  \___/|_| \_\
 *
 * donustur.net · app/static/css/base_convert.css
 * Sayı tabanı çevirme sayfasına özgü kurallar: devre kartı sahnesi (8'li DIP anahtar + karakter ekranı), adım tabloları, örnekler.
 * NOT: standart bileşenler (.uc-q, .uc-list, .uc-note, .uc-t, .ucs, .gc-t) cevir.css'te; burada yalnız .bx / .bxs altı.
 *   Anahtar konumu yalnız .is-on sınıfıyla değişir (base-page.js); satır içi stil yok.
 */

/* ------------------------------------------------------------------ giriş: uzun sayı yazılabilsin */
.bx .bx-in { max-width: 100%; }
.bx .uc-res__v { word-break: break-all; }

/* ------------------------------------------------------------------ sahne: yeşil lehim maskeli kart */
.bxs { display: grid; place-items: center; }
.bxs-pcb { position: relative; width: min(560px, calc(100% - 40px)); height: 236px; box-sizing: border-box; border-radius: 10px;
  background:
    radial-gradient(circle at 18px 18px, #C9A54A 0 5px, #8C6B22 5px 6.5px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) 18px, #C9A54A 0 5px, #8C6B22 5px 6.5px, transparent 7px),
    radial-gradient(circle at 18px calc(100% - 18px), #C9A54A 0 5px, #8C6B22 5px 6.5px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), #C9A54A 0 5px, #8C6B22 5px 6.5px, transparent 7px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(160, 210, 150, .10) 46px 48px),
    linear-gradient(155deg, #1F6B43 0%, #18573A 55%, #124630 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 1px 2px rgba(18, 20, 24, .18),
    0 26px 44px -20px rgba(18, 20, 24, .55); }

/* karakter ekranı (16 × 2 benzeri): sarımsı yeşil cam, koyu nokta yazı */
.bxs-lcd { position: absolute; left: 34px; top: 30px; width: 176px; padding: 12px 14px; box-sizing: border-box; border-radius: 4px;
  border: 6px solid #1B1D21; background: linear-gradient(180deg, #B7C86A 0%, #A3B657 100%);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28), 0 2px 0 #0D0E10; }
.bxs-ln { display: flex; justify-content: space-between; margin: 0; font: 700 21px/1.25 var(--f-code, var(--f-mono, ui-monospace, monospace));
  letter-spacing: .08em; color: #223014; text-shadow: 1px 1px 0 rgba(34, 48, 20, .18); font-variant-numeric: tabular-nums; }
.bxs-ln span { opacity: .55; font-size: 15px; align-self: center; }

/* 8'li DIP anahtar: kırmızı gövde, beyaz sürgü; yukarı = ON */
.bxs-dip { position: absolute; right: 34px; top: 34px; width: 272px; height: 104px; box-sizing: border-box; padding: 18px 12px 0; border-radius: 4px;
  background: linear-gradient(180deg, #D8322F 0%, #B8221F 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .22), 0 3px 0 #6E1311, 0 8px 14px -6px rgba(0, 0, 0, .55); }
.bxs-on { position: absolute; left: 12px; top: 3px; font: 700 10px/1 var(--f-sans); letter-spacing: .1em; color: #fff; opacity: .9; }
.bxs-on::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 4px; border: 4px solid transparent; border-bottom-color: #fff; border-top: 0; vertical-align: 1px; }
.bxs-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.bxs-sw { position: relative; display: block; height: 58px; border-radius: 2px; background: #2A0C0B; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7); }
.bxs-sw b { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 24px; border-radius: 2px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E6E8EC 70%, #C9CDD4 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 2px 2px rgba(0, 0, 0, .45);
  transition: transform .45s var(--spr, ease); }
.bxs-sw.is-on b { transform: translateY(-28px); }
.bxs-num { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 5px; text-align: center; font: 700 10px/1 var(--f-sans); color: #fff; opacity: .85; }
/* basamak değerleri: kart üstüne serigrafi gibi */
.bxs-w { position: absolute; right: 46px; top: 150px; width: 248px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; text-align: center;
  font: 600 11px/1 var(--f-code, var(--f-mono, ui-monospace, monospace)); color: #E9F2E4; opacity: .82; font-variant-numeric: tabular-nums; }
.bxs-tag { position: absolute; left: 34px; bottom: 26px; margin: 0; padding: 4px 9px; border: 1px solid rgba(233, 242, 228, .55); border-radius: 3px;
  font: 600 11px/1.2 var(--f-sans); letter-spacing: .04em; color: #E9F2E4; }
.bxs-tag:empty { display: none; }
@media (max-width: 620px) {
  .ucs.bxs { height: 344px; }
  .bxs-pcb { height: 300px; }
  .bxs-lcd { left: 50%; margin-left: -88px; top: 22px; }
  .bxs-dip { right: auto; left: 50%; margin-left: -136px; top: 126px; }
  .bxs-w { display: none; }
  .bxs-tag { left: 50%; transform: translateX(-50%); bottom: 14px; white-space: nowrap; }
}
@media (max-width: 380px) { .bxs-pcb { transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { .bxs-sw b { transition: none; } }
html.is-still .bxs-sw b, html.is-reduced .bxs-sw b, html.is-paused .bxs-sw b { transition: none; }

/* ------------------------------------------------------------------ adım tabloları */
.bx-st[hidden] { display: none; }
.bx-st__b { display: grid; gap: 12px; }
.bx-st__b .lnote { margin: 0; }
.bx-t { max-width: 560px; }
.bx-t td { font-family: var(--f-code, var(--f-mono, ui-monospace, monospace)); font-weight: 600; }
/* sayı basamağın ortasından bölünmesin: hücre tek satır, dar ekranda tablo kendi kutusunda yana kayar (sayfa kaymaz).
   .bx-pw 2'nin kuvvetleri tablosunun kutusu: iç boşluk .uc-t gölgesi kesilmesin diye, eksi kenar boşluğu onu geri alır. */
.bx-t td, .bx-pow td { white-space: nowrap; }
.bx-tw { max-width: 560px; overflow-x: auto; }
.bx-pw { overflow-x: auto; margin: 0 -16px -28px; padding: 0 16px 28px; }
.bx-tw:focus-visible, .bx-pw:focus-visible { outline: 2px solid #121418; outline-offset: 2px; }

/* toplu liste: uzun sonuç satır kırsın (cevir.css .gc-t ikinci sütunu nowrap); hata cümlesi kelime arasından kırılır */
.bx .gc-out .gc-t tbody td { white-space: normal; word-break: break-all; }
.bx .gc-out .gc-t tbody td.gc-t__s { word-break: normal; overflow-wrap: break-word; }

/* ------------------------------------------------------------------ çözümlü örnekler */
.bx-ex__l { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.bx-ex__i { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 1px solid #E3E6EC; border-radius: 12px; background: #fff; }
.bx-ex__q { margin: 0; font: 500 15px/1.5 var(--f-sans); color: #121418; }
.bx-ex__a { margin: 0; font: 700 16px/1.4 var(--f-code, var(--f-mono, ui-monospace, monospace)); color: #121418; overflow-wrap: anywhere; }
.bx-ex__s { margin: 0; font: 400 13px/1.5 var(--f-sans); color: #7B8394; }
.bx-ex__i .y10-act { justify-self: start; margin: 4px 0 0; }
