/* AI model lines (templates/partials/ai_models.html) - /ai ranking, /ai per-stock list, stock page AI box.
   2026-11-28: one line per MODEL. Bold = model name, small = company. Phone first (W < 600); the PC rules at the
   bottom only keep the arrangement the pages already had. No text under 14px. */
[data-aim] [hidden]{display:none !important}

/* company chips: 전체 / 회사들 */
.aim-chips{display:flex;gap:6px;margin:0 0 10px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.aim-chips::-webkit-scrollbar{display:none}
.aim-chip{flex:none;min-height:40px;padding:0 14px;border:1px solid var(--m-border,#DFE3E8);border-radius:4px;background:var(--m-surface,#fff);
  font:inherit;font-size:15px;font-weight:600;color:var(--m-sub,#5B6470);cursor:pointer;white-space:nowrap}
.aim-chip.on{border-color:var(--ink,#16181D);background:var(--ink,#16181D);color:#fff}

/* list: one model per line. grid = rank | logo | text | numbers(right, end aligned) */
.aim-list{list-style:none;margin:0;padding:0;background:var(--m-surface,#fff)}
.aim-list>li{display:grid;grid-template-columns:22px 36px minmax(0,1fr) auto;column-gap:10px;row-gap:2px;align-items:start;padding:12px 0}
.aim-list>li+li{border-top:1px solid var(--m-divider,#EEF0F3)}
.aim-list.norank>li{grid-template-columns:36px minmax(0,1fr) auto}
.aim-n{grid-row:1;align-self:center;text-align:center;font-size:17px;font-weight:700;color:var(--m-sub,#5B6470);font-variant-numeric:tabular-nums}
.aim-n.hot{color:var(--up,#E0474C)}
.aim-logo{grid-row:1;align-self:center;width:36px;height:36px;border-radius:4px;display:grid;place-items:center;font-weight:800;font-size:17px;color:#fff;background:var(--ink,#16181D)}
.aim-logo.img{background:#fff;border:1px solid var(--m-divider,#EEF0F3)}
.aim-logo.img img{display:block;width:26px;height:26px;object-fit:contain}
.aim-logo[data-c="openai"]{background:#10A37F}.aim-logo[data-c="anthropic"]{background:#D97757}.aim-logo[data-c="google"]{background:#4285F4}
.aim-logo[data-c="xai"]{background:#111}.aim-logo[data-c="deepseek"]{background:#4D6BFE}.aim-logo[data-c="alibaba"]{background:#615CED}
.aim-logo[data-c="moonshotai"]{background:#2B2B2B}
.aim-t{grid-row:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.aim-name{font-size:17px;font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aim-co,.aim-ln,.aim-sub{font-size:14px;line-height:1.45;color:var(--m-sub,#5B6470);font-weight:400}
.aim-co{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aim-off{font-style:normal;font-weight:600;color:var(--text,#16181D)}
/* calculation models (owner 2026-11-30): their own group, the mark "계산 모델" by the name, one line for the 50% (random) level */
.aim-tag{font-style:normal;font-weight:600;color:var(--text,#16181D)}
.aim-logo-calc{background:var(--subtle,#F0F2F5);color:var(--text,#16181D)}
.aim-list>li.aim-base{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:14px;font-weight:600;color:var(--m-sub,#5B6470)}
.aim-list>li.aim-base::before,.aim-list>li.aim-base::after{content:"";flex:1 1 0;height:0;border-top:1px dashed var(--m-border,#DFE3E8)}
.aim-list>li.aim-base span{flex:0 0 auto}
.aim-calc{margin-bottom:24px}
.ai-th-tag{display:block;font-size:14px;font-weight:500;color:var(--m-sub,#5B6470)}
.ai-paused{margin:12px 0 0;font-size:15px;line-height:1.6;color:var(--m-sub,#5B6470)}
.ai-paused b{margin-right:8px;font-weight:700;color:var(--text,#16181D)}
.aim-u{white-space:nowrap}                      /* a word and its number never split */
.aim-ln{display:block}
.aim-ln.wide{grid-column:3 / -1}                /* second row: under the text AND the numbers (room for one line) */
.aim-list.norank .aim-ln.wide{grid-column:2 / -1}
.aim-r{grid-row:1;display:flex;flex-direction:column;align-items:flex-end;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.aim-v{font-size:18px;font-weight:700;line-height:1.3}
.aim-v.hot{color:var(--up,#E0474C)}
.aim-v.wait{font-size:15px;font-weight:600;color:var(--m-sub,#5B6470)}
.aim-v.na{font-weight:400;color:var(--m-sub,#5B6470)}
.aim-up{color:var(--up,#E0474C)}.aim-down{color:var(--down,#3870D8)}.aim-flat{color:var(--m-sub,#5B6470)}
.aim-bar{display:none}

/* arrow: show the lines after the 10th */
.aim-more{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0;padding:0;border:0;border-top:1px solid var(--m-divider,#EEF0F3);
  background:var(--m-surface,#fff);color:var(--text,#16181D);cursor:pointer}
.aim-more.open svg{transform:rotate(180deg)}

/* /ai per-stock part: stock chips + one stock's model lines (phone); the PC keeps its table */
.aim-stock-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 0 10px;border-bottom:1px solid var(--m-divider,#EEF0F3);color:inherit;text-decoration:none}
.aim-stock-h b{font-size:17px;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aim-stock-h span{font-size:14px;color:var(--m-sub,#5B6470);white-space:nowrap;font-variant-numeric:tabular-nums}
.aim-box{background:var(--m-surface,#fff);padding:0 12px}       /* the only side padding of a phone list */
.aim-pc{display:none}
.aim-empty{margin:0;padding:20px 0;color:var(--m-sub,#5B6470);font-size:15px}

/* stock page box: the box already has its side padding -> the list adds none */
.es-box .aim-list,.es-box .aim-more{background:transparent}

@media (min-width:600px){
  /* PC: same arrangement as before (rank, logo, name, bar, number at the right end; first place tinted) */
  .aim-phone{display:none}
  .aim-pc{display:block}
  .aim-box{padding:4px 12px;border:1px solid var(--m-border,#DFE3E8);border-radius:4px}
  .aim-list>li{grid-template-columns:28px 36px minmax(0,1fr) 120px minmax(96px,auto);column-gap:12px;align-items:center}
  .aim-list.norank>li{grid-template-columns:36px minmax(0,1fr) minmax(96px,auto)}
  .aim-rank>li.top{background:var(--gold-soft,#FAF1DF);margin:0 -12px;padding:12px}
  .aim-rank .aim-bar{display:block;grid-row:1;height:8px;border-radius:2px;background:var(--subtle,#F0F2F5);overflow:hidden}
  .aim-rank .aim-bar i{display:block;height:100%;background:var(--ink,#16181D)}
  .aim-rank>li.top .aim-bar i{background:var(--up,#E0474C)}
  .aim-ln.wide{grid-column:3 / 4}
  .es-box .aim-list>li{grid-template-columns:22px 36px minmax(0,1fr) auto;column-gap:10px}
  .es-box .aim-ln.wide{grid-column:3 / -1}
}

/* long model names wrap at a space instead of being cut ("DeepSeek V4 Pro 0813") */
.aim-name{white-space:normal;overflow:visible;overflow-wrap:break-word}
@media (max-width:599px){
  .aim-chipw{padding:0 12px}                    /* chips start on the same line as the list text */
  .aim-chipw .aim-chips,.aim-chips.aim-chipw{margin-bottom:10px}
}
@media (max-width:599px){[data-aim] .al-h small{font-size:14px}}
/* phone /ai: the page already keeps 16px at both sides -> the white boxes go edge to edge and everything (title,
   chips, lines, numbers) sits on that one 16px line. No second layer of side padding. */
@media (max-width:599px){
  .al-grid[data-aim] .aim-box{margin:0 -16px;padding:0 16px}
  .al-grid[data-aim] .aim-chipw,.al-grid[data-aim] .al-main>.al-h{padding-left:0;padding-right:0}
}

/* 2026-11-29 (owner): switched-off models = one "예측 중단" group at the end of the ranking, folded; the header row
   opens it (44px tall, same line as the list). Lines inside keep the ranking line shape, rank column shows "–". */
.aim-group{border-top:1px solid var(--m-divider,#EEF0F3)}
.aim-gh{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:0;padding:0;border:0;
  background:var(--m-surface,#fff);font:inherit;font-size:15px;font-weight:600;color:var(--m-sub,#5B6470);cursor:pointer;text-align:left}
.aim-gh b{font-weight:700;color:var(--text,#16181D)}
.aim-gh svg{flex:none;color:var(--text,#16181D)}
.aim-gh.open svg{transform:rotate(180deg)}
.aim-group .aim-list>li:first-child{border-top:1px solid var(--m-divider,#EEF0F3)}
.es-box .aim-gh{background:transparent}
