/* Terminal desk. Colors only from theme.css tokens. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.terminal { overflow: hidden; }
body.terminal .stage { overflow: hidden; background: var(--bg); }
body.terminal .body { flex: 1; min-height: 0; overflow: hidden; }
body.terminal .main { padding: 0; display: flex; min-height: 0; overflow: hidden; background: var(--bg); }
/* Yalniz site altligi. Genel `footer` yazarsak sohbetin yazi kutusu ve
   terminalin dip seridi de (ikisi de <footer>) kayboluyor. */
body.terminal .site-foot,
body.terminal .dock,
body.terminal .side,
body.terminal .side-mask,
body.terminal .ptr,
body.terminal .top,
body.terminal .cookie-bar { display: none !important; }
body.terminal .rail {
  height: 100%;
  position: relative;
  top: auto;
  align-self: stretch;
  padding: .4rem .45rem .4rem 0;
}
body.terminal .chat { height: 100%; }
@media (max-width: 860px) {
  html.chat-off:not(.chat-skip) body.terminal .chat-fab,
  body.terminal.chat-off .chat-fab { display: flex !important; }
  /* Üst çubuk duruyor ama yan menü `display:none !important` ile kilitliydi.
     Hamburger açılınca menü gelsin, siteye çıkılabilsin. */
  body.terminal.nav-open .side {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(21rem, 92vw);
    height: 100%;
    z-index: 46;
    padding-top: max(.9rem, env(safe-area-inset-top));
    padding-bottom: max(1.4rem, env(safe-area-inset-bottom));
  }
  body.terminal.nav-open .side-mask,
  body.terminal.nav-open .side-mask.on {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: var(--fog);
  }
  body.terminal .top { display: grid !important; }
}
body.terminal #terminal-view {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
}
html.page-wait body.terminal .main { min-height: 0; }
html.page-wait body.terminal .main::after,
html.page-wait body.terminal .main::before { display: none; }

.term {
  --term-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --term-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --term-fs: 13.75px;
  --term-scale-user: 1.1;
  --term-scale: var(--term-scale-user);
  --term-lh: 1.45;
  /* Tablo sutun olculeri. Basligin ve satirin ayni degeri gormesi icin
     hepsi sabit; icerige bagli sutun (auto) sutunlari kaydirir. */
  --c-code: minmax(2.7rem, 3.5rem);
  --c-num: minmax(2.6rem, 4.6rem);
  --c-ava: 1.35rem;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--term-font);
  font-size: var(--term-fs);
  line-height: var(--term-lh);
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.term[data-term-font="system"] {
  --term-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.term[data-term-font="mono"] {
  --term-font: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.term[data-term-size="sm"] { --term-fs: 12.5px; --term-scale-user: 1; --term-lh: 1.38; }
.term[data-term-size="md"] { --term-fs: 13.75px; --term-scale-user: 1.1; --term-lh: 1.45; }
.term[data-term-size="lg"] { --term-fs: 15.25px; --term-scale-user: 1.22; --term-lh: 1.48; }
.term[data-term-size="xl"] { --term-fs: 16.75px; --term-scale-user: 1.34; --term-lh: 1.5; }
.term-top {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: calc(.5rem * var(--term-scale-user));
  min-height: calc(2.55rem * var(--term-scale-user));
  padding: calc(.18rem * var(--term-scale-user)) calc(.6rem * var(--term-scale-user));
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  font-size: var(--term-fs);
}
.term-top-l {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}
.term-brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.term-brand img {
  display: block;
  height: calc(26px * var(--term-scale-user));
  width: auto;
  filter: var(--logo-filter);
}
.term-brand .logo-off { display: none; }
[data-theme="light"] .term-brand .logo-on { display: none; }
[data-theme="light"] .term-brand .logo-off { display: block; filter: none; }
.term-brand b {
  font-size: calc(13.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: -.02em;
}
.term-leave {
  display: none;
  align-items: center;
  min-height: 1.7rem;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 700;
  text-decoration: none;
}
.term-leave:hover {
  border-color: var(--accent-line);
  background: var(--raise);
}
.term-sess,
.term-live {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  min-height: 1.35rem;
  padding: 0 .42rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--inset);
  color: var(--mute);
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 700;
}
.term-sess.on,
.term-live.on {
  border-color: var(--up-line);
  background: var(--up-soft);
  color: var(--up);
}
.term-sess.wait,
.term-live.wait {
  border-color: var(--warn-line);
  background: var(--warn-soft);
  color: var(--warn);
}
.term-live i,
.term-dot {
  width: .38rem;
  height: .38rem;
  border-radius: 99px;
  background: var(--dim);
}
.term-live.on i,
.term-dot.on {
  background: var(--up);
  box-shadow: 0 0 0 3px var(--up-soft);
  animation: term-pulse 1.6s ease infinite;
}
.term-live.wait i,
.term-dot.wait { background: var(--warn); }
@keyframes term-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--up-soft); }
  50% { box-shadow: 0 0 0 5px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .term-live.on i { animation: none; }
}
.term-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: var(--term-mono);
  text-align: center;
}
.term-clock-d {
  color: var(--mute);
  font-size: calc(10px * var(--term-scale));
  font-weight: 650;
  letter-spacing: .04em;
}
.term-clock-t {
  font-size: calc(16.8px * var(--term-scale));
  font-weight: 750;
  letter-spacing: -.03em;
}
.term-top-r {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  min-width: 0;
}
.term-seg {
  display: flex;
  max-width: 100%;
  padding: .1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  overflow: auto;
}
.term-seg button {
  min-height: 1.55rem;
  padding: 0 .55rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-seg button:hover { color: var(--text); background: var(--hover); }
.term-seg button.on {
  background: var(--accent);
  color: var(--on-accent);
}
.term-seg button.dirty::after {
  content: "";
  display: inline-block;
  width: .35rem;
  height: .35rem;
  margin-left: .28rem;
  border-radius: 99px;
  background: var(--on-accent);
  opacity: .7;
}
.term-seg[hidden] { display: none !important; }
.term-tools {
  display: flex;
  align-items: center;
  gap: .32rem;
}
/* Ust menu is grubuna gore ayrilir: once masa isleri, sonra gorunum, sonra cikis. */
.term-pod {
  display: flex;
  align-items: center;
  gap: calc(.1rem * var(--term-scale-user));
  padding: calc(.12rem * var(--term-scale-user));
  border: 1px solid var(--line);
  border-radius: calc(10px * var(--term-scale-user));
  background: var(--inset);
}
.term-tools button,
.term-tools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(1.55rem * var(--term-scale-user));
  padding: calc(.14rem * var(--term-scale-user)) calc(.4rem * var(--term-scale-user));
  border: 1px solid var(--line);
  border-radius: calc(8px * var(--term-scale-user));
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.term-tools .term-ico {
  width: calc(1.55rem * var(--term-scale-user));
  height: calc(1.55rem * var(--term-scale-user));
  min-height: calc(1.55rem * var(--term-scale-user));
  padding: 0;
}
.term-pod svg {
  width: calc(15px * var(--term-scale-user));
  height: calc(15px * var(--term-scale-user));
}
.term-tools button:hover,
.term-tools a:hover {
  border-color: var(--accent-line);
  background: var(--raise);
}
.term-tools button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
/* Grup icinde butonlar cercevesiz durur; grup kabi zaten sinir cizer. */
.term-pod button,
.term-pod a {
  border-color: transparent;
  background: transparent;
}
.term-pod button:hover,
.term-pod a:hover {
  border-color: transparent;
  background: var(--hover);
}
.term-pod .term-btn {
  gap: calc(.28rem * var(--term-scale-user));
  width: auto;
  padding: calc(.14rem * var(--term-scale-user)) calc(.48rem * var(--term-scale-user));
}
.term-pod .term-btn span {
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 700;
  white-space: nowrap;
}
.term-pod button.on,
.term-pod button.on:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.term-pod .term-ico.soft {
  background: var(--accent-soft);
  color: var(--accent);
}
.term-pod .term-ico.soft:hover {
  background: var(--accent);
  color: var(--on-accent);
}
/* Yer daralinca yazi duser, ikon kalir. */
@media (max-width: 1280px) {
  .term-pod .term-btn {
    width: calc(1.55rem * var(--term-scale-user));
    padding: 0;
  }
  .term-pod .term-btn span { display: none; }
}
.term-tools button:focus-visible,
.term-tools a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.term-tape {
  flex: none;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--inset);
  mask-image: linear-gradient(90deg, transparent, #000 1.4rem, #000 calc(100% - 1.4rem), transparent);
}
.term-tape[hidden] { display: none !important; }
.term-tape-track {
  display: flex;
  gap: 1.4rem;
  width: max-content;
  padding: .28rem .7rem;
  animation: term-tape 42s linear infinite;
}
.term-tape:hover .term-tape-track { animation-play-state: paused; }
@keyframes term-tape {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .term-tape-track { animation: none; }
}
.term-chip {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.term-chip b {
  color: var(--text);
  font-family: var(--term-mono);
  font-size: calc(11px * var(--term-scale));
}
.term-chip em {
  font-style: normal;
  font-family: var(--term-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.term-chip em.up { color: var(--up); }
.term-chip em.down { color: var(--down); }
.term-chip em.mute { color: var(--mute); }

.term-desk {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
  padding: .4rem;
}
.term-board {
  position: relative;
  min-height: 100%;
}
.term.edit .term-board {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    radial-gradient(circle, var(--mute) 1.1px, transparent 1.2px);
  background-position: 0 0;
}

.term-tile {
  --q: 1;
  --term-scale: calc(var(--term-scale-user) * var(--q));
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line-soft);
  container-type: size;
  container-name: tile;
}
.term.edit .term-tile {
  outline: 1px solid var(--accent-line);
}
.term-tile.max {
  inset: .12rem !important;
  width: auto !important;
  height: auto !important;
  z-index: 5;
}
.term-hd {
  flex: none;
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 1.85rem;
  padding: .16rem .38rem .14rem .5rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--raise);
}
.term-hd b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(11px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.term-hd em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(10px * var(--term-scale));
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.term-tile.fon .term-hd b {
  flex: 1 1 auto;
  font-family: var(--term-font);
  font-weight: 700;
  letter-spacing: -.015em;
  text-transform: none;
}
.term-hd-tools {
  margin-left: auto;
  display: flex;
  gap: .08rem;
}
.term-hd-tools a,
.term-hd-tools button {
  width: 1.3rem;
  height: 1.3rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.term-hd-tools a:hover,
.term-hd-tools button:hover {
  background: var(--hover);
  color: var(--text);
}
.term-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: .38rem .48rem .42rem;
  display: flex;
  flex-direction: column;
}

/* Her panel ayni kalip: sabit bas (.term-fix) + esneyen bolge (.term-flow).
   Govde asla kaymaz; kaydirma yalniz akan bolgede olur. */
/* Sabit bas kendi boyunu korur: akan liste ne kadar uzun olursa olsun
   basi ezmez. Bas kirpilmasin diye esneme kapali; kutu iyice kisalirsa
   asagidaki kap sorgulari icerigi seyreltir. Tavan, listeye her zaman
   yer kalmasi icin. */
.term-fix {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  min-height: 0;
  max-height: 74cqh;
  margin-bottom: .34rem;
  overflow: hidden;
}
.term-fix > * { margin: 0; }
.term-fix .term-head { margin: 0 -.22rem; }
.term-fix:empty { display: none; }
.term-flow {
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.term-flow.fill {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.term-flow.fill > * { flex: 1; min-height: 0; }
.term-flow.rows,
.term-flow.grid {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
}
.term-flow.rows {
  display: flex;
  flex-direction: column;
}
.term-flow.rows > * { flex: none; }
.term-flow.grid > * { min-height: 0; }
.term-flow .term-row,
.term-flow .term-list,
.term-flow .term-card,
.term-flow .term-heat-c { scroll-snap-align: start; }
/* Satir yuksekligi kutuya gore olculur: tam sayida satir, yarim satir yok. */
.term-flow.fit > .term-row,
.term-flow.fit > .term-list {
  height: var(--rh-fill);
  min-height: 0;
}
.term-flow.fit .term-cards,
.term-flow.fit .term-heat { grid-auto-rows: var(--rh-fill); }
/* Icerik siğdiginda sutun sayisi da kutuya gore secilir. */
.term-flow.cols .term-cards,
.term-flow.cols .term-heat { grid-template-columns: repeat(var(--cols-fill), minmax(0, 1fr)); }
/* Son sira yarim kalmasin: artan hucreyi son kutu doldurur. */
.term-flow.cols .term-heat > :last-child { grid-column: span var(--last-span, 1); }
.term-flow.fit .term-card,
.term-flow.fit .term-heat-c { height: 100%; min-height: 0; }
/* Kart kisaldiginda yardimci metin cikar; cumle ortasindan kesilmez. */
.term-flow.fit .term-card {
  container-type: size;
  container-name: card;
}
/* Yardimci metin kalan yeri alir ve dibe dogru soner: yari cumle gorunmez. */
.term-card .sub {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  /* Maske rengi degil saydamlik tasir; palet ile ilgisi yok. */
  mask-image: linear-gradient(180deg, #000 calc(100% - .95rem), transparent);
}
/* Liste kutuyu doldurmadiysa dipteki not kalan yeri kapatir. Yer yoksa
   hic gorunmez: yarim satir veya bos alan kalmaz. */
.term-tail { display: none; }
.term-flow.slack > .term-tail {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 0;
  padding: .7rem .8rem;
  color: var(--dim);
  font-size: calc(10.5px * var(--term-scale));
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  border-top: 1px dashed var(--line-soft);
}
.term-flow.slack > a.term-tail:hover {
  color: var(--text);
  background: var(--hover);
}
.term-flow.slack > .term-tail > span { max-width: 22rem; }

/* Kart ici seyrelme kurallari dosyanin sonundaki blokta. */
/* Satir cok buyudugunde ince ayirici koy; seyrek liste dagilmis durmasin. */
.term-flow.airy > .term-row,
.term-flow.airy > .term-list { box-shadow: inset 0 -1px 0 var(--line-soft); }
.term-flow.airy > .term-row:last-child,
.term-flow.airy > .term-list:last-child { box-shadow: none; }
/* Bos ve yukleniyor durumu kutunun ortasinda durur. */
.term-flow:has(> .term-empty),
.term-flow:has(> .term-blank) {
  display: grid;
  place-items: center;
  overflow: hidden;
}
.term-flow > .term-empty { padding: .2rem .4rem; text-align: center; }
/* Kart ici kaydirma cubugu ince ve sessiz. */
.term-flow::-webkit-scrollbar { width: 6px; }
.term-flow::-webkit-scrollbar-thumb { background: var(--line); }
.term-tile:hover .term-flow::-webkit-scrollbar-thumb { background: var(--scroll); }
.term-drag { cursor: grab; }
.term.dragging .term-drag { cursor: grabbing; }
.term-rses { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.term-rses i {
  position: absolute;
  pointer-events: none;
  touch-action: none;
}
.term.edit .term-rses i { pointer-events: auto; }
.term-rses [data-rs="n"],
.term-rses [data-rs="s"] { left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.term-rses [data-rs="n"] { top: 0; }
.term-rses [data-rs="s"] { bottom: 0; }
.term-rses [data-rs="e"],
.term-rses [data-rs="w"] { top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.term-rses [data-rs="e"] { right: 0; }
.term-rses [data-rs="w"] { left: 0; }
.term-rses [data-rs="ne"],
.term-rses [data-rs="nw"],
.term-rses [data-rs="se"],
.term-rses [data-rs="sw"] { width: 12px; height: 12px; }
.term-rses [data-rs="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.term-rses [data-rs="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.term-rses [data-rs="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
.term-rses [data-rs="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.term-rses [data-rs="se"]::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 0 0 3px 0;
  opacity: 0;
}
.term.edit .term-tile:hover .term-rses [data-rs="se"]::after,
.term.edit .term-rses [data-rs="se"]::after,
.term.dragging .term-rses [data-rs="se"]::after { opacity: 1; }
.term-tile.max .term-rses { display: none; }
.term-ghost {
  position: absolute;
  z-index: 2;
  border: 1.5px dashed var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  pointer-events: none;
}
.term-ghost.bad {
  border-color: var(--down);
  background: var(--down-soft);
}

.term-gate,
.term-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.term-app { position: relative; }
.term-gate {
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  background:
    radial-gradient(36rem 18rem at 50% 0%, var(--accent-soft), transparent 62%),
    var(--bg);
}
.term-gate-card {
  width: min(26rem, 100%);
  padding: 1.45rem 1.4rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--shadow-lg);
}
.term-gate-card h1 {
  margin: 0 0 .3rem;
  font-size: calc(22.4px * var(--term-scale));
  letter-spacing: -.03em;
}
.term-gate-card p {
  margin: 0 0 1rem;
  color: var(--mute);
  font-size: calc(13.5px * var(--term-scale));
}
.term-gate .auth-actions button:not(.ghost) {
  flex: 1;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
  padding: .58rem .7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.term-gate .auth-actions button:not(.ghost):hover { filter: brightness(1.06); }

.term-empty {
  color: var(--mute);
  font-size: calc(12px * var(--term-scale));
  padding: .4rem .1rem;
}
.term-hint {
  margin: 0 0 .35rem;
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
}
.term-asof {
  margin: .45rem 0 .2rem;
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.term-asof:first-child { margin-top: 0; }

.term-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .18rem;
  margin-bottom: .4rem;
}
.term-tabs button {
  min-height: 1.45rem;
  padding: 0 .42rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 700;
  cursor: pointer;
}
.term-tabs button:hover { background: var(--hover); color: var(--text); }
.term-tabs button.on {
  background: var(--inset);
  border-color: var(--line);
  color: var(--text);
}

.term-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .38rem;
  height: 100%;
}
.term-kpi {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: .42rem .5rem .36rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}
.term-kpi:hover { border-color: var(--accent-line); }
.term-kpi.on { box-shadow: inset 2px 0 0 var(--accent); }
.term-kpi small {
  display: block;
  color: var(--mute);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.term-kpi b {
  display: block;
  margin: .14rem 0 .02rem;
  font-family: var(--term-mono);
  font-size: calc(19.52px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.term-kpi em {
  font-style: normal;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-family: var(--term-mono);
}
.term-kpi em.up { color: var(--up); }
.term-kpi em.down { color: var(--down); }
.term-kpi em.mute { color: var(--mute); }
.term-kpi .term-sub {
  display: flex;
  justify-content: space-between;
  gap: .3rem;
  margin-top: .1rem;
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
  font-variant-numeric: tabular-nums;
}
.term-mini {
  display: block;
  width: 3.1rem;
  height: 16px;
  overflow: hidden;
}
.term-kpi .term-mini {
  width: 100%;
  height: 26px;
  margin-top: auto;
  padding-top: .28rem;
}
.term-mini polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.term-mini.up { color: var(--up); }
.term-mini.down { color: var(--down); }
.term-range {
  display: block;
  height: 3px;
  margin-top: .22rem;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.term-range b {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--accent);
  border-radius: 99px;
}

.term-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.4rem, 1fr));
  gap: .32rem;
  margin-bottom: .4rem;
}
.term-stat {
  min-width: 0;
  padding: .38rem .46rem;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--inset);
}
.term-stat small {
  display: block;
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-stat b {
  display: block;
  margin-top: .1rem;
  font-family: var(--term-mono);
  font-size: calc(13px * var(--term-scale));
  font-variant-numeric: tabular-nums;
}
.term-stat b.up { color: var(--up); }
.term-stat b.down { color: var(--down); }
.term-stat p {
  margin: .12rem 0 0;
  color: var(--dim);
  font-size: calc(10.5px * var(--term-scale));
}

.term-session {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .4rem;
}
.term-session .bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.term-session .bar b {
  display: block;
  height: 100%;
  background: var(--up);
}
.term-session.wait .bar b { background: var(--warn); }
.term-session .next { color: var(--mute); font-size: calc(11px * var(--term-scale)); }

.term-breadth {
  display: flex;
  height: 5px;
  margin: .15rem 0 .45rem;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line);
}
.term-breadth i {
  display: block;
  height: 100%;
  background: var(--up);
}
.term-breadth em {
  display: block;
  height: 100%;
  background: var(--down);
  font-style: normal;
}

.term-call {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .32rem;
  margin-bottom: .38rem;
}
.term-call a {
  display: block;
  padding: .36rem .46rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.term-call a.up { background: var(--up-soft); }
.term-call a.down { background: var(--down-soft); }
.term-call small { display: block; font-size: calc(10px * var(--term-scale)); font-weight: 750; color: var(--mute); }
.term-call b { font-family: var(--term-mono); font-size: calc(13px * var(--term-scale)); }
.term-call em { font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
.term-call a.up em { color: var(--up); }
.term-call a.down em { color: var(--down); }

/* Tablo sutunlari: basligin ve satirlarin izgarasi ayri ayri hesaplanir.
   Icerige bagli (`auto`) sutun kullanilirsa iki izgara farkli cikar ve
   basliklar kayar. Bu yuzden butun sutunlar sabit olcudur. */
.term-row {
  display: grid;
  grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num);
  gap: .22rem .4rem;
  align-items: center;
  min-height: 1.55rem;
  padding: .12rem .22rem;
  margin: 0 -.22rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.term-row:hover { background: var(--hover); }
.term-row.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.term-row.wide { grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num); }
.term-row.fat { grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num) var(--c-num); }
/* Logo sutunu en basa eklenir; baslikta bos hucre karsilar. */
.term-row.logo,
.term-head.logo { grid-template-columns: var(--c-ava) var(--c-code) minmax(0, 1fr) var(--c-num); }
.term-row.wide.logo,
.term-head.wide.logo { grid-template-columns: var(--c-ava) var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num); }
.term-row.fat.logo,
.term-head.fat.logo { grid-template-columns: var(--c-ava) var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num) var(--c-num); }
/* Uzun ad kapaliyken bos ad sutunu bosluk birakmasin. */
.term-row.fat.lean,
.term-head.fat.lean { grid-template-columns: var(--c-code) 0 1fr 1fr 1fr; }
.term-row.fat.lean.logo,
.term-head.fat.lean.logo { grid-template-columns: var(--c-ava) var(--c-code) 0 1fr 1fr 1fr; }
.term-row.fat.lean:not(.logo) > span:nth-child(2),
.term-head.fat.lean:not(.logo) > span:nth-child(2) { display: none; }
.term-row.fat.lean.logo > span:nth-child(3),
.term-head.fat.lean.logo > span:nth-child(3) { display: none; }
.term-row.fat.lean em,
.term-head.fat.lean:not(.logo) span:not(:first-child),
.term-head.fat.lean.logo span:not(:nth-child(-n+2)) { text-align: right; }
.term-row b {
  font-family: var(--term-mono);
  font-size: calc(11px * var(--term-scale));
  letter-spacing: -.02em;
}
.term-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
}
.term-row em {
  min-width: 0;
  overflow: hidden;
  /* Sayi sutunu sabit genislikte: sarkma yerine kisalir. */
  white-space: nowrap;
  text-overflow: ellipsis;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-family: var(--term-mono);
  font-weight: 700;
  font-size: calc(11px * var(--term-scale));
  text-align: right;
}
.term-row em.up { color: var(--up); }
.term-row em.down { color: var(--down); }
.term-row em.mute { color: var(--mute); }
.term-row .term-mini { justify-self: end; }
.term-drv {
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
}

.term-head {
  display: grid;
  grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num);
  gap: .22rem .4rem;
  /* Satirlarda kaydirma cubugu varsa baslik da o kadar daralir; yoksa
     son sutun bir cubuk kadar kayar. Olcu JS'ten gelir. */
  padding: 0 calc(.22rem + var(--sb, 0px)) .16rem .22rem;
  margin: 0 -.22rem .1rem;
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
}
.term-head.wide { grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num); }
.term-head.fat { grid-template-columns: var(--c-code) minmax(0, 1fr) var(--c-num) var(--c-num) var(--c-num); }
.term-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.term-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.1rem;
  padding: 0 .32rem;
  border-radius: 99px;
  background: var(--inset);
  color: var(--mute);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .03em;
}
.term-pill.up { background: var(--up-soft); color: var(--up); }
.term-pill.down { background: var(--down-soft); color: var(--down); }
.term-pill.warn { background: var(--warn-soft); color: var(--warn); }
.term-pill.accent { background: var(--accent-soft); color: var(--accent); }

.term-heat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr));
  gap: .22rem;
  min-height: 0;
  align-content: start;
}
.term-heat a {
  display: flex;
  flex-direction: column;
  gap: .06rem;
  min-height: 2.85rem;
  padding: .28rem .3rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}
.term-heat a.on { outline: 1px solid var(--accent); }
.term-heat b {
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
}
.term-heat em {
  font-style: normal;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  font-size: calc(11.5px * var(--term-scale));
}

.term-news { display: grid; gap: .38rem; }
.term-feat {
  display: block;
  padding: .46rem .5rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  color: inherit;
  text-decoration: none;
}
.term-feat:hover { border-color: var(--accent-line); }
.term-feat b { display: block; font-size: calc(13px * var(--term-scale)); letter-spacing: -.01em; }
.term-feat p {
  margin: .22rem 0 0;
  color: var(--mute);
  font-size: calc(12px * var(--term-scale));
}

.term-flash-up,
.term-flash-down {
  display: inline-block;
  border-radius: 4px;
  padding: 0 .12em;
  margin: 0 -.12em;
}
.term-flash-up { animation: term-tick-up .55s ease; }
.term-flash-down { animation: term-tick-down .55s ease; }
@keyframes term-tick-up {
  0% { color: var(--up); background: var(--up-soft); transform: translateY(-1px) scale(1.04); }
  100% { background: transparent; transform: none; }
}
@keyframes term-tick-down {
  0% { color: var(--down); background: var(--down-soft); transform: translateY(1px) scale(1.04); }
  100% { background: transparent; transform: none; }
}

.term-note {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  resize: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}
.term-note:focus { outline: none; }

.term-bar {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  min-height: 1.85rem;
  padding: .16rem .65rem;
  border-top: 1px solid var(--line);
  background: var(--chrome);
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.term-bar b { color: var(--text); font-weight: 750; }
.term-bar .up { color: var(--up); }
.term-bar .down { color: var(--down); }

.term-type { display: grid; gap: .42rem; }
.term-type-k {
  margin: 0;
  color: var(--ink);
  font-size: calc(11px * var(--term-scale));
  font-weight: 750;
}
.term-type-seg { width: 100%; }
.term-type-seg button { flex: 1; min-width: 0; }
.term-look,
.term-tpl { display: grid; gap: .7rem; }
.term-look[hidden],
.term-tpl[hidden] { display: none !important; }

.term-set {
  position: absolute;
  inset: 2.9rem 0 0;
  z-index: 12;
  display: grid;
  place-items: start center;
  padding: .7rem 1rem 1rem;
  background: var(--fog);
  overflow: auto;
}
.term.tight .term-set { top: 2.45rem; }
.term-set[hidden] { display: none !important; }
.term-set-card {
  width: min(42rem, 100%);
  max-height: min(42rem, calc(100vh - 3.2rem));
  overflow: auto;
  padding: .85rem .9rem .75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: term-pop .2s ease both;
}
#term-look-x,
#term-tpl-x {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--mute);
  font: inherit;
  font-size: calc(15px * var(--term-scale));
  line-height: 1;
  cursor: pointer;
}
#term-look-x:hover,
#term-tpl-x:hover { border-color: var(--accent-line); color: var(--text); }
.term-tpl-wide { width: min(52rem, 100%); }
.term-set-sec {
  display: grid;
  gap: .35rem;
  padding: .65rem .7rem .7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inset);
}
.term-set-sec h3 {
  margin: 0;
  font-size: calc(11px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.term-set-sec > p {
  margin: 0;
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
  line-height: 1.4;
}
.term-set-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  min-height: 2.4rem;
}
.term-set-row + .term-set-row {
  border-top: 1px solid var(--line-soft);
  padding-top: .4rem;
}
.term-set-row b { display: block; font-size: calc(12.5px * var(--term-scale)); }
.term-set-row em {
  display: block;
  color: var(--mute);
  font-style: normal;
  font-size: calc(11px * var(--term-scale));
}
.term-set-go {
  min-height: 1.7rem;
  padding: 0 .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-set-go:hover { border-color: var(--accent-line); }
.term-set-save {
  margin: .55rem 0 0;
  color: var(--dim);
  font-size: calc(11px * var(--term-scale));
}
.term-set-save.ok { color: var(--up); }
.term-star {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--dim);
  cursor: pointer;
}
.term-star:hover { border-color: var(--accent-line); color: var(--accent-dim); }
.term-star.on {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}
.term-pin-art {
  position: relative;
  display: block;
  height: 5.4rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--raise);
  overflow: hidden;
}
.term-pin-art i {
  position: absolute;
  border-radius: 3px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.term-ready.on .term-pin-art i {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.term-tpl-ready,
.term-tpl-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.6rem, 1fr));
  gap: .55rem;
}
.term-ready {
  display: grid;
  gap: .45rem;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.term-ready.on { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.term-ready-art { position: relative; }
.term-ready-art .term-star {
  position: absolute;
  top: .35rem;
  right: .35rem;
  z-index: 1;
  background: var(--card);
}
.term-ready-now,
.term-ready-n {
  position: absolute;
  left: .4rem;
  bottom: .35rem;
  padding: .08rem .38rem;
  border-radius: 99px;
  font-size: calc(10px * var(--term-scale));
  font-weight: 700;
  font-style: normal;
}
.term-ready-now {
  background: var(--accent);
  color: var(--on-accent);
}
.term-ready-n {
  background: var(--inset);
  color: var(--mute);
  border: 1px solid var(--line-soft);
}
.term-ready-t { display: grid; gap: .08rem; min-width: 0; padding: 0 .08rem; }
.term-ready-t b { font-size: calc(14px * var(--term-scale)); letter-spacing: -.02em; }
.term-ready-t em {
  color: var(--mute);
  font-style: normal;
  font-size: calc(11.5px * var(--term-scale));
  line-height: 1.35;
}
.term-ready-go {
  min-height: 1.85rem;
  border: 0;
  border-radius: 9px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(12px * var(--term-scale));
  font-weight: 700;
  cursor: pointer;
}
.term-ready-go:hover { background: var(--hover); }
.term-ready.on .term-ready-go {
  background: var(--accent);
  color: var(--on-accent);
}
.term-ready-acts {
  display: flex;
  flex-wrap: wrap;
  gap: .22rem;
}
.term-ready-acts button {
  flex: 1;
  min-height: 1.55rem;
  padding: 0 .4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--mute);
  font: inherit;
  font-size: calc(11px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-ready-acts button:hover { color: var(--text); border-color: var(--accent-line); }
.term-tpl-card .acts,
.term-tpl-pin .acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .22rem;
}
.term-tpl-card .acts button:not(.term-star),
.term-tpl-pin .acts button:not(.term-star),
.term-tpl-save button,
.term-tpl-actions button {
  min-height: 1.7rem;
  padding: 0 .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-tpl-card .acts button:not(.term-star):hover,
.term-tpl-actions button:hover { border-color: var(--accent-line); }
.term-tpl-save {
  display: flex;
  gap: .3rem;
}
.term-tpl-save input,
.term-tpl-ren {
  flex: 1;
  min-height: 2rem;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.term-tpl-save button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.term-tpl-actions { display: flex; gap: .3rem; }
.term-tpl-pins { display: grid; gap: .28rem; }
.term-tpl-pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .35rem;
  padding: .35rem .4rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}
.term-tpl-pin b { font-size: calc(12.5px * var(--term-scale)); }
.term-tpl-pin em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(10.5px * var(--term-scale));
}
.term-tpl-pin .acts button:disabled { opacity: .4; cursor: default; }

/* ---- Panel ekleme penceresi ---- */
.term-drawer {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: start center;
  padding: 2.4rem 1rem 1rem;
  background: var(--fog);
  overflow: auto;
}
.term-drawer[hidden] { display: none !important; }
.term-drawer-card {
  width: min(43rem, 100%);
  padding: .85rem .9rem .8rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: term-pop .2s ease both;
  font-family: var(--term-font);
  font-size: var(--term-fs);
}
#term-add-x {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--mute);
  font: inherit;
  font-size: calc(15px * var(--term-scale));
  line-height: 1;
  cursor: pointer;
}
#term-add-x:hover { border-color: var(--accent-line); color: var(--text); }
.term-add {
  display: grid;
  gap: .7rem;
  max-height: min(28rem, 62vh);
  margin-top: .5rem;
  overflow: auto;
  padding-right: .15rem;
}
.term-grp { display: grid; gap: .3rem; }
.term-grp-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .1rem .45rem;
  margin: 0;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line-soft);
}
.term-grp-h b {
  color: var(--ink);
  font-family: var(--term-font);
  font-size: calc(var(--term-fs) * 0.92);
  font-weight: 750;
  letter-spacing: -.01em;
  text-transform: none;
}
.term-grp-h em {
  color: var(--dim);
  font-family: var(--term-font);
  font-style: normal;
  font-size: calc(var(--term-fs) * 0.82);
}
.term-grp .term-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.8rem, 1fr));
  gap: .3rem;
}
.term-grp .term-card {
  position: relative;
  min-height: 3.7rem;
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  padding: .45rem .5rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--inset);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.term-grp .term-card:hover {
  border-color: var(--accent-line);
  background: var(--hover);
  transform: translateY(-1px);
}
.term-grp .term-card.on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.term-card-t { display: grid; gap: .04rem; min-width: 0; }
.term-grp .term-card-t b {
  padding-right: 3.1rem;
  font-family: var(--term-font);
  font-size: calc(var(--term-fs) * 0.96);
  font-weight: 700;
  letter-spacing: -.01em;
  text-transform: none;
}
.term-card-t em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--mute);
  font-family: var(--term-font);
  font-style: normal;
  font-size: calc(var(--term-fs) * 0.82);
  line-height: 1.34;
}
/* Rozet sag ust kosede; baslik satiri o kadar yer birakir. */
.term-grp .term-card > i {
  position: absolute;
  top: .32rem;
  right: .36rem;
  padding: .1rem .34rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  color: var(--dim);
  font-family: var(--term-mono);
  font-size: calc(9px * var(--term-scale));
  font-style: normal;
  letter-spacing: .02em;
  white-space: nowrap;
}
.term-grp .term-card.on > i {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-dim);
}

/* Kucuk tel kafes onizleme */
.term-art {
  display: grid;
  align-content: start;
  gap: 2px;
  height: 2.5rem;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--card);
  overflow: hidden;
}
.term-art i, .term-art span { display: block; }
.term-art .a-hd { height: 3px; border-radius: 2px; background: var(--accent); opacity: .75; }
.term-art .a-ln { height: 2px; border-radius: 2px; background: var(--line); }
.term-art .a-ln.s { width: 58%; }
.term-art .a-row { height: 4px; border-radius: 2px; background: var(--line); }
.term-art .a-big { height: 11px; border-radius: 3px; background: var(--up-soft); }
.term-art .a-bar { height: 3px; border-radius: 2px; background: var(--up); opacity: .7; }
.term-art .a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.term-art .a-grid i { height: 8px; border-radius: 2px; background: var(--line); }
.term-art .a-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.term-art .a-kpi i { height: 14px; border-radius: 3px; background: var(--line); }
.term-art .a-heat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.term-art .a-heat i { height: 6px; border-radius: 1px; background: var(--line); }
.term-art .a-heat i:nth-child(2n) { background: var(--up); opacity: .55; }
.term-art .a-heat i:nth-child(3n) { background: var(--down); opacity: .5; }
.term-art .a-pie {
  width: 17px;
  height: 17px;
  margin: 0 auto 2px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  border-right-color: var(--up);
  border-bottom-color: var(--line);
  opacity: .8;
}
.term-art .a-note { height: 22px; border-radius: 3px; background: var(--line-soft); border: 1px dashed var(--line); }
.term-art .a-bub { width: 74%; height: 6px; border-radius: 3px; background: var(--line); }
.term-art .a-bub.r { margin-left: auto; background: var(--accent); opacity: .6; }
/* ---- Panel ayarlari ---- */
.term-cog {
  position: absolute;
  z-index: 9;
  padding: .55rem .6rem .6rem;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: term-pop .16s ease both;
}
.term-cog-hd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line-soft);
}
.term-cog-hd b {
  overflow: hidden;
  font-size: calc(11.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-cog-hd button {
  width: 1.3rem;
  height: 1.3rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: calc(14px * var(--term-scale));
  line-height: 1;
  cursor: pointer;
}
.term-cog-hd button:hover { background: var(--hover); color: var(--text); }
.term-cog-rows { display: grid; gap: .22rem; }
.term-cog-rows:empty { display: none; }
.term-cog-none,
.term-cog-hint {
  margin: 0;
  color: var(--mute);
  font-size: calc(10.5px * var(--term-scale));
  line-height: 1.4;
}
.term-cog-hint { margin: 0 0 .35rem; }
.term-cog-r {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
  min-height: 1.5rem;
}
.term-cog-r.wide { grid-template-columns: minmax(0, 1fr); gap: .16rem; }
.term-cog-r > span {
  overflow: hidden;
  color: var(--ink);
  font-size: calc(11px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-sw {
  flex: none;
  width: 1.85rem;
  height: 1.05rem;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--inset);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.term-sw i {
  display: block;
  width: .72rem;
  height: .72rem;
  border-radius: 50%;
  background: var(--dim);
  transition: transform .16s ease, background .16s ease;
}
.term-sw.on { background: var(--accent); border-color: var(--accent); }
.term-sw.on i { background: var(--on-accent); transform: translateX(.78rem); }
.term-cog-seg {
  display: flex;
  flex-wrap: wrap;
  gap: .14rem;
}
.term-cog-seg button {
  min-height: 1.35rem;
  padding: 0 .38rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--inset);
  color: var(--mute);
  font: inherit;
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-cog-seg button:hover { border-color: var(--accent-line); color: var(--text); }
.term-cog-seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.term-cog-ft {
  display: flex;
  gap: .25rem;
  margin-top: .45rem;
  padding-top: .4rem;
  border-top: 1px solid var(--line-soft);
}
.term-cog-ft button {
  flex: 1;
  min-height: 1.6rem;
  padding: 0 .4rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--inset);
  color: var(--ink);
  font: inherit;
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-cog-ft button:hover { border-color: var(--accent-line); }
.term-cog-ft button:disabled { opacity: .45; cursor: default; }
.term-cog-ft button.warn { color: var(--down); }
.term-cog-ft button.warn:hover { border-color: var(--down-line); background: var(--down-soft); }
.term-cog-btn.on { background: var(--accent-soft); color: var(--accent-dim); }
#term-root.dragging .term-cog { display: none; }

/* ---- Panel ici siralama ---- */
.term-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .16rem;
  margin-bottom: .3rem;
}
.term-sort em {
  margin-right: .1rem;
  color: var(--dim);
  font-style: normal;
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-sort button {
  min-height: 1.3rem;
  padding: 0 .34rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
.term-sort button:hover { border-color: var(--line); color: var(--text); }
.term-sort button.on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-dim);
}

/* Yeni panel goz onune gelirken kisa isaret */
.term-tile.just {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow);
}
.term-pf.flat { grid-template-columns: minmax(0, 1fr); }
#term-pick-note.ok { color: var(--up); }
.term-theme {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  margin-bottom: .15rem;
}
.term-theme button {
  display: grid;
  gap: .28rem;
  min-height: 0;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(11px * var(--term-scale));
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.term-theme button .theme-card-prev { height: 2.6rem; }
.term-theme button:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.term-theme button.on {
  border-color: var(--accent);
  box-shadow: var(--ring);
  background: var(--accent-soft);
}
.term-accents {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .15rem 0 .7rem;
}
.term-accents button {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 99px;
  background: var(--accent);
  cursor: pointer;
}
.term-accents button.on { border-color: var(--text); }
#term-tight-btn {
  width: 100%;
  min-height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(12px * var(--term-scale));
  font-weight: 650;
  cursor: pointer;
}
#term-tight-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.term-pal {
  position: absolute;
  z-index: 9;
  top: 3rem;
  left: 50%;
  width: min(28rem, calc(100vw - 1.4rem));
  transform: translateX(-50%);
  padding: .45rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: term-pop-mid .2s ease both;
}
.term-pal[hidden] { display: none !important; }
.term-pal input {
  width: 100%;
  min-height: 2.1rem;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
}
.term-pal input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.term-pal-list { display: grid; gap: .12rem; margin-top: .35rem; }
.term-pal-list a,
.term-pal-list button {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  text-align: left;
  padding: .38rem .45rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.term-pal-list a:hover,
.term-pal-list button:hover,
.term-pal-list .on { background: var(--hover); }
.term-pal-list em { color: var(--mute); font-style: normal; font-size: calc(11px * var(--term-scale)); }

.term-help {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--fog);
}
.term-help[hidden] { display: none !important; }
.term-help-card {
  width: min(22rem, 100%);
  padding: 1rem 1.05rem .9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.term-help-card h2 { margin: 0 0 .55rem; font-size: calc(14px * var(--term-scale)); }
.term-help-card ul { margin: 0; padding: 0; list-style: none; }
.term-help-card li {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  min-height: 1.7rem;
  align-items: center;
  font-size: calc(12.5px * var(--term-scale));
}
.term-help-card span { color: var(--mute); }
.term-help-card kbd {
  min-width: 1.6rem;
  padding: .12rem .35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--inset);
  font: inherit;
  font-size: calc(11px * var(--term-scale));
  font-weight: 750;
  text-align: center;
}
.term-help-card p {
  margin: .55rem 0 .7rem;
  color: var(--mute);
  font-size: calc(12px * var(--term-scale));
}
.term-help-card button {
  width: 100%;
  min-height: 2rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.term-search {
  display: block;
  margin: 0 0 .4rem;
}
.term-search input {
  width: 100%;
  min-height: 1.85rem;
  padding: 0 .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(12px * var(--term-scale));
}
.term-search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.term-list,
.term-head.list {
  display: grid;
  grid-template-columns: var(--c-ava) minmax(0, 1fr) var(--c-num);
  gap: .42rem;
  align-items: center;
}
.term-list {
  min-height: 2.15rem;
  padding: .18rem .2rem;
  margin: 0 -.2rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.term-head.list {
  padding: 0 calc(.2rem + var(--sb, 0px)) .16rem .2rem;
  margin: 0 -.2rem .1rem;
}
.term-fix .term-head.list { margin: 0 -.2rem; }
.term-list:hover { background: var(--hover); }
.term-list.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.term-list.nologo,
.term-head.list.nologo { grid-template-columns: minmax(0, 1fr) var(--c-num); }
.term-list.duo,
.term-head.list.duo { grid-template-columns: var(--c-ava) minmax(0, 1fr) var(--c-num) var(--c-num); }
.term-list.duo.nologo,
.term-head.list.duo.nologo { grid-template-columns: minmax(0, 1fr) var(--c-num) var(--c-num); }
.term-head.list > span:last-child,
.term-head.list.duo > span:nth-last-child(-n+2) { text-align: right; }
.term-list.lean { min-height: 1.7rem; }
.term-list.lean b { font-size: calc(12.5px * var(--term-scale)); }
.term-list .term-sub {
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
  font-weight: 650;
}
.term-list .term-sub.up { color: var(--up); }
.term-list .term-sub.down { color: var(--down); }
.term-list span {
  min-width: 0;
  display: grid;
  gap: .04rem;
}
.term-list b {
  font-size: calc(12px * var(--term-scale));
  letter-spacing: -.02em;
}
.term-list em {
  overflow: hidden;
  color: var(--mute);
  font-style: normal;
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-list strong {
  min-width: 0;
  justify-self: stretch;
  text-align: right;
  font-family: var(--term-mono);
  font-size: calc(12px * var(--term-scale));
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.term-list strong.up { color: var(--up); }
.term-list strong.down { color: var(--down); }
.term-mover {
  display: grid;
  grid-template-columns: minmax(5.4rem, 8.5rem) minmax(0, 1fr) auto;
  gap: .45rem .7rem;
  align-items: center;
  min-height: 2.35rem;
  padding: .28rem .2rem;
  margin: 0 -.2rem;
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
}
.term-mover:hover { background: var(--hover); }
.term-mover.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.term-mover-id {
  min-width: 0;
  display: grid;
  gap: .04rem;
}
.term-mover-id b {
  font-size: calc(12.5px * var(--term-scale));
  letter-spacing: -.02em;
}
.term-mover-id em {
  overflow: hidden;
  color: var(--mute);
  font-style: normal;
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-mover-bar {
  display: block;
  height: .42rem;
  border-radius: 99px;
  background: var(--inset);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  overflow: hidden;
}
.term-mover-bar u {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--mute);
}
.term-mover-bar u.up { background: var(--up); }
.term-mover-bar u.down { background: var(--down); }
.term-mover-num {
  display: grid;
  justify-items: end;
  gap: .02rem;
  min-width: 4.4rem;
}
.term-mover-num strong {
  font-family: var(--term-mono);
  font-size: calc(12px * var(--term-scale));
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.term-mover-num strong.up { color: var(--up); }
.term-mover-num strong.down { color: var(--down); }
.term-mover-num em {
  font-style: normal;
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.term-mover-num em.up { color: var(--up); }
.term-mover-num em.down { color: var(--down); }
.term-mover-num em.mute { color: var(--mute); }
.term-ava {
  width: var(--c-ava);
  height: var(--c-ava);
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: calc(8.5px * var(--term-scale));
  font-weight: 800;
  overflow: hidden;
}
.term-list .term-ava { width: var(--c-ava); height: var(--c-ava); }
img.term-ava {
  object-fit: contain;
  padding: .12rem;
  background: var(--raise);
}
.term-mkt {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .38rem;
  height: 100%;
  min-height: 0;
}
.term-mkt:not(:has(.term-gold)) { grid-template-rows: minmax(0, 1fr); }
.term-desk-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: .32rem;
  height: 100%;
  min-height: 0;
}
.term-desk-kpi {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: .04rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: .36rem .44rem .22rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--inset);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  /* Kutu degil hucre olculur: dort kutucuk kendi boyuna gore seyrelir. */
  container-type: size;
  container-name: kpi;
}
.term-desk-kpi:hover {
  border-color: var(--accent-line);
  background: var(--raise);
}
.term-desk-kpi.on { box-shadow: inset 2px 0 0 var(--accent); }
.term-desk-kpi small {
  color: var(--mute);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-desk-kpi b {
  font-family: var(--term-mono);
  font-size: calc(18.4px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.term-desk-kpi em {
  font-style: normal;
  font-family: var(--term-mono);
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 750;
}
.term-desk-kpi em.up { color: var(--up); }
.term-desk-kpi em.down { color: var(--down); }
.term-desk-kpi .term-mini {
  width: 100%;
  height: 100%;
  min-height: 14px;
  max-height: 4.2rem;
  margin-top: .08rem;
  align-self: stretch;
}
.term-gold {
  display: grid;
  gap: .06rem;
  min-height: 0;
}
.term-head.gold,
.term-row.gold {
  grid-template-columns: minmax(0, 1.4fr) minmax(3.4rem, 5.2rem) minmax(2.8rem, 4.2rem);
}
.term-head.gold.logo,
.term-row.gold.logo {
  grid-template-columns: var(--c-ava) minmax(0, 1.4fr) minmax(3.4rem, 5.2rem) minmax(2.8rem, 4.2rem);
}
/* Fon satirinda kod ustte, uzun ad altta; logo solda hizali durur. */
.term-row.gold > span {
  display: grid;
  gap: .02rem;
  min-width: 0;
}
.term-row.gold span i {
  overflow: hidden;
  color: var(--mute);
  font-style: normal;
  font-size: calc(9.8px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-row.gold.logo { min-height: 1.9rem; }
/* Kutu kuculdukce seyrelme kurallari dosyanin sonundadir: kap sorgusu
   ozgulluk eklemez, temel kurallardan sonra gelmesi gerekir. */
.term-ozet {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  height: 100%;
  min-height: 0;
}
.term-ozet .term-stats {
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
  overflow: hidden;
}
.term-ozet .term-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  container-type: size;
  container-name: stat;
}
.term-row.gold span b { font-size: calc(11.5px * var(--term-scale)); }
.term-heroes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.4rem, 1fr));
  gap: .45rem;
  height: 100%;
  min-height: 0;
  align-content: start;
  overflow: hidden;
}
.term-hero {
  display: flex;
  flex-direction: column;
  gap: .42rem;
  min-height: 0;
  height: 100%;
  padding: .55rem .55rem .5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inset);
  color: inherit;
  text-decoration: none;
}
.term-hero:hover {
  border-color: var(--accent-line);
  background: var(--raise);
  transform: translateY(-2px);
}
.term-hero.on { box-shadow: inset 0 0 0 1px var(--accent-line); }
.term-hero-hd {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  gap: .4rem;
  align-items: center;
}
.term-hero-hd b { display: block; font-size: calc(13px * var(--term-scale)); }
.term-hero-hd small {
  display: block;
  overflow: hidden;
  color: var(--mute);
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-hero-box {
  flex: 1;
  display: grid;
  align-content: center;
  min-height: 0;
  padding: .4rem .5rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line-soft);
}
.term-hero-box.up { background: var(--up-soft); border-color: var(--up-line); }
.term-hero-box.down { background: var(--down-soft); border-color: var(--down-line); }
.term-hero-box em {
  color: var(--mute);
  font-style: normal;
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-hero-box.up em,
.term-hero-box.down em { color: inherit; opacity: .72; }
.term-hero-box strong {
  font-family: var(--term-mono);
  font-size: calc(24.8px * var(--term-scale));
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.term-hero-box.up strong { color: var(--up); }
.term-hero-box.down strong { color: var(--down); }
.term-hero-ft {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .45rem;
  color: var(--dim);
  font-size: calc(10.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
}
.term-hero-ft .up { color: var(--up); }
.term-hero-ft .down { color: var(--down); }
.term-pf {
  display: grid;
  grid-template-columns: minmax(7.2rem, 8.6rem) minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
/* Portfoy ozeti sabit basta durur; paylar altta akar. */
.term-fix .term-pf { height: auto; }
.term-pf-viz { display: grid; place-items: center; }
/* Halka kutu kisaldiginda kendi de kisalir: ozet basi kutuyu yutmaz. */
.term-donut {
  width: 100%;
  max-width: min(8.4rem, 38cqh);
  height: auto;
}
.term-donut-hole { fill: var(--card); }
.term-pf-sum small {
  display: block;
  color: var(--mute);
  font-size: calc(11px * var(--term-scale));
  font-weight: 750;
}
.term-pf-sum > b {
  display: block;
  margin: .1rem 0 .22rem;
  font-size: calc(21px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.term-pf-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .7rem;
  padding-top: .04rem;
}
.term-pf-stats span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: .28rem;
}
.term-pf-stats em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.term-pf-stats strong {
  font-size: calc(12.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.term-pf-stats strong.up { color: var(--up); }
.term-pf-stats strong.down { color: var(--down); }
.term-pf-guess {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .16rem .36rem;
  margin: .02rem 0 .28rem;
  padding: .16rem .5rem .18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--inset);
}
.term-pf-guess .tag {
  font-style: normal;
  font-size: calc(9px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: .04rem .36rem;
}
.term-pf-guess > b {
  font-size: calc(12.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: var(--text);
}
.term-pf-guess.up { border-color: var(--up-line); }
.term-pf-guess.up > b { color: var(--up); }
.term-pf-guess.down { border-color: var(--down-line); }
.term-pf-guess.down > b { color: var(--down); }
.term-pf-guess strong { font-size: calc(11.5px * var(--term-scale)); font-variant-numeric: tabular-nums; font-weight: 750; }
.term-pf-guess strong.up { color: var(--up); }
.term-pf-guess strong.down { color: var(--down); }
.term-pf-guess span { color: var(--dim); font-size: calc(10px * var(--term-scale)); }
.term-pf-guess.wait > b, .term-pf-guess.off > b { color: var(--mute); font-size: calc(11px * var(--term-scale)); font-weight: 600; }
.term-pf-legs {
  margin: .35rem 0 0;
  color: var(--dim);
  font-size: calc(11px * var(--term-scale));
}
.term-body:has(.term-chat) {
  display: flex;
  flex-direction: column;
  padding: .28rem .4rem .32rem;
}
.term-body:has(.term-pf),
.term-body:has(.term-mkt),
.term-body:has(.term-heroes) {
  padding: .42rem .48rem .45rem;
}

.term.tight .term-top { min-height: calc(2.2rem * var(--term-scale-user)); }
.term.tight .term-brand img { height: 22px; }
.term.tight .term-hd { min-height: 1.65rem; }
.term.tight .term-body { padding: .28rem .36rem .3rem; }
.term.tight .term-row { min-height: 1.4rem; }
.term.tight .term-desk { padding: .32rem; }

.term-dl,
.term-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .85rem;
  min-height: 2rem;
  padding: 0 .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-size: calc(12px * var(--term-scale));
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.term-dl:hover,
.term-dl-btn:hover { border-color: var(--accent-line); }
.term-dl-btn { width: 100%; margin-top: .55rem; }

.term-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: .4rem;
}
.term-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  min-height: 7.4rem;
  padding: .55rem .6rem .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inset);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}
.term-card-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--line);
}
.term-card-hd {
  display: grid;
  gap: .12rem;
}
/* Logolu kart basligi: solda logo, sagda tur ve kod. */
.term-card-hd.logo {
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  gap: .1rem .4rem;
}
.term-card-hd.logo .term-ava {
  grid-row: span 2;
  width: 1.5rem;
  height: 1.5rem;
  font-size: calc(7.8px * var(--term-scale));
}
.term-row .term-ava {
  width: var(--c-ava);
  height: var(--c-ava);
  font-size: calc(7.4px * var(--term-scale));
}
.term-card-vals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
}
.term-card-vals span {
  display: grid;
  gap: .06rem;
  min-width: 0;
}
.term-card-vals em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(10px * var(--term-scale));
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.term-card-vals b {
  font-size: calc(13px * var(--term-scale));
}
.term-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  background: var(--raise);
}
.term-card.on { box-shadow: inset 0 0 0 1px var(--accent-line); }
.term-card.slim { min-height: 5.4rem; }
.term-card.news b.wrap,
.term-card .wrap {
  font-family: inherit;
  font-size: calc(12.5px * var(--term-scale));
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.term-cards.news { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.term-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.term-split > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.term-split > div > .term-asof { flex: none; }
.term-split .term-cards { grid-template-columns: minmax(0, 1fr); }
.term-split .term-card { min-height: 0; }
.term-card small {
  color: var(--mute);
  font-size: calc(10px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-card b {
  font-family: var(--term-mono);
  font-size: calc(15px * var(--term-scale));
}
.term-card .wrap { font-family: inherit; }
.term-card .drv {
  margin: 0;
  color: var(--dim);
  font-size: calc(11px * var(--term-scale));
  line-height: 1.35;
}

.term-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: .35rem; }
.term-chat.site { gap: 0; }
.term-chat.site .chat-tabs { padding: 0 0 .4rem; }
.term-chat.site .chat-stream {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.term-chat.site .chat-foot {
  padding: .4rem 0 .1rem;
  background: transparent;
}
.term-chat.site .chat-empty { padding: .8rem .2rem; }
.term-chat-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: .28rem;
}
.term-chat-row {
  padding: .28rem .36rem;
  border-radius: 7px;
  background: var(--inset);
}
.term-chat-row b { font-size: calc(11px * var(--term-scale)); }
.term-chat-row span { display: block; margin-top: .08rem; color: var(--text); font-size: calc(12px * var(--term-scale)); }
.term-chat-row em { color: var(--dim); font-style: normal; font-size: calc(10px * var(--term-scale)); }
.term-chat form {
  display: flex;
  gap: .28rem;
}
.term-chat input {
  flex: 1;
  min-height: 2rem;
  padding: 0 .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
}
.term-chat button {
  min-height: 2rem;
  padding: 0 .55rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.term-eco .stars { color: var(--warn); letter-spacing: .05em; }
.term-tile.born {
  animation: term-in .38s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.term.edit .term-tile {
  transition: left .14s ease, top .14s ease, width .14s ease, height .14s ease;
}
.term.dragging .term-tile { transition: none; }
.term.dragging .term-tile.moving {
  transition: none;
  z-index: 5;
}
.term-card { animation: none; }
.term-kpi {
  transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.term-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.term-row { transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.term-row:hover { background: var(--hover); }
.term-ghost { transition: left .08s ease, top .08s ease, width .08s ease, height .08s ease; }
@keyframes term-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes term-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes term-pop-mid {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateX(-50%); }
}
@keyframes term-up {
  0% { background: var(--up-soft); box-shadow: inset 0 0 0 1px var(--up-line); }
  100% { background: transparent; box-shadow: none; }
}
@keyframes term-down {
  0% { background: var(--down-soft); box-shadow: inset 0 0 0 1px var(--down-line); }
  100% { background: transparent; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .term-tile.born,
  .term-card,
  .term-tape-track,
  .term-look,
  .term-tpl,
  .term-set,
  .term-pal,
  .term-drawer,
  .term-flash-up,
  .term-flash-down { animation: none; }
  .term-kpi,
  .term-row,
  .term-ghost,
  .term-card { transition: none; }
}

/* ---- Fon paneli (her fon kendi kutusunda) ---- */
/* Fon karti: baslik ve buyuk sayi kendi boyunda durur, artan yeri
   etkileyenler alir. Boylece hicbir blok kendi icinde kirpilmaz. */
.term-fon1 {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  animation: term-in .3s ease both;
}
.term-fon1 [hidden] { display: none !important; }
.term-fon1 > * { flex: 0 0 auto; min-height: 0; }
.term-fon1 .term-fon-hero { min-height: 0; }
/* Kalan yer burada: kendi yuksekligine gore satir gosterir. */
.term-fon1 .term-fon-drv {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  container-name: drv;
}
.term-fon1 .term-fon-ft { margin-top: auto; }
.term-fon1.solo {
  gap: 0;
  justify-content: center;
}
.term-fon1.solo .term-fon-hero {
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  min-height: 0;
  text-align: center;
}
.term-fon1.solo .term-fon-hero em,
.term-fon1.solo .term-fon-hero strong,
.term-fon1.solo .term-fon-hero > span { justify-self: center; }
.term-fon1.solo .term-fon-hero strong {
  font-size: clamp(1.2rem, 12cqmin, 2.1rem);
}
.term-fon-who {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  align-items: center;
  gap: .4rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.term-fon-who-t {
  min-width: 0;
  display: grid;
  gap: .04rem;
}
.term-fon-who-t b {
  overflow: hidden;
  font-family: var(--term-mono);
  font-size: calc(16px * var(--term-scale));
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-fon-who-t em {
  overflow: hidden;
  color: var(--mute);
  font-style: normal;
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-fon-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .18rem;
}
.term-fon-hero {
  display: grid;
  gap: .06rem;
  padding: .42rem .5rem .45rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}
.term-fon-hero.up { background: var(--up-soft); border-color: var(--up-line); }
.term-fon-hero.down { background: var(--down-soft); border-color: var(--down-line); }
.term-fon-hero em {
  color: var(--mute);
  font-style: normal;
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.term-fon-hero.up em,
.term-fon-hero.down em { color: inherit; opacity: .75; }
.term-fon-hero strong {
  font-family: var(--term-mono);
  font-size: calc(24px * var(--term-scale));
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1.08;
}
.term-fon-hero.up strong { color: var(--up); }
.term-fon-hero.down strong { color: var(--down); }
.term-fon-hero > span {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .5rem;
  margin-top: .12rem;
}
.term-fon-hero > span i {
  color: var(--dim);
  font-style: normal;
  font-size: calc(10px * var(--term-scale));
}
.term-fon-hero > span b {
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
}
.term-fon-hero > span b.up { color: var(--up); }
.term-fon-hero > span b.down { color: var(--down); }
.term-fon-hero > span b.mute { color: var(--mute); }
.term-fon-cov {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .1rem .4rem;
}
.term-fon-cov span {
  color: var(--dim);
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-fon-cov b {
  color: var(--ink);
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 700;
  text-align: right;
}
.term-fon-bar {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  margin-top: .1rem;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.term-fon-bar u {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}
.term-fon-bar u.up { background: var(--up); }
.term-fon-bar u.warn { background: var(--warn); }
.term-fon-bar u.down { background: var(--down); }
.term-fon-lbl {
  margin: 0 0 .16rem;
  color: var(--dim);
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.term-fon-drv { display: grid; gap: .1rem; }
.term-fon-d {
  display: grid;
  grid-template-columns: minmax(2.6rem, auto) 2.4rem minmax(1.6rem, 1fr) 3.4rem;
  align-items: center;
  gap: .3rem;
}
.term-fon-d b {
  overflow: hidden;
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-fon-d em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(9.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.term-fon-track {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}
.term-fon-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.term-fon-track u {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 99px;
}
.term-fon-track u.up { background: var(--up); }
.term-fon-track u.down { background: var(--down); }
.term-fon-d strong {
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.term-fon-d strong.up { color: var(--up); }
.term-fon-d strong.down { color: var(--down); }
.term-fon-d strong.mute { color: var(--mute); }
.term-fon-ft {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .28rem;
  padding-top: .34rem;
  border-top: 1px solid var(--line-soft);
}
.term-fon-ft span { display: grid; gap: .04rem; min-width: 0; }
.term-fon-ft em {
  color: var(--dim);
  font-style: normal;
  font-size: calc(9px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.term-fon-ft b {
  overflow: hidden;
  font-size: calc(10.5px * var(--term-scale));
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-fon-ft b.up { color: var(--up); }
.term-fon-ft b.down { color: var(--down); }
.term-fon-ft b.mute { color: var(--mute); }
.term-fon-note {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--dim);
  font-size: calc(10px * var(--term-scale));
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.term-fon1 .term-fon-who { grid-template-columns: 2.05rem minmax(0, 1fr); }
.term-fon1 .term-fon-who-t b {
  font-family: var(--term-mono);
  font-size: calc(16px * var(--term-scale));
  font-weight: 800;
  letter-spacing: -.03em;
}
.term-fon1 .term-fon-hero { padding: .55rem .6rem .58rem; }
.term-fon1 .term-fon-hero strong { font-size: calc(27.52px * var(--term-scale)); }
.term-fon1 .term-fon-drv { margin-top: .06rem; }

/* ---- Bos durum ---- */
.term-blank {
  display: grid;
  gap: .4rem;
  place-content: center;
  justify-items: center;
  min-height: 8rem;
  height: 100%;
  padding: .8rem .7rem;
  text-align: center;
}
.term-blank b { font-size: calc(13.5px * var(--term-scale)); letter-spacing: -.01em; }
.term-blank p {
  margin: 0;
  max-width: 26rem;
  color: var(--mute);
  font-size: calc(11.5px * var(--term-scale));
  line-height: 1.45;
}
.term-blank-a {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem;
  margin-top: .2rem;
}
.term-blank-a button {
  min-height: 1.9rem;
  padding: 0 .7rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: calc(11.5px * var(--term-scale));
  font-weight: 700;
  cursor: pointer;
}
.term-blank-a button.ghost {
  border-color: var(--line);
  background: var(--inset);
  color: var(--text);
}
.term-blank-a button:hover { filter: brightness(1.06); }
.term-blank-a button.ghost:hover { border-color: var(--accent-line); filter: none; }

/* ---- Fon secici ---- */
.term-pick {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: start center;
  padding: 3rem 1rem 1rem;
  background: var(--fog);
  overflow: auto;
}
.term-pick[hidden] { display: none !important; }
.term-pick-card {
  width: min(29rem, 100%);
  padding: .8rem .85rem .75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: term-pop .2s ease both;
}
.term-pick-hd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  margin-bottom: .55rem;
}
.term-pick-hd h2 {
  margin: 0 0 .16rem;
  font-family: var(--term-font);
  font-size: calc(var(--term-fs) * 1.12);
  letter-spacing: -.02em;
  text-transform: none;
}
.term-pick-hd p {
  margin: 0;
  color: var(--mute);
  font-family: var(--term-font);
  font-size: calc(var(--term-fs) * 0.86);
  line-height: 1.4;
}
#term-pick-x {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--inset);
  color: var(--mute);
  font: inherit;
  font-size: calc(15px * var(--term-scale));
  line-height: 1;
  cursor: pointer;
}
#term-pick-x:hover { border-color: var(--accent-line); color: var(--text); }
.term-pick-list {
  display: grid;
  gap: .1rem;
  max-height: 17rem;
  overflow: auto;
  margin-bottom: .2rem;
}
.term-pick-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .35rem .45rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.term-pick-list button:hover {
  border-color: var(--accent-line);
  background: var(--hover);
}
.term-pick-list button.on { opacity: .45; cursor: default; }
.term-pick-list span { min-width: 0; display: grid; gap: .04rem; }
.term-pick-list b {
  font-family: var(--term-mono);
  font-size: calc(12px * var(--term-scale));
}
.term-pick-list em {
  overflow: hidden;
  color: var(--mute);
  font-style: normal;
  font-size: calc(10.5px * var(--term-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-pick-list i {
  color: var(--dim);
  font-style: normal;
  font-size: calc(9.5px * var(--term-scale));
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.term-pick-have {
  display: flex;
  flex-wrap: wrap;
  gap: .22rem;
}
.term-pick-have button {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  min-height: 1.5rem;
  padding: 0 .42rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--inset);
  color: var(--text);
  font: inherit;
  font-family: var(--term-mono);
  font-size: calc(10.5px * var(--term-scale));
  font-weight: 700;
  cursor: pointer;
}
.term-pick-have button i { font-style: normal; color: var(--dim); }
.term-pick-have button:hover {
  border-color: var(--down-line);
  background: var(--down-soft);
  color: var(--down);
}
.term-pick-have button:hover i { color: inherit; }
.term-pick-have .term-empty { padding: .1rem; }
.term-pick #term-pick-note { margin: .45rem 0 0; }

/* ---- Cila ---- */
.term-desk,
.term-body,
.term-pick-list,
.term-drawer,
.term-set,
.term-look,
.term-tpl { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
.term ::-webkit-scrollbar { width: 9px; height: 9px; }
.term ::-webkit-scrollbar-track { background: transparent; }
.term ::-webkit-scrollbar-thumb {
  background: var(--scroll);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 99px;
}
.term ::-webkit-scrollbar-corner { background: transparent; }
.term-top { background: linear-gradient(180deg, var(--raise), var(--chrome) 82%); }
.term-brand {
  padding-right: .5rem;
  margin-right: .1rem;
  border-right: 1px solid var(--line);
}
.term-tile {
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.term-tile:hover { border-color: var(--hair); box-shadow: var(--shadow); }
.term-hd { background: linear-gradient(180deg, var(--raise), var(--card)); }
.term-dot {
  width: .34rem;
  height: .34rem;
  border-radius: 2px;
  transform: rotate(45deg);
}
.term-tile:hover .term-hd b { color: var(--text); }
.term-hd b { color: var(--ink); transition: color .16s ease; }
.term-body:has(.term-fons),
.term-body:has(.term-blank) { padding: .42rem .48rem .45rem; }
.term-pill { border: 1px solid var(--line-soft); }
.term-pill.up { border-color: var(--up-line); }
.term-pill.down { border-color: var(--down-line); }
.term-pill.warn { border-color: var(--warn-line); }
.term-pill.accent { border-color: var(--accent-line); }
.term-search input::placeholder,
.term-pal input::placeholder { color: var(--dim); }
.term-band {
  position: relative;
  display: block;
  height: 3px;
  margin-top: .26rem;
  border-radius: 99px;
  background: var(--line);
}
.term-band i {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 7px;
  margin-left: -1px;
  border-radius: 99px;
  background: var(--accent);
}
.term-pf-legs {
  display: flex;
  flex-wrap: wrap;
  gap: .12rem .5rem;
  margin: .4rem 0 0;
  color: var(--mute);
  font-size: calc(10.5px * var(--term-scale));
}
.term-pf-legs span {
  display: inline-flex;
  align-items: center;
  gap: .26rem;
}
.term-pf-legs i {
  width: .48rem;
  height: .48rem;
  border-radius: 2px;
}
.term-pf-legs b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .term-top {
    display: flex;
    flex-wrap: wrap;
  }
  .term-clock { order: -1; width: 100%; }
  .term-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .term-fons { grid-template-columns: minmax(0, 1fr); }
  .term-fon-tools { opacity: 1; }
  .term-pick { padding: 1rem .7rem; }
}
@media (max-width: 860px) {
  .term-leave { display: inline-flex; }
  .term-tools a[href="/"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .term-fon,
  .term-pick-card { animation: none; }
  .term-fon,
  .term-fon-tools,
  .term-tile { transition: none; }
}
@media (max-width: 980px) {
  body.terminal .top { display: flex !important; }
  body.terminal .side { display: none; }
  .term-top { flex-wrap: wrap; }
  .term-seg { margin-left: 0; }
  .term-clock { margin-left: 0; }
  .term-tape-track { animation: none; flex-wrap: wrap; width: auto; }
  .term-board { display: grid; gap: .45rem; }
  /* Dar ekranda kutu yuksekligi icerikten gelir. `container-type: size` bu
     durumda yuksekligi sifirlar; o yuzden burada kapatiyoruz. */
  .term-tile {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 16rem;
    max-height: 32rem;
    container-type: normal;
  }
  .term-ghost,
  .term-rses { display: none !important; }
  .term.edit .term-board { background-image: none; }
  .term-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-bar { display: none; }
}

/* ==========================================================================
   Kutu kuculdukce icerik seyrelir.
   Bu blok dosyanin SONUNDA durur. Kap sorgusu (`@container`) ozgulluk
   eklemez; ayni secici temel kuralda sonra yazilirsa sorguyu ezer. Yukari
   tasinirsa kurallarin hicbiri islemez.
   ========================================================================== */

/* ---- Piyasa ozeti: dort kutucuk, kendi boyuna gore ---- */
@container tile (min-width: 34rem) {
  .term-desk-kpis { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; }
}
/* Kisa kutuda metal seridi cikar; sayilar yerini alir. */
@container tile (max-height: 16rem) {
  .term-gold { display: none; }
  .term-mkt { grid-template-rows: minmax(0, 1fr); }
}
/* Basik ve genis kutuda dort kutucuk tek sıraya gecer: her biri nefes alir. */
@container tile (max-height: 12rem) and (min-width: 22rem) {
  .term-desk-kpis { grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr; }
}
@container kpi (max-height: 5.4rem) {
  .term-desk-kpi .term-mini { display: none; }
}
@container kpi (max-height: 4.4rem) {
  .term-desk-kpi em { display: none; }
  .term-desk-kpi b { font-size: calc(15.5px * var(--term-scale)); }
}
@container kpi (max-height: 3rem) {
  .term-desk-kpi small { display: none; }
  .term-desk-kpi b { font-size: calc(13.5px * var(--term-scale)); }
}

/* ---- Gun ozeti: kutucuk kendi boyuna gore ---- */
@container tile (max-height: 16rem) {
  .term-ozet .term-stat:nth-child(n+7) { display: none; }
}
@container tile (max-height: 11rem) {
  .term-ozet .term-session { display: none; }
  .term-ozet .term-stat:nth-child(n+4) { display: none; }
  /* Kutucugun kendi dolgusu kendi sorgusundan degistirilemez: kutudan gelir. */
  .term-ozet .term-stat { padding: .1rem .32rem; }
  .term-ozet .term-stat b { font-size: calc(11.5px * var(--term-scale)); }
}
/* Aciklama satiri kutucuga gore kisalir; deger hep tam gorunur. */
@container stat (max-height: 9rem) {
  .term-stat p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
}
@container stat (max-height: 7rem) {
  .term-stat p { -webkit-line-clamp: 1; line-clamp: 1; }
}
@container stat (max-height: 3.4rem) {
  .term-stat p { display: none; }
}
/* Etiket sona kadar kalir: sayinin ne oldugu anlasilmali. */
@container stat (max-height: 2.6rem) {
  .term-stat small { font-size: calc(8.6px * var(--term-scale)); }
  .term-stat b { font-size: calc(11.5px * var(--term-scale)); }
}
@container stat (max-height: 1.7rem) {
  .term-stat small { display: none; }
}

/* ---- Liste panelleri: cok kisa kutuda bas sadelesir, yer satira kalir ---- */
@container tile (max-height: 11rem) {
  .term-fix .term-search,
  .term-fix .term-sort,
  .term-fix .term-stats,
  .term-chat .chat-tabs { display: none; }
}
@container tile (max-height: 9rem) {
  .term-fix .term-head { display: none; }
}
@container tile (max-height: 15rem) {
  .term-feat p,
  .term-call { display: none; }
}
@container tile (max-height: 12.5rem) {
  .term-feat { display: none; }
}

/* ---- Portfoy ozeti ---- */
@container tile (max-height: 17rem) {
  .term-pf-legs { display: none; }
}
@container tile (max-height: 15rem) {
  .term-pf-sum > b { margin: .1rem 0 .28rem; }
}
/* Dar ve kisa kutuda halka yerini sayilara birakir; genis kutuda kalir. */
@container tile (max-height: 15rem) and (max-width: 27rem) {
  .term-pf-viz { display: none; }
  .term-pf { grid-template-columns: minmax(0, 1fr); }
}
@container tile (max-height: 12.5rem) {
  .term-pf-viz,
  .term-pf-guess { display: none; }
  .term-pf { grid-template-columns: minmax(0, 1fr); }
  .term-pf-sum > b {
    margin: .06rem 0 .18rem;
    font-size: calc(17px * var(--term-scale));
  }
  .term-pf-stats { gap: .1rem .5rem; }
}
/* Cok kisa kutuda ozet tek satira iner: toplam, gun ve kar tek serit.
   Boylece paylardan en az bir satir tam gorunur. */
@container tile (max-height: 10.2rem) {
  .term-pf-sum small { display: none; }
  .term-pf-sum > b {
    margin: 0 0 .12rem;
    font-size: calc(15.5px * var(--term-scale));
  }
  .term-pf-stats { gap: .08rem .45rem; }
  .term-pf-stats em { font-size: calc(9px * var(--term-scale)); }
  .term-pf-stats strong { font-size: calc(11px * var(--term-scale)); }
}

/* ---- Fon karti: sayi kuculur; blogu kapatmayi JS (termFitFon) yapar ---- */
@container tile (max-height: 22rem) {
  .term-fon1 .term-fon-hero strong { font-size: calc(24px * var(--term-scale)); }
}
@container tile (max-height: 18rem) {
  .term-fon1 .term-fon-hero strong { font-size: calc(21px * var(--term-scale)); }
}
@container tile (max-height: 15rem) {
  .term-fon1 .term-fon-hero { padding: .42rem .5rem .44rem; }
  .term-fon1 .term-fon-hero strong { font-size: calc(18.5px * var(--term-scale)); }
}
@container tile (max-height: 12rem) {
  .term-fon1 .term-fon-hero strong { font-size: calc(16.5px * var(--term-scale)); }
}
/* Etkileyenler kalan yeri alir: kac satir sigiyorsa o kadar gosterir. */
@container drv (max-height: 6rem) {
  .term-fon-d:nth-of-type(4) { display: none; }
}
@container drv (max-height: 4.8rem) {
  .term-fon-d:nth-of-type(3) { display: none; }
}
@container drv (max-height: 3.6rem) {
  .term-fon-d:nth-of-type(2) { display: none; }
}
@container drv (max-height: 2.6rem) {
  .term-fon-lbl { display: none; }
}
/* Tek satira bile yer yoksa blok tumden cekilir. */
@container drv (max-height: 1.1rem) {
  .term-fon-d { display: none; }
}
.term-tile.fon.slim .term-stale { display: none; }

/* ---- Haber / KAP kartlari: cumle ortasindan kesilmez ---- */
@container card (max-height: 8rem) {
  .term-card .sub { display: none; }
  .term-card .wrap { -webkit-line-clamp: 2; line-clamp: 2; }
}
@container card (max-height: 6.4rem) {
  .term-card .wrap { -webkit-line-clamp: 1; line-clamp: 1; }
}

/* ---- Dar kutu: panel iki sutuna kadar kucultulebilir ----
   Yukseklik kurallari yukarida; burasi genislige gore sadeleşme. Sayi
   sutunlari daralir, sadece yer tutan parcalar cekilir. */
@container tile (max-width: 18rem) {
  .term-row,
  .term-head,
  .term-list {
    --c-code: minmax(2.4rem, 3.1rem);
    --c-num: minmax(2.1rem, 4rem);
  }
  .term-row .term-mini { width: 2.2rem; }
  .term-call { display: none; }
  .term-fon-ft { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .16rem .28rem; }
  .term-fon-ft span:nth-child(n+3) { display: none; }
  .term-fon-who-t em { display: none; }
  .term-fon-hero > span {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 .3rem;
  }
  .term-fon-hero > span i { display: grid; gap: .02rem; }
}
@container tile (max-width: 15rem) {
  .term-row,
  .term-head,
  .term-list { --c-num: minmax(1.9rem, 3.7rem); }
  /* Sayilar bir tik kucultulur: sutun daralinca kesilmesin. */
  .term-row em,
  .term-row b,
  .term-head,
  .term-list strong { font-size: calc(9.9px * var(--term-scale)); }
  .term-fix .term-sort em { display: none; }
  .term-fix .term-sort button:nth-of-type(n+5) { display: none; }
  .term-fon1 .term-fon-chips { display: none; }
  .term-fon-d { grid-template-columns: minmax(2.4rem, 1fr) 2.2rem 3.2rem; }
  .term-fon-d .term-fon-track { display: none; }
}
@container tile (max-width: 13rem) {
  /* Altin satirda (fon / kur) sayilar kisalir, ad sutunu kalir. */
  .term-head.gold,
  .term-row.gold { grid-template-columns: minmax(0, 1fr) minmax(2.3rem, 3.2rem) minmax(2.1rem, 2.9rem); }
  .term-head.gold.logo,
  .term-row.gold.logo { grid-template-columns: var(--c-ava) minmax(0, 1fr) minmax(2.3rem, 3.2rem) minmax(2.1rem, 2.9rem); }
  /* KAP gibi metin agirlikli satirda saat duser; baslik tam okunur. */
  .term-row.note { grid-template-columns: var(--c-code) minmax(0, 1fr); }
  .term-row.note.logo { grid-template-columns: var(--c-ava) var(--c-code) minmax(0, 1fr); }
  .term-row.note > em:last-child { display: none; }
}
@container tile (max-width: 12.5rem) {
  .term-fix .term-search { display: none; }
  .term-fix .term-sort button:nth-of-type(n+3) { display: none; }
  .term-fon-ft span:nth-child(n+3) { display: none; }
  .term-hd em { display: none; }
}
/* Iki sutunluk kutu (~135 px): kart tek bir sayiya iner, uzun ad baslikta. */
@container tile (max-width: 11rem) {
  .term-row,
  .term-head,
  .term-list {
    --c-code: minmax(2.2rem, 2.8rem);
    --c-num: minmax(1.8rem, 3.4rem);
    --c-ava: 1.1rem;
  }
  .term-fon1 {
    gap: 0;
    justify-content: center;
  }
  .term-fon1 .term-fon-who,
  .term-fon1 .term-fon-cov,
  .term-fon1 .term-fon-drv,
  .term-fon1 .term-fon-ft,
  .term-fon1 .term-fon-note,
  .term-fon1 .term-fon-chips { display: none; }
  .term-hd-tools [data-max] { display: none; }
  .term-fon-hero {
    flex: 1 1 auto;
    display: grid;
    place-content: center;
    min-height: 0;
    padding: .4rem .35rem;
    text-align: center;
  }
  .term-fon-hero em,
  .term-fon-hero strong,
  .term-fon-hero > span { justify-self: center; }
  .term-fon-hero strong { font-size: clamp(1.05rem, 16cqi, 1.65rem); }
  .term-fon-hero > span {
    grid-template-columns: minmax(0, 1fr);
    margin-top: .06rem;
    justify-items: center;
  }
  .term-fon-hero > span i:first-child { display: none; }
  .term-fon-hero em { letter-spacing: .02em; }
  .term-desk-kpis { grid-template-columns: minmax(0, 1fr); }
  .term-cards { grid-template-columns: minmax(0, 1fr); }
  /* Sekme ve siralama seridi ucer satira yayiliyordu; yer listeye kalir.
     Ikisi de dişliden ve panel ayarlarindan yonetilebiliyor. */
  .term-fix .term-sort,
  .term-fix .term-tabs,
  .term-fix .term-hint { display: none; }
  /* Ikinci sayi sutunu (7g) cikar; gunluk deger kalir. */
  .term-head.gold,
  .term-row.gold { grid-template-columns: minmax(0, 1fr) minmax(2.2rem, 3.4rem); }
  .term-head.gold.logo,
  .term-row.gold.logo { grid-template-columns: var(--c-ava) minmax(0, 1fr) minmax(2.2rem, 3.4rem); }
  .term-head.gold > :last-child,
  .term-row.gold > :last-child { display: none; }
  .term-list .term-sub,
  .term-head.list .term-h-sub { display: none; }
  .term-list.duo:has(.term-sub),
  .term-head.list.duo:has(.term-h-sub) { grid-template-columns: var(--c-ava) minmax(0, 1fr) var(--c-num); }
  .term-list.duo.nologo:has(.term-sub),
  .term-head.list.duo.nologo:has(.term-h-sub) { grid-template-columns: minmax(0, 1fr) var(--c-num); }
  .term-mover { grid-template-columns: minmax(0, 1fr) auto; }
  .term-mover-bar { display: none; }
}
/* Kisa kutu: once ikincil satirlar, sonra sepet ve dip serit duser. */
@container tile (max-height: 17rem) {
  .term-ozet .term-stat p { display: none; }
  .term-ozet .term-hint { display: none; }
}
@container tile (max-height: 13rem) {
  .term-ozet .term-breadth { display: none; }
  .term-ozet .term-session .next { display: none; }
}
@container tile (max-width: 9rem) {
  .term-fon-hero > span { display: none; }
  /* Listede logo yerini koda birakir; baslik ayni ızgarada kalir. */
  .term-list.logo,
  .term-head.list.logo { grid-template-columns: minmax(0, 1fr) var(--c-num); }
  .term-list.duo.logo,
  .term-head.list.duo.logo { grid-template-columns: minmax(0, 1fr) var(--c-num) var(--c-num); }
  .term-list.duo.logo:has(.term-sub),
  .term-head.list.duo.logo:has(.term-h-sub) { grid-template-columns: minmax(0, 1fr) var(--c-num); }
  .term-list .term-ava,
  .term-head.list.logo > span:first-child { display: none; }
  /* Baslikta yer kalmayinca "sayfaya git" duser; dişli ve kapat kalir. */
  .term-hd-tools a { display: none; }
}

/* Dar ekranda kutu yuksekligi icerikten gelir: olcum kabi kapanir, yoksa
   `container-type: size` ic kutulari sifir yukseklige dusurur. */
@media (max-width: 980px) {
  .term-desk-kpi,
  .term-ozet .term-stat,
  .term-fon1 .term-fon-drv { container-type: normal; }
  .term-fon1 .term-fon-drv { flex: 0 0 auto; }
}
